crossplane-contrib/provider-kubernetes

creating a secret passing a very long value for dockerconfigjson from a claim it causes an error

gladio78 opened this issue · 0 comments

If I pass a base64 encoded string from a claim to a .dockerconfigjson for creating a imagePullSecret in my cluster (EKS 1.23) , without using the convert FromBase64 but just as it is, it fails to create the object. (0.9 Kubernetes Provider)
It work flawlessly if I specify the value directly in the composition. so I don't think that the encoding is relevant but only the fact that probably is a very long string (800+ characters)

Below a fragment of the composition

  - name: k8s-pull-secret
    base:
      apiVersion: kubernetes.crossplane.io/v1alpha1
      kind: Object
      metadata:
        name: myapp-pull-secret
      spec:
        forProvider:
          manifest:
            apiVersion: v1
            kind: Secret
            metadata:
              name: myapp-pull-secret
              namespace: myapp-operator
            data:   
             .dockerconfigjson: my_econded_repo_pull_secrets
            type: kubernetes.io/dockerconfigjson
    patches:
    - fromFieldPath: spec.parameters.clusterName
      toFieldPath: metadata.name
      transforms:
      - type: string
        string:
          fmt: '%s-k8s-myapp-operator-pull-secret'
    - fromFieldPath: spec.parameters.clusterName
      toFieldPath: spec.providerConfigRef.name
    - fromFieldPath: spec.parameters.myAppPullsecretJson
      toFieldPath: spec.forProvider.manifest.data..dockerconfigjson