-1

I'm not very experimented with k8s. I have a ConfigMap defined like this:

kind: ConfigMap
metadata:
  name: cluster-parameters
  namespace: argocd
data:
  load_balancer.name: nlb-kubeflow-test
  load_balancer.scheme: internet-facing
  load_balancer.nlb_target_type: instance
  route53.hosted_zone_hostnames: kubeflow.domain.com

And I'm trying to use it like this:

apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
  namespace: istio-system
  name: istio
spec:
  profile: default
  tag: 1.10.1 # istio/operator
  hub: docker.io/istio
  components:
    ingressGateways:
    - name: istio-ingressgateway
      k8s:
        service:
          type: LoadBalancer
        serviceAnnotations:
          service.beta.kubernetes.io/aws-load-balancer-name:
            valueFrom:
              configMapKeyRef:
                name: cluster-parameters
                key: load_balancer.name
          service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: '*'
          service.beta.kubernetes.io/aws-load-balancer-scheme:
            valueFrom:
              configMapKeyRef:
                name: cluster-parameters
                key: load_balancer.scheme
          service.beta.kubernetes.io/aws-load-balancer-type: external
          service.beta.kubernetes.io/aws-load-balancer-nlb-target-type:
            valueFrom:
              configMapKeyRef:
                name: cluster-parameters
                key: load_balancer.nlb_target_type
          proxy.istio.io/config: '{"gatewayTopology" : { "numTrustedProxies": 2 } }'
          external-dns.alpha.kubernetes.io/hostname:
            valueFrom:
              configMapKeyRef:
                name: cluster-parameters
                key: route53.hosted_zone_hostnames
  values:
    sidecarInjectorWebhook:
      neverInjectSelector:
      # kube-prometheus-stack
      ## Admission Webhook jobs do not terminate as expected with istio-proxy
      - matchExpressions:
        - {key: app, operator: In, values: [kube-prometheus-stack-admission-create, kube-prometheus-stack-admission-patch]}

But it doesn't seem to be working, what am I missing? Can ConfigMap be used in k8s CRDs? Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.