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

fix: env vars from secrets and configmap + values.schema update #21

Merged
merged 1 commit into from
Nov 22, 2023
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
32 changes: 32 additions & 0 deletions test/unit/deployment_registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,35 @@ tests:
- equal:
path: spec.template.spec.initContainers[0].env[0].value
value: VALUE
- it: plain extra env
set:
registry:
extraEnv:
- name: ENV_VAR
value: VALUE
asserts:
- equal:
path: spec.template.spec.containers[0].env[3].name
value: ENV_VAR
- equal:
path: spec.template.spec.containers[0].env[3].value
value: VALUE
- it: extra env from secret
set:
registry:
extraEnv:
- name: FOO
valueFrom:
secretKeyRef:
name: bar
key: baz
asserts:
- equal:
path: spec.template.spec.containers[0].env[3].name
value: FOO
- equal:
path: spec.template.spec.containers[0].env[3].valueFrom.secretKeyRef.name
value: bar
- equal:
path: spec.template.spec.containers[0].env[3].valueFrom.secretKeyRef.key
value: baz
34 changes: 18 additions & 16 deletions values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,6 @@
}
}
},
"keyValue": {
"type": "object", "additionalProperties": false,
"required": ["name", "value"],
"properties": {
"name": { "type": "string"},
"value": {"type": "string"}
}
},
"initContainers": {
"type": "array", "default": []
},
Expand Down Expand Up @@ -89,14 +81,24 @@
"enabled": {"$ref": "#/definitions/isEnabled"},
"image": {"$ref": "#/definitions/dockerImage"},
"nodeSelector": {"type": "object", "title": "node selector for registry"},
"initContainers": {"$ref": "#/definitions/initContainers"},
"initContainers": {"$ref": "#/definitions/initContainers", "title": "init containers for registry"},
"extraEnv": {
"type": "array", "default": [],
"items": {"$ref": "#/definitions/keyValue"}
"type": "array",
"title": "extra environment variables for registry",
"default": [],
"items": {
"type": "object",
"required": ["name"],
"properties": {
"name": {
"type": "string"
}
}
}
},
"resources": {"$ref": "#/definitions/podResources"},
"extraVolumeMounts": {"$ref": "#/definitions/volumeMounts"},
"extraVolumes": {"$ref": "#/definitions/volumes"},
"extraVolumeMounts": {"$ref": "#/definitions/volumeMounts", "title": "extra volume mounts for registry"},
"extraVolumes": {"$ref": "#/definitions/volumes", "title": "extra volumes for registry"},
"kafka": {"$ref": "#/definitions/persistence/kafka"},
"sql": {"$ref": "#/definitions/persistence/sql"},
"ingress": {"$ref": "#/definitions/ingress"}
Expand All @@ -109,10 +111,10 @@
"enabled": {"$ref": "#/definitions/isEnabled"},
"image": {"$ref": "#/definitions/dockerImage"},
"nodeSelector": {"type": "object", "title": "node selector for registry content sync"},
"initContainers": {"$ref": "#/definitions/initContainers"},
"initContainers": {"$ref": "#/definitions/initContainers", "title": "init containers for registry content sync"},
"resources": {"$ref": "#/definitions/podResources"},
"extraVolumeMounts": {"$ref": "#/definitions/volumeMounts"},
"extraVolumes": {"$ref": "#/definitions/volumes"},
"extraVolumeMounts": {"$ref": "#/definitions/volumeMounts", "title": "extra volume mounts for registry content sync"},
"extraVolumes": {"$ref": "#/definitions/volumes", "title": "extra volumes for registry content sync"},
"registryUrl": {"type": ["null", "string"], "default": null}
}
}
Expand Down
Loading