diff --git a/incubator/chartmuseum/Chart.yaml b/incubator/chartmuseum/Chart.yaml index 3da138948a..368ecdd1d4 100644 --- a/incubator/chartmuseum/Chart.yaml +++ b/incubator/chartmuseum/Chart.yaml @@ -1,10 +1,12 @@ apiVersion: v1 description: Helm Chart Repository with support for Amazon S3 and Google Cloud Storage name: chartmuseum -version: 0.1.3 -appVersion: 0.2.6 +version: 0.2.0 +appVersion: 0.2.7 home: https://github.com/chartmuseum/chartmuseum icon: https://raw.githubusercontent.com/chartmuseum/chartmuseum/master/logo.png maintainers: - name: ChartMuseum email: chartmuseum@gmail.com +- name: Cloud Posse + email: hello@cloudposse.com diff --git a/incubator/chartmuseum/requirements.lock b/incubator/chartmuseum/requirements.lock deleted file mode 100644 index ef059b5d98..0000000000 --- a/incubator/chartmuseum/requirements.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: common - repository: https://kubernetes-charts-incubator.storage.googleapis.com/ - version: 0.0.1 -digest: sha256:306378be27e855f6823d057c0d90ba3be227d44dc75b2c70c484a03c2515511e -generated: 2017-11-14T11:12:37.260876101Z diff --git a/incubator/chartmuseum/templates/deployment.yaml b/incubator/chartmuseum/templates/deployment.yaml index 877e95fdcd..b57154be75 100644 --- a/incubator/chartmuseum/templates/deployment.yaml +++ b/incubator/chartmuseum/templates/deployment.yaml @@ -2,48 +2,74 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: name: {{ include "common.fullname" . }} + annotations: +{{ toYaml .Values.deployment.annotations | indent 4 }} labels: {{ include "common.labels.standard" . | indent 4 }} spec: replicas: {{ .Values.replicaCount }} + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 0 + revisionHistoryLimit: 10 template: metadata: name: {{ include "common.fullname" . }} + annotations: +{{ toYaml .Values.replica.annotations | indent 8 }} labels: app: {{ template "common.name" . }} release: {{ .Release.Name | quote }} spec: - volumes: - - name: storage-volume - emptyDir: {} containers: - name: {{ .Chart.Name }} image: {{ .Values.image.repository }}:{{ .Values.image.tag }} imagePullPolicy: {{ .Values.image.pullPolicy }} + env: +{{- range $name, $value := .Values.env.open }} +{{- if not (empty $value) }} + - name: {{ $name | quote }} + value: {{ $value | quote }} +{{- end }} +{{- end }} +{{- $secret_name := include "common.fullname" . }} +{{- range $name, $value := .Values.env.secret }} +{{- if not ( empty $value) }} + - name: {{ $name | quote }} + valueFrom: + secretKeyRef: + name: {{ $secret_name }} + key: {{ $name | quote }} +{{- end }} +{{- end }} args: - --port={{ .Values.service.internalPort }} - - --debug - - --storage=local +{{- if eq .Values.env.open.STORAGE "local" }} - --storage-local-rootdir=/storage +{{- end }} ports: - containerPort: {{ .Values.service.internalPort }} livenessProbe: httpGet: - path: /index.yaml + path: /health port: {{ .Values.service.internalPort }} + initialDelaySeconds: 5 + periodSeconds: 10 readinessProbe: httpGet: - path: /index.yaml + path: /health port: {{ .Values.service.internalPort }} + initialDelaySeconds: 5 + periodSeconds: 10 +{{- if eq .Values.env.open.STORAGE "local" }} volumeMounts: - mountPath: /storage name: storage-volume +{{- end }} resources: {{ toYaml .Values.resources | indent 10 }} volumes: -{{- if .Values.persistence.volumes }} -{{ toYaml .Values.persistence.volumes | indent 6 }} -{{- end }} - name: storage-volume {{- if .Values.persistence.Enabled }} persistentVolumeClaim: diff --git a/incubator/chartmuseum/templates/ingress.yaml b/incubator/chartmuseum/templates/ingress.yaml new file mode 100644 index 0000000000..3fd1707053 --- /dev/null +++ b/incubator/chartmuseum/templates/ingress.yaml @@ -0,0 +1,33 @@ +{{- $servicePort := .Values.service.externalPort -}} +{{- $serviceName := include "common.fullname" . -}} +{{- if .Values.ingress.enabled }} +--- +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ include "common.fullname" . }} + annotations: +{{ toYaml .Values.ingress.annotations | indent 4 }} + labels: +{{- if .Values.ingress.labels }} +{{ toYaml .Values.ingress.labels | indent 4 }} +{{- end }} +{{ include "common.labels.standard" . | indent 4 }} +spec: + rules: + {{- range $host, $paths := .Values.ingress.hosts }} + - host: {{ $host }} + http: + paths: + {{- range $paths }} + - path: {{ . }} + backend: + serviceName: {{ $serviceName }} + servicePort: {{ $servicePort }} + {{- end -}} + {{- end -}} + {{- if .Values.ingress.tls }} + tls: +{{ toYaml .Values.ingress.tls | indent 4 }} + {{- end -}} +{{- end -}} diff --git a/incubator/chartmuseum/templates/secret.yaml b/incubator/chartmuseum/templates/secret.yaml new file mode 100644 index 0000000000..e405a2da2d --- /dev/null +++ b/incubator/chartmuseum/templates/secret.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "common.fullname" . }} + labels: +{{ include "common.labels.standard" . | indent 4 }} +type: Opaque +data: +{{- range $name, $value := .Values.env.secret }} +{{- if not (empty $value) }} + {{ $name }}: {{ $value | b64enc }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/incubator/chartmuseum/templates/service.yaml b/incubator/chartmuseum/templates/service.yaml index 70e2be13f4..3ca2a27617 100644 --- a/incubator/chartmuseum/templates/service.yaml +++ b/incubator/chartmuseum/templates/service.yaml @@ -2,6 +2,8 @@ apiVersion: v1 kind: Service metadata: name: {{ include "common.fullname" . }} + annotations: +{{ toYaml .Values.service.annotations | indent 4 }} labels: {{ include "common.labels.standard" . | indent 4 }} {{- if .Values.service.annotations }} diff --git a/incubator/chartmuseum/values.yaml b/incubator/chartmuseum/values.yaml index 9838e7f2b1..f1499e97c4 100644 --- a/incubator/chartmuseum/values.yaml +++ b/incubator/chartmuseum/values.yaml @@ -1,8 +1,54 @@ replicaCount: 1 image: repository: chartmuseum/chartmuseum - tag: v0.2.6 + tag: v0.2.7 pullPolicy: IfNotPresent +env: + open: + # storage backend, can be one of: local, amazon, google + STORAGE: local + # s3 bucket to store charts for amazon storage backend + STORAGE_AMAZON_BUCKET: + # prefix to store charts for amazon storage backend + STORAGE_AMAZON_PREFIX: + # region of s3 bucket to store charts + STORAGE_AMAZON_REGION: + # alternative s3 endpoint + STORAGE_AMAZON_ENDPOINT: + # gcs bucket to store charts for google storage backend + STORAGE_GOOGLE_BUCKET: + # prefix to store charts for google storage backend + STORAGE_GOOGLE_PREFIX: + # form field which will be queried for the chart file content + CHART_POST_FORM_FIELD_NAME: chart + # form field which will be queried for the provenance file content + PROV_POST_FORM_FIELD_NAME: prov + # show debug messages + DEBUG: false + # output structured logs as json + LOG_JSON: true + # disable Prometheus metrics + DISABLE_METRICS: true + # disable all routes prefixed with /api + DISABLE_API: true + # allow chart versions to be re-uploaded + ALLOW_OVERWRITE: false + # absolute url for .tgzs in index.yaml + CHART_URL: + secret: + # username for basic http authentication + BASIC_AUTH_USER: + # password for basic http authentication + BASIC_AUTH_PASS: +deployment: + ## Chartmuseum Deployment annotations + annotations: {} + # name: value +replica: + ## Chartmuseum Replicas annotations + annotations: {} + ## Read more about kube2iam to provide access to s3 https://github.com/jtblin/kube2iam + # iam.amazonaws.com/role: role-arn service: type: ClusterIP externalPort: 8080 @@ -25,7 +71,7 @@ persistence: ## If defined, PVC must be created manually before volume will be bound # ExistingClaim: - ## jenkins data Persistent Volume Storage Class + ## Chartmuseum data Persistent Volume Storage Class ## If defined, storageClassName: ## If set to "-", storageClassName: "", which disables dynamic provisioning ## If undefined (the default) or set to null, no storageClassName spec is @@ -33,3 +79,33 @@ persistence: ## GKE, AWS & OpenStack) ## # StorageClass: "-" + +## Ingress for load balancer +ingress: + enabled: false +## Chartmuseum Ingress labels +## +# labels: +# dns: "route53" + +## Chartmuseum Ingress annotations +## +# annotations: +# kubernetes.io/ingress.class: nginx +# kubernetes.io/tls-acme: "true" + +## Chartmuseum Ingress hostnames +## Must be provided if Ingress is enabled +## +# hosts: +# chartmuseum.domain.com: +# - /charts +# - /index.yaml + +## Chartmuseum Ingress TLS configuration +## Secrets must be manually created in the namespace +## +# tls: +# - secretName: chartmuseum-server-tls +# hosts: +# - chartmuseum.domain.com