Skip to content

Commit

Permalink
resource-manager: improve approach to env (#35)
Browse files Browse the repository at this point in the history
To help with configuration.
  • Loading branch information
yoctozepto authored Nov 20, 2024
1 parent 13e93d2 commit bbd6edf
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 25 deletions.
2 changes: 1 addition & 1 deletion charts/nebulous-resource-manager/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.1
version: 0.2.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
12 changes: 6 additions & 6 deletions charts/nebulous-resource-manager/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
{{- range .Values.env }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- range $key, $val := .Values.env }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
ports:
- name: http
Expand All @@ -58,9 +58,9 @@ spec:
image: "docker.io/library/mongo:4.4.29"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
{{- range .Values.env }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- range $key, $val := .Values.mongodb.env }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
ports:
- name: mongo-port
Expand Down
32 changes: 14 additions & 18 deletions charts/nebulous-resource-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,22 +81,18 @@ tolerations: []

affinity: {}

mongodb:
env:
MONGO_INITDB_ROOT_USERNAME: "root"
MONGO_INITDB_ROOT_PASSWORD: "example"

env:
# ===== MongoDB configuration =====
- name: MONGO_INITDB_ROOT_USERNAME
value: 'root'
- name: MONGO_INITDB_ROOT_PASSWORD
value: 'example'
# ===== Resource Manager configuration =====
- name: SPRING_DATA_MONGODB_URI
value: 'mongodb://root:example@localhost:27017/admin'
- name: DISCOVERY_BROKER_USERNAME
value: 'aaa'
- name: DISCOVERY_BROKER_PASSWORD
value: '111'
- name: DISCOVERY_BROKERURL
value: 'tcp://nebulous-monitoring:61616?daemon=true&trace=false&useInactivityMonitor=false&connectionTimeout=0&keepAlive=true'
- name: DISCOVERY_API_KEY_AUTHENTICATION_ENABLED
value: 'true'
- name: DISCOVERY_API_KEY_VALUE
value: '1234567890'
SPRING_DATA_MONGODB_URI: "mongodb://root:example@localhost:27017/admin"
DISCOVERY_BROKER_USERNAME: "aaa"
DISCOVERY_BROKER_PASSWORD: "111"
DISCOVERY_BROKERURL: "tcp://nebulous-monitoring:61616?daemon=true&trace=false&useInactivityMonitor=false&connectionTimeout=0&keepAlive=true"
DISCOVERY_API_KEY_AUTHENTICATION_ENABLED: "true"
DISCOVERY_API_KEY_VALUE: "1234567890"
RM_ADMIN_PASSWD: "admin"
RM_USER_PASSWD: "user"
NEBULOUS_SERVER_IP_ADDRESS: "127.0.0.1"

0 comments on commit bbd6edf

Please sign in to comment.