diff --git a/charts/oam-runtime/templates/admission-webhooks/job-patch/job-createSecret.yaml b/charts/oam-runtime/templates/admission-webhooks/job-patch/job-createSecret.yaml index de15dbf2d..b54c06069 100644 --- a/charts/oam-runtime/templates/admission-webhooks/job-patch/job-createSecret.yaml +++ b/charts/oam-runtime/templates/admission-webhooks/job-patch/job-createSecret.yaml @@ -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 diff --git a/charts/oam-runtime/templates/admission-webhooks/job-patch/job-patchWebhook.yaml b/charts/oam-runtime/templates/admission-webhooks/job-patch/job-patchWebhook.yaml index eaad9c4ee..52dfbdb7e 100644 --- a/charts/oam-runtime/templates/admission-webhooks/job-patch/job-patchWebhook.yaml +++ b/charts/oam-runtime/templates/admission-webhooks/job-patch/job-patchWebhook.yaml @@ -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 diff --git a/charts/oam-runtime/templates/oam-runtime-controller.yaml b/charts/oam-runtime/templates/oam-runtime-controller.yaml index 005a2dc25..3cc87f8ee 100644 --- a/charts/oam-runtime/templates/oam-runtime-controller.yaml +++ b/charts/oam-runtime/templates/oam-runtime-controller.yaml @@ -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 }} diff --git a/charts/oam-runtime/templates/test/test-application.yaml b/charts/oam-runtime/templates/test/test-application.yaml index a9375c7f6..aa1c2bbf8 100644 --- a/charts/oam-runtime/templates/test/test-application.yaml +++ b/charts/oam-runtime/templates/test/test-application.yaml @@ -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 \ No newline at end of file diff --git a/charts/oam-runtime/values.yaml b/charts/oam-runtime/values.yaml index b387e53f4..6ac5cd013 100644 --- a/charts/oam-runtime/values.yaml +++ b/charts/oam-runtime/values.yaml @@ -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" \ No newline at end of file +OAMSpecVer: "v0.2" + +test: + app: + repository: oamdev/busybox + tag: latest \ No newline at end of file diff --git a/charts/vela-core/templates/admission-webhooks/job-patch/job-createSecret.yaml b/charts/vela-core/templates/admission-webhooks/job-patch/job-createSecret.yaml index b62f91dc1..b792c2c44 100644 --- a/charts/vela-core/templates/admission-webhooks/job-patch/job-createSecret.yaml +++ b/charts/vela-core/templates/admission-webhooks/job-patch/job-createSecret.yaml @@ -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 diff --git a/charts/vela-core/templates/admission-webhooks/job-patch/job-patchWebhook.yaml b/charts/vela-core/templates/admission-webhooks/job-patch/job-patchWebhook.yaml index 03744aeed..35f66e40c 100644 --- a/charts/vela-core/templates/admission-webhooks/job-patch/job-patchWebhook.yaml +++ b/charts/vela-core/templates/admission-webhooks/job-patch/job-patchWebhook.yaml @@ -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 diff --git a/charts/vela-core/templates/cluster-gateway.yaml b/charts/vela-core/templates/cluster-gateway.yaml index b0943f13a..d2dee6662 100644 --- a/charts/vela-core/templates/cluster-gateway.yaml +++ b/charts/vela-core/templates/cluster-gateway.yaml @@ -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 diff --git a/charts/vela-core/templates/kubevela-apiserver.yaml b/charts/vela-core/templates/kubevela-apiserver.yaml index 9a8b2e7c4..be8d70c28 100644 --- a/charts/vela-core/templates/kubevela-apiserver.yaml +++ b/charts/vela-core/templates/kubevela-apiserver.yaml @@ -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 }} diff --git a/charts/vela-core/templates/kubevela-controller.yaml b/charts/vela-core/templates/kubevela-controller.yaml index e6241d910..6e85c5c63 100644 --- a/charts/vela-core/templates/kubevela-controller.yaml +++ b/charts/vela-core/templates/kubevela-controller.yaml @@ -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 }} diff --git a/charts/vela-core/templates/test/test-application.yaml b/charts/vela-core/templates/test/test-application.yaml index 184200375..cb4ee05f7 100644 --- a/charts/vela-core/templates/test/test-application.yaml +++ b/charts/vela-core/templates/test/test-application.yaml @@ -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 diff --git a/charts/vela-core/values.yaml b/charts/vela-core/values.yaml index 327fd4615..dea0cf26b 100644 --- a/charts/vela-core/values.yaml +++ b/charts/vela-core/values.yaml @@ -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 \ No newline at end of file + certPath: /etc/k8s-cluster-gateway-certs + +test: + app: + repository: oamdev/hello-world + tag: latest + k8s: + repository: oamdev/alpine-k8s + tag: 1.18.2 \ No newline at end of file diff --git a/charts/vela-minimal/templates/admission-webhooks/job-patch/job-createSecret.yaml b/charts/vela-minimal/templates/admission-webhooks/job-patch/job-createSecret.yaml index b62f91dc1..b792c2c44 100644 --- a/charts/vela-minimal/templates/admission-webhooks/job-patch/job-createSecret.yaml +++ b/charts/vela-minimal/templates/admission-webhooks/job-patch/job-createSecret.yaml @@ -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 diff --git a/charts/vela-minimal/templates/admission-webhooks/job-patch/job-patchWebhook.yaml b/charts/vela-minimal/templates/admission-webhooks/job-patch/job-patchWebhook.yaml index 03744aeed..35f66e40c 100644 --- a/charts/vela-minimal/templates/admission-webhooks/job-patch/job-patchWebhook.yaml +++ b/charts/vela-minimal/templates/admission-webhooks/job-patch/job-patchWebhook.yaml @@ -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 diff --git a/charts/vela-minimal/templates/cluster-gateway.yaml b/charts/vela-minimal/templates/cluster-gateway.yaml index 817036913..b2dd3fe5c 100644 --- a/charts/vela-minimal/templates/cluster-gateway.yaml +++ b/charts/vela-minimal/templates/cluster-gateway.yaml @@ -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 diff --git a/charts/vela-minimal/templates/kubevela-apiserver.yaml b/charts/vela-minimal/templates/kubevela-apiserver.yaml index 21baa5069..428e967d0 100644 --- a/charts/vela-minimal/templates/kubevela-apiserver.yaml +++ b/charts/vela-minimal/templates/kubevela-apiserver.yaml @@ -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 }} diff --git a/charts/vela-minimal/templates/kubevela-controller.yaml b/charts/vela-minimal/templates/kubevela-controller.yaml index 379993796..9accfbaf6 100644 --- a/charts/vela-minimal/templates/kubevela-controller.yaml +++ b/charts/vela-minimal/templates/kubevela-controller.yaml @@ -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 }} diff --git a/charts/vela-minimal/templates/test/test-application.yaml b/charts/vela-minimal/templates/test/test-application.yaml index a805ce94d..af70ddecd 100644 --- a/charts/vela-minimal/templates/test/test-application.yaml +++ b/charts/vela-minimal/templates/test/test-application.yaml @@ -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 \ No newline at end of file diff --git a/charts/vela-minimal/values.yaml b/charts/vela-minimal/values.yaml index c5191ce8d..865c74986 100644 --- a/charts/vela-minimal/values.yaml +++ b/charts/vela-minimal/values.yaml @@ -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 \ No newline at end of file + certPath: /etc/k8s-cluster-gateway-certs + +test: + app: + repository: oamdev/hello-world + tag: latest \ No newline at end of file