Skip to content

Commit

Permalink
image hub set (#483)
Browse files Browse the repository at this point in the history
Co-authored-by: bobtthp <bobtthp@bobtthp-mbp.local>
Co-authored-by: Albumen Kevin <jhq0812@gmail.com>
  • Loading branch information
3 people authored Sep 8, 2022
1 parent 119744b commit 287bbeb
Show file tree
Hide file tree
Showing 31 changed files with 65 additions and 65 deletions.
2 changes: 1 addition & 1 deletion manifests/charts/gateway/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ sources:
icon: https://istio.io/latest/favicons/android-192x192.png
keywords:
- istio
- gateways
- gateways
2 changes: 1 addition & 1 deletion manifests/charts/gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ affinity: {}
# If specified, the gateway will act as a network gateway for the given network.
networkGateway: ""

imagePullSecrets: []
imagePullSecrets: []
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ spec:
{{- if contains "/" .Values.global.proxy.image }}
image: "{{ .Values.global.proxy.image }}"
{{- else }}
image: "{{ .Values.global.hub }}/{{ .Values.global.proxy.image | default "proxyv2" }}:{{ .Values.global.tag }}"
image: "{{ .Values.global.hub }}/{{ .Values.global.proxy.image | default "dubbo-agent" }}:{{ .Values.global.tag }}"
{{- end }}
{{- if .Values.global.imagePullPolicy }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
Expand All @@ -92,7 +92,7 @@ spec:
{{- if contains "/" .Values.global.proxy.image }}
image: "{{ .Values.global.proxy.image }}"
{{- else }}
image: "{{ .Values.global.hub }}/{{ .Values.global.proxy.image | default "proxyv2" }}:{{ .Values.global.tag }}"
image: "{{ .Values.global.hub }}/{{ .Values.global.proxy.image | default "dubbo-agent" }}:{{ .Values.global.tag }}"
{{- end }}
{{- if .Values.global.imagePullPolicy }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
Expand Down
4 changes: 2 additions & 2 deletions manifests/charts/gateways/istio-egress/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ global:
# Default hub for Istio images.
# Releases are published to docker hub under 'istio' project.
# Dev builds from prow are on gcr.io
hub: gcr.io/istio-testing
hub: apache

# Default tag for Istio images.
tag: latest
Expand Down Expand Up @@ -184,7 +184,7 @@ global:
priorityClassName: ""

proxy:
image: proxyv2
image: dubbo-agent

# CAUTION: It is important to ensure that all Istio helm charts specify the same clusterDomain value
# cluster domain. Default value is "cluster.local".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ spec:
{{- if contains "/" .Values.global.proxy.image }}
image: "{{ .Values.global.proxy.image }}"
{{- else }}
image: "{{ .Values.global.hub }}/{{ .Values.global.proxy.image | default "proxyv2" }}:{{ .Values.global.tag }}"
image: "{{ .Values.global.hub }}/{{ .Values.global.proxy.image | default "dubbo-agent" }}:{{ .Values.global.tag }}"
{{- end }}
{{- if .Values.global.imagePullPolicy }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
Expand All @@ -92,7 +92,7 @@ spec:
{{- if contains "/" .Values.global.proxy.image }}
image: "{{ .Values.global.proxy.image }}"
{{- else }}
image: "{{ .Values.global.hub }}/{{ .Values.global.proxy.image | default "proxyv2" }}:{{ .Values.global.tag }}"
image: "{{ .Values.global.hub }}/{{ .Values.global.proxy.image | default "dubbo-agent" }}:{{ .Values.global.tag }}"
{{- end }}
{{- if .Values.global.imagePullPolicy }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
Expand Down
4 changes: 2 additions & 2 deletions manifests/charts/gateways/istio-ingress/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ global:
# Default hub for Istio images.
# Releases are published to docker hub under 'istio' project.
# Dev builds from prow are on gcr.io
hub: gcr.io/istio-testing
hub: apache

# Default tag for Istio images.
tag: latest
Expand Down Expand Up @@ -197,7 +197,7 @@ global:
priorityClassName: ""

proxy:
image: proxyv2
image: dubbo-agent

# CAUTION: It is important to ensure that all Istio helm charts specify the same clusterDomain value
# cluster domain. Default value is "cluster.local".
Expand Down
2 changes: 1 addition & 1 deletion manifests/charts/istio-cni/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ global:
# Default hub for Istio images.
# Releases are published to docker hub under 'istio' project.
# Dev builds from prow are on gcr.io
hub: gcr.io/istio-testing
hub: apache

# Default tag for Istio images.
tag: latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ data:
}
},
"externalIstiod": false,
"hub": "gcr.io/istio-testing",
"hub": "apache",
"imagePullPolicy": "",
"imagePullSecrets": [],
"istioNamespace": "istio-system",
Expand Down Expand Up @@ -119,7 +119,7 @@ data:
"excludeInboundPorts": "",
"excludeOutboundPorts": "",
"holdApplicationUntilProxyStarts": false,
"image": "proxyv2",
"image": "dubbo-agent",
"includeIPRanges": "*",
"includeInboundPorts": "*",
"includeOutboundPorts": "",
Expand All @@ -142,7 +142,7 @@ data:
"tracer": "zipkin"
},
"proxy_init": {
"image": "proxyv2",
"image": "dubbo-agent",
"resources": {
"limits": {
"cpu": "2000m",
Expand Down Expand Up @@ -1570,7 +1570,7 @@ spec:
fsGroup: 1337
containers:
- name: discovery
image: "gcr.io/istio-testing/pilot:latest"
image: "apache/dubbo-pilot:latest"
args:
- "discovery"
- --monitoringAddr=:15014
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ spec:
averageUtilization: {{ .Values.pilot.cpu.targetAverageUtilization }}
---
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ subjects:
- kind: ServiceAccount
name: istiod{{- if not (eq .Values.revision "")}}-{{ .Values.revision }}{{- end }}
namespace: {{ .Values.global.istioNamespace }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ spec:
{{- if contains "/" .Values.pilot.image }}
image: "{{ .Values.pilot.image }}"
{{- else }}
image: "{{ .Values.pilot.hub | default .Values.global.hub }}/{{ .Values.pilot.image | default "pilot" }}:{{ .Values.pilot.tag | default .Values.global.tag }}"
image: "{{ .Values.pilot.hub | default .Values.global.hub }}/{{ .Values.pilot.image | default "dubbo-pilot" }}:{{ .Values.pilot.tag | default .Values.global.tag }}"
{{- end }}
{{- if .Values.global.imagePullPolicy }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
Expand Down
8 changes: 4 additions & 4 deletions manifests/charts/istio-control/istio-discovery/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pilot:
tag: ""

# Can be a full hub/image:tag
image: pilot
image: dubbo-pilot
traceSampling: 1.0

# Resources for a small pilot install
Expand Down Expand Up @@ -235,7 +235,7 @@ global:
# Default hub for Istio images.
# Releases are published to docker hub under 'istio' project.
# Dev builds from prow are on gcr.io
hub: gcr.io/istio-testing
hub: apache
# Default tag for Istio images.
tag: latest

Expand Down Expand Up @@ -297,7 +297,7 @@ global:
priorityClassName: ""

proxy:
image: proxyv2
image: dubbo-agent

# This controls the 'policy' in the sidecar injector.
autoInject: enabled
Expand Down Expand Up @@ -367,7 +367,7 @@ global:

proxy_init:
# Base name for the proxy_init container, used to configure iptables.
image: proxyv2
image: dubbo-agent
resources:
limits:
cpu: 2000m
Expand Down
2 changes: 1 addition & 1 deletion manifests/charts/istio-operator/files/gen-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ spec:
serviceAccountName: istio-operator
containers:
- name: istio-operator
image: gcr.io/istio-testing/operator:1.14-dev
image: apache/dubbo-operator:latest
command:
- operator
- server
Expand Down
2 changes: 1 addition & 1 deletion manifests/charts/istio-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
serviceAccountName: istio-operator{{- if not (eq .Values.revision "") }}-{{ .Values.revision }}{{- end }}
containers:
- name: istio-operator
image: {{.Values.hub}}/operator:{{.Values.tag}}
image: {{.Values.hub}}/dubbo-operator:{{.Values.tag}}
command:
- operator
- server
Expand Down
2 changes: 1 addition & 1 deletion manifests/charts/istio-operator/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
hub: gcr.io/istio-testing
hub: apache
tag: latest

# ImagePullSecrets for operator ServiceAccount, list of secrets in the same namespace
Expand Down
8 changes: 4 additions & 4 deletions manifests/charts/istiod-remote/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pilot:
hub: ""
tag: ""
# Can be a full hub/image:tag
image: pilot
image: dubbo-pilot
traceSampling: 1.0
# Resources for a small pilot install
resources:
Expand Down Expand Up @@ -203,7 +203,7 @@ global:
# Default hub for Istio images.
# Releases are published to docker hub under 'istio' project.
# Dev builds from prow are on gcr.io
hub: gcr.io/istio-testing
hub: apache
# Default tag for Istio images.
tag: latest
# Specify image pull policy if default behavior isn't desired.
Expand Down Expand Up @@ -256,7 +256,7 @@ global:
# for more detail.
priorityClassName: ""
proxy:
image: proxyv2
image: dubbo-agent
# This controls the 'policy' in the sidecar injector.
autoInject: enabled
# CAUTION: It is important to ensure that all Istio helm charts specify the same clusterDomain value
Expand Down Expand Up @@ -309,7 +309,7 @@ global:
holdApplicationUntilProxyStarts: false
proxy_init:
# Base name for the proxy_init container, used to configure iptables.
image: proxyv2
image: dubbo-agent
resources:
limits:
cpu: 2000m
Expand Down
10 changes: 5 additions & 5 deletions manifests/profiles/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: IstioOperator
metadata:
namespace: istio-system
spec:
hub: gcr.io/istio-testing
hub: apache
tag: latest

# You may override parts of meshconfig by uncommenting the following lines.
Expand All @@ -25,7 +25,7 @@ spec:
# Istio Gateway feature
ingressGateways:
- name: istio-ingressgateway
enabled: true
enabled: false
egressGateways:
- name: istio-egressgateway
enabled: false
Expand All @@ -52,7 +52,7 @@ spec:
pilotCertProvider: istiod
jwtPolicy: third-party-jwt
proxy:
image: proxyv2
image: dubbo-agent
clusterDomain: "cluster.local"
resources:
requests:
Expand All @@ -76,7 +76,7 @@ spec:
autoInject: enabled
tracer: "zipkin"
proxy_init:
image: proxyv2
image: dubbo-agent
resources:
limits:
cpu: 2000m
Expand Down Expand Up @@ -124,7 +124,7 @@ spec:
autoscaleMin: 1
autoscaleMax: 5
replicaCount: 1
image: pilot
image: dubbo-pilot
traceSampling: 1.0
env: {}
cpu:
Expand Down
14 changes: 7 additions & 7 deletions operator/cmd/mesh/manifest-generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func TestMain(m *testing.M) {
func TestManifestGenerateComponentHubTag(t *testing.T) {
g := NewWithT(t)

objs, err := runManifestCommands("component_hub_tag", "", liveCharts, []string{"templates/deployment.yaml"})
objs, err := runManifestCommands("component_hub_tag", "--set values.gateways.istio-ingressgateway.enabled=true", liveCharts, []string{"templates/deployment.yaml"})
if err != nil {
t.Fatal(err)
}
Expand All @@ -123,12 +123,12 @@ func TestManifestGenerateComponentHubTag(t *testing.T) {
{
deploymentName: "istio-ingressgateway",
containerName: "istio-proxy",
want: "istio-spec.hub/proxyv2:istio-spec.tag",
want: "istio-spec.hub/dubbo-agent:istio-spec.tag",
},
{
deploymentName: "istiod",
containerName: "discovery",
want: "component.pilot.hub/pilot:2",
want: "component.pilot.hub/dubbo-pilot:2",
},
}

Expand Down Expand Up @@ -329,12 +329,12 @@ func TestManifestGenerateFlagsSetHubTag(t *testing.T) {
dobj := mustGetDeployment(g, objs, "istiod")

c := dobj.Container("discovery")
g.Expect(c).Should(HavePathValueEqual(PathValue{"image", "foo/pilot:bar"}))
g.Expect(c).Should(HavePathValueEqual(PathValue{"image", "foo/dubbo-pilot:bar"}))
}

func TestManifestGenerateFlagsSetValues(t *testing.T) {
g := NewWithT(t)
m, _, err := generateManifest("default", "-s values.global.proxy.image=myproxy -s values.global.proxy.includeIPRanges=172.30.0.0/16,172.21.0.0/16", liveCharts,
m, _, err := generateManifest("default", "-s values.gateways.istio-ingressgateway.enabled=true -s values.global.proxy.image=myproxy -s values.global.proxy.includeIPRanges=172.30.0.0/16,172.21.0.0/16", liveCharts,
[]string{"templates/deployment.yaml", "templates/istiod-injector-configmap.yaml"})
if err != nil {
t.Fatal(err)
Expand All @@ -346,7 +346,7 @@ func TestManifestGenerateFlagsSetValues(t *testing.T) {
dobj := mustGetDeployment(g, objs, "istio-ingressgateway")

c := dobj.Container("istio-proxy")
g.Expect(c).Should(HavePathValueEqual(PathValue{"image", "gcr.io/istio-testing/myproxy:latest"}))
g.Expect(c).Should(HavePathValueEqual(PathValue{"image", "apache/myproxy:latest"}))

cm := objs.kind("ConfigMap").nameEquals("istio-sidecar-injector").Unstructured()
// TODO: change values to some nicer format rather than text block.
Expand Down Expand Up @@ -630,7 +630,7 @@ func TestConfigSelectors(t *testing.T) {
"templates/autoscale.yaml",
"templates/serviceaccount.yaml",
}
got, err := runManifestGenerate([]string{}, "--set values.gateways.istio-egressgateway.enabled=true", liveCharts, selectors)
got, err := runManifestGenerate([]string{}, "--set values.gateways.istio-ingressgateway.enabled=true --set values.gateways.istio-egressgateway.enabled=true", liveCharts, selectors)
if err != nil {
t.Fatal(err)
}
Expand Down
Binary file modified operator/cmd/mesh/testdata/manifest-generate/data-snapshot.tar.gz
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8251,7 +8251,7 @@ data:
"excludeInboundPorts": "",
"excludeOutboundPorts": "",
"holdApplicationUntilProxyStarts": false,
"image": "proxyv2",
"image": "dubbo-agent",
"includeIPRanges": "*",
"includeInboundPorts": "*",
"includeOutboundPorts": "",
Expand All @@ -8274,7 +8274,7 @@ data:
"tracer": "zipkin"
},
"proxy_init": {
"image": "proxyv2",
"image": "dubbo-agent",
"resources": {
"limits": {
"cpu": "2000m",
Expand Down Expand Up @@ -9548,7 +9548,7 @@ spec:
serviceAccountName: istio-egressgateway-service-account
containers:
- name: istio-proxy
image: "gcr.io/istio-testing/proxyv2:latest"
image: "gcr.io/istio-testing/dubbo-agent:latest"
ports:
- containerPort: 8080
protocol: TCP
Expand Down Expand Up @@ -9792,7 +9792,7 @@ spec:
serviceAccountName: istio-ingressgateway-service-account
containers:
- name: istio-proxy
image: "gcr.io/istio-testing/proxyv2:latest"
image: "gcr.io/istio-testing/dubbo-agent:latest"
ports:
- containerPort: 15021
protocol: TCP
Expand Down Expand Up @@ -10028,7 +10028,7 @@ spec:
fsGroup: 1337
containers:
- name: discovery
image: "gcr.io/istio-testing/pilot:latest"
image: "gcr.io/istio-testing/dubbo-pilot:latest"
args:
- "discovery"
- --monitoringAddr=:15014
Expand Down
Loading

0 comments on commit 287bbeb

Please sign in to comment.