Skip to content

Registering Annotation depends-on #49404

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Ritikaa96
Copy link
Contributor

Description

Adding annotation config.kubernetes.io/depends-on in the Well known annotation & labels page.

Closes: #42150

@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label Jan 13, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign dipesh-rawat for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 13, 2025
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 13, 2025
@Ritikaa96
Copy link
Contributor Author

/sig docs
/kind bug

@k8s-ci-robot k8s-ci-robot added sig/docs Categorizes an issue or PR as relevant to SIG Docs. kind/bug Categorizes issue or PR as related to a bug. labels Jan 13, 2025
@Ritikaa96
Copy link
Contributor Author

Copy link

netlify bot commented Jan 13, 2025

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit b0531f9
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/67e3f309b85f810008b6de3a
😎 Deploy Preview https://deploy-preview-49404--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.


Used On: All Objects

This annotation is used to specify dependencies between objects. It ensures that the they are applied and deleted in correct order. For example, If a MongoDB should be up and running before a WordPress deployment , this annotation can be used to ensure that task. To learn more, see the [Explicit Dependency Ordering](https://github.com/kubernetes-sigs/cli-utils/blob/8c2dae2da75c87b7c9567f5aa3186dedff1a5d68/README.md?plain=1#L110).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing some minor grammatical errors

Suggested change
This annotation is used to specify dependencies between objects. It ensures that the they are applied and deleted in correct order. For example, If a MongoDB should be up and running before a WordPress deployment , this annotation can be used to ensure that task. To learn more, see the [Explicit Dependency Ordering](https://github.com/kubernetes-sigs/cli-utils/blob/8c2dae2da75c87b7c9567f5aa3186dedff1a5d68/README.md?plain=1#L110).
This annotation is used to specify dependencies between objects. It ensures that they are applied and deleted in the correct order. For example, if MongoDB should be up and running before a WordPress deployment, this annotation can be used to ensure that task. To learn more, see the [Explicit Dependency Ordering](https://github.com/kubernetes-sigs/cli-utils/blob/8c2dae2da75c87b7c9567f5aa3186dedff1a5d68/README.md?plain=1#L110).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, i'll update it.

@Ritikaa96
Copy link
Contributor Author

Hi I have added the changes mentioned @katcosgrove . PTAL.

Copy link
Contributor

@divya-mohan0209 divya-mohan0209 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely comfortable linking to a random branch on GitHub. Is there a specific reason we've not opted for the master branch?

This annotation is used to specify dependencies between objects. It ensures
that they are applied and deleted in the correct order. For example, if MongoDB should
be up and running before a WordPress deployment, this annotation can be used to ensure that task.
To learn more, see the [Explicit Dependency Ordering](https://github.com/kubernetes-sigs/cli-utils/blob/8c2dae2da75c87b7c9567f5aa3186dedff1a5d68/README.md?plain=1#L110).
Copy link
Contributor

@divya-mohan0209 divya-mohan0209 Feb 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit.

Suggested change
To learn more, see the [Explicit Dependency Ordering](https://github.com/kubernetes-sigs/cli-utils/blob/8c2dae2da75c87b7c9567f5aa3186dedff1a5d68/README.md?plain=1#L110).
To learn more, see [Explicit Dependency Ordering](https://github.com/kubernetes-sigs/cli-utils/blob/master/README.md?plain=1#L110).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, i missed this. Will update this and recommit.

@Ritikaa96
Copy link
Contributor Author

I'm not entirely comfortable linking to a random branch on GitHub. Is there a specific reason we've not opted for the master branch?

Oh yes, thats understandable. I might have missed that, thank you for pointing out.

@Ritikaa96 Ritikaa96 force-pushed the annotation-depends-on branch from 8663d25 to b0531f9 Compare March 26, 2025 12:28
@Ritikaa96
Copy link
Contributor Author

Hi @divya-mohan0209 , I updated the PR
PTAL.


Type: Annotation

Example: `config.kubernetes.io/depends-on: /namespaces/default/Pod/pod-c`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure pod is the right example unless the pod is statefulsets.
Typically on new deployment or rolling restart pod name will change with some random string.
e.g.
mongodb-d47d5c8f9-abcd2
mongodb-d47d5c8f9-zrqd2

may be deployment is better example?

config.kubernetes.io/depends-on: /namespaces/default/Deployment/mongodb-a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. language/en Issues or PRs related to English language sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Annotation config.kubernetes.io/depends-on not registered / documented
5 participants