UNCLASSIFIED

Commit 76d23e1d authored by kevin.wilder's avatar kevin.wilder
Browse files

Merge branch 'fix-extralabels' into 'main'

Fix extralabels indentation and add to Deployment pod template

See merge request !10
parents a2457f05 2e8d10cd
Pipeline #393636 passed with stages
in 5 minutes and 26 seconds
# Changelog # Changelog
--- ---
## [29.1.0-bb.7] - 2021-07-27
### Fixes
- Fixed extraLabels indentation in all resources that have it.
### Added
- Added extraLabels to Deployment template labels.
## [29.1.0-bb.6] - 2021-06-30 ## [29.1.0-bb.6] - 2021-06-30
### Added ### Added
- Add openshift toggle, conditionally add port 5353 egress. Changing "openshift:" to true in values.yaml will enable. - Add openshift toggle, conditionally add port 5353 egress. Changing "openshift:" to true in values.yaml will enable.
......
apiVersion: v2 apiVersion: v2
name: nexus-repository-manager name: nexus-repository-manager
version: 29.1.0-bb.6 version: 29.1.0-bb.7
appVersion: 3.29.0 appVersion: 3.29.0
description: Sonatype Nexus Repository Manager - Universal Binary repository description: Sonatype Nexus Repository Manager - Universal Binary repository
type: application type: application
......
...@@ -4,11 +4,11 @@ kind: ConfigMap ...@@ -4,11 +4,11 @@ kind: ConfigMap
metadata: metadata:
name: {{ template "nexus.name" . }}-proxy name: {{ template "nexus.name" . }}-proxy
labels: {{- include "nexus.labels" . | nindent 4 }} labels: {{- include "nexus.labels" . | nindent 4 }}
{{- if .Values.nexus.extraLabels }} {{- if .Values.nexus.extraLabels }}
{{- with .Values.nexus.extraLabels }} {{- with .Values.nexus.extraLabels }}
{{ toYaml . | indent 4 }} {{ toYaml . }}
{{- end }} {{- end }}
{{- end }} {{- end }}
data: data:
proxy: {{ .Values.proxy.request | toJson | quote }} proxy: {{ .Values.proxy.request | toJson | quote }}
{{- end }} {{- end }}
......
...@@ -4,11 +4,11 @@ kind: ConfigMap ...@@ -4,11 +4,11 @@ kind: ConfigMap
metadata: metadata:
name: {{ template "nexus.name" . }}-sso name: {{ template "nexus.name" . }}-sso
labels: {{- include "nexus.labels" . | nindent 4 }} labels: {{- include "nexus.labels" . | nindent 4 }}
{{- if .Values.nexus.extraLabels }} {{- if .Values.nexus.extraLabels }}
{{- with .Values.nexus.extraLabels }} {{- with .Values.nexus.extraLabels }}
{{ toYaml . | indent 4 }} {{ toYaml . }}
{{- end }} {{- end }}
{{- end }} {{- end }}
data: data:
idp-metadata: {{ .Values.sso.idp_data | toJson | quote }} idp-metadata: {{ .Values.sso.idp_data | toJson | quote }}
#realm: {{ .Values.sso.realm | quote }} #realm: {{ .Values.sso.realm | quote }}
......
...@@ -5,11 +5,11 @@ metadata: ...@@ -5,11 +5,11 @@ metadata:
name: {{ template "nexus.name" . }}-license name: {{ template "nexus.name" . }}-license
labels: labels:
{{ include "nexus.labels" . | indent 4 }} {{ include "nexus.labels" . | indent 4 }}
{{- if .Values.nexus.extraLabels }} {{- if .Values.nexus.extraLabels }}
{{- with .Values.nexus.extraLabels }} {{- with .Values.nexus.extraLabels }}
{{ toYaml . | indent 4 }} {{ toYaml . }}
{{- end }} {{- end }}
{{- end }} {{- end }}
data: data:
{{ include "nexus.licenseKey" . | indent 2 }} {{ include "nexus.licenseKey" . | indent 2 }}
{{- end -}} {{- end -}}
\ No newline at end of file
...@@ -13,11 +13,11 @@ metadata: ...@@ -13,11 +13,11 @@ metadata:
name: {{ template "nexus.name" . }}-secret name: {{ template "nexus.name" . }}-secret
labels: labels:
{{ include "nexus.labels" . | indent 4 }} {{ include "nexus.labels" . | indent 4 }}
{{- if .Values.nexus.extraLabels }} {{- if .Values.nexus.extraLabels }}
{{- with .Values.nexus.extraLabels }} {{- with .Values.nexus.extraLabels }}
{{ toYaml . | indent 4 }} {{ toYaml . }}
{{- end }} {{- end }}
{{- end }} {{- end }}
data: data:
admin.password: {{ $nexusAdminPass }} admin.password: {{ $nexusAdminPass }}
admin.username: YWRtaW4K admin.username: YWRtaW4K
......
...@@ -4,11 +4,11 @@ kind: ConfigMap ...@@ -4,11 +4,11 @@ kind: ConfigMap
metadata: metadata:
name: {{ template "nexus.name" . }}-properties name: {{ template "nexus.name" . }}-properties
labels: {{- include "nexus.labels" . | nindent 4 }} labels: {{- include "nexus.labels" . | nindent 4 }}
{{- if .Values.nexus.extraLabels }} {{- if .Values.nexus.extraLabels }}
{{- with .Values.nexus.extraLabels }} {{- with .Values.nexus.extraLabels }}
{{ toYaml . | indent 4 }} {{ toYaml . }}
{{- end }} {{- end }}
{{- end }} {{- end }}
data: data:
nexus.properties: | nexus.properties: |
{{- $data := dict -}} {{- $data := dict -}}
...@@ -20,4 +20,4 @@ data: ...@@ -20,4 +20,4 @@ data:
{{- range $k, $v := $data }} {{- range $k, $v := $data }}
{{ $k }}={{ $v }} {{ $k }}={{ $v }}
{{- end }} {{- end }}
{{- end }} {{- end }}
\ No newline at end of file
...@@ -5,11 +5,11 @@ metadata: ...@@ -5,11 +5,11 @@ metadata:
name: {{ template "nexus.name" . }}-conf name: {{ template "nexus.name" . }}-conf
labels: labels:
{{ include "nexus.labels" . | indent 4 }} {{ include "nexus.labels" . | indent 4 }}
{{- if .Values.nexus.extraLabels }} {{- if .Values.nexus.extraLabels }}
{{- with .Values.nexus.extraLabels }} {{- with .Values.nexus.extraLabels }}
{{ toYaml . | indent 4 }} {{ toYaml . }}
{{- end }} {{- end }}
{{- end }} {{- end }}
data: data:
{{ toYaml .Values.config.data | indent 2 }} {{ toYaml .Values.config.data | indent 2 }}
{{- end }} {{- end }}
\ No newline at end of file
...@@ -4,11 +4,11 @@ metadata: ...@@ -4,11 +4,11 @@ metadata:
name: {{ template "nexus.fullname" . }} name: {{ template "nexus.fullname" . }}
labels: labels:
{{ include "nexus.labels" . | indent 4 }} {{ include "nexus.labels" . | indent 4 }}
{{- if .Values.nexus.extraLabels }} {{- if .Values.nexus.extraLabels }}
{{- with .Values.nexus.extraLabels }} {{- with .Values.nexus.extraLabels }}
{{ toYaml . | indent 4 }} {{ toYaml . }}
{{- end }}
{{- end }} {{- end }}
{{- end }}
{{- if .Values.deployment.annotations }} {{- if .Values.deployment.annotations }}
annotations: annotations:
{{ toYaml .Values.deployment.annotations | indent 4 }} {{ toYaml .Values.deployment.annotations | indent 4 }}
...@@ -34,6 +34,9 @@ spec: ...@@ -34,6 +34,9 @@ spec:
{{- end }} {{- end }}
labels: labels:
{{- include "nexus.selectorLabels" . | nindent 8 }} {{- include "nexus.selectorLabels" . | nindent 8 }}
{{- with .Values.nexus.extraLabels }}
{{ toYaml . }}
{{- end }}
spec: spec:
serviceAccountName: {{ include "nexus.serviceAccountName" . }} serviceAccountName: {{ include "nexus.serviceAccountName" . }}
{{- if .Values.deployment.initContainers }} {{- if .Values.deployment.initContainers }}
......
...@@ -8,11 +8,11 @@ metadata: ...@@ -8,11 +8,11 @@ metadata:
name: {{ $fullName }} name: {{ $fullName }}
labels: labels:
{{- include "nexus.labels" . | nindent 4 }} {{- include "nexus.labels" . | nindent 4 }}
{{- if .Values.nexus.extraLabels }} {{- if .Values.nexus.extraLabels }}
{{- with .Values.nexus.extraLabels }} {{- with .Values.nexus.extraLabels }}
{{ toYaml . | indent 4 }} {{ toYaml . }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- with .Values.ingress.annotations }} {{- with .Values.ingress.annotations }}
annotations: annotations:
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
......
...@@ -3,9 +3,11 @@ apiVersion: rbac.authorization.k8s.io/v1beta1 ...@@ -3,9 +3,11 @@ apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole kind: ClusterRole
metadata: metadata:
labels: {{- include "nexus.labels" . | nindent 4 }} labels: {{- include "nexus.labels" . | nindent 4 }}
{{- if .Values.nexus.extraLabels }}
{{- with .Values.nexus.extraLabels }} {{- with .Values.nexus.extraLabels }}
{{ toYaml . | indent 4 }} {{ toYaml . }}
{{- end }} {{- end }}
{{- end }}
name: {{ template "nexus.name" . }}-psp-use name: {{ template "nexus.name" . }}-psp-use
rules: rules:
- apiGroups: - apiGroups:
...@@ -16,4 +18,4 @@ rules: ...@@ -16,4 +18,4 @@ rules:
- {{ template "nexus.name" . }} - {{ template "nexus.name" . }}
verbs: verbs:
- use - use
{{- end -}} {{- end -}}
\ No newline at end of file
...@@ -3,9 +3,11 @@ apiVersion: rbac.authorization.k8s.io/v1 ...@@ -3,9 +3,11 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding kind: RoleBinding
metadata: metadata:
labels: {{- include "nexus.labels" . | nindent 4 }} labels: {{- include "nexus.labels" . | nindent 4 }}
{{- if .Values.nexus.extraLabels }}
{{- with .Values.nexus.extraLabels }} {{- with .Values.nexus.extraLabels }}
{{ toYaml . | indent 4 }} {{ toYaml . }}
{{- end }} {{- end }}
{{- end }}
name: {{ template "nexus.name" . }}-psp-use name: {{ template "nexus.name" . }}-psp-use
roleRef: roleRef:
apiGroup: rbac.authorization.k8s.io apiGroup: rbac.authorization.k8s.io
...@@ -14,4 +16,4 @@ roleRef: ...@@ -14,4 +16,4 @@ roleRef:
subjects: subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: {{ include "nexus.serviceAccountName" . }} name: {{ include "nexus.serviceAccountName" . }}
{{- end -}} {{- end -}}
\ No newline at end of file
...@@ -3,9 +3,11 @@ apiVersion: policy/v1beta1 ...@@ -3,9 +3,11 @@ apiVersion: policy/v1beta1
kind: PodSecurityPolicy kind: PodSecurityPolicy
metadata: metadata:
labels: {{- include "nexus.labels" . | nindent 4 }} labels: {{- include "nexus.labels" . | nindent 4 }}
{{- if .Values.nexus.extraLabels }}
{{- with .Values.nexus.extraLabels }} {{- with .Values.nexus.extraLabels }}
{{ toYaml . | indent 4 }} {{ toYaml . }}
{{- end }} {{- end }}
{{- end }}
name: {{ template "nexus.name" . }} name: {{ template "nexus.name" . }}
spec: spec:
requiredDropCapabilities: requiredDropCapabilities:
......
...@@ -6,11 +6,11 @@ metadata: ...@@ -6,11 +6,11 @@ metadata:
name: {{ .Values.persistence.pdName }} name: {{ .Values.persistence.pdName }}
labels: labels:
{{ include "nexus.labels" . | indent 4 }} {{ include "nexus.labels" . | indent 4 }}
{{- if .Values.nexus.extraLabels }} {{- if .Values.nexus.extraLabels }}
{{- with .Values.nexus.extraLabels }} {{- with .Values.nexus.extraLabels }}
{{ toYaml . | indent 4 }} {{ toYaml . }}
{{- end }} {{- end }}
{{- end }} {{- end }}
spec: spec:
capacity: capacity:
storage: {{ .Values.persistence.storageSize }} storage: {{ .Values.persistence.storageSize }}
......
...@@ -5,11 +5,11 @@ metadata: ...@@ -5,11 +5,11 @@ metadata:
name: {{ template "nexus.fullname" . }}-data name: {{ template "nexus.fullname" . }}-data
labels: labels:
{{ include "nexus.labels" . | indent 4 }} {{ include "nexus.labels" . | indent 4 }}
{{- if .Values.nexus.extraLabels }} {{- if .Values.nexus.extraLabels }}
{{- with .Values.nexus.extraLabels }} {{- with .Values.nexus.extraLabels }}
{{ toYaml . | indent 4 }} {{ toYaml . }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if .Values.persistence.annotations }} {{- if .Values.persistence.annotations }}
annotations: annotations:
{{ toYaml .Values.persistence.annotations | indent 4 }} {{ toYaml .Values.persistence.annotations | indent 4 }}
......
...@@ -10,11 +10,11 @@ metadata: ...@@ -10,11 +10,11 @@ metadata:
{{- end }} {{- end }}
labels: labels:
{{- include "nexus.labels" . | nindent 4 }} {{- include "nexus.labels" . | nindent 4 }}
{{- if .Values.nexus.extraLabels }} {{- if .Values.nexus.extraLabels }}
{{- with .Values.nexus.extraLabels }} {{- with .Values.nexus.extraLabels }}
{{ toYaml . | indent 4 }} {{ toYaml . }}
{{- end }} {{- end }}
{{- end }} {{- end }}
spec: spec:
type: {{ .Values.service.type }} type: {{ .Values.service.type }}
ports: ports:
......
...@@ -4,11 +4,11 @@ kind: ServiceAccount ...@@ -4,11 +4,11 @@ kind: ServiceAccount
metadata: metadata:
name: {{ include "nexus.serviceAccountName" . }} name: {{ include "nexus.serviceAccountName" . }}
labels: {{- include "nexus.labels" . | nindent 4 }} labels: {{- include "nexus.labels" . | nindent 4 }}
{{- if .Values.nexus.extraLabels }} {{- if .Values.nexus.extraLabels }}
{{- with .Values.nexus.extraLabels }} {{- with .Values.nexus.extraLabels }}
{{ toYaml . | indent 4 }} {{ toYaml . }}
{{- end }}
{{- end }} {{- end }}
{{- end }}
{{- with .Values.serviceAccount.annotations }} {{- with .Values.serviceAccount.annotations }}
annotations: {{- toYaml . | nindent 4 }} annotations: {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
......
...@@ -100,6 +100,8 @@ image: ...@@ -100,6 +100,8 @@ image:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
nexus: nexus:
extraLabels:
app: nexus-repository-manager
docker: docker:
enabled: false enabled: false
registries: [] registries: []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment