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]: Azure Container App ContainerAppSecretInvalid: Invalid Request: Container app secret(s) with name(s) '' #860

Open
1 task done
marcusio888 opened this issue Nov 1, 2024 · 0 comments
Labels
bug Something isn't working needs:triage

Comments

@marcusio888
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Affected Resource(s)

  • containerapp.azure.upbound.io/v1beta2 - ContainerApp
  • containerapp.azure.upbound.io/v1beta1 - ContainerApp

Resource MRs required to reproduce the bug

apiVersion: containerapp.azure.upbound.io/v1beta2
kind: ContainerApp
metadata:
name: capp-psp
spec:
deletionPolicy: Delete
forProvider:
containerAppEnvironmentId: /subscriptions/subscriptionID/resourceGroups/ResourceGroupName/providers/Microsoft.App/managedEnvironments/env-containerapp-bbmp
containerAppEnvironmentIdRef:
name: env-containerapp-bbmp
ingress:
allowInsecureConnections: false
externalEnabled: true
targetPort: 80
trafficWeight:
- label: canary
latestRevision: true
percentage: 100
transport: auto
registry:
- passwordSecretName: registry
server: privateregistry.azurecr.io
username: username
resourceGroupName: ResourceGroupName
revisionMode: Multiple
secret:
- nameSecretRef:
name: privateregistry
namespace: default
key: registry
tags:
Environment: labs
provider: crossplane
template:
container:
- cpu: 0.25
image: privateregistry.azurecr.io/psp:latest
memory: 0.5Gi
name: psp
initProvider: {}
managementPolicies:

  • '*'
    providerConfigRef:
    name: bbmp

Steps to Reproduce

Apply the manifest.
Verify the container app controller logs and the status of the containerapp resource.

What happened?

Error creating the resource with the following message:

2024-11-01T12:50:51Z DEBUG provider-azure Async create ended. {"trackerUID": "d8ed1da1-edac-485e-8e65-f2c92a563c05", "resourceName": "capp-psp", "gvk": "containerapp.azure.upbound.io/v1beta1, Kind=ContainerApp", "error": "async create failed: failed to create the resource: [{0 creating Container App (Subscription: \"subscriptionID\"\nResource Group Name: \"ResourceGroupName\"\nContainer App Name: \"capp-psp\"): performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with error: ContainerAppSecretInvalid: Invalid Request: Container app secret(s) with name(s) '' are invalid: value or keyVaultUrl and identity should be provided. creating Container App (Subscription: \"subscriptionID\"\nResource Group Name: \"ResourceGroupName\"\nContainer App Name: \"capp-psp\"): performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with error: ContainerAppSecretInvalid: Invalid Request: Container app secret(s) with name(s) '' are invalid: value or keyVaultUrl and identity should be provided. []}]", "tfID": ""}

Relevant Error Output Snippet

status:
  atProvider: {}
  conditions:
  - lastTransitionTime: "2024-11-01T12:50:16Z"
    reason: Creating
    status: "False"
    type: Ready
  - lastTransitionTime: "2024-11-01T12:50:16Z"
    message: |-
      create failed: async create failed: failed to create the resource: [{0 creating Container App (Subscription: "subscriptionID"
      Resource Group Name: "ResourceGroupName"
      Container App Name: "capp-psp"): performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with error: ContainerAppSecretInvalid: Invalid Request: Container app secret(s) with name(s) '' are invalid: value or keyVaultUrl and identity should be provided. creating Container App (Subscription: "subscriptionID"
      Resource Group Name: "ResourceGroupName"
      Container App Name: "capp-psp"): performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with error: ContainerAppSecretInvalid: Invalid Request: Container app secret(s) with name(s) '' are invalid: value or keyVaultUrl and identity should be provided. []}]
    reason: ReconcileError
    status: "False"
    type: Synced
  - lastTransitionTime: "2024-11-01T12:50:16Z"
    message: |-
      async create failed: failed to create the resource: [{0 creating Container App (Subscription: "subscriptionID"
      Resource Group Name: "ResourceGroupName"
      Container App Name: "capp-psp"): performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with error: ContainerAppSecretInvalid: Invalid Request: Container app secret(s) with name(s) '' are invalid: value or keyVaultUrl and identity should be provided. creating Container App (Subscription: "subscriptionID"
      Resource Group Name: "ResourceGroupName"
      Container App Name: "capp-psp"): performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with error: ContainerAppSecretInvalid: Invalid Request: Container app secret(s) with name(s) '' are invalid: value or keyVaultUrl and identity should be provided. []}]
    reason: AsyncCreateFailure
    status: "False"
    type: LastAsyncOperation

Crossplane Version

1.17.1

Provider Version

v1.7.0

Kubernetes Version

1.30.3

Kubernetes Distribution

AKS

Additional Info

I am trying to pull an image from a private registry using secrets with user and passwords, the registry was not created with crossplane, in kubernetes there is a secret with user and password.

@marcusio888 marcusio888 added bug Something isn't working needs:triage labels Nov 1, 2024
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