Feature request
Proposal: Could it be possible to predeploy any resouce, controlled by some annotation? Like krane.shopify.io/predeployed, which currently only supports CRDs.
My personal use-case is deploying kind: ExternalSecret resources from https://github.com/external-secrets/external-secrets. Essentially it's an operator, which syncs secrets from external places like secret management solutions offered by AWS, Azure, GCP, whatever & creates corresponding kind: Secret resources.
The problem is that the kind: ExternalSecret doesn't always have enough time for initial sync as they're deployed at the same time as kind: Deployment for example, which can cause krane to result in failure like so:
[INFO][2022-10-04 06:47:53 +0000] ----------------------------------Phase 4: Deploying all resources----------------------------------
[INFO][2022-10-04 06:47:53 +0000] Deploying resources:
[INFO][2022-10-04 06:47:53 +0000] - Deployment/account-deployment (timeout: 420s)
[INFO][2022-10-04 06:47:53 +0000] - ExternalSecret/foo (timeout: 300s)
...blablabla
[WARN][2022-10-04 06:48:23 +0000] Don't know how to monitor resources of type ExternalSecret. Assuming ExternalSecret/foo deployed successfully.
...blablabla
[INFO][2022-10-04 06:48:29 +0000] ------------------------------------------Result: FAILURE-------------------------------------------
[FATAL][2022-10-04 06:48:29 +0000] Successfully deployed 13 resources and failed to deploy 1 resource
[FATAL][2022-10-04 06:48:29 +0000]
[FATAL][2022-10-04 06:48:29 +0000] Successful resources
[FATAL][2022-10-04 06:48:29 +0000] Deployment/account-scheduler-deployment 0 replicas
[FATAL][2022-10-04 06:48:29 +0000] ExternalSecret/foo Not Found
... blablabla
[FATAL][2022-10-04 06:48:29 +0000] Deployment/account-deployment: FAILED
[FATAL][2022-10-04 06:48:29 +0000] Latest ReplicaSet: account-deployment-67f9b49988
[FATAL][2022-10-04 06:48:29 +0000]
[FATAL][2022-10-04 06:48:29 +0000] The following containers are in a state that is unlikely to be recoverable:
[FATAL][2022-10-04 06:48:29 +0000] > account: Failed to generate container configuration: secret "foo" not found
[FATAL][2022-10-04 06:48:29 +0000]
[FATAL][2022-10-04 06:48:29 +0000] - Final status: 1 replica, 1 updatedReplica, 1 unavailableReplica
[FATAL][2022-10-04 06:48:29 +0000] - Events (common success events excluded):
[FATAL][2022-10-04 06:48:29 +0000] [Deployment/account-deployment] ScalingReplicaSet: Scaled up replica set account-deployment-67f9b49988 to 1 (1 events)
[FATAL][2022-10-04 06:48:29 +0000] [Pod/account-deployment-67f9b49988-4hzc5] Failed: Error: secret "foo" not found (2 events)
Of course as the secret is synced often just seconds after the deployment will recover automatically, but as we're running krane in CICD it'll still report the deployment as failed.
https://github.com/Shopify/krane#deploying-custom-resources would be another option, but unfortunately external-secrets-operator doesn't currently implement observedGeneration & thus I can't use this.
Feature request
Proposal: Could it be possible to predeploy any resouce, controlled by some annotation? Like
krane.shopify.io/predeployed, which currently only supports CRDs.My personal use-case is deploying
kind: ExternalSecretresources from https://github.com/external-secrets/external-secrets. Essentially it's an operator, which syncs secrets from external places like secret management solutions offered by AWS, Azure, GCP, whatever & creates correspondingkind: Secretresources.The problem is that the
kind: ExternalSecretdoesn't always have enough time for initial sync as they're deployed at the same time askind: Deploymentfor example, which can cause krane to result in failure like so:Of course as the secret is synced often just seconds after the deployment will recover automatically, but as we're running krane in CICD it'll still report the deployment as failed.
https://github.com/Shopify/krane#deploying-custom-resources would be another option, but unfortunately external-secrets-operator doesn't currently implement
observedGeneration& thus I can't use this.