Skip to content

Commit

Permalink
Disable imageDigest support in ztunnel controller
Browse files Browse the repository at this point in the history
Currently, we have some pending work with the ztunnel images that
are used as imageDigests. Because of this, when deploying Ambient
profile using the OSSM operator, the ztunnel pod fails to come up.
This PR temporarily disables this functionality until proper support
is implemented.

Alternatives:
1. Default Image: If no image details are provided in the ZTunnel CR,
   the operator will use the default image from the helm chart.
2. Explicitly specify image details: Following a recent fix in the
   ztunnel controller (PR#568), users can specify image details within
   the ztunnel CR itself in one of the following ways.
   2.1: ztunnel.spec.values.ztunnel.image
   2.2: ztunnel.spec.values.global.hub/tag

Fixes: istio-ecosystem#581
Signed-off-by: Sridhar Gaddam <[email protected]>
  • Loading branch information
sridhargaddam committed Jan 23, 2025
1 parent 6f59106 commit 81b9b67
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion controllers/ztunnel/ztunnel_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,17 @@ func (r *Reconciler) installHelmChart(ctx context.Context, ztunnel *v1alpha1.ZTu
userValues := ztunnel.Spec.Values

// apply image digests from configuration, if not already set by user
userValues = applyImageDigests(ztunnel, userValues, config.Config)
// TODO: Revisit once we support ImageOverrides for ztunnel
// userValues = applyImageDigests(ztunnel, userValues, config.Config)

if userValues == nil {
userValues = &v1alpha1.ZTunnelValues{}
}

// set image digest unless any part of the image has been configured by the user
if userValues.ZTunnel == nil {
userValues.ZTunnel = &v1alpha1.ZTunnelConfig{}
}

// apply userValues on top of defaultValues from profiles
mergedHelmValues, err := istiovalues.ApplyProfilesAndPlatform(
Expand Down
2 changes: 1 addition & 1 deletion controllers/ztunnel/ztunnel_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ func TestDetermineReadyCondition(t *testing.T) {
}
}

func TestApplyImageDigests(t *testing.T) {
func PTestApplyImageDigests(t *testing.T) {
testCases := []struct {
name string
config config.OperatorConfig
Expand Down

0 comments on commit 81b9b67

Please sign in to comment.