SAP / sap-btp-service-operator

SAP BTP service operator enables developers to connect Kubernetes clusters to SAP BTP accounts and to consume SAP BTP services within the clusters by using Kubernetes native tools.
Apache License 2.0
125 stars 49 forks source link

Can't render sapbtp-operator deployment #462

Closed MarekMichali closed 2 weeks ago

MarekMichali commented 2 weeks ago

When trying to run the helm template command, the v.0.6.7 version of the sapbtp-operator returns an error.

helm template . -s templates/deployment.yml --debug

# Source: sap-btp-operator/templates/deployment.yml
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    control-plane: controller-manager
    app.kubernetes.io/instance: sap-btp-operator
    app.kubernetes.io/name: sap-btp-operator
  name: sap-btp-operator-controller-manager
  namespace: default
spec:
  replicas: 2
  selector:
    matchLabels:
      control-plane: controller-manager
  template:
    metadata:
      annotations:
        checksum/config: 03ab0e75386720ea4d2fb5ad74cab72224de0cb03651f3e2e61e4fd514ec7164
      labels:
        control-plane: controller-manager
        app.kubernetes.io/instance: sap-btp-operator
        app.kubernetes.io/name: sap-btp-operator
    spec:
      serviceAccountName: sap-btp-operator
      containers:
        - args:
            - --secure-listen-address=0.0.0.0:8443
            - --upstream=http://127.0.0.1:8080/
            - --logtostderr=true
            - --v=10
          image: "quay.io/brancz/kube-rbac-proxy:v0.15.0"
          name: kube-rbac-proxy
          resources:
            limits:
            requests:
          ports:
            - containerPort: 8443
              name: https
        - args:
            - --metrics-addr=127.0.0.1:8080
            - --enable-leader-election
            - --logger_use_dev_mode=true
          command:
            - /manager
          envFrom:
            - configMapRef:
                name: sap-btp-operator-config
            - secretRef:
                name: sap-btp-operator-clusterid
                optional: true
          image: "ghcr.io/sap/sap-btp-service-operator/controller:v0.6.7"
          imagePullPolicy: IfNotPresent
          name: manager
          ports:
            - containerPort: 9443
              name: webhook-server
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8081
            initialDelaySeconds: 15
            periodSeconds: 20
          readinessProbe:
            httpGet:
              path: /readyz
              port: 8081
            initialDelaySeconds: 5
            periodSeconds: 10
          resources:
            limits:
              cpu: 250m
              memory: 200Mi
            requests:
              cpu: 100m
              memory: 20Mi
          volumeMounts:
            - mountPath: /tmp/k8s-webhook-server/serving-certs
              name: cert
              readOnly: true
      terminationGracePeriodSeconds: 10
      volumes:
        - name: cert
          secret:
            defaultMode: 420
            secretName: webhook-server-cert
      { { - if .Values.manager.topologySpreadConstraints } }
      topologySpreadConstraints: { { toYaml .Values.manager.topologySpreadConstraints | nindent 8 } }
      { { - end } }
Error: YAML parse error on sap-btp-operator/templates/deployment.yml: error converting YAML to JSON: yaml: line 88: could not find expected ':'
helm.go:84: [debug] error converting YAML to JSON: yaml: line 88: could not find expected ':'

From my tests, it looks like this is caused by unnecessary spaces in the topologySpreadConstraints section in the deployment, even though the error message suggests otherwise.

I065450 commented 2 weeks ago

Thank you for bringing this to our attention. We're working on a fix.

I065450 commented 2 weeks ago

please use new version v0.6.8