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

az k8s-configuration flux create -k 'wait: false' #27747

Closed
schdief opened this issue Nov 2, 2023 · 5 comments
Closed

az k8s-configuration flux create -k 'wait: false' #27747

schdief opened this issue Nov 2, 2023 · 5 comments
Labels
Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. Kubernetes Configuration Service Attention This issue is responsible by Azure service team.

Comments

@schdief
Copy link

schdief commented Nov 2, 2023

Related command

az k8s-configuration flux create -k

https://learn.microsoft.com/de-de/cli/azure/k8s-configuration/flux?view=azure-cli-latest#az-k8s-configuration-flux-create-optional-parameters

Is your feature request related to a problem? Please describe.
Yes, because the kustomization won't finish reconcilation in case a sub-resource fails as the wait option is always true. This is a problem since we have multiple individual deployments within our repo that are synced with a single Kustomization. If any deployment fails, this impacts the reconcilation of all deployments.

apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
  labels:
    clusterconfig.azure.com/is-managed: 'true'
    clusterconfig.azure.com/name: gitops
    clusterconfig.azure.com/namespace: flux-system
    clusterconfig.azure.com/operation-id: 9d1...
spec:
  force: true
  interval: 8m20s
  path: ./clusters/npi
  postBuild: {}
  prune: true
  retryInterval: 10m0s
  serviceAccountName: flux-applier
  sourceRef:
    kind: GitRepository
    name: gitops
    namespace: flux-system
  timeout: 5m0s
  wait: true

Describe the solution you'd like
I would like to set the value of wait to false.

Describe alternatives you've considered
We could create individual Kustomizations, but then they won't be part of our repository so a restore would be cumbersome. So the only alternative is not using the aks flux extension.

Additional context

@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot Kubernetes Configuration Service Attention This issue is responsible by Azure service team. labels Nov 2, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented Nov 2, 2023

Thank you for opening this issue, we will look into it.

@NarayanThiru
Copy link
Member

@bavneetsingh16 , can you pl. take a look at this?

@bavneetsingh16
Copy link

@schdief, we are planning a new cli release next month which will have the 'wait' parameter. Currently, it can be done by creating or updating the configuration via ARM template deployment, please find the example in the link below.

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2023-05-01/examples/CreateFluxConfiguration.json#L31

@bavneetsingh16
Copy link

The release of this cli was delayed as it is going to be released with support for new source - ociRepositories. A new api version has been added for it and it will be introduced in the cli. The new eta for this release is early September.

@bavneetsingh16
Copy link

bavneetsingh16 commented Oct 24, 2024

Please update the k8s-configuration cli extension to the latest version to use wait(--disable-health-check) parameter.

  • Update k8s-configuration cli extension
    az extension update -n k8s-configuration

  • Flux config create cmd
    az k8s-configuration flux create --resource-group my-resource-group --cluster-name mycluster --cluster-type connectedClusters --name myconfig --scope cluster --namespace my-namespace --kind git --url https://github.com/Azure/arc-k8s-demo --branch main --kustomization name=my-kustomization disable-health-check=true

  • Kustomization update cmd
    az k8s-configuration flux kustomization update --resource-group my-resource-group --cluster-name mycluster --cluster-type connectedClusters --name myconfig --kustomization-name my-kustomization --path ./my/new-path --prune --force --disable-health-check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. Kubernetes Configuration Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

4 participants