Skip to content

Add feature flag to redirect case studies to CNCF - #55120

Closed
Caesarsage wants to merge 3 commits into
kubernetes:mainfrom
Caesarsage:drop-case-studies-link
Closed

Add feature flag to redirect case studies to CNCF#55120
Caesarsage wants to merge 3 commits into
kubernetes:mainfrom
Caesarsage:drop-case-studies-link

Conversation

@Caesarsage

Copy link
Copy Markdown
Contributor

Description:

  • Add case_studies_are_cncf feature flag via data/site_rendering/behaviors.yaml
  • When enabled, homepage case studies section links to CNCF instead of showing un-maintained local case studies
  • Community page uses new case-studies-link shortcode that respects the flag

Closes: #23660

@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label Mar 28, 2026
@k8s-ci-robot

Copy link
Copy Markdown
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 lmktfy for approval. For more information see the Code Review Process.

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

Details 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 sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 28, 2026
@netlify

netlify Bot commented Mar 28, 2026

Copy link
Copy Markdown

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit d5e952f
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-io-main-staging/deploys/6a0a7031652edd0008c92974
😎 Deploy Preview https://deploy-preview-55120--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 project configuration.

@Caesarsage
Caesarsage force-pushed the drop-case-studies-link branch from ebfd4bd to 8592c9c Compare March 29, 2026 20:33
{{ $flags := site.Data.site_rendering.behaviors.website_rendering.feature_flags_enabled }}
{{ if in $flags "case_studies_are_cncf" }}
<section class="case-studies" style="text-align: center;">
<h3>{{ T "case_study_title" }}</h3>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: we could take this from the title of content/en/case-studies/_index.html (adjust for current localization) - and we can do that even after we drop case studies.

I probably would do that. Localized strings are kind of a last resort.

@@ -1,3 +1,10 @@
{{ $flags := site.Data.site_rendering.behaviors.website_rendering.feature_flags_enabled }}
{{ if in $flags "case_studies_are_cncf" }}
<section class="case-studies" style="text-align: center;">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Avoid putting CSS within layouts. Instead, use HTML classes.

Comment thread content/en/community/_index.html Outdated
</div>
<div class="community-nav-item">
<a href="/case-studies">Case Studies</a>
{{< case-studies-link >}}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(nit)
This could be expressed as:

Suggested change
{{< case-studies-link >}}
{{< case-studies linkOnly="true" >}}

@@ -0,0 +1,6 @@
{{- $flags := site.Data.site_rendering.behaviors.website_rendering.feature_flags_enabled -}}
{{- if in $flags "case_studies_are_cncf" -}}
<a href="https://www.cncf.io/case-studies/?_sft_lf-project=kubernetes" target="_blank" rel="noopener">{{ T "case_study_title" }}</a>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We might want to link to https://www.cncf.io/case-studies-cn/

I wonder if we can make this localizable. For example, put the relevant URL in the front matter of content/en/case-studies/_index.html so that another localization can set an override.

(wondering how we eventually stop rendering content/en/case-studies/_index.html as a page? It can be done, I promise you.)

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 1, 2026
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 1, 2026
@@ -0,0 +1,3 @@
---
website_rendering:
feature_flags_enabled: []

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If I put case_studies_are_cncf here and go directly to /case-studies, what happens?

Now, what to do about that? We have a layout that renders Netlify redirects. How about a partial that conditionally redirects all the actual case studies to the right place?

It may need a list (English, Chinese) of which locales have a CNCF equivalent.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If we do have a new list of target localizations, maybe it can go in, eg, data/case_studies/cncf.yaml

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Are you suggesting, we have a redirect to cncf managed case studies based on localization? @lmktfy

If that's the case, I am not sure cncf have localization. My thoughts is everyone is redirected to the cncf page

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@lmktfy

lmktfy commented Apr 5, 2026

Copy link
Copy Markdown
Member

The CNCF case studies are, at time of writing, available in English and in Chinese.

@Caesarsage

Copy link
Copy Markdown
Contributor Author

The CNCF case studies are, at time of writing, available in English and in Chinese.

Thank you. I went back and check. https://www.cncf.io/case-studies-cn/

I will look into your suggestions

@k8s-ci-robot k8s-ci-robot added area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 18, 2026
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 2, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

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-sigs/prow repository.

@Caesarsage

Copy link
Copy Markdown
Contributor Author

closing this in favor of #57043

/close

@kubernetes-prow kubernetes-prow Bot closed this Aug 23, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

@Caesarsage: Closed this PR.

Details

In response to this:

closing this in favor of #57043

/close

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-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. sig/docs Categorizes an issue or PR as relevant to SIG Docs. 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.

Improve maintainability of Case Studies

3 participants