istio icon indicating copy to clipboard operation
istio copied to clipboard

Istio installation using IOP failed when hpaSpec for cpu utilization configured for components

Open muraliinformal opened this issue 3 years ago • 3 comments

Installing istio with IOP(default profile) failed when hpaSpec for cpu utilization configured.

Error message -

- Processing resources for Istio core.
   ✔ Istio core installed
   - Processing resources for Istiod.2022-08-30T23:43:32.119129Z        error   installer       failed to update resource with server-side apply for obj HorizontalPodAutoscaler/istio-system/istiod: failed to create typed patch object (istio-system/istiod; autoscaling/v2beta1, Kind=HorizontalPodAutoscaler): .spec.metrics[0].resource.target: field not declared in schema
   
   ✘ Istiod encountered an error: failed to update resource with server-side apply for obj HorizontalPodAutoscaler/istio-system/istiod: failed to create typed patch object (istio-system/istiod; autoscaling/v2beta1, Kind=HorizontalPodAutoscaler): .spec.metrics[0].resource.target: field not declared in schema

Istio version - 1.14.3 Kubernetes version - 1.24.3

Attachments: Istio IOP file generated using istioctl profile dump istio_1.14.3_default_profile.txt

muraliinformal avatar Sep 15 '22 17:09 muraliinformal

Minimal reproducer:

apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
  components:
    ingressGateways:
    - enabled: true
      k8s:
        hpaSpec:
          metrics:
          - resource:
              name: cpu
              targetAverageUtilization: 80
            type: Resource
      name: istio-ingressgateway
  values:
    pilot:
      cpu:
        targetAverageUtilization: 80


howardjohn avatar Sep 15 '22 20:09 howardjohn

I will take a look

zirain avatar Sep 16 '22 01:09 zirain

you can workaround by using:

apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
  components:
    pilot:
      k8s:
        hpaSpec:
          metrics:
          - resource:
              name: cpu
              targetAverageUtilization: 80
            type: Resource
    ingressGateways:
    - enabled: true
      k8s:
        hpaSpec:
          metrics:
          - resource:
              name: cpu
              targetAverageUtilization: 80
            type: Resource
      name: istio-ingressgateway
  # values:
  #   pilot:
  #     cpu:
  #       targetAverageUtilization: 80

zirain avatar Sep 16 '22 07:09 zirain