mirror of
https://github.com/goharbor/harbor
synced 2025-04-08 02:45:51 +00:00
update helm chart to use external postgresql dependency
This commit is contained in:
parent
dab5dd9879
commit
187b0dcdbb
1
contrib/helm/harbor/.gitignore
vendored
Normal file
1
contrib/helm/harbor/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
charts/*
|
|
@ -1,5 +1,5 @@
|
||||||
name: harbor
|
name: harbor
|
||||||
version: 0.1.0
|
version: 0.1.1
|
||||||
appVersion: 1.4.0
|
appVersion: 1.4.0
|
||||||
description: An Enterprise-class Docker Registry by VMware
|
description: An Enterprise-class Docker Registry by VMware
|
||||||
keywords:
|
keywords:
|
||||||
|
|
|
@ -154,8 +154,8 @@ The following tables lists the configurable parameters of the Harbor chart and t
|
||||||
| `clair.enabled` | Enable clair? | `true` |
|
| `clair.enabled` | Enable clair? | `true` |
|
||||||
| `clair.image.repository` | Repository for clair image | `vmware/clair-photon` |
|
| `clair.image.repository` | Repository for clair image | `vmware/clair-photon` |
|
||||||
| `clair.image.tag` | Tag for clair image | `v2.0.1-v1.4.0`
|
| `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.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 |
|
| `postgresql` | Overrides for postgresql chart [values.yaml](https://github.com/kubernetes/charts/blob/f2938a46e3ae8e2512ede1142465004094c3c333/stable/postgresql/values.yaml) | see values.yaml
|
||||||
| | | |
|
| | | |
|
||||||
|
|
||||||
|
|
||||||
|
|
6
contrib/helm/harbor/requirements.lock
Normal file
6
contrib/helm/harbor/requirements.lock
Normal file
|
@ -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
contrib/helm/harbor/requirements.yaml
Normal file
4
contrib/helm/harbor/requirements.yaml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
dependencies:
|
||||||
|
- name: postgresql
|
||||||
|
version: 0.9.1
|
||||||
|
repository: https://kubernetes-charts.storage.googleapis.com
|
|
@ -50,10 +50,10 @@ data:
|
||||||
ADMIRAL_URL: "NA"
|
ADMIRAL_URL: "NA"
|
||||||
RESET: "false"
|
RESET: "false"
|
||||||
WITH_CLAIR: "{{ .Values.clair.enabled }}"
|
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_PORT: "5432"
|
||||||
CLAIR_DB: "postgres"
|
CLAIR_DB: "{{ .Values.clair.postgresDatabase }}"
|
||||||
CLAIR_DB_USERNAME: "postgres"
|
CLAIR_DB_USERNAME: "{{ .Values.clair.postgresUser }}"
|
||||||
CLAIR_DB_PASSWORD: "{{ .Values.clair.postgresPassword }}"
|
CLAIR_DB_PASSWORD: "{{ .Values.clair.postgresPassword }}"
|
||||||
UAA_ENDPOINT: ""
|
UAA_ENDPOINT: ""
|
||||||
UAA_CLIENTID: ""
|
UAA_CLIENTID: ""
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "harbor.fullname" . }}
|
name: {{ template "harbor.fullname" . }}-clair
|
||||||
labels:
|
labels:
|
||||||
{{ include "harbor.labels" . | indent 4 }}
|
{{ include "harbor.labels" . | indent 4 }}
|
||||||
component: clair
|
component: clair
|
||||||
|
@ -12,8 +12,7 @@ data:
|
||||||
database:
|
database:
|
||||||
type: pgsql
|
type: pgsql
|
||||||
options:
|
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
|
# 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.
|
# Values unlikely to change (e.g. namespaces) are cached in order to save prevent needless roundtrips to the database.
|
||||||
cachesize: 16384
|
cachesize: 16384
|
||||||
|
|
|
@ -34,7 +34,7 @@ spec:
|
||||||
volumes:
|
volumes:
|
||||||
- name: clair-config
|
- name: clair-config
|
||||||
configMap:
|
configMap:
|
||||||
name: "{{ template "harbor.fullname" . }}"
|
name: "{{ template "harbor.fullname" . }}-clair"
|
||||||
items:
|
items:
|
||||||
- key: config.yaml
|
- key: config.yaml
|
||||||
path: config.yaml
|
path: config.yaml
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
{{ if .Values.clair.enabled }}
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: {{ template "harbor.fullname" . }}-clair-pg-config
|
|
||||||
labels:
|
|
||||||
{{ include "harbor.labels" . | indent 4 }}
|
|
||||||
type: Opaque
|
|
||||||
data:
|
|
||||||
POSTGRES_PASSWORD: {{ .Values.clair.postgresPassword | b64enc | quote }}
|
|
||||||
{{ end }}
|
|
|
@ -1,72 +0,0 @@
|
||||||
{{ if .Values.clair.enabled }}
|
|
||||||
apiVersion: apps/v1beta2
|
|
||||||
kind: StatefulSet
|
|
||||||
metadata:
|
|
||||||
name: {{ template "harbor.fullname" . }}-clair-pg
|
|
||||||
labels:
|
|
||||||
{{ include "harbor.labels" . | indent 4 }}
|
|
||||||
component: clair-pg
|
|
||||||
spec:
|
|
||||||
serviceName: "{{ template "harbor.fullname" . }}-clair-pg"
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
{{ include "harbor.matchLabels" . | indent 6 }}
|
|
||||||
component: clair-pg
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
name: {{ template "harbor.fullname" . }}-clair-pg
|
|
||||||
labels:
|
|
||||||
{{ include "harbor.labels" . | indent 8 }}
|
|
||||||
component: clair-pg
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: postgres
|
|
||||||
image: {{ .Values.clair.pgImage.repository }}:{{ .Values.clair.pgImage.tag }}
|
|
||||||
imagePullPolicy: {{ .Values.clair.pgImage.pullPolicy }}
|
|
||||||
resources:
|
|
||||||
{{ toYaml .Values.clair.pgResources | indent 10 }}
|
|
||||||
env:
|
|
||||||
- name: POSTGRES_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: {{ template "harbor.fullname" . }}-clair-pg-config
|
|
||||||
key: POSTGRES_PASSWORD
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 1000m
|
|
||||||
memory: 1Gi
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 512Mi
|
|
||||||
volumeMounts:
|
|
||||||
- name: pgdata
|
|
||||||
mountPath: /var/lib/postgresql
|
|
||||||
ports:
|
|
||||||
- containerPort: 5432
|
|
||||||
name: postgres-port
|
|
||||||
protocol: TCP
|
|
||||||
{{- if not .Values.persistence.enabled }}
|
|
||||||
volumes:
|
|
||||||
- name: pgdata
|
|
||||||
emptyDir: {}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.persistence.enabled }}
|
|
||||||
volumeClaimTemplates:
|
|
||||||
- metadata:
|
|
||||||
name: pgdata
|
|
||||||
labels:
|
|
||||||
{{ include "harbor.labels" . | indent 8 }}
|
|
||||||
spec:
|
|
||||||
accessModes: [{{ .Values.clair.volumes.pgData.accessMode | quote }}]
|
|
||||||
{{- if .Values.clair.volumes.pgData.storageClass }}
|
|
||||||
{{- if (eq "-" .Values.clair.volumes.pgData.storageClass) }}
|
|
||||||
storageClassName: ""
|
|
||||||
{{- else }}
|
|
||||||
storageClassName: "{{ .Values.clair.volumes.pgData.storageClass }}"
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: {{ .Values.clair.volumes.pgData.size | quote }}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
|
@ -1,14 +0,0 @@
|
||||||
{{ if .Values.clair.enabled }}
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: {{ template "harbor.fullname" . }}-clair-pg
|
|
||||||
labels:
|
|
||||||
{{ include "harbor.labels" . | indent 4 }}
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- port: 5432
|
|
||||||
selector:
|
|
||||||
{{ include "harbor.matchLabels" . | indent 4 }}
|
|
||||||
component: clair-pg
|
|
||||||
{{ end }}
|
|
|
@ -243,9 +243,6 @@ registry:
|
||||||
# memory: 256Mi
|
# memory: 256Mi
|
||||||
# cpu: 100m
|
# cpu: 100m
|
||||||
|
|
||||||
## Clair support is not yet fully implemented in the Helm Charts
|
|
||||||
## Enabling it will just break things.
|
|
||||||
#
|
|
||||||
clair:
|
clair:
|
||||||
enabled: true
|
enabled: true
|
||||||
image:
|
image:
|
||||||
|
@ -253,10 +250,8 @@ clair:
|
||||||
tag: v2.0.1-v1.4.0
|
tag: v2.0.1-v1.4.0
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
postgresPassword: not-a-secure-password
|
postgresPassword: not-a-secure-password
|
||||||
pgImage:
|
postgresUser: clair
|
||||||
repository: postgres
|
postgresDatabase: clair
|
||||||
tag: "9.6.4"
|
|
||||||
pullPolicy: IfNotPresent
|
|
||||||
# resources:
|
# resources:
|
||||||
# requests:
|
# requests:
|
||||||
# memory: 256Mi
|
# memory: 256Mi
|
||||||
|
@ -280,3 +275,13 @@ clair:
|
||||||
#
|
#
|
||||||
notary:
|
notary:
|
||||||
enabled: false
|
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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user