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

add publish not ready headless service to jobset #505

Merged

Conversation

kannon92
Copy link
Contributor

Fixes #504

Adds PublishNotReadyHeadlessService to Jobset.

Defaulting logic sets to true.

Did one optimization in network defaulting where I moved it out of a loop.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 12, 2024
Copy link

netlify bot commented Apr 12, 2024

Deploy Preview for kubernetes-sigs-jobset canceled.

Name Link
🔨 Latest commit 23a0a39
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-jobset/deploys/661ec09c9fe80d00084cadfe

@kannon92 kannon92 force-pushed the publish-not-ready-headless-service branch from 05b6212 to 8ab1de0 Compare April 12, 2024 12:29
@kannon92
Copy link
Contributor Author

Man this is a rough one..

I am not able to generate CRDs anymore so the integration tests are failing due to the fact that crd are not generated.

Looking into this now.

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 12, 2024
@kannon92
Copy link
Contributor Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 13, 2024
Makefile Outdated
@@ -83,6 +83,11 @@ manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and Cust
$(CONTROLLER_GEN) \
rbac:roleName=manager-role output:rbac:artifacts:config=config/components/rbac\
paths="./api/..."

$(CONTROLLER_GEN) \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I noticed that I wasn’t generating crds anymore. Added this allows me to generate the CRD.

not sure when this broke.

@kannon92 kannon92 force-pushed the publish-not-ready-headless-service branch 5 times, most recently from 18e28a2 to cd1c961 Compare April 13, 2024 17:42
@kannon92 kannon92 force-pushed the publish-not-ready-headless-service branch from cd1c961 to cfcf10f Compare April 13, 2024 17:43
@kannon92
Copy link
Contributor Author

/assign @ahg-g @danielvegamyhre

@@ -35,6 +35,8 @@ var TestPodTemplate = corev1.PodTemplateSpec{
},
}

var defaultNetwork = &jobset.Network{EnableDNSHostnames: ptr.To(true), PublishNotReadyAddresses: ptr.To(true)}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this only used in TestJobSetDefaulting? If so let's move it into TestJobSetDefaulting next to the defaultSuccessPolicy and defaultStartupPolicy variables.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

Comment on lines 201 to 204

// PublishNotReadyAddresses indicates that any agent
// which deals with endpoints for this Service should disregard any indications of ready/not-ready.
// Defaults to true if not set
Copy link
Contributor

Choose a reason for hiding this comment

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

"Indicates if DNS records of pods should be published before the pods are ready. Defaults to True."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated.

@ahg-g
Copy link
Contributor

ahg-g commented Apr 16, 2024

/lgtm

leaving approve to Daniel

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 16, 2024
@danielvegamyhre
Copy link
Contributor

This change makes sense to me, thanks for working on it.

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danielvegamyhre, kannon92

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 16, 2024
@k8s-ci-robot k8s-ci-robot merged commit 3b58b0d into kubernetes-sigs:main Apr 16, 2024
12 checks passed
@danielvegamyhre danielvegamyhre mentioned this pull request Aug 19, 2024
20 tasks
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow setting publishNotReadyAddresses=True when creating headless service
4 participants