Skip to content

[artifactory] Add metadata.namespace to chart templates #1986

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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 stable/artifactory/templates/admin-bootstrap-creds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ kind: Secret
apiVersion: v1
metadata:
name: {{ template "artifactory.fullname" . }}-bootstrap-creds
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ template "artifactory.fullname" . }}-access-config
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Secret
apiVersion: v1
metadata:
name: {{ template "artifactory.fullname" . }}-binarystore
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand Down
3 changes: 2 additions & 1 deletion stable/artifactory/templates/artifactory-configmaps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "artifactory.fullname" . }}-configmaps
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.fullname" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
data:
{{ tpl .Values.artifactory.configMaps . | indent 2 }}
{{ end -}}
{{ end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ template "artifactory.fullname" $ }}-{{ .name }}
namespace: {{ $.Release.Namespace | quote }}
labels:
app: "{{ template "artifactory.name" $ }}"
chart: "{{ template "artifactory.chart" $ }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ template "artifactory.fullname" . }}-database-creds
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ kind: Secret
apiVersion: v1
metadata:
name: {{ template "artifactory.fullname" . }}-gcpcreds
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand All @@ -13,4 +14,4 @@ stringData:
gcp.credentials.json: |-
{{ tpl .Values.artifactory.persistence.googleStorage.gcpServiceAccount.config . | indent 4 }}
{{- end }}
{{- end }}
{{- end }}
1 change: 1 addition & 0 deletions stable/artifactory/templates/artifactory-hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ metadata:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "artifactory.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
spec:
scaleTargetRef:
apiVersion: apps/v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ kind: ConfigMap
apiVersion: v1
metadata:
name: {{ template "artifactory.fullname" . }}-installer-info
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand Down
3 changes: 2 additions & 1 deletion stable/artifactory/templates/artifactory-license-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ template "artifactory.fullname" $ }}-license
namespace: {{ $.Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" $ }}
chart: {{ template "artifactory.chart" $ }}
Expand All @@ -13,4 +14,4 @@ type: Opaque
data:
artifactory.lic: {{ . | b64enc | quote }}
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "artifactory.fullname" . }}-migration-scripts
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand All @@ -15,4 +16,4 @@ data:
{{ .Files.Get "files/migrationHelmInfo.yaml" | indent 4 }}
migrationStatus.sh: |
{{ .Files.Get "files/migrationStatus.sh" | indent 4 }}
{{- end }}
{{- end }}
3 changes: 2 additions & 1 deletion stable/artifactory/templates/artifactory-networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ template "artifactory.fullname" $ }}-{{ .name }}-networkpolicy
namespace: {{ $.Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" $ }}
chart: {{ template "artifactory.chart" $ }}
Expand Down Expand Up @@ -31,4 +32,4 @@ spec:
{{ .egress | toYaml | trimSuffix "\n" | indent 2 -}}
{{- end }}
---
{{- end -}}
{{- end -}}
2 changes: 2 additions & 0 deletions stable/artifactory/templates/artifactory-nfs-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "artifactory.fullname" . }}-data-pvc
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand Down Expand Up @@ -80,6 +81,7 @@ kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "artifactory.fullname" . }}-backup-pvc
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand Down
1 change: 1 addition & 0 deletions stable/artifactory/templates/artifactory-pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ template "artifactory.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand Down
1 change: 1 addition & 0 deletions stable/artifactory/templates/artifactory-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ metadata:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "artifactory.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
rules:
{{ toYaml .Values.rbac.role.rules }}
{{- end }}
1 change: 1 addition & 0 deletions stable/artifactory/templates/artifactory-rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ metadata:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "artifactory.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
subjects:
- kind: ServiceAccount
name: {{ template "artifactory.serviceAccountName" . }}
Expand Down
3 changes: 2 additions & 1 deletion stable/artifactory/templates/artifactory-secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ template "artifactory.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand All @@ -27,4 +28,4 @@ data:
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
3 changes: 2 additions & 1 deletion stable/artifactory/templates/artifactory-service-grpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ template "artifactory.serviceGrpc.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand Down Expand Up @@ -41,4 +42,4 @@ spec:
app: {{ template "artifactory.name" . }}
component: "{{ .Values.artifactory.name }}"
release: {{ .Release.Name }}
{{- end -}}
{{- end -}}
3 changes: 2 additions & 1 deletion stable/artifactory/templates/artifactory-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ template "artifactory.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand Down Expand Up @@ -56,4 +57,4 @@ spec:
selector:
app: {{ template "artifactory.name" . }}
component: "{{ .Values.artifactory.name }}"
release: {{ .Release.Name }}
release: {{ .Release.Name }}
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ metadata:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "artifactory.serviceAccountName" . }}
namespace: {{ .Release.Namespace | quote }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
{{- end }}
3 changes: 2 additions & 1 deletion stable/artifactory/templates/artifactory-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ template "artifactory.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand Down Expand Up @@ -1786,4 +1787,4 @@ spec:
resources:
requests:
storage: {{ .Values.artifactory.customPersistentVolumeClaim.size }}
{{- end }}
{{- end }}
1 change: 1 addition & 0 deletions stable/artifactory/templates/artifactory-system-yaml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ template "artifactory.fullname" . }}-systemyaml
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ template "artifactory.unifiedSecretPrependReleaseName" . }}-unified-secret
namespace: {{ $.Release.Namespace | quote }}
labels:
app: "{{ template "artifactory.name" $ }}"
chart: "{{ template "artifactory.chart" $ }}"
Expand Down
1 change: 1 addition & 0 deletions stable/artifactory/templates/filebeat-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "artifactory.fullname" . }}-filebeat-config
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
Expand Down
1 change: 1 addition & 0 deletions stable/artifactory/templates/ingress-grpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $ingressName }}
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand Down
1 change: 1 addition & 0 deletions stable/artifactory/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $ingressName }}
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand Down
1 change: 1 addition & 0 deletions stable/artifactory/templates/logger-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "artifactory.fullname" . }}-logger
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand Down
3 changes: 2 additions & 1 deletion stable/artifactory/templates/nginx-artifactory-conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "artifactory.fullname" . }}-nginx-artifactory-conf
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand All @@ -15,4 +16,4 @@ data:
{{- else }}
{{ tpl ( .Files.Get "files/nginx-artifactory-conf.yaml" ) . | indent 4 }}
{{- end }}
{{- end }}
{{- end }}
1 change: 1 addition & 0 deletions stable/artifactory/templates/nginx-certificate-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ kind: Secret
type: kubernetes.io/tls
metadata:
name: {{ template "artifactory.fullname" . }}-nginx-certificate
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand Down
3 changes: 2 additions & 1 deletion stable/artifactory/templates/nginx-conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "artifactory.fullname" . }}-nginx-conf
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand All @@ -15,4 +16,4 @@ data:
{{- else }}
{{ tpl ( .Files.Get "files/nginx-main-conf.yaml" ) . | indent 4 }}
{{- end }}
{{- end }}
{{- end }}
3 changes: 2 additions & 1 deletion stable/artifactory/templates/nginx-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apiVersion: apps/v1
kind: {{ .Values.nginx.kind }}
metadata:
name: {{ template "artifactory.nginx.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand Down Expand Up @@ -220,4 +221,4 @@ spec:
secretName: {{ template "artifactory.fullname" . }}-nginx-certificate
{{- end }}
{{- end }}
{{- end }}
{{- end }}
1 change: 1 addition & 0 deletions stable/artifactory/templates/nginx-pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ template "artifactory.nginx.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand Down
1 change: 1 addition & 0 deletions stable/artifactory/templates/nginx-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "artifactory.nginx.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand Down
1 change: 1 addition & 0 deletions stable/artifactory/templates/nginx-scripts-conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "artifactory.fullname" . }}-nginx-scripts
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand Down
3 changes: 2 additions & 1 deletion stable/artifactory/templates/nginx-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ template "artifactory.nginx.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand Down Expand Up @@ -85,4 +86,4 @@ spec:
app: {{ template "artifactory.name" . }}
component: {{ .Values.nginx.name }}
release: {{ .Release.Name }}
{{- end }}
{{- end }}
3 changes: 2 additions & 1 deletion stable/artifactory/templates/rtfs-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "rtfs.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
Expand Down Expand Up @@ -347,4 +348,4 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
Loading
Loading