Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

components.pilot.k8s.replicaCount should not be set when values.pilot.autoscaleEnabled is true #40246

Closed
martinstenhoff opened this issue Aug 3, 2022 · 2 comments · Fixed by #40297

Comments

@martinstenhoff
Copy link

martinstenhoff commented Aug 3, 2022

Bug Description

The default profile provided in 1.14.3 (istio-1.14.3/manifests/profiles/default.yaml) generates a warning message about "incompatible" config settings when used.

$ ./istio-1.14.3/bin/istioctl install -f ./istio-1.14.3/manifests/profiles/default.yaml
components.pilot.k8s.replicaCount should not be set when values.pilot.autoscaleEnabled is true
This will install the Istio 1.14.3 default profile with ["Istio core" "Istiod" "Ingress gateways"] components into the cluster. Proceed? (y/N)

The default for components.pilot (using istioctl profile dump command) seems to be:

pilot:
      enabled: true
      k8s:
        hpaSpec:
          maxReplicas: 5
          metrics:
          - resource:
              name: cpu
              target:
                averageUtilization: 80
                type: Utilization
            type: Resource
          minReplicas: 1
          scaleTargetRef:
            apiVersion: apps/v1
            kind: Deployment
            name: istiod
        replicaCount: 1

Version

istioctl version
no running Istio pods in "istio-system"
1.14.3

kubectl version --short
Flag --short has been deprecated, and will be removed in the future. The --short output will become the default.
Client Version: v1.24.3
Kustomize Version: v4.5.4
Server Version: v1.24.0

Additional Information

Perhaps the profile defaults should've been updated as part of this PR #36928

@howardjohn
Copy link
Member

You shouldn't need to pass -f ./manifests/profiles/default.yaml - its the defaults already. I think there is somehow logic to know if the warnings are from the built-in defaults not to warn:

$ istioctl install -f ./manifests/profiles/default.yaml --dry-run
components.pilot.k8s.replicaCount should not be set when values.pilot.autoscaleEnabled is true
^C
$ istioctl install  --dry-run
✔ Istio core installed
✔ Istiod installed
✔ Ingress gateways installed
- Pruning removed resources
^C

These will install the same thing in the end.

That being said, there may be some improvements to be made here as well

@martinstenhoff
Copy link
Author

You shouldn't need to pass -f ./manifests/profiles/default.yaml - its the defaults already. I think there is somehow logic to know if the warnings are from the built-in defaults not to warn:

I was actually using a customized profile based on the default profile but hadn't made any changes to the pilot specific config provided in the default which is why it's a bit surprising to get a warning about invalid pilot config.

The default.yaml profile contains:

values.pilot.autoscaleEnabled: true
values.pilot.replicaCount: 1

which appears to be copied to

components.pilot.k8s.replicaCount

Is the values.pilot.replicaCount: 1 value used for something else as well or could it be removed from the default profile?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants