Skip to content

Commit

Permalink
update helm chart to use external postgresql dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
paulczar committed Mar 9, 2018
1 parent dab5dd9 commit 187b0dc
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 114 deletions.
1 change: 1 addition & 0 deletions contrib/helm/harbor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
charts/*
2 changes: 1 addition & 1 deletion contrib/helm/harbor/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: harbor
version: 0.1.0
version: 0.1.1
appVersion: 1.4.0
description: An Enterprise-class Docker Registry by VMware
keywords:
Expand Down
4 changes: 2 additions & 2 deletions contrib/helm/harbor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ The following tables lists the configurable parameters of the Harbor chart and t
| `clair.enabled` | Enable clair? | `true` |
| `clair.image.repository` | Repository for clair image | `vmware/clair-photon` |
| `clair.image.tag` | Tag for clair image | `v2.0.1-v1.4.0`
| `clair.postgresPassword` | password for clair postgres | see values.yaml |
| `clair.resources` | [resources](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) to allocate for container | undefined | `clair.pgResources` | [resources](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) to allocate for container | undefined |
| `clair.resources` | [resources](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) to allocate for container | undefined
| `postgresql` | Overrides for postgresql chart [values.yaml](https://github.com/kubernetes/charts/blob/f2938a46e3ae8e2512ede1142465004094c3c333/stable/postgresql/values.yaml) | see values.yaml
| | | |


Expand Down
6 changes: 6 additions & 0 deletions contrib/helm/harbor/requirements.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: postgresql
repository: https://kubernetes-charts.storage.googleapis.com
version: 0.9.1
digest: sha256:e89ecacdca0cc0414763a586832bf7ca3d57bd25ac8e1a08e41080b610eb5a7d
generated: 2018-03-09T15:34:27.167977722-06:00
4 changes: 4 additions & 0 deletions contrib/helm/harbor/requirements.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dependencies:
- name: postgresql
version: 0.9.1
repository: https://kubernetes-charts.storage.googleapis.com
6 changes: 3 additions & 3 deletions contrib/helm/harbor/templates/adminserver/adminserver-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ data:
ADMIRAL_URL: "NA"
RESET: "false"
WITH_CLAIR: "{{ .Values.clair.enabled }}"
CLAIR_DB_HOST: "{{ template "harbor.fullname" . }}-clair-pg"
CLAIR_DB_HOST: "{{ .Release.Name }}-postgresql"
CLAIR_DB_PORT: "5432"
CLAIR_DB: "postgres"
CLAIR_DB_USERNAME: "postgres"
CLAIR_DB: "{{ .Values.clair.postgresDatabase }}"
CLAIR_DB_USERNAME: "{{ .Values.clair.postgresUser }}"
CLAIR_DB_PASSWORD: "{{ .Values.clair.postgresPassword }}"
UAA_ENDPOINT: ""
UAA_CLIENTID: ""
Expand Down
5 changes: 2 additions & 3 deletions contrib/helm/harbor/templates/clair/clair-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "harbor.fullname" . }}
name: {{ template "harbor.fullname" . }}-clair
labels:
{{ include "harbor.labels" . | indent 4 }}
component: clair
Expand All @@ -12,8 +12,7 @@ data:
database:
type: pgsql
options:
source: "postgresql://postgres:{{ .Values.clair.postgresPassword }}@{{ template "harbor.fullname" . }}-clair-pg:5432?sslmode=disable"
source: "postgresql://{{ .Values.clair.postgresUser }}:{{ .Values.clair.postgresPassword }}@{{ .Release.Name }}-postgresql:5432/{{ .Values.clair.postgresDatabase }}?sslmode=disable"
# Number of elements kept in the cache
# Values unlikely to change (e.g. namespaces) are cached in order to save prevent needless roundtrips to the database.
cachesize: 16384
Expand Down
2 changes: 1 addition & 1 deletion contrib/helm/harbor/templates/clair/clair-dpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
volumes:
- name: clair-config
configMap:
name: "{{ template "harbor.fullname" . }}"
name: "{{ template "harbor.fullname" . }}-clair"
items:
- key: config.yaml
path: config.yaml
Expand Down
11 changes: 0 additions & 11 deletions contrib/helm/harbor/templates/clair/postgres-secret.yaml

This file was deleted.

72 changes: 0 additions & 72 deletions contrib/helm/harbor/templates/clair/postgres-ss.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions contrib/helm/harbor/templates/clair/postgres-svc.yaml

This file was deleted.

19 changes: 12 additions & 7 deletions contrib/helm/harbor/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -243,20 +243,15 @@ registry:
# memory: 256Mi
# cpu: 100m

## Clair support is not yet fully implemented in the Helm Charts
## Enabling it will just break things.
#
clair:
enabled: true
image:
repository: vmware/clair-photon
tag: v2.0.1-v1.4.0
pullPolicy: IfNotPresent
postgresPassword: not-a-secure-password
pgImage:
repository: postgres
tag: "9.6.4"
pullPolicy: IfNotPresent
postgresUser: clair
postgresDatabase: clair
# resources:
# requests:
# memory: 256Mi
Expand All @@ -280,3 +275,13 @@ clair:
#
notary:
enabled: false

## Settings for postgresql dependency.
## see https://github.com/kubernetes/charts/tree/master/stable/postgresql
## for further configurables.
postgresql:
postgresUser: clair
postgresPassword: not-a-secure-password
postgresDatabase: clair
persistence:
enabled: false

0 comments on commit 187b0dc

Please sign in to comment.