Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
ServiceSpec is missing possibility to set annotations #21995
Describe the feature request
Describe alternatives you've considered
[ X] Configuration Infrastructure
At least in the source code I have not found it. Ihave
If you can tell me the secret trick to do it - you are more than wellcome, but anyway properly added and documented feature would be any way better.
we did have that documented: https://istio.io/docs/reference/config/istio.operator.v1alpha1/#KubernetesResourcesSpec. But yes our examples are hidden and hard to find, but here is one if you want to take a look to see how to overlay serviceannotations: https://github.com/istio/istio/blob/master/operator/cmd/mesh/testdata/manifest-generate/input/telemetry_k8s_settings.yaml
I've seen all these, but it is not (properly) implemented. May be we need to change this issue type from feature request to bug.
This is what I feed to istioctl:
spec: addonComponents: kiali: enabled: true k8s: serviceAnnotations: test.annotation: test service: type: NodePort
At least to me seems to be perfectly according to the documentation. And istioctl accepting it without any messages.
apiVersion: v1 kind: Service metadata: name: kiali namespace: istio-system labels: app: kiali release: istio spec: ports: - name: http-kiali protocol: TCP port: 20001 selector: app: kiali
where is my annotation? where is my type NodePort? They are all gone! The generated configuration is not what I have expected to have. My service annotation and service type are ignored by istioct.
It looks like it is global issue. For instance I've tried the following with grafana addon both old and new way:
values: grafana: service: annotations: test.annotation: test type: NodePort
and it produces correct result:
apiVersion: v1 kind: Service metadata: name: grafana namespace: istio-system annotations: test.annotation: "test" labels: app: grafana release: istio spec: type: NodePort ports: - port: 3000 targetPort: 3000 protocol: TCP name: http selector: app: grafana
but when I try the new way it is broken:
addonComponents: grafana: enabled: true k8s: serviceAnnotations: test.annotation: test service: type: NodePort
I would expect the result should be the same like previous one via values, but it is not:
apiVersion: v1 kind: Service metadata: name: grafana namespace: istio-system annotations: labels: app: grafana release: istio spec: type: ClusterIP ports: - port: 3000 targetPort: 3000 protocol: TCP name: http selector: app: grafana
Annotation is lost and service type set to ClusterIP instead of nodeport. So it is not kiali only, it is a general bug.