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

Bug 1754046: Ensure kuryr webhook is running before other operators' pods #108

Merged
merged 1 commit into from Dec 17, 2019

Conversation

luis5tb
Copy link
Contributor

@luis5tb luis5tb commented Dec 13, 2019

This PR ensure that Kuryr-admission-controller is up and ready (including its associated service) before other operators so that the proper dns configuration is enforced

@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 13, 2019
@luis5tb luis5tb changed the title Ensure kuryr webhook is running before other operators' pods [WIP] Ensure kuryr webhook is running before other operators' pods Dec 13, 2019
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 13, 2019
@luis5tb luis5tb force-pushed the ocp-master-4.4 branch 2 times, most recently from 0edcc35 to 1765c49 Compare December 13, 2019 12:27
@luis5tb luis5tb changed the title [WIP] Ensure kuryr webhook is running before other operators' pods Ensure kuryr webhook is running before other operators' pods Dec 13, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 13, 2019
@luis5tb luis5tb changed the title Ensure kuryr webhook is running before other operators' pods Bug 1779654: Ensure kuryr webhook is running before other operators' pods Dec 13, 2019
@openshift-ci-robot
Copy link

@luis5tb: This pull request references Bugzilla bug 1779654, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Bug 1779654: Ensure kuryr webhook is running before other operators' pods

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.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Dec 13, 2019
@luis5tb luis5tb changed the title Bug 1779654: Ensure kuryr webhook is running before other operators' pods Bug 1754046: Ensure kuryr webhook is running before other operators' pods Dec 16, 2019
@openshift-ci-robot
Copy link

@luis5tb: This pull request references Bugzilla bug 1754046, which is valid.

In response to this:

Bug 1754046: Ensure kuryr webhook is running before other operators' pods

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.

Copy link
Contributor

@MaysaMacedo MaysaMacedo left a comment

Choose a reason for hiding this comment

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

Thanks, Luis. Just a few suggestions:

k8s = k8s_client.K8sClient(api_root)
# list of namespaces with operators to delete
for ns in app.config['ns_to_clear']:
pods = k8s.get('{}/namespaces/{}/pods'.format(
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be safer to handle any Kubernetes exception that might be raised.

for pod in pods.get('items'):
options = pod['spec'].get('dnsConfig', {}).get('options', [])
if not [o for o in options if o['name'] == 'use-vc']:
k8s.delete('{}/namespaces/{}/pods/{}'.format(
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Change-Id: Id74eb4d8a7b1ea7ec97085de85f29244bbda25ea
@dulek
Copy link
Contributor

dulek commented Dec 17, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 17, 2019
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dulek, luis5tb

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

The pull request process is described 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

@openshift-merge-robot openshift-merge-robot merged commit 365017a into openshift:master Dec 17, 2019
@luis5tb
Copy link
Contributor Author

luis5tb commented Dec 17, 2019

/cherry-pick release-4.3

@openshift-cherrypick-robot

@luis5tb: new pull request created: #110

In response to this:

/cherry-pick release-4.3

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.

MaysaMacedo pushed a commit to MaysaMacedo/kuryr-kubernetes-1 that referenced this pull request Jul 1, 2021
openshift-sdn: more service-catalog netnamespace fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants