diff --git a/staging/kubeaddons-catalog/Chart.yaml b/staging/kubeaddons-catalog/Chart.yaml index bf79952c2..df610a5be 100644 --- a/staging/kubeaddons-catalog/Chart.yaml +++ b/staging/kubeaddons-catalog/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "v0.0.1-alpha1" description: "A Catalog service for Kubeaddons" name: kubeaddons-catalog -version: 0.0.3 +version: 0.0.4 home: https://github.com/mesosphere/kubeaddons sources: - https://github.com/mesosphere/kubeaddons/tools/catalog diff --git a/staging/kubeaddons-catalog/templates/crds.yaml b/staging/kubeaddons-catalog/templates/crd_addonrepository.yaml similarity index 92% rename from staging/kubeaddons-catalog/templates/crds.yaml rename to staging/kubeaddons-catalog/templates/crd_addonrepository.yaml index d5577217d..451cec957 100644 --- a/staging/kubeaddons-catalog/templates/crds.yaml +++ b/staging/kubeaddons-catalog/templates/crd_addonrepository.yaml @@ -1,9 +1,14 @@ +{{- if or (not (.Capabilities.APIVersions.Has "kubeaddons.mesosphere.io/v1alpha1")) .Values.crds.forceDeploy }} --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: creationTimestamp: null name: addonrepositories.kubeaddons.mesosphere.io + labels: +{{ include "kubeaddons-catalog.labels" . | indent 4 }} + annotations: + "helm.sh/hook": crd-install spec: additionalPrinterColumns: - JSONPath: .status.ready @@ -80,3 +85,4 @@ status: plural: "" conditions: [] storedVersions: [] +{{- end }} diff --git a/staging/kubeaddons-catalog/templates/deployment.yaml b/staging/kubeaddons-catalog/templates/deployment.yaml index 240020193..6fa21bac8 100644 --- a/staging/kubeaddons-catalog/templates/deployment.yaml +++ b/staging/kubeaddons-catalog/templates/deployment.yaml @@ -16,6 +16,7 @@ spec: app.kubernetes.io/name: {{ include "kubeaddons-catalog.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} spec: + serviceAccountName: {{ template "kubeaddons-catalog.fullname" . }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} @@ -28,13 +29,16 @@ spec: - name: http containerPort: 3000 protocol: TCP + - name: metrics + containerPort: 9094 + protocol: TCP livenessProbe: httpGet: - path: /v1alpha1/health + path: /v1beta1/health port: http readinessProbe: httpGet: - path: /v1alpha1/healthz + path: /v1beta1/healthz port: http resources: {{- toYaml .Values.resources | nindent 12 }} diff --git a/staging/kubeaddons-catalog/templates/hook-roles.yaml b/staging/kubeaddons-catalog/templates/hook-roles.yaml new file mode 100644 index 000000000..fa300d7c5 --- /dev/null +++ b/staging/kubeaddons-catalog/templates/hook-roles.yaml @@ -0,0 +1,11 @@ +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "kubeaddons-catalog.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: +{{ include "kubeaddons-catalog.labels" . | indent 4 }} + annotations: + helm.sh/hook: pre-install + helm.sh/hook-delete-policy: "before-hook-creation" \ No newline at end of file diff --git a/staging/kubeaddons-catalog/templates/role.yaml b/staging/kubeaddons-catalog/templates/role.yaml new file mode 100644 index 000000000..d5f5e6b06 --- /dev/null +++ b/staging/kubeaddons-catalog/templates/role.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ template "kubeaddons-catalog.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: +{{ include "kubeaddons-catalog.labels" . | indent 4 }} +rules: + - apiGroups: ["kubeaddons.mesosphere.io"] + resources: ["addonrepositories"] + verbs: ["get", "watch", "list"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ template "kubeaddons-catalog.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: +{{ include "kubeaddons-catalog.labels" . | indent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ template "kubeaddons-catalog.fullname" . }} +subjects: + - kind: ServiceAccount + name: {{ template "kubeaddons-catalog.fullname" . }} + namespace: {{ .Release.Namespace }} diff --git a/staging/kubeaddons-catalog/values.yaml b/staging/kubeaddons-catalog/values.yaml index 3a7d6c60a..cf2880db6 100644 --- a/staging/kubeaddons-catalog/values.yaml +++ b/staging/kubeaddons-catalog/values.yaml @@ -13,6 +13,9 @@ service: type: ClusterIP port: 80 +crds: + forceDeploy: false + resources: {} nodeSelector: {} tolerations: []