Add labels to more common objects and add names.fqdn (#884)
* Add labels to more common objects and add names.fqdn * whoops copy pasta mistake
This commit is contained in:
parent
f0b31dddc4
commit
29615ca832
|
@ -18,4 +18,4 @@ maintainers:
|
||||||
name: common
|
name: common
|
||||||
sources: null
|
sources: null
|
||||||
type: library
|
type: library
|
||||||
version: 6.13.1
|
version: 6.13.2
|
||||||
|
|
|
@ -7,6 +7,8 @@ Blueprint for the NetworkPolicy object that can be included in the addon.
|
||||||
kind: NetworkPolicy
|
kind: NetworkPolicy
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
metadata:
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "common.labels" . | nindent 4 }}
|
||||||
name: {{ include "common.names.fullname" . }}
|
name: {{ include "common.names.fullname" . }}
|
||||||
spec:
|
spec:
|
||||||
podSelector:
|
podSelector:
|
||||||
|
|
|
@ -10,6 +10,7 @@ kind: ClusterRole
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "common.names.fullname" . -}}
|
name: {{ include "common.names.fullname" . -}}
|
||||||
labels:
|
labels:
|
||||||
|
{{- include "common.labels" . | nindent 4 }}
|
||||||
{{- with .Values.rbac.labels }}
|
{{- with .Values.rbac.labels }}
|
||||||
{{- toYaml . | nindent 4 }}
|
{{- toYaml . | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -27,6 +28,7 @@ kind: ClusterRoleBinding
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "common.names.fullname" . -}}
|
name: {{ include "common.names.fullname" . -}}
|
||||||
labels:
|
labels:
|
||||||
|
{{- include "common.labels" . | nindent 4 }}
|
||||||
{{- with .Values.rbac.labels }}
|
{{- with .Values.rbac.labels }}
|
||||||
{{- toYaml . | nindent 4 }}
|
{{- toYaml . | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -71,7 +71,8 @@ apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: portal
|
name: portal
|
||||||
labels: {{ include "common.labels" . | nindent 4 }}
|
labels:
|
||||||
|
{{ include "common.labels" . | nindent 4 }}
|
||||||
annotations:
|
annotations:
|
||||||
rollme: {{ randAlphaNum 5 | quote }}
|
rollme: {{ randAlphaNum 5 | quote }}
|
||||||
data:
|
data:
|
||||||
|
|
|
@ -56,3 +56,10 @@ If release name contains chart name it will be used as a full name.
|
||||||
{{- fail (printf "Not a valid controller.type (%s)" .Values.controller.type) -}}
|
{{- fail (printf "Not a valid controller.type (%s)" .Values.controller.type) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the "name" + "." + "namespace" fqdn
|
||||||
|
*/}}
|
||||||
|
{{- define "common.names.fqdn" -}}
|
||||||
|
{{- printf "%s.%s" (include "common.names.fullname" .) .Release.Namespace | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
Loading…
Reference in New Issue