Skip to content

Commit

Permalink
introduced extra volumes (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
guneriu authored Jul 30, 2024
1 parent 09cfab4 commit 360587a
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions yilu-common/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
Environment Secrets introduced, refer to [Using Environment Secrets](README.md#using-environment-secrets)
Introduced Static secret data transformation [Secret Data Transformation](https://developer.hashicorp.com/vault/docs/platform/k8s/vso/secret-transformation)
Extra Volume Mounts introduced, refer to [Extra Volume Mounts](README.md#extra-volume-mounts)
Extra Volumes introduced, refer to [Extra Volumes](README.md#extra-volumes)
### Bug Fixes

### Other Changes
Expand Down
12 changes: 12 additions & 0 deletions yilu-common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,11 @@ yilu-common:
extraVolumeMounts:
- name: payment-secrets
mountPath: /etc/secrets
extraVolumes:
- name: payment-secrets
secret:
secretName: payment-secrets
extraEnv:
- name: SPRING_CONFIG_ADDITIONAL-LOCATION
Expand Down Expand Up @@ -583,3 +588,10 @@ New Config, please don't use `version` parameter, unless you really intend to us
| `name` | The name of the environment variable | `""` |
| `mountPath` | The name of the kubernetes secret name | `""` |

### Extra Volumes

| Name | Description | Value |
|--------|-----------------------------------------------------------------------------------------------------------------------------------------|-------|
| `name` | The name of the extra volume | `""` |
| 'body' | either empty dir, or generate from secret or configmap, [please refer here](https://kubernetes.io/docs/concepts/configuration/secret/) | `""` |

3 changes: 3 additions & 0 deletions yilu-common/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ spec:
secret:
secretName: {{ .Values.secrets.name }}
{{- end }}
{{- if .Values.extraVolumes }}
{{- toYaml .Values.extraVolumes | nindent 6 }}
{{- end }}
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand Down
5 changes: 5 additions & 0 deletions yilu-common/values-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ extraVolumeMounts:
- name: booking-secrets
mountPath: /etc/secrets

extraVolumes:
- name: booking-secrets
secret:
secretName: booking-secrets

extraEnv:
- name: SPRING_CONFIG_ADDITIONAL-LOCATION
value: file:/etc/secrets/
10 changes: 10 additions & 0 deletions yilu-common/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@ extraVolumeMounts: []
# - name: some-volume-name
# mountPath: /path/in/container

# -- Optionally specify additional volumes for the pod.
# Check values.yaml for examples.
extraVolumes:
# - name: ejson-keys
# secret:
# secretName: ejson-keys
# - name: some-volume-name
# emptyDir: {}


#
# labels: |
# app.kubernetes.io/component: microservice
Expand Down

0 comments on commit 360587a

Please sign in to comment.