Slackbot
06/10/2022, 1:29 PMMathieu Frenette
06/10/2022, 1:58 PMMathieu Frenette
06/10/2022, 1:59 PMDeployment resource is only optional, and can be turned on with the deployment.enabled value:
https://github.com/cloudposse/charts/blob/master/incubator/monochart/templates/deployment.yaml#L1Mathieu Frenette
06/10/2022, 1:59 PMif sections, but also ranges. For example, you can define as many config maps as you need, with a section like this in your yaml values:
configMaps:
my-first-config-map:
key1: value1
key2: value2
my-second-config-map:
key1: value1
key2: value2
And that will generate multiple config maps with those keys/values using a range:
https://github.com/cloudposse/charts/blob/master/incubator/monochart/templates/configmap.yaml#L2Mathieu Frenette
06/10/2022, 2:22 PMsecrets:
my-secrets:
enabled: true
env:
ENV_VAR1: my secret 1
ENV_VAR2: my secret 2
and that will both create the “my-secret” Secret resource here and make it’s content available as env vars in all payloads via a secretRef here.Mathieu Frenette
06/10/2022, 2:23 PMMathieu Frenette
06/10/2022, 2:25 PMMathieu Frenette
06/10/2022, 2:28 PMSecret resource, but rather a <http://bitnami.com/v1alpha1/SealedSecret|bitnami.com/v1alpha1/SealedSecret> resource, which gets picked-up by the sealed-secrets controller at run-time, which in turn produces the regular Secret. But we can pull the same trick of pre-wiring those secrets to all our payloads.Mathieu Frenette
06/10/2022, 2:34 PMapi (our typical Go microservice)
• frontend (our typical React front-end app)
• gateway (our typical API Gateway written in Go with krakend)Mathieu Frenette
06/10/2022, 2:36 PMapi module can be turned on and configured in the yaml values like so:
api:
enabled: true
database: true
deployment:
labels:
my-label: "label"
annotations:
my-annotation: ...
replicas: 2
strategy:
type: RollingUpdate
container:
command:
- ...
args:
- ...
port: 3000
...Mathieu Frenette
06/10/2022, 2:38 PMapi.enabled controls whether the api module is included or not and the api.database feature flag controls whether that api microservice needs an associated database.Mathieu Frenette
06/10/2022, 2:40 PMenv:
{{- if .Values.api.database }}
- name: DB_NAME
value: {{ $name }}
- name: DB_USER
valueFrom:
secretKeyRef:
key: username
name: {{ $name }}-db-credentials
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
key: password
name: {{ $name }}-db-credentials
{{- end }}