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 ingress class name to example-ingress.yaml #46229

Merged
merged 1 commit into from
May 29, 2024

Conversation

24online24
Copy link
Contributor

The reason for this pull request is described in the issue: #46228

The missing ingress class name property in the example-ingress.yaml file present in 6 different locales causes the created ingress not to work properly. Adding ingressClassName: nginx fixes the issue.

Copy link

linux-foundation-easycla bot commented May 6, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: 24online24 / name: Chiuzbăian Rareș (7b8e37f)

@k8s-ci-robot k8s-ci-robot added the area/localization General issues or PRs related to localization label May 6, 2024
@k8s-ci-robot k8s-ci-robot added language/en Issues or PRs related to English language cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. language/es Issues or PRs related to Spanish language language/ja Issues or PRs related to Japanese language labels May 6, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @24online24!

It looks like this is your first PR to kubernetes/website 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/website has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added language/ko Issues or PRs related to Korean language language/pt Issues or PRs related to Portuguese language language/zh Issues or PRs related to Chinese language sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 6, 2024
Copy link

netlify bot commented May 6, 2024

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 7b8e37f
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/6639326609af190008cb4ae9
😎 Deploy Preview https://deploy-preview-46229--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.

@dipesh-rawat
Copy link
Member

@24online24 Thanks you for your contribution.
Could you please sign the CLA before the PR can be reviewed.
You can follow the steps documented here: CLA Steps

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels May 6, 2024
Copy link
Member

@dipesh-rawat dipesh-rawat left a comment

Choose a reason for hiding this comment

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

It seems this PR contains modifications to files in various languages ('English', 'Spanish', 'Japanese', 'Korean', 'Portuguese' ,'Chinese'). However, documentation process varies for each localization, and we generally do not approve pull requests affecting multiple languages at once. I recommend focusing on changing the primary website content (specifically the English content) with this PR first. Once the English content is merged, we can then create separate pull requests for any other language(s). I hope this suggestion is beneficial.

@dipesh-rawat
Copy link
Member

Explicit hold until this PR only covers one language
(Ok to unhold once that's done)
/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 May 6, 2024
@24online24
Copy link
Contributor Author

@dipesh-rawat Thanks a lot for the guidance and warm welcome!
I have now changed the commit to only modify the English version of the file.

@stmcginnis
Copy link
Contributor

Great catch. I think there may be some IngressControllers that do not use this, but it should be the preferred way to set things up.

  ingressClassName	<string>
    ingressClassName is the name of an IngressClass cluster resource. Ingress
    controller implementations use this field to know whether they should be
    serving this Ingress resource, by a transitive connection (controller ->
    IngressClass -> Ingress resource). Although the
    `kubernetes.io/ingress.class` annotation (simple constant name) was never
    formally defined, it was widely supported by Ingress controllers to create a
    direct binding between Ingress controller and Ingress resources. Newly
    created Ingress resources should prefer using the field. However, even
    though the annotation is officially deprecated, for backwards compatibility
    reasons, ingress controllers should still honor that annotation if present.

So I think it's a good call to add it to our examples.

/lgtm

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

LGTM label has been added.

Git tree hash: e968f5e12a7abc5fc89b417704a646fc858007bb

@sftim
Copy link
Contributor

sftim commented May 6, 2024

/retitle Add ingress class name to example-ingress.yaml

We don't mention issue references in PR titles (as these can / will end up as commit messages, and that causes problems for forks of this project)

@k8s-ci-robot k8s-ci-robot changed the title Add ingress class name to example-ingress.yaml (Issue #46228) Add ingress class name to example-ingress.yaml May 6, 2024
@salaxander
Copy link
Contributor

/unhold

@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 May 6, 2024
@dipesh-rawat
Copy link
Member

/remove-language es
/remove-language ja
/remove-language ko
/remove-language pt
/remove-language zh

@k8s-ci-robot k8s-ci-robot removed language/es Issues or PRs related to Spanish language language/ja Issues or PRs related to Japanese language language/ko Issues or PRs related to Korean language language/pt Issues or PRs related to Portuguese language language/zh Issues or PRs related to Chinese language labels May 6, 2024
@tengqm
Copy link
Contributor

tengqm commented May 7, 2024

I don't understand the issue we are solving with this PR. Do you mean the manifest doesn't work if the ingressClassName is not specified? That is contradictory to what the API spec says. Maybe the implication is that the field must be specified? Then we need to revise the API spec so no one will step into this again.

@24online24
Copy link
Contributor Author

@tengqm Sorry for any confusion. I have more and found out more details:

  • if you add ingress through minikube addons enable ingress and configure it through kubectl apply -f https://k8s.io/examples/service/networking/example-ingress.yaml, it results in
NAME              CLASS   HOSTS              ADDRESS   PORTS   AGE
example-ingress   nginx   hello-world.info             80      6s
  • if you add ingress through helm upgrade --install ingress-nginx ingress-nginx --repo https://kubernetes.github.io/ingress-nginx --namespace ingress-nginx --create-namespace and apply the same configuration, it results in
NAME              CLASS    HOSTS              ADDRESS   PORTS   AGE
example-ingress   <none>   hello-world.info             80      4s

Personally I prefer the helm version as it is more generic and not specific to minikube. For this to work, ingressClassName needs to be specified in example-ingress.yaml

@sftim
Copy link
Contributor

sftim commented May 29, 2024

I don't understand the issue we are solving with this PR. Do you mean the manifest doesn't work if the ingressClassName is not specified? That is contradictory to what the API spec says. Maybe the implication is that the field must be specified? Then we need to revise the API spec so no one will step into this again.

Ingress without an ingressClassName works, but not defining one is discouraged if not actively deprecated.

This avoids implying it's OK to omit the name of the IngressClass.
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sftim

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 May 29, 2024
@k8s-ci-robot k8s-ci-robot merged commit 2ebd76e into kubernetes:main May 29, 2024
6 checks passed
shayaniox pushed a commit to shayaniox/k8swebsite that referenced this pull request May 29, 2024
Add ingress class name to example-ingress.yaml
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. area/localization General issues or PRs related to localization cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants