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

YAF-5286 add extraVolumes #61

Merged
merged 1 commit into from
Jul 30, 2024
Merged
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
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-volume-mounts)
### 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