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

Management Policies Support incomplete? #190

Closed
patpicos opened this issue Aug 15, 2024 · 3 comments · Fixed by #191
Closed

Management Policies Support incomplete? #190

patpicos opened this issue Aug 15, 2024 · 3 comments · Fixed by #191
Labels
bug Something isn't working

Comments

@patpicos
Copy link

patpicos commented Aug 15, 2024

What happened?

I have enabled the --enable-management-policies using a DeploymentRuntimeConfig for the ArgoCD provider.
The logs show that is enabled during startup

2024-08-14T20:25:16Z    INFO    provider-argocd Alpha feature enabled   {"flag": "EnableAlphaManagementPolicies"}

Proof flag is enabled on the pod

spec:
  containers:
  - args:
    - --enable-management-policies
    - -d
    env:

However, Project and Repository resources complain that the managementPolicies I pass in are not recognized

2024-08-15T14:16:31Z    INFO    provider-argocd Alpha feature enabled   {"flag": "EnableAlphaManagementPolicies"}
2024-08-15T14:16:31Z    DEBUG   provider-argocd `spec.managementPolicies` is set to a non-default value but the feature is not enabled: [Observe Update Delete Create LateInitialize]   {"controller": "managed/repository", "request": {"name":"xyz-dev-9fgb8-argocd-repo-helm"}, "uid": "15f9b21c-f228-42f6-9835-6b99bf8121ab", "version": "38365739", "external-name": "https://***********/api/v4/projects/160/packages/helm/stable"}
2024-08-15T14:16:31Z    DEBUG   events  `spec.managementPolicies` is set to a non-default value but the feature is not enabled: [Observe Update Delete Create LateInitialize]   {"type": "Warning", "object": {"kind":"Repository","name":"xyz-dev-9fgb8-argocd-repo-helm","uid":"15f9b21c-f228-42f6-9835-6b99bf8121ab","apiVersion":"repositories.argocd.crossplane.io/v1alpha1","resourceVersion":"38365739"}, "reason": "CannotUseInvalidManagementPolicy"}
2024-08-15T14:16:31Z    DEBUG   provider-argocd `spec.managementPolicies` is set to a non-default value but the feature is not enabled: [Delete Create LateInitialize Observe Update]   {"controller": "managed/project", "request": {"name":"xyz-argocd-prj-dev"}, "uid": "4ce50669-9c11-4b31-816a-394b56a43e49", "version": "38365709", "external-name": "xyz-argocd-prj-dev"}
2024-08-15T14:16:31Z    DEBUG   events  `spec.managementPolicies` is set to a non-default value but the feature is not enabled: [Delete Create LateInitialize Observe Update]   {"type": "Warning", "object": {"kind":"Project","name":"xyz-argocd-prj-dev","uid":"4ce50669-9c11-4b31-816a-394b56a43e49","apiVersion":"projects.argocd.crossplane.io/v1alpha1","resourceVersion":"38365709"}, "reason": "CannotUseInvalidManagementPolicy"}
2024-08-15T14:16:31Z    DEBUG   provider-argocd `spec.managementPolicies` is set to a non-default value but the feature is not enabled: [Create LateInitialize Observe Update Delete]   {"controller": "managed/repository", "request": {"name":"xyz-dev-9fgb8-argocd-repo-git"}, "uid": "0b5e76f9-b0b9-4bed-b4a3-047c9ba58482", "version": "38365724", "external-name": "https://***********/amdocs/v3-configuration/isv-service-configuration/dev/xyz-dev/xyz-dev.git"}
2024-08-15T14:16:31Z    DEBUG   events  `spec.managementPolicies` is set to a non-default value but the feature is not enabled: [Create LateInitialize Observe Update Delete]   {"type": "Warning", "object": {"kind":"Repository","name":"xyz-dev-9fgb8-argocd-repo-git","uid":"0b5e76f9-b0b9-4bed-b4a3-047c9ba58482","apiVersion":"repositories.argocd.crossplane.io/v1alpha1","resourceVersion":"38365724"}, "reason": "CannotUseInvalidManagementPolicy"}
2024-08-15T14:16:31Z    DEBUG   provider-argocd `spec.managementPolicies` is set to a non-default value but the feature is not enabled: [LateInitialize Observe Update Delete Create]   {"controller": "managed/project", "request": {"name":"xyz-argocd-prj-dev"}, "uid": "4ce50669-9c11-4b31-816a-394b56a43e49", "version": "38369021", "external-name": "xyz-argocd-prj-dev"}
2024-08-15T14:16:31Z    DEBUG   events  `spec.managementPolicies` is set to a non-default value but the feature is not enabled: [LateInitialize Observe Update Delete Create]   {"type": "Warning", "object": {"kind":"Project","name":"xyz-argocd-prj-dev","uid":"4ce50669-9c11-4b31-816a-394b56a43e49","apiVersion":"projects.argocd.crossplane.io/v1alpha1","resourceVersion":"38369021"}, "reason": "CannotUseInvalidManagementPolicy"}
2024-08-15T14:16:31Z    DEBUG   provider-argocd `spec.managementPolicies` is set to a non-default value but the feature is not enabled: [Create LateInitialize Observe Update Delete]   {"controller": "managed/repository", "request": {"name":"xyz-dev-9fgb8-argocd-repo-git"}, "uid": "0b5e76f9-b0b9-4bed-b4a3-047c9ba58482", "version": "38369023", "external-name": "https://***********/amdocs/v3-configuration/isv-service-configuration/dev/xyz-dev/xyz-dev.git"}
2024-08-15T14:16:31Z    DEBUG   events  `spec.managementPolicies` is set to a non-default value but the feature is not enabled: [Create LateInitialize Observe Update Delete]   {"type": "Warning", "object": {"kind":"Repository","name":"xyz-dev-9fgb8-argocd-repo-git","uid":"0b5e76f9-b0b9-4bed-b4a3-047c9ba58482","apiVersion":"repositories.argocd.crossplane.io/v1alpha1","resourceVersion":"38369023"}, "reason": "CannotUseInvalidManagementPolicy"}
2024-08-15T14:16:31Z    DEBUG   provider-argocd `spec.managementPolicies` is set to a non-default value but the feature is not enabled: [LateInitialize Observe Update Delete Create]   {"controller": "managed/project", "request": {"name":"xyz-argocd-prj-dev"}, "uid": "4ce50669-9c11-4b31-816a-394b56a43e49", "version": "38369026", "external-name": "xyz-argocd-prj-dev"}
2024-08-15T14:16:31Z    DEBUG   events  `spec.managementPolicies` is set to a non-default value but the feature is not enabled: [LateInitialize Observe Update Delete Create]   {"type": "Warning", "object": {"kind":"Project","name":"xyz-argocd-prj-dev","uid":"4ce50669-9c11-4b31-816a-394b56a43e49","apiVersion":"projects.argocd.crossplane.io/v1alpha1","resourceVersion":"38369026"}, "reason": "CannotUseInvalidManagementPolicy"}

