Skip to content

Commit

Permalink
feat: configurable images for istio-gateway (#323)
Browse files Browse the repository at this point in the history
# Description
More details in: #322

# Summary of changes:
- Added proxy-image config option.
- Updated manifest template with placeholder for proxy image.
- Modified charm code to render manifest with proxy image from configuration.

# Testing

For complete testing refer to #322
---------

Co-authored-by: Orfeas Kourkakis <[email protected]>
  • Loading branch information
i-chvets and orfeas-k authored Aug 31, 2023
1 parent 9f310bf commit bed0151
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions charms/istio-gateway/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ options:
type: string
description: |
Type of service for the ingress gateway out of: 'ClusterIP', 'LoadBalancer', or 'NodePort'.
proxy-image:
default: 'docker.io/istio/proxyv2:1.17.3'
description: Istio Proxy image
type: string
2 changes: 2 additions & 0 deletions charms/istio-gateway/src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def start(self, event):
rendered = template.render(
kind=self.model.config["kind"],
namespace=self.model.name,
proxy_image=self.model.config["proxy-image"],
pilot_host=pilot["service-name"],
pilot_port=pilot["service-port"],
gateway_service_type=self.model.config["gateway_service_type"],
Expand All @@ -88,6 +89,7 @@ def remove(self, event):
rendered = template.render(
kind=self.model.config["kind"],
namespace=self.model.name,
proxy_image=self.model.config["proxy-image"],
pilot_host="foo",
pilot_port="foo",
)
Expand Down
2 changes: 1 addition & 1 deletion charms/istio-gateway/src/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ spec:
value: standard
- name: ISTIO_META_CLUSTER_ID
value: Kubernetes
image: docker.io/istio/proxyv2:1.17.3
image: {{ proxy_image }}
name: istio-proxy
ports:
- containerPort: 15021
Expand Down

0 comments on commit bed0151

Please sign in to comment.