jenkins-library icon indicating copy to clipboard operation
jenkins-library copied to clipboard

[Feature Request] A library step for "kubectl wait"

Open levinanton opened this issue 3 years ago • 6 comments

Context

In our (K8s) setup, we have dependent resources (service instances) which have to be created one-by-one (we have to ensure that one is in a "ready" state, before we create the next one).

Descriptors for those resources are distributed across 2 different deployment configuration (yaml) files and kubectl wait https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#wait command is used to verify the conditions.

// dummy-instance-1 is a part of first.yml 
kubectl apply -f ./config/first.yml -n dummy

// wait until dummy-instance-1 is created
kubectl wait --for=condition=Ready serviceinstance.servicecatalog.k8s.io/dummy-instance-1  --timeout=30s -n dummy 

// apply second config
kubectl apply -f ./config/second.yml -n dummy

Request

There is a library step kubernetesDeploy https://www.project-piper.io/steps/kubernetesDeploy/

When above step is configured to use deployTool: kubectl https://www.project-piper.io/steps/kubernetesDeploy/#deploytool , it will execute kubectl apply , applying provided deployment configurations.

Could we expect that Piper will add a library step for kubectl wait https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#wait as well?

levinanton avatar Feb 09 '22 15:02 levinanton

Thank you for your contribution! This issue is stale because it has been open 60 days with no activity. In order to keep it open, please remove stale label or add a comment within the next 10 days. If you need a Piper team member to remove the stale label make sure to add @SAP/jenkins-library-team to your comment.

github-actions[bot] avatar Apr 11 '22 00:04 github-actions[bot]

Adding @SAP/jenkins-library-team to remove "stale" label. A feature request is still valid.

levinanton avatar Apr 11 '22 04:04 levinanton

Thank you for your contribution! This issue is stale because it has been open 60 days with no activity. In order to keep it open, please remove stale label or add a comment within the next 10 days. If you need a Piper team member to remove the stale label make sure to add @SAP/jenkins-library-team to your comment.

github-actions[bot] avatar Jun 11 '22 00:06 github-actions[bot]

Adding @SAP/jenkins-library-team to remove "stale" label. A feature request is still valid.

levinanton avatar Jun 11 '22 07:06 levinanton

@levinanton Could you imagine contributing this step yourself? We gladly accept PRs

o-liver avatar Jun 13 '22 09:06 o-liver

Thank you for your contribution! This issue is stale because it has been open 60 days with no activity. In order to keep it open, please remove stale label or add a comment within the next 10 days. If you need a Piper team member to remove the stale label make sure to add @SAP/jenkins-library-team to your comment.

github-actions[bot] avatar Aug 13 '22 00:08 github-actions[bot]

Issue got stale and no further activity happened. It has automatically been closed. Please re-open in case you still consider it relevant.

github-actions[bot] avatar Aug 23 '22 00:08 github-actions[bot]

I'd still consider this relevant. Currently, we don't see us contributing to it, however, having it would simplify our lives.

Adding @SAP/jenkins-library-team for removing stale label and reopening.

jambt avatar Aug 23 '22 05:08 jambt