Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: LinuxVirtualMachineScaleSet / spec.forProvider.customData requires a double-encoded value #919

Open
1 task done
chkp-orhaz opened this issue Jan 28, 2025 · 1 comment
Labels
bug Something isn't working needs:triage

Comments

@chkp-orhaz
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Affected Resource(s)

compute.azure.upbound.io - LinuxVirtualMachineScaleSet

Resource MRs required to reproduce the bug

apiVersion: compute.azure.upbound.io/v1beta1
kind: LinuxVirtualMachineScaleSet
metadata:
  labels:
    env: dev
    region: westeurope
  name: fw
spec:
  forProvider:
    disablePasswordAuthentication: false
    adminUsername: admin
    adminPasswordSecretRef:
      key: password
      name: admin-password
      namespace: crossplane-system
    instances: 1
    location: West Europe
    networkInterface:
      - ipConfiguration:
          - name: internal
            primary: true
            subnetIdSelector:
              matchLabels:
                env: dev
                region: westeurope
        name: example
        primary: true
    osDisk:
      - caching: ReadWrite
        storageAccountType: Standard_LRS
    resourceGroupNameSelector:
      matchLabels:
        env: dev
        region: westeurope
    sku: Standard_F2
    sourceImageReference:
    - publisher: checkpoint
      offer: check-point-cg-r8120
      sku: sg-byol
      version: latest
    customDataSecretRef:
      key: customData
      name: greatScript
      namespace: crossplane-system

Steps to Reproduce

  1. Deploy the Manifest and make sure a secret called greatScript in namespace: crossplane-system with a key - customData exists.
  2. The key should be only encoded once (base64). to verify that, decode it and make sure you got the script in plain text.
  3. an error will pop up saying Azure API can only accept bae64 encoded values.
  4. Delete the resource, and try again only this time, encode customData script twice with a base64 encoder, now it'll work.

What happened?

Only when the customData is double encoded the resource works.

Relevant Error Output Snippet

Crossplane Version

1.15.0

Provider Version

1.10.2

Kubernetes Version

1.27.9

Kubernetes Distribution

AKS

Additional Info

No response

@chkp-orhaz chkp-orhaz added bug Something isn't working needs:triage labels Jan 28, 2025
@chkp-orhaz
Copy link
Author

any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs:triage
Projects
None yet
Development

No branches or pull requests

1 participant