Looking at the trace:

NAME                                                                                                 RESOURCE                                                                     SYNCED   READY   STATUS
XIsvContinuousDeployment/xyz-dev-9fgb8                                                                                                                                            True     True    Available
<omitted>
├─ Project/xyz-argocd-prj-dev                                                                        xyz-argocd-prj-dev                                                           False    True    ReconcileError: `spec.managementPolicies` is set to a non-default value but the feature is not enabled: [Create LateInitialize Observe]
├─ Project/xyz-dev-9fgb8-xyz-dev-gitlab-prj                                                          xyz-dev-9fgb8-xyz-dev-gitlab-prj                                             True     True    Available
├─ Repository/xyz-dev-9fgb8-argocd-repo-git                                                          xyz-dev-9fgb8-argocd-repo-git                                                False    True    ReconcileError: `spec.managementPolicies` is set to a non-default value but the feature is not enabled: [Create LateInitialize Observe]
└─ Repository/xyz-dev-9fgb8-argocd-repo-helm                                                         xyz-dev-9fgb8-argocd-repo-helm                                               False    True    ReconcileError: `spec.managementPolicies` is set to a non-default value but the feature is not enabled: [Create LateInitialize Observe]

How can we reproduce it?

apiVersion: repositories.argocd.crossplane.io/v1alpha1
kind: Repository
metadata:
  annotations:
    crossplane.io/composition-resource-name: xyz-dev-9fgb8-argocd-repo-git
    crossplane.io/external-create-pending: "2024-08-08T22:47:14Z"
    crossplane.io/external-create-succeeded: "2024-08-08T22:47:14Z"
    crossplane.io/external-name: https://xxxxxxxxxxxxxxxxxxxxxx/v3-configuration/isv-service-configuration/dev/xyz-dev/xyz-dev.git
  creationTimestamp: "2024-08-08T22:47:14Z"
  finalizers:
  - finalizer.managedresource.crossplane.io
  generateName: xyz-dev-9fgb8-
  generation: 5
  labels:
    crossplane.io/claim-name: xyz-dev
    crossplane.io/claim-namespace: isv-onboarding-continuous-deployment
    crossplane.io/composite: xyz-dev-9fgb8
  name: xyz-dev-9fgb8-argocd-repo-git
  ownerReferences:
  - apiVersion: onboarding.gitops.k8s.dish.io/v1beta1
    blockOwnerDeletion: true
    controller: true
    kind: XIsvContinuousDeployment
    name: xyz-dev-9fgb8
    uid: 0b6192f0-236a-4699-9faf-9cd731ea1934
  resourceVersion: "38369023"
  uid: 0b5e76f9-b0b9-4bed-b4a3-047c9ba58482
spec:
  deletionPolicy: Orphan
  forProvider:
    enableLfs: false
    enableOCI: false
    inheritedCreds: true
    insecure: true
    name: xyz-argocd-prj-dev-git-repo
    project: xyz-argocd-prj-dev
    repo: https://xxxxxxxxxx/v3-configuration/isv-service-configuration/dev/xyz-dev/xyz-dev.git
    type: git
    username: argo-read-repo
  managementPolicies:
  - Create
  - LateInitialize
  - Observe
  - Update
  - Delete
  providerConfigRef:
    name: argocd-provider-config
status:
  atProvider:
    connectionState:
      attemptedAt: "2024-08-13T17:35:05Z"
      status: Successful
  conditions:
  - lastTransitionTime: "2024-08-08T22:47:14Z"
    reason: Available
    status: "True"
    type: Ready
  - lastTransitionTime: "2024-08-15T14:16:31Z"
    message: '`spec.managementPolicies` is set to a non-default value but the feature
      is not enabled: [Create LateInitialize Observe Update Delete]'
    reason: ReconcileError
    status: "False"
    type: Synced

What environment did it happen in?

Crossplane version: 1.16
Crossplane Provider argocd version: v0.8.0
Cloud provider or hardware configuration: AWS EKS
Kubernetes version (use kubectl version): 1.29

@patpicos patpicos added the bug Something isn't working label Aug 15, 2024
@patpicos patpicos changed the title Management Policies Support incomplete?? Management Policies Support incomplete? Aug 15, 2024
@patpicos
Copy link
Author

@MisterMX do you have a rough timeline for the next release?

@MisterMX
Copy link
Collaborator

There is no roadmap for releases. We ususally schedule them once there are changes to be released.

@patpicos
Copy link
Author

There is no roadmap for releases. We ususally schedule them once there are changes to be released.

Would it be possible to cut a release soon for this enhancement? Reza (engineer who submitted the PR) and I work on the same project that needs this feature where controlling how updates are performed is an important control on the platform.

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

Successfully merging a pull request may close this issue.

2 participants