Skip to content

Commit

Permalink
chore: use ecr as default registry and update svc accnt name (#185)
Browse files Browse the repository at this point in the history
* chore: use ecr as default registry and update svc accnt name

* chore: use image.globalRegsitry for postgres

* chore: address review comments
  • Loading branch information
yashmehrotra committed Jun 20, 2024
1 parent e5ec95c commit a2cc0ad
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 11 deletions.
4 changes: 2 additions & 2 deletions agent-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ spec:
labels:
{{- include "incident-commander.selectorLabels" . | nindent 8 }}
spec:
serviceAccountName: {{ include "incident-commander.name" . }}-sa
serviceAccountName: {{ .Values.serviceAccount.name }}
volumes:
- name: properties-config
configMap:
name: {{ include "incident-commander.name" . }}-properties-config
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
image: "{{ .Values.global.imageRegistry }}/{{.Values.global.imagePrefix}}/incident-commander:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: DB_URL
Expand Down
4 changes: 4 additions & 0 deletions agent-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ image:
global:
# -v, -vv, -vvv
logLevel: ""
imageRegistry: public.ecr.aws
imagePrefix: k4y9r6y5

logLevel: "{{.Values.global.logLevel}}"
jsonLogs: true
serviceAccount:
# Annotations to add to the service account
annotations: {}
name: mission-control-sa
rbac:
# Whether to create cluster-wide or namespaced roles
clusterRole: true
Expand Down
2 changes: 1 addition & 1 deletion chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ Generate the secrets.cipher value
{{- fail "Expected kratos.config.secrets.cipher to be a list of strings" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
4 changes: 2 additions & 2 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
labels:
{{- include "incident-commander.selectorLabels" . | nindent 8 }}
spec:
serviceAccountName: {{ include "incident-commander.name" . }}-sa
serviceAccountName: {{ .Values.serviceAccount.name }}
volumes:
- name: properties-config
configMap:
Expand All @@ -27,7 +27,7 @@ spec:
{{- end}}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
image: "{{ .Values.global.imageRegistry }}/{{.Values.global.imagePrefix}}/incident-commander:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if ne .Values.identityRoleMapper.configMap.name ""}}
volumeMounts:
Expand Down
4 changes: 2 additions & 2 deletions chart/templates/postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
- name: dshm
emptyDir:
medium: Memory
sizeLimit: "{{- .Values.db.shmVolume }}"
sizeLimit: "{{- .Values.db.shmVolume }}"
- name: conf
configMap:
name: postgresql-conf
Expand All @@ -41,7 +41,7 @@ spec:
mountPath: /dev/shm
containers:
- name: postgresql
image: docker.io/supabase/postgres:14.1.0.21
image: {{ tpl .Values.global.imageRegistry . }}/supabase/postgres:14.1.0.89
command:
- /usr/local/bin/docker-entrypoint.sh
- -D
Expand Down
2 changes: 1 addition & 1 deletion chart/templates/postgrest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
spec:
containers:
- name: postgrest
image: docker.io/postgrest/postgrest:{{ .Values.externalPostgrest.tag | default "v10.1.0" }}
image: {{ tpl .Values.global.imageRegistry . }}/{{.Values.externalPostgrest.imageName}}:{{ .Values.externalPostgrest.tag | default "v10.2.0" }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: PGRST_DB_URI
Expand Down
4 changes: 2 additions & 2 deletions chart/templates/rbac.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "incident-commander.name" . }}-sa
name: {{.Values.serviceAccount.name}}
labels:
{{- include "incident-commander.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
Expand Down Expand Up @@ -116,5 +116,5 @@ roleRef:
name: {{ include "incident-commander.name" . }}-role
subjects:
- kind: ServiceAccount
name: {{ include "incident-commander.name" . }}-sa
name: {{.Values.serviceAccount.name}}
namespace: {{ .Release.Namespace }}
9 changes: 8 additions & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ image:
global:
# -v, -vv, -vvv
logLevel: ""
imageRegistry: public.ecr.aws
imagePrefix: k4y9r6y5
ui:
host: "mission-control-ui.local"
tlsSecretName: "mission-control-ui-tls"
Expand All @@ -29,6 +31,7 @@ global:
image: bitnami/pgbouncer:1.22.0
serviceAccount:
# Annotations to add to the service account
name: mission-control-sa
annotations: {}
rbac:
# Whether to create cluster-wide or namespaced roles
Expand All @@ -46,7 +49,9 @@ serviceAccount:
extraArgs: {}
externalPostgrest:
enable: true
tag: v10.1.0
tag: v10.2.0
# supabase/postgrest if registry is ecr and postgrest/postgrest if registry is docker.io
imageName: supabase/postgrest
logLevel: info
dbScema: public
dbAnonRole: postgrest_anon
Expand Down Expand Up @@ -225,6 +230,8 @@ flanksource-ui:
# database URL in it.
kratos:
enabled: true
image:
repository: public.ecr.aws/k4y9r6y5/kratos
deployment:
extraArgs:
- --watch-courier
Expand Down

0 comments on commit a2cc0ad

Please sign in to comment.