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

update optional labels #174

Merged
merged 7 commits into from
Jul 4, 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
5 changes: 5 additions & 0 deletions charts/agent-stack-k8s/templates/_helper.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{/* Generate basic labels */}}
{{- define "agent-stack-k8s.labels" }}
{{- toYaml $.Values.labels }}
app: {{ .Release.Name }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/agent-stack-k8s/templates/deployment.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
template:
metadata:
labels:
app: {{ .Release.Name }}
{{- include "agent-stack-k8s.labels" . | nindent 8 }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/config.yaml.tpl") . | sha256sum }}
checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml.tpl") . | sha256sum }}
Expand Down
17 changes: 17 additions & 0 deletions charts/agent-stack-k8s/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,23 @@
}
]
},
"labels": {
"type": "object",
"default": {},
"title": "The labels Schema",
triarius marked this conversation as resolved.
Show resolved Hide resolved
"description": "label app is reserved, user input label app is not allowed",
"not": { "required": [ "app" ] },
jiaquan1 marked this conversation as resolved.
Show resolved Hide resolved
"additionalProperties": {
"type": "string",
"default": ""
},
"example": [
{
"user": "name",
"project": "project"
triarius marked this conversation as resolved.
Show resolved Hide resolved
}
]
},
"resources": {
"type": "object",
"default": {},
Expand Down
3 changes: 3 additions & 0 deletions charts/agent-stack-k8s/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ resources:
requests:
cpu: 100m
memory: 100Mi

labels: {}