diff --git a/chart/kubeapps/Chart.yaml b/chart/kubeapps/Chart.yaml index e7bb836ccb3..61068dce8b9 100644 --- a/chart/kubeapps/Chart.yaml +++ b/chart/kubeapps/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: kubeapps -version: 0.1.2 +version: 0.2.0 appVersion: 1.0.0.alpha.5 description: Kubeapps is a dashboard for your Kubernetes cluster that makes it easy to deploy and manage applications in your cluster using Helm icon: https://raw.githubusercontent.com/kubeapps/kubeapps/master/docs/img/logo.png diff --git a/chart/kubeapps/templates/tests/test-chartsvc.yaml b/chart/kubeapps/templates/tests/test-chartsvc.yaml new file mode 100644 index 00000000000..12f7c2d7d4c --- /dev/null +++ b/chart/kubeapps/templates/tests/test-chartsvc.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ .Release.Name }}-chartsvc-test" + annotations: + "helm.sh/hook": test-success +spec: + containers: + - name: {{ .Release.Name }}-chartsvc-test + image: {{ .Values.testImage.repository }}:{{ .Values.testImage.tag }} + env: + - name: CHARTSVC_HOST + value: {{ template "kubeapps.chartsvc.fullname" . }}.{{ .Release.Namespace }} + - name: CHARTSVC_PORT + value: "{{ .Values.chartsvc.service.port }}" + command: + - sh + - -c + - curl $CHARTSVC_HOST:$CHARTSVC_PORT/v1/charts | grep wordpress + restartPolicy: Never diff --git a/chart/kubeapps/templates/tests/test-dashboard.yaml b/chart/kubeapps/templates/tests/test-dashboard.yaml new file mode 100644 index 00000000000..a26d35e878b --- /dev/null +++ b/chart/kubeapps/templates/tests/test-dashboard.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ .Release.Name }}-dashboard-test" + annotations: + "helm.sh/hook": test-success +spec: + containers: + - name: {{ .Release.Name }}-dashboard-test + image: {{ .Values.testImage.repository }}:{{ .Values.testImage.tag }} + env: + - name: DASHBOARD_HOST + value: {{ template "kubeapps.fullname" . }}.{{ .Release.Namespace }} + command: + - sh + - -c + - curl $DASHBOARD_HOST | grep 'You need to enable JavaScript to run this app' + restartPolicy: Never diff --git a/chart/kubeapps/templates/tests/test-tiller-proxy.yaml b/chart/kubeapps/templates/tests/test-tiller-proxy.yaml new file mode 100644 index 00000000000..0a7aecfdea1 --- /dev/null +++ b/chart/kubeapps/templates/tests/test-tiller-proxy.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ .Release.Name }}-tiller-proxy-test" + annotations: + "helm.sh/hook": test-success +spec: + containers: + - name: {{ .Release.Name }}-tiller-proxy-test + image: {{ .Values.testImage.repository }}:{{ .Values.testImage.tag }} + env: + - name: TILLER_PROXY_HOST + value: {{ template "kubeapps.tiller-proxy.fullname" . }}.{{ .Release.Namespace }} + - name: TILLER_PROXY_PORT + value: "{{ .Values.tillerProxy.service.port }}" + - name: KUBEAPPS_RELEASE + value: {{ .Release.Name }} + command: + - sh + - -c + - "curl -ik -H \"Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)\" $TILLER_PROXY_HOST:$TILLER_PROXY_PORT/v1/releases | grep $KUBEAPPS_RELEASE" + restartPolicy: Never diff --git a/chart/kubeapps/values.yaml b/chart/kubeapps/values.yaml index 9e1d4238149..43653cdaf94 100644 --- a/chart/kubeapps/values.yaml +++ b/chart/kubeapps/values.yaml @@ -177,3 +177,10 @@ affinity: {} rbac: # Perform creation of RBAC resources create: true + +testImage: + # Image used for the tests. The only requirement is to include curl + registry: docker.io + repository: bitnami/nginx + tag: 1.14.0-r27 +