Skip to content

Commit

Permalink
Small cleanup, fix indent on match labels (#14)
Browse files Browse the repository at this point in the history
* Small cleanup, fix indent on match labels

Signed-off-by: Sarah Funkhouser <11655165+sfunkhouser@users.noreply.github.com>
  • Loading branch information
sfunkhouser authored Sep 28, 2023
1 parent 1b79216 commit 8b6aba1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
13 changes: 7 additions & 6 deletions charts/governor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@ helm install governor-api equinixmetal/governor-api
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| api | object | `{"adminGroups":"governor-admins","db":{"connections":{"max_idle":20,"max_lifetime":0,"max_open":20},"secrets":{"crdbCrt":null,"enabled":false,"uri":null},"uri":{"existingSecret":"db-uri"}},"debug":false,"enabled":true,"image":{"pullPolicy":"IfNotPresent","repository":"ghcr.io/metal-toolbox/governor-api","tag":"243-dec3db14"},"ingress":{"host":"api.governor.example.com","prefix":"api.governor"},"labels":{"app.kubernetes.io/component":"api","app.kubernetes.io/instance":"governor","app.kubernetes.io/managed-by":"Helm","app.kubernetes.io/name":"governor"},"matchLabels":{"app.kubernetes.io/component":"api","app.kubernetes.io/instance":"governor","app.kubernetes.io/name":"governor"},"nats":{"credsPath":"/nats","secrets":{"clientCreds":null,"enabled":false},"subjectPrefix":"governor.events","url":null},"oidc":[{"audience":"","enabled":true,"issuer":"","jwksuri":"","rolesClaim":"","userClaim":""}],"readinessProbe":{"failureThreshold":3,"periodSeconds":20,"successThreshold":1,"timeoutSeconds":3},"replicaCount":2,"resources":{"limits":{"cpu":"500m","memory":"1Gi"},"requests":{"cpu":"100m","memory":"128Mi"}},"tracing":{"enabled":true,"secrets":{"enabled":false,"honeycombKey":null}}}` | governor-api settings |
| api | object | `{"adminGroups":"governor-admins","db":{"connections":{"max_idle":20,"max_lifetime":0,"max_open":20},"secrets":{"crdbCrt":null,"enabled":false,"uri":null},"uri":{"existingSecret":"db-uri"}},"debug":false,"enabled":true,"image":{"pullPolicy":"IfNotPresent","repository":"ghcr.io/metal-toolbox/governor-api","tag":"428-3090bc42"},"ingress":{"host":"api.governor.example.com","prefix":"api.governor"},"labels":{"app.kubernetes.io/component":"api","app.kubernetes.io/instance":"governor","app.kubernetes.io/managed-by":"Helm","app.kubernetes.io/name":"governor"},"matchLabels":{"app.kubernetes.io/instance":"governor","app.kubernetes.io/name":"governor"},"nats":{"credsPath":"/nats","secrets":{"clientCreds":null,"enabled":false},"subjectPrefix":"governor.events","url":null},"oidc":[{"audience":"","enabled":true,"issuer":"","jwksuri":"","rolesClaim":"","userClaim":""}],"readinessProbe":{"failureThreshold":3,"periodSeconds":20,"successThreshold":1,"timeoutSeconds":3},"replicaCount":2,"resources":{"limits":{"cpu":"500m","memory":"1Gi"},"requests":{"cpu":"100m","memory":"128Mi"}},"tracing":{"enabled":true,"secrets":{"enabled":false,"honeycombKey":null}}}` | governor-api settings |
| api.adminGroups | string | `"governor-admins"` | admin group for highest level permissions in the governor-api |
| api.db | object | `{"connections":{"max_idle":20,"max_lifetime":0,"max_open":20},"secrets":{"crdbCrt":null,"enabled":false,"uri":null},"uri":{"existingSecret":"db-uri"}}` | settings for the backend db |
| api.db.secrets | object | `{"crdbCrt":null,"enabled":false,"uri":null}` | db secrets, set to `true` if you want to set the value directly in the chart (not recommended) |
| api.debug | bool | `false` | set to true to turn on debug logging |
| api.enabled | bool | `true` | enable the governor-api components |
| api.image | object | `{"pullPolicy":"IfNotPresent","repository":"ghcr.io/metal-toolbox/governor-api","tag":"243-dec3db14"}` | image for the governor-api |
| api.image | object | `{"pullPolicy":"IfNotPresent","repository":"ghcr.io/metal-toolbox/governor-api","tag":"428-3090bc42"}` | image for the governor-api |
| api.image.pullPolicy | string | `"IfNotPresent"` | image pull policy for the governor-api container |
| api.image.repository | string | `"ghcr.io/metal-toolbox/governor-api"` | container image repository for the governor-api image |
| api.image.tag | string | `"243-dec3db14"` | image tag version |
| api.image.tag | string | `"428-3090bc42"` | image tag version |
| api.ingress | object | `{"host":"api.governor.example.com","prefix":"api.governor"}` | ingress settings for the governor-api |
| api.ingress.host | string | `"api.governor.example.com"` | host definition for the api ingress |
| api.ingress.prefix | string | `"api.governor"` | prefix use for the governor api ingress |
| api.labels | object | `{"app.kubernetes.io/component":"api","app.kubernetes.io/instance":"governor","app.kubernetes.io/managed-by":"Helm","app.kubernetes.io/name":"governor"}` | set of additional labels for the application |
| api.matchLabels | object | `{"app.kubernetes.io/component":"api","app.kubernetes.io/instance":"governor","app.kubernetes.io/name":"governor"}` | set of additional match labels for the application |
| api.matchLabels | object | `{"app.kubernetes.io/instance":"governor","app.kubernetes.io/name":"governor"}` | set of additional match labels for the application |
| api.nats | object | `{"credsPath":"/nats","secrets":{"clientCreds":null,"enabled":false},"subjectPrefix":"governor.events","url":null}` | nats settings for the governor-api |
| api.nats.credsPath | string | `"/nats"` | mount path for the nats creds file |
| api.nats.secrets | object | `{"clientCreds":null,"enabled":false}` | nats secrets definitions |
Expand All @@ -67,9 +67,9 @@ helm install governor-api equinixmetal/governor-api
| api.resources | object | `{"limits":{"cpu":"500m","memory":"1Gi"},"requests":{"cpu":"100m","memory":"128Mi"}}` | resource settings for the governor-api |
| api.tracing | object | `{"enabled":true,"secrets":{"enabled":false,"honeycombKey":null}}` | tracing settings |
| api.tracing.secrets | object | `{"enabled":false,"honeycombKey":null}` | tracing secrets, set to `true` if you want to set the value directly in the chart (not recommended) |
| audit | object | `{"auditImage":{"pullPolicy":"IfNotPresent","repository":"ghcr.io/metal-toolbox/audittail","tag":"v0.7.0"},"enabled":true,"initContainer":{"resources":{"limits":{"cpu":"100m","memory":"20Mi"},"requests":{"cpu":"100m","memory":"20Mi"}}},"resources":{"limits":{"cpu":"500m","memory":"1Gi"},"requests":{"cpu":"100m","memory":"128Mi"}},"securityContext":{"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsNonRoot":true,"runAsUser":1000}}` | audit sidecar settings |
| audit | object | `{"auditImage":{"pullPolicy":"IfNotPresent","repository":"ghcr.io/metal-toolbox/audittail","tag":"v0.8.0"},"enabled":true,"initContainer":{"resources":{"limits":{"cpu":"100m","memory":"20Mi"},"requests":{"cpu":"100m","memory":"20Mi"}}},"resources":{"limits":{"cpu":"500m","memory":"1Gi"},"requests":{"cpu":"100m","memory":"128Mi"}},"securityContext":{"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsNonRoot":true,"runAsUser":1000}}` | audit sidecar settings |
| k8s-otel-collector | object | `{"include_otel_attributes":false}` | settings for the otel collector sub-chart ref https://github.com/equinixmetal-helm/k8s-otel-collector |
| slackAddon | object | `{"api":{"audience":"https://api.governor.example.com","clientId":"gov-slack-addon-governor","url":"https://api.governor.example.com"},"autoscaling":{"enabled":false},"debug":false,"dryrun":false,"enabled":true,"hydra":{"url":"https://hydra.example.com/oauth2/token"},"image":{"pullPolicy":"IfNotPresent","repository":"ghcr.io/metal-toolbox/governor-slack-addon","tag":"46-c41b0158"},"labels":{"app.kubernetes.io/instance":"gov-slack-addon","app.kubernetes.io/managed-by":"Helm","app.kubernetes.io/name":"gov-slack-addon"},"matchLabels":{"app.kubernetes.io/instance":"gov-slack-addon","app.kubernetes.io/name":"gov-slack-addon"},"nats":{"credsPath":"/nats","subjectPrefix":"governor.events","url":"tls://nats.governor.example.com:4222,"},"nodeSelector":null,"pretty":false,"reconciler":{"interval":"1h","locking":true},"replicas":1,"resources":{"limits":{"cpu":"500m","memory":"500Mi"},"requests":{"cpu":"250m","memory":"500Mi"}},"securityContext":{"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsNonRoot":true,"runAsUser":1000},"service":{"port":80},"tolerations":null}` | slack-addon settings |
| slackAddon | object | `{"api":{"audience":"https://api.governor.example.com","clientId":"gov-slack-addon-governor","url":"https://api.governor.example.com"},"autoscaling":{"enabled":false},"debug":false,"dryrun":false,"enabled":true,"hydra":{"url":"https://hydra.example.com/oauth2/token"},"image":{"pullPolicy":"IfNotPresent","repository":"ghcr.io/metal-toolbox/governor-slack-addon","tag":"46-c41b0158"},"labels":{"app.kubernetes.io/instance":"gov-slack-addon","app.kubernetes.io/managed-by":"Helm","app.kubernetes.io/name":"gov-slack-addon"},"matchLabels":{"app.kubernetes.io/instance":"gov-slack-addon","app.kubernetes.io/name":"gov-slack-addon"},"nats":{"credsPath":"/nats","subjectPrefix":"governor.events","url":"tls://nats.governor.example.com:4222,"},"nodeSelector":null,"ports":[{"containerPort":8000,"name":"http"}],"pretty":false,"reconciler":{"interval":"1h","locking":true},"replicas":1,"resources":{"limits":{"cpu":"500m","memory":"500Mi"},"requests":{"cpu":"250m","memory":"500Mi"}},"securityContext":{"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsNonRoot":true,"runAsUser":1000},"service":{"port":80},"tolerations":null}` | slack-addon settings |
| slackAddon.api | object | `{"audience":"https://api.governor.example.com","clientId":"gov-slack-addon-governor","url":"https://api.governor.example.com"}` | governor-api settings to retrieve required information by the slack addon |
| slackAddon.debug | bool | `false` | set to true to turn on debug logging |
| slackAddon.dryrun | bool | `false` | dryrun on the reconcile loop |
Expand All @@ -79,6 +79,7 @@ helm install governor-api equinixmetal/governor-api
| slackAddon.labels | object | `{"app.kubernetes.io/instance":"gov-slack-addon","app.kubernetes.io/managed-by":"Helm","app.kubernetes.io/name":"gov-slack-addon"}` | set of labels for the application |
| slackAddon.matchLabels | object | `{"app.kubernetes.io/instance":"gov-slack-addon","app.kubernetes.io/name":"gov-slack-addon"}` | set of match labels for the application |
| slackAddon.nats | object | `{"credsPath":"/nats","subjectPrefix":"governor.events","url":"tls://nats.governor.example.com:4222,"}` | nats setup for the slack addon |
| slackAddon.ports | list | `[{"containerPort":8000,"name":"http"}]` | ports for the slack addon container |
| slackAddon.pretty | bool | `false` | set to true for human readable logging |
| slackAddon.resources | dict | `{"limits":{"cpu":"500m","memory":"500Mi"},"requests":{"cpu":"250m","memory":"500Mi"}}` | resource limits & requests ref: https://kubernetes.io/docs/user-guide/compute-resources/ |
| slackAddon.securityContext | object | `{"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsNonRoot":true,"runAsUser":1000}` | Security context to be added to the deployment |
Expand Down
2 changes: 1 addition & 1 deletion charts/governor/templates/api-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
selector:
matchLabels:
{{- with .Values.api.matchLabels }}
{{- toYaml . | nindent 4 }}
{{- toYaml . | nindent 6 }}
{{- end }}
template:
metadata:
Expand Down
9 changes: 5 additions & 4 deletions charts/governor/templates/slack-addon-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ kind: ConfigMap
metadata:
name: gov-slack-addon-config
labels:
{{- with .Values.slackAddon.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
{{- with .Values.slackAddon.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
data:
GSA_DRYRUN: "{{ .Values.slackAddon.dryrun }}"
GSA_LOGGING_DEBUG: "{{ .Values.slackAddon.debug }}"
Expand All @@ -17,7 +18,7 @@ data:
GSA_GOVERNOR_URL: "{{ .Values.slackAddon.api.url }}"
GSA_GOVERNOR_TOKEN_URL: "{{ .Values.slackAddon.hydra.url }}"
GSA_NATS_URL: "{{ .Values.slackAddon.nats.url }}"
GSA_NATS_CREDS_FILE: "{{ .Values.slackAddon.nats.credsPath }}/{{ template "common.names.fullname" . }}-nats-client-creds"
GSA_NATS_CREDS_FILE: "{{ .Values.slackAddon.nats.credsPath }}/gov-slack-addon-nats-client-creds"
GSA_RECONCILER_INTERVAL: "{{ .Values.slackAddon.reconciler.interval }}"
GSA_RECONCILER_LOCKING: "{{ .Values.slackAddon.reconciler.locking }}"
{{- end }}
10 changes: 7 additions & 3 deletions charts/governor/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ api:
matchLabels:
app.kubernetes.io/instance: governor
app.kubernetes.io/name: governor
app.kubernetes.io/component: api

# -- set to true to turn on debug logging
debug: false
Expand All @@ -24,7 +23,7 @@ api:
# -- container image repository for the governor-api image
repository: ghcr.io/metal-toolbox/governor-api
# -- image tag version
tag: 243-dec3db14
tag: 428-3090bc42
# -- image pull policy for the governor-api container
pullPolicy: IfNotPresent

Expand Down Expand Up @@ -111,6 +110,11 @@ slackAddon:
# -- set to false to disable this addon completely
enabled: true

# -- ports for the slack addon container
ports:
- name: http
containerPort: 8000

# -- set of labels for the application
labels:
app.kubernetes.io/instance: gov-slack-addon
Expand Down Expand Up @@ -193,7 +197,7 @@ audit:
enabled: true
auditImage:
repository: ghcr.io/metal-toolbox/audittail
tag: v0.7.0
tag: v0.8.0
pullPolicy: IfNotPresent
resources:
limits:
Expand Down

0 comments on commit 8b6aba1

Please sign in to comment.