зеркало из https://github.com/Azure/orkestra.git
Configmap for config.yaml (#57)
config.yaml parsed from mounted configmap volume Co-authored-by: Nitish Malhotra <nitishm@microsoft.com>
This commit is contained in:
Родитель
bea4df2f59
Коммит
23586feea8
|
@ -14,10 +14,10 @@ COPY main.go main.go
|
|||
COPY api/ api/
|
||||
COPY pkg/ pkg/
|
||||
COPY controllers/ controllers/
|
||||
COPY config.yaml config.yaml
|
||||
# COPY config.yaml config.yaml
|
||||
|
||||
# Build
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -o manager main.go
|
||||
|
||||
FROM alpine:3.7
|
||||
RUN apk add --no-cache bash
|
||||
|
@ -25,6 +25,6 @@ RUN mkdir -p /etc/orkestra/charts/pull/
|
|||
|
||||
WORKDIR /
|
||||
COPY --from=builder /workspace/manager .
|
||||
COPY --from=builder /workspace/config.yaml /etc/controller/config.yaml
|
||||
# COPY --from=builder /workspace/config.yaml /etc/controller/config.yaml
|
||||
|
||||
ENTRYPOINT ["/manager"]
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
kind: ConfigMap
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: registry-config
|
||||
labels:
|
||||
{{- include "orkestra.labels" . | nindent 4 }}
|
||||
data:
|
||||
config.yaml: |
|
||||
registries:
|
||||
{{- range $repo := $.Values.repositories }}
|
||||
{{ $repo.name }}:
|
||||
url: {{ $repo.url }}
|
||||
{{ if $repo.username }}
|
||||
username: { {$repo.username }}
|
||||
{{ end }}
|
||||
{{ if $repo.password }}
|
||||
password: {{ $repo.password }}
|
||||
{{ end }}
|
||||
{{ if $repo.authHeader }}
|
||||
authHeader: {{ $repo.authHeader }}
|
||||
{{ end }}
|
||||
{{ if $repo.caFile }}
|
||||
caFile: {{ $repo.caFile }}
|
||||
{{ end }}
|
||||
{{ if $repo.certFile }}
|
||||
certFile: {{ $repo.certFile }}
|
||||
{{ end }}
|
||||
{{ if $repo.keyFile }}
|
||||
keyFile: {{ $repo.keyFile }}
|
||||
{{ end }}
|
||||
{{ if $repo.insecureSkipVerify }}
|
||||
insecureSkipVerify: {{ $repo.insecureSkipVerify }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
|
|
@ -43,20 +43,15 @@ spec:
|
|||
value: orkestra
|
||||
- name: SERVICE_ACCOUNT_NAME
|
||||
value: {{ include "orkestra.serviceAccountName" . }}
|
||||
# ports:
|
||||
# - name: http
|
||||
# containerPort: 80
|
||||
# protocol: TCP
|
||||
# livenessProbe:
|
||||
# httpGet:
|
||||
# path: /
|
||||
# port: http
|
||||
# readinessProbe:
|
||||
# httpGet:
|
||||
# path: /
|
||||
# port: http
|
||||
volumeMounts:
|
||||
- name: registry-config
|
||||
mountPath: /etc/controller/
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
volumes:
|
||||
- name: registry-config
|
||||
configMap:
|
||||
name: registry-config
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
|
|
|
@ -17,6 +17,19 @@ serviceAccount:
|
|||
annotations: {}
|
||||
name: *serviceAccount
|
||||
|
||||
repositories:
|
||||
- name: staging
|
||||
url: "http://orkestra-chartmuseum.orkestra:8080"
|
||||
- name: bitnami
|
||||
url: "https://charts.bitnami.com/bitnami"
|
||||
# username: admin
|
||||
# password: password
|
||||
# authHeader: 'Authorization: Basic HTTPBASICAUTHCREDS'
|
||||
# caFile: /path/to/ca/file
|
||||
# certFile: /path/to/cert/file
|
||||
# keyFile: /path/to/key/file
|
||||
# insecureSkipVerify: false
|
||||
|
||||
podAnnotations: {}
|
||||
|
||||
podSecurityContext: {}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
registries:
|
||||
bitnami:
|
||||
url: "https://charts.bitnami.com/bitnami"
|
||||
insecureSkipVerify: true
|
||||
|
||||
staging:
|
||||
url: "http://orkestra-chartmuseum.orkestra:8080"
|
Загрузка…
Ссылка в новой задаче