mirror of
https://github.com/kubevela/kubevela.git
synced 2026-02-14 18:10:21 +00:00
Feat: support user defined image registry (#2623)
* Feat: support user defined image registry * Feat: add test app image repo into values
This commit is contained in:
@@ -24,7 +24,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: create
|
||||
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
|
||||
args:
|
||||
- create
|
||||
|
||||
@@ -24,7 +24,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: patch
|
||||
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
|
||||
args:
|
||||
- patch
|
||||
|
||||
@@ -126,7 +126,7 @@ spec:
|
||||
{{ end }}
|
||||
- "--system-definition-namespace={{ .Values.systemDefinitionNamespace }}"
|
||||
- "--oam-spec-ver={{ .Values.OAMSpecVer }}"
|
||||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
imagePullPolicy: {{ quote .Values.image.pullPolicy }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: "{{ include "oam-runtime.fullname" . }}-test-connection"
|
||||
name: {{ include "oam-runtime.fullname" . }}-test-connection
|
||||
labels:
|
||||
{{- include "oam-runtime.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
@@ -9,7 +9,7 @@ metadata:
|
||||
spec:
|
||||
containers:
|
||||
- name: wget
|
||||
image: busybox
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.test.app.repository }}:{{ .Values.test.app.tag }}
|
||||
command: ['wget']
|
||||
args: ['{{ include "oam-runtime.fullname" . }}:{{ .Values.healthCheck.port }}']
|
||||
restartPolicy: Never
|
||||
@@ -7,6 +7,8 @@ replicaCount: 1
|
||||
applyOnceOnly: "off"
|
||||
|
||||
disableCaps: "all"
|
||||
|
||||
imageRegistry: ""
|
||||
image:
|
||||
repository: oamdev/vela-core
|
||||
tag: latest
|
||||
@@ -98,4 +100,9 @@ concurrentReconciles: 4
|
||||
dependCheckWait: 30s
|
||||
|
||||
# OAMSpecVer is the oam spec version controller want to setup
|
||||
OAMSpecVer: "v0.2"
|
||||
OAMSpecVer: "v0.2"
|
||||
|
||||
test:
|
||||
app:
|
||||
repository: oamdev/busybox
|
||||
tag: latest
|
||||
@@ -24,7 +24,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: create
|
||||
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
|
||||
args:
|
||||
- create
|
||||
|
||||
@@ -24,7 +24,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: patch
|
||||
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
|
||||
args:
|
||||
- patch
|
||||
|
||||
@@ -35,7 +35,7 @@ spec:
|
||||
{{ if .Values.multicluster.clusterGateway.secureTLS.enabled }}
|
||||
- "--cert-dir={{ .Values.multicluster.clusterGateway.secureTLS.certPath }}"
|
||||
{{ end }}
|
||||
image: {{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
|
||||
imagePullPolicy: {{ .Values.multicluster.clusterGateway.image.pullPolicy }}
|
||||
resources:
|
||||
{{- toYaml .Values.multicluster.clusterGateway.resources | nindent 12 }}
|
||||
@@ -190,7 +190,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: create
|
||||
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
|
||||
args:
|
||||
- create
|
||||
@@ -233,7 +233,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: patch
|
||||
image: {{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
|
||||
imagePullPolicy: {{ .Values.multicluster.clusterGateway.image.pullPolicy }}
|
||||
command:
|
||||
- /patch
|
||||
|
||||
@@ -30,7 +30,7 @@ spec:
|
||||
args:
|
||||
- "apiserver"
|
||||
- "--port={{ .Values.apiServer.port }}"
|
||||
image: {{ .Values.apiserverImage.repository }}:{{ .Values.apiserverImage.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.apiserverImage.repository }}:{{ .Values.apiserverImage.tag }}
|
||||
imagePullPolicy: {{ quote .Values.apiserverImage.pullPolicy }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
|
||||
@@ -130,7 +130,7 @@ spec:
|
||||
{{ if .Values.multicluster.enabled }}
|
||||
- "--enable-cluster-gateway"
|
||||
{{ end }}
|
||||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
imagePullPolicy: {{ quote .Values.image.pullPolicy }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
|
||||
@@ -10,7 +10,7 @@ spec:
|
||||
- name: helm-test-express-server
|
||||
type: webservice
|
||||
properties:
|
||||
image: crccheck/hello-world
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.test.app.repository }}:{{ .Values.test.app.tag }}
|
||||
port: 8000
|
||||
traits:
|
||||
- type: ingress
|
||||
@@ -30,7 +30,7 @@ spec:
|
||||
serviceAccountName: kubevela-vela-core
|
||||
containers:
|
||||
- name: {{ .Release.Name }}-application-test
|
||||
image: alpine/k8s:1.18.2
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.test.k8s.repository }}:{{ .Values.test.k8s.tag }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
command:
|
||||
- /bin/bash
|
||||
|
||||
@@ -7,6 +7,8 @@ replicaCount: 1
|
||||
applyOnceOnly: "off"
|
||||
|
||||
disableCaps: ""
|
||||
|
||||
imageRegistry: ""
|
||||
image:
|
||||
repository: oamdev/vela-core
|
||||
tag: latest
|
||||
@@ -130,4 +132,12 @@ multicluster:
|
||||
memory: 200Mi
|
||||
secureTLS:
|
||||
enabled: true
|
||||
certPath: /etc/k8s-cluster-gateway-certs
|
||||
certPath: /etc/k8s-cluster-gateway-certs
|
||||
|
||||
test:
|
||||
app:
|
||||
repository: oamdev/hello-world
|
||||
tag: latest
|
||||
k8s:
|
||||
repository: oamdev/alpine-k8s
|
||||
tag: 1.18.2
|
||||
@@ -24,7 +24,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: create
|
||||
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
|
||||
args:
|
||||
- create
|
||||
|
||||
@@ -24,7 +24,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: patch
|
||||
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
|
||||
args:
|
||||
- patch
|
||||
|
||||
@@ -35,7 +35,7 @@ spec:
|
||||
{{ if .Values.multicluster.clusterGateway.secureTLS.enabled }}
|
||||
- "--cert-dir={{ .Values.multicluster.clusterGateway.secureTLS.certPath }}"
|
||||
{{ end }}
|
||||
image: {{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
|
||||
imagePullPolicy: {{ .Values.multicluster.clusterGateway.image.pullPolicy }}
|
||||
resources:
|
||||
{{- toYaml .Values.multicluster.clusterGateway.resources | nindent 12 }}
|
||||
@@ -132,7 +132,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: create
|
||||
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
|
||||
args:
|
||||
- create
|
||||
@@ -175,7 +175,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: patch
|
||||
image: {{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
|
||||
imagePullPolicy: {{ .Values.multicluster.clusterGateway.image.pullPolicy }}
|
||||
command:
|
||||
- /patch
|
||||
|
||||
@@ -30,7 +30,7 @@ spec:
|
||||
args:
|
||||
- "apiserver"
|
||||
- "--bind-addr=0.0.0.0:{{ .Values.apiServer.port }}"
|
||||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
imagePullPolicy: {{ quote .Values.image.pullPolicy }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
|
||||
@@ -132,7 +132,7 @@ spec:
|
||||
{{ if .Values.multicluster.enabled }}
|
||||
- "--enable-cluster-gateway"
|
||||
{{ end }}
|
||||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
imagePullPolicy: {{ quote .Values.image.pullPolicy }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
|
||||
@@ -10,53 +10,5 @@ spec:
|
||||
- name: helm-test-express-server
|
||||
type: webservice
|
||||
properties:
|
||||
image: crccheck/hello-world
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.test.app.repository }}:{{ .Values.test.app.tag }}
|
||||
port: 8000
|
||||
# traits:
|
||||
# - type: ingress
|
||||
# properties:
|
||||
# domain: testsvc.example.com
|
||||
# http:
|
||||
# "/": 8000
|
||||
# ---
|
||||
# apiVersion: v1
|
||||
# kind: Pod
|
||||
# metadata:
|
||||
# name: "{{ .Release.Name }}-application-test"
|
||||
# annotations:
|
||||
# "helm.sh/hook": test
|
||||
# helm.sh/hook-delete-policy: hook-succeeded
|
||||
# spec:
|
||||
# serviceAccountName: kubevela-vela-core
|
||||
# containers:
|
||||
# - name: {{ .Release.Name }}-application-test
|
||||
# image: alpine/k8s:1.18.2
|
||||
# imagePullPolicy: IfNotPresent
|
||||
# command:
|
||||
# - /bin/bash
|
||||
# - -ec
|
||||
# - |
|
||||
|
||||
# set -e
|
||||
|
||||
# echo "Waiting application is ready..."
|
||||
|
||||
# echo "waiting for application being Ready"
|
||||
# kubectl -n vela-system wait --for=condition=Ready applications.core.oam.dev helm-test-vela-app --timeout=3m
|
||||
# echo "application is Ready"
|
||||
|
||||
# # wait for deploy being created
|
||||
# echo "waiting for deployment being available"
|
||||
# kubectl -n vela-system wait --for=condition=available deployments helm-test-express-server --timeout 3m
|
||||
# echo "deployment being available"
|
||||
|
||||
# # wait for ingress being created
|
||||
# while ! [ `kubectl -n vela-system get ing helm-test-express-server | grep -v NAME | wc -l` = 1 ]; do
|
||||
# echo "waiting for ingress being created"
|
||||
# sleep 1
|
||||
# done
|
||||
|
||||
|
||||
|
||||
# echo "Application and its components are created"
|
||||
# restartPolicy: Never
|
||||
@@ -7,6 +7,8 @@ replicaCount: 1
|
||||
applyOnceOnly: "off"
|
||||
|
||||
disableCaps: "manualscalertrait,containerizedwokrload,envbinding"
|
||||
|
||||
imageRegistry: ""
|
||||
image:
|
||||
repository: oamdev/vela-core
|
||||
tag: latest
|
||||
@@ -125,4 +127,9 @@ multicluster:
|
||||
memory: 200Mi
|
||||
secureTLS:
|
||||
enabled: true
|
||||
certPath: /etc/k8s-cluster-gateway-certs
|
||||
certPath: /etc/k8s-cluster-gateway-certs
|
||||
|
||||
test:
|
||||
app:
|
||||
repository: oamdev/hello-world
|
||||
tag: latest
|
||||
Reference in New Issue
Block a user