Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance configuration options #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions templates/netmaker-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,14 @@ spec:
- name: SQL_USER
value: {{ index .Values "postgresql-ha" "postgresql" "username" }}
- name: SQL_PASS
{{- if index .Values "postgresql-ha" "postgresql" "existingSecret" }}
valueFrom:
secretKeyRef:
name: {{ index .Values "postgresql-ha" "postgresql" "existingSecret" }}
key: password
{{- else }}
value: {{ index .Values "postgresql-ha" "postgresql" "password" }}
{{- end }}
- name: DATABASE
value: postgres
- name: DISPLAY_KEYS
Expand All @@ -93,11 +100,32 @@ spec:
- name: MQ_SERVER_PORT
value: "1883"
- name: MQ_ADMIN_PASSWORD
{{- if or (index .Values "mq" "existingSecretName") (index .Values "mq" "existingSecretKey") }}
valueFrom:
secretKeyRef:
name: {{ index .Values "mq" "existingSecretName" }}
key: {{ index .Values "mq" "existingSecretKey" }}
{{- else }}
value: {{ .Values.mq.password }}
{{- end }}
- name: PLATFORM
value: "Kubernetes"
- name: VERBOSITY
value: "3"
{{- if .Values.extraEnv }}
{{- tpl (.Values.extraEnv | toYaml) . | nindent 8 }}
{{- end }}
{{- if or .Values.extraEnvCM .Values.extraEnvSecret }}
envFrom:
{{- if .Values.extraEnvCM }}
- configMapRef:
name: {{ .Values.extraEnvCM }}
{{- end }}
{{- if .Values.extraEnvSecret }}
- secretRef:
name: {{ .Values.extraEnvSecret }}
{{- end }}
{{- end }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: {{ include "netmaker.fullname" . }}
Expand Down
20 changes: 18 additions & 2 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ podAnnotations: {}
podSecurityContext: {}
# fsGroup: 2000

# -- extra environment variables from a config map
# extraEnvCM: "configmap-name"
# -- extra environment variables from a secret
# extraEnvSecret: "secret-name"
## -- extra environment variables, passed through helm tpl
# extraEnv:
# - name: TEST_VARIABLE
# value: "TEST_VALUE"

ui:
# -- how many UI replicas to create
replicas: 2
Expand All @@ -44,6 +53,10 @@ mq:
singlenode: false
storageSize: 128Mi
password: 3yyerWGdds43yegGR
# -- specify a secret containing the mq password
# existingSecretName: ""
# -- key in the existing secret that contains the password for mq
# existingSecretKey: ""
RWX:
storageClassName: ""

Expand Down Expand Up @@ -121,10 +134,13 @@ postgresql-ha:
username: netmaker
# -- postgres pass to generate
password: netmaker
# -- postgress db to generate
# -- postgres db to generate
database: netmaker
# -- postgress number of replicas to deploy
# -- postgres number of replicas to deploy
replicaCount: 2
# -- postgres use existing secret for passwords
# -- secret must contain values for keys postgres-password, password and repmgr-password
# existingSecret: ""
persistence:
# -- size of postgres DB
size: 1Gi