python icon indicating copy to clipboard operation
python copied to clipboard

Merge in patch as option

Open gfrid opened this issue 2 years ago • 3 comments

Lets assume the bellow scenario:

the patch replaces existing resources, it there any 'merge' ? 'op': 'merge' ?


    annotations = [
        {
            'op': 'add',  # You can try different operations like 'replace', 'add' and 'remove'
            'path': '/metadata/annotations',
            'value': {
                'external-dns.alpha.kubernetes.io/internal-hostname': ingress_name,
                'external-dns.alpha.kubernetes.io/target': ip

            }
        }
    ]

    annotate_deployment(apps_v1_api, name, annotations)



gfrid avatar Aug 18 '22 11:08 gfrid

  • Can you please explain this, I am little confused of what to do?

  • Do I need to update this in setup.py?

Adarsh-jaiss avatar Aug 26 '22 19:08 Adarsh-jaiss

the idea is to annotate ingress but using "strategic merge" option, the current state is that python overwrites existing annotations. 'op': 'add' removes the existing and creates a new. This is important feature that needs to work as it allows Kubernetes external DNS: https://github.com/kubernetes-sigs/external-dns/blob/master/docs/faq.md to work in specific scenarios, from what i know there is no other way to do this. Rancher does it programmatically. Current workaround is to use kubectl inside the python using os.system

gfrid avatar Sep 04 '22 06:09 gfrid

  • Thank you for responding!
  • I will try to find an alternate solution other than the rancher
  • if I will not get any other, I will use kubectl inside the python using os.system

Adarsh-jaiss avatar Sep 08 '22 15:09 Adarsh-jaiss

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Dec 07 '22 15:12 k8s-triage-robot

/remove-lifecycle stale

Adarsh-jaiss avatar Dec 16 '22 16:12 Adarsh-jaiss

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Mar 16 '23 16:03 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Apr 15 '23 16:04 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar May 15 '23 17:05 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar May 15 '23 17:05 k8s-ci-robot