Skip to content

kubernetesconfiguration resource version v1api20241101 gets rollback to v1api20230501 #4723

@arnaud-tincelin

Description

@arnaud-tincelin

Describe the bug

I am applying a FluxConfiguration version kubernetesconfiguration.azure.com/v1api20241101

The resource gets created normally:

fluxconfiguration.kubernetesconfiguration.azure.com/config2 created

However, when I read the resource in the cluster, the resource version has changed (note the kubectl.kubernetes.io/last-applied-configuration annotation) :

apiVersion: kubernetesconfiguration.azure.com/v1api20230501
kind: FluxConfiguration
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"kubernetesconfiguration.azure.com/v1api20241101","kind":"FluxConfiguration","metadata":{"annotations":{},"name":"config2","namespace":"cluster-config"},"spec":{"azureName":"config2","gitRepository":{"provider":"Azure","repositoryRef":{"branch":"demo"},"syncIntervalInSeconds":300,"url":"https://dev.azure.com/<organization>/<project>/_git/<repository>"},"kustomizations":{"tool":{"path":"./dev","prune":true,"retryIntervalInSeconds":120,"syncIntervalInSeconds":300,"timeoutInSeconds":300}},"namespace":"test","owner":{"armId":"/subscriptions/<sub-id>/resourceGroups/<rg-name>/providers/Microsoft.ContainerService/managedClusters/<cluster-name>"},"scope":"namespace","sourceKind":"GitRepository"}}
    serviceoperator.azure.com/latest-reconciled-generation: "1"
    serviceoperator.azure.com/operator-namespace: azure-service-operator
    serviceoperator.azure.com/poller-resume-id: GenericClient.CreateOrUpdateByID
    serviceoperator.azure.com/poller-resume-token: '{"type":"GenericResource","token":{"asyncURL":"https://management.azure.com/subscriptions/<sub-id>/resourceGroups/rg-lzo-rib-dev-gwc-01-wrk-01/providers/Microsoft.ContainerService/ManagedClusters/<cluster-name>/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/config2/operations/5fb38939-893d-4f84-b961-ab22691450d9?api-version=2024-11-01<...>"}}

Azure Service Operator Version: 2.13.0
AKS Version: 1.31.7

Expected behavior

I expect the resource version to remain unchanged and the field spec.gitRepository.provider as well

To Reproduce

Apply the following file:

apiVersion: kubernetesconfiguration.azure.com/v1api20241101
kind: FluxConfiguration
metadata:
  name: config2
  namespace: cluster-config
spec:
  azureName: config2
  gitRepository:
    provider: Azure
    repositoryRef:
      branch: demo
    syncIntervalInSeconds: 300
    url: https://dev.azure.com/<organization>/<project>/_git/<repository>
  kustomizations:
    tool:
      path: ./dev
      prune: true
      retryIntervalInSeconds: 120
      syncIntervalInSeconds: 300
      timeoutInSeconds: 300
  namespace: my-app
  owner:
    armId: /subscriptions/<sub-id>/resourceGroups/<rg-name>/providers/Microsoft.ContainerService/managedClusters/<cluster-name>
  scope: namespace
  sourceKind: GitRepository

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🪲Something isn't working

    Type

    No type

    Projects

    Status

    Recently Completed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions