istio / istio

Connect, secure, control, and observe services.
https://istio.io
Apache License 2.0
35.92k stars 7.75k forks source link

Detect `tag: ...-distroless` #51040

Open howardjohn opened 5 months ago

howardjohn commented 5 months ago

From slack:

""" is distroless default in 1.22 ambient profile? was just on 1.21.x and minimal profile

apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
  profile: ambient
  hub: gcr.io/istio-release
  tag: {{ istioVersion }}-distroless

getting image pull errors now Back-off pulling image "gcr.io/istio-release/pilot:1.22.0-distroless-distroless"

The issue is tag: {{ istioVersion }}-distroless This is the old way to configure the image type. Now there is variant Ambient defaults to vartiant: distroless So you end up with <hub>/image:<tag>-<variant>

You should do

apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
  profile: ambient
  hub: gcr.io/istio-release
  tag: {{ istioVersion }}

for ambient or if you want distroless off-ambient

apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
  hub: gcr.io/istio-release
  tag: {{ istioVersion }}
  variant: distroless

Probably we should automatically detect/warn/fix this case """


We can probably detect this in istioctl and warn or automatically correct it

nicole-lihui commented 5 months ago

I tried to solve the problem. and then I found that users could not use custom variant(The configuration parameters are not exposed and cannot be verified)

generate config: unknown field "variant" in v1alpha1.Values
howardjohn commented 5 months ago

It is values.global.variant=debug, sorry my initial example was wrong