From 51d889366cda99bffac1aa476a3fbca6e3adf5ff Mon Sep 17 00:00:00 2001 From: Dhilip Date: Thu, 17 Aug 2017 16:02:37 +0530 Subject: [PATCH] [stable/artifactory]Promote initContainers to pod spec (#1736) * Promote initContainers to pod spec * Fix typo * Fix version and consistent intendation --- stable/artifactory/Chart.yaml | 4 ++-- stable/artifactory/README.md | 1 + .../templates/artifactory-deployment.yaml | 24 +++++++++---------- .../templates/nginx-deployment.yaml | 24 +++++++++---------- .../templates/postgresql-deployment.yaml | 24 +++++++++---------- stable/artifactory/values.yaml | 6 ++--- 6 files changed, 42 insertions(+), 41 deletions(-) diff --git a/stable/artifactory/Chart.yaml b/stable/artifactory/Chart.yaml index c5254d1a03..eb14db5353 100644 --- a/stable/artifactory/Chart.yaml +++ b/stable/artifactory/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 name: artifactory home: https://www.jfrog.com/artifactory/ -version: 5.4.5 -appVersion: 5.4.5 +version: 5.4.6-1 +appVersion: 5.4.6 description: Universal Repository Manager supporting all major packaging formats, build tools and CI servers. keywords: - artifactory diff --git a/stable/artifactory/README.md b/stable/artifactory/README.md index 7ea9d0cc45..d527a703f4 100644 --- a/stable/artifactory/README.md +++ b/stable/artifactory/README.md @@ -2,6 +2,7 @@ ## Prerequisites Details +* Kubernetes 1.6+ * Artifactory Pro trial license [get one from here](https://www.jfrog.com/artifactory/free-trial/) ## Chart Details diff --git a/stable/artifactory/templates/artifactory-deployment.yaml b/stable/artifactory/templates/artifactory-deployment.yaml index 6a3c71622c..6cf8ae2c85 100644 --- a/stable/artifactory/templates/artifactory-deployment.yaml +++ b/stable/artifactory/templates/artifactory-deployment.yaml @@ -16,18 +16,18 @@ spec: app: {{ template "name" . }} component: "{{ .Values.artifactory.name }}" release: {{ .Release.Name }} - annotations: - pod.beta.kubernetes.io/init-containers: '[{ - "name": "remove-lost-found", - "image": {{ .Values.initContainerImage | quote }}, - "command": ["rm", "-rf", "{{ .Values.artifactory.persistence.mountPath }}/lost+found"], - "volumeMounts": [{ - "name": "artifactory-volume", - "mountPath": {{ .Values.artifactory.persistence.mountPath | quote }} - }], - "imagePullPolicy": {{ .Values.artifactory.image.pullPolicy | quote }} - }]' spec: + initContainers: + - name: "remove-lost-found" + image: "{{ .Values.initContainerImage }}" + imagePullPolicy: {{ .Values.artifactory.image.pullPolicy }} + command: + - "rm" + - "-rf" + - "{{ .Values.artifactory.persistence.mountPath }}/lost+found" + volumeMounts: + - mountPath: {{ .Values.artifactory.persistence.mountPath | quote }} + name: artifactory-volume containers: - name: {{ .Values.artifactory.name }} image: "{{ .Values.artifactory.image.repository }}:{{ .Values.artifactory.image.version }}" @@ -56,4 +56,4 @@ spec: claimName: {{ template "artifactory.fullname" . }} {{- else }} emptyDir: {} - {{- end -}} \ No newline at end of file + {{- end -}} diff --git a/stable/artifactory/templates/nginx-deployment.yaml b/stable/artifactory/templates/nginx-deployment.yaml index df05aa488c..18768e075e 100644 --- a/stable/artifactory/templates/nginx-deployment.yaml +++ b/stable/artifactory/templates/nginx-deployment.yaml @@ -16,18 +16,18 @@ spec: app: {{ template "name" . }} component: "{{ .Values.nginx.name }}" release: {{ .Release.Name }} - annotations: - pod.beta.kubernetes.io/init-containers: '[{ - "name": "remove-lost-found", - "image": {{ .Values.initContainerImage | quote }}, - "command": ["rm", "-rf", "{{ .Values.nginx.persistence.mountPath }}/lost+found"], - "volumeMounts": [{ - "name": "nginx-volume", - "mountPath": {{ .Values.nginx.persistence.mountPath | quote }} - }], - "imagePullPolicy": {{ .Values.nginx.image.pullPolicy | quote }} - }]' spec: + initContainers: + - name: "remove-lost-found" + image: "{{ .Values.initContainerImage }}" + imagePullPolicy: {{ .Values.nginx.image.pullPolicy }} + command: + - "rm" + - "-rf" + - "{{ .Values.nginx.persistence.mountPath }}/lost+found" + volumeMounts: + - mountPath: {{ .Values.nginx.persistence.mountPath | quote }} + name: nginx-volume containers: - name: {{ .Values.nginx.name }} image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.version }}" @@ -50,4 +50,4 @@ spec: claimName: {{ template "nginx.fullname" . }} {{- else }} emptyDir: {} - {{- end -}} \ No newline at end of file + {{- end -}} diff --git a/stable/artifactory/templates/postgresql-deployment.yaml b/stable/artifactory/templates/postgresql-deployment.yaml index 029f3b65d5..7ab13d9b9f 100644 --- a/stable/artifactory/templates/postgresql-deployment.yaml +++ b/stable/artifactory/templates/postgresql-deployment.yaml @@ -16,18 +16,18 @@ spec: app: {{ template "name" . }} component: "{{ .Values.database.name }}" release: {{ .Release.Name }} - annotations: - pod.beta.kubernetes.io/init-containers: '[{ - "name": "remove-lost-found", - "image": {{ .Values.initContainerImage | quote }}, - "command": ["rm", "-rf", "{{ .Values.database.persistence.mountPath }}/lost+found"], - "volumeMounts": [{ - "name": "postgresql-volume", - "mountPath": {{ .Values.database.persistence.mountPath | quote }} - }], - "imagePullPolicy": {{ .Values.database.image.pullPolicy | quote }} - }]' spec: + initContainers: + - name: "remove-lost-found" + image: "{{ .Values.initContainerImage }}" + imagePullPolicy: "{{ .Values.database.image.pullPolicy }}" + command: + - "rm" + - "-rf" + - "{{ .Values.database.persistence.mountPath }}/lost+found" + volumeMounts: + - mountPath: {{ .Values.database.persistence.mountPath | quote }} + name: postgresql-volume containers: - name: {{ .Values.database.name }} image: "{{ .Values.database.image.repository }}:{{ .Values.database.image.version }}" @@ -54,4 +54,4 @@ spec: claimName: {{ template "database.fullname" . }} {{- else }} emptyDir: {} - {{- end -}} \ No newline at end of file + {{- end -}} diff --git a/stable/artifactory/values.yaml b/stable/artifactory/values.yaml index 6c8e731c5b..c7dab381f5 100644 --- a/stable/artifactory/values.yaml +++ b/stable/artifactory/values.yaml @@ -37,7 +37,7 @@ artifactory: image: #repository: "docker.bintray.io/jfrog/artifactory-oss" repository: "docker.bintray.io/jfrog/artifactory-pro" - version: 5.4.5 + version: 5.4.6 pullPolicy: IfNotPresent service: type: ClusterIP @@ -55,7 +55,7 @@ nginx: replicaCount: 1 image: repository: "docker.bintray.io/jfrog/nginx-artifactory-pro" - version: 5.4.5 + version: 5.4.6 pullPolicy: IfNotPresent service: ## For minikube, set this to NodePort, elsewhere use LoadBalancer @@ -71,4 +71,4 @@ nginx: mountPath: "/var/opt/jfrog/nginx" enabled: true accessMode: ReadWriteOnce - size: 5Gi \ No newline at end of file + size: 5Gi