Skip to content

Automate KubeCon event listings #53519

Merged
k8s-ci-robot merged 8 commits into
kubernetes:mainfrom
Caesarsage:automate-kubecon-events
May 26, 2026
Merged

Automate KubeCon event listings #53519
k8s-ci-robot merged 8 commits into
kubernetes:mainfrom
Caesarsage:automate-kubecon-events

Conversation

@Caesarsage
Copy link
Copy Markdown
Contributor

@Caesarsage Caesarsage commented Dec 6, 2025

Description

Replaces hardcoded KubeCon event links with an automated system that fetches and displays events from the Linux Foundation calendar.

Changes

  • Removed hardcoded event HTML from content/en/_index.html
  • Added kubecon-events.html shortcode for dynamic event rendering
  • Added data/kubecon_events.yaml containing structured event data generated from scripts/fetch_kubecon_events
  • Added scripts/fetch_kubecon_events.py to scrape and generate event data

To Update Events

python3 scripts/fetch_kubecon_events.py

Preview

Related to #52376

@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label Dec 6, 2025
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 6, 2025
@k8s-ci-robot k8s-ci-robot added sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 6, 2025
@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 6, 2025

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 538ca43
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-io-main-staging/deploys/6933795b1f51610007dc93a7
😎 Deploy Preview https://deploy-preview-53519--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.

Copy link
Copy Markdown
Member

@lmktfy lmktfy left a comment

Choose a reason for hiding this comment

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

This is good, but there's a challenge: how does this interact with localization?

  • eg: make sure to mark the text as left to right in case the parent page isn't
  • eg: we might want to use a localized date format
  • other ideas can fit too
    /area web-development

@k8s-ci-robot k8s-ci-robot added the area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes label Dec 6, 2025
Comment thread scripts/fetch_kubecon_events.py Outdated
"""Scrape KubeCon events from Linux Foundation calendar"""

headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'
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 is mildly deceptive

@Caesarsage
Copy link
Copy Markdown
Contributor Author

This is good, but there's a challenge: how does this interact with localization?

  • eg: make sure to mark the text as left to right in case the parent page isn't
  • eg: we might want to use a localized date format
  • other ideas can fit too
    /area web-development

Thanks for the feedback! Here's what we can do:

  • Add dir and lang attributes on the shortcode to handle text direction
  • Use Hugo's i18n for region name translations
  • For dates, we can keep the original format for now, but it's possible to parse dates in the script and use Hugo's time formatting

other suggestions are welcome too

Copy link
Copy Markdown
Contributor

@singh1203 singh1203 left a comment

Choose a reason for hiding this comment

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

LGTM!

@Caesarsage, Thank you. This is a solid implementation that eliminates the need for manual event updates. The filtering logic and error handling are particularly well done.

Comment thread scripts/fetch_kubecon_events.py Outdated
Comment on lines +14 to +17
# Configuration
EVENT_URL = "https://events.linuxfoundation.org/about/calendar/?_sf_s=kubecon"
EVENT_LIMIT = 2
OUTPUT_PATH = "data/kubecon_events.yaml"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Non-blocking: This could also use CLI flags for URL/limit/output to help with local testing, but the current constant-based approach is also reasonable for a small maintenance script.

@dkarczmarski
Copy link
Copy Markdown
Member

This idea seems interesting :)

@Caesarsage

* Use Hugo's i18n for region name translations

region name - does it mean country name and city name ?

for example in:

        <a href="https://events.linuxfoundation.org/kubecon-cloudnativecon-north-america/" class="desktopKCButton"><strong>North America</strong> (Atlanta, Nov 10-13)</a>

there is "North America" + "Atlanta".

@lmktfy
Copy link
Copy Markdown
Member

lmktfy commented Dec 8, 2025

I'd say that the region is "North America". KubeCon North America was most recently held in the city of Atlanta.

@lmktfy
Copy link
Copy Markdown
Member

lmktfy commented Dec 8, 2025

Either before or after we merge this, we could ask the CNCF for a more machine readable version of the page we scrape.

Maybe there is a WordPress plugin that can add RDFa data to the event feed or something? Or they can serve the data we're after as jCalendar?

@Caesarsage
Copy link
Copy Markdown
Contributor Author

I'd say that the region is "North America". KubeCon North America was most recently held in the city of Atlanta.

Yes, i agree with this

@Caesarsage
Copy link
Copy Markdown
Contributor Author

Either before or after we merge this, we could ask the CNCF for a more machine readable version of the page we scrape.

Maybe there is a WordPress plugin that can add RDFa data to the event feed or something? Or they can serve the data we're after as jCalendar?

How do one get this informations from CNCF

@lmktfy
Copy link
Copy Markdown
Member

lmktfy commented Dec 8, 2025

To contact the CNCF, we use https://github.com/cncf/servicedesk

@kubernetes/sig-docs-leads can send a message on your / our behalf @Caesarsage (and it's OK to propose that!)

Copy link
Copy Markdown
Contributor

@nate-double-u nate-double-u left a comment

Choose a reason for hiding this comment

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

Thanks for this @Caesarsage

A concern: this may circumvent the steering committee's ability to approve site-wide changes. Usually any update to the banner needs to be approved. Tho, I suppose if this is run and generates a PR that could be approved that would alleviate the concern.

Also, each banner has a UTM link associated with it generated by the LF Marketing team that wouldn't be captured by scraping the event page.

How would this manage scheduling the banners (and ensure there is no overlap between existing banners, or if there is, how would this decide which has precedence)?

@lmktfy
Copy link
Copy Markdown
Member

lmktfy commented Dec 9, 2025

There are several places we mention KubeCon.

This PR is about mentioning it on https://k8s.io/ (and localized equivalents)

We also have site wide banners, that this PR doesn't plan to touch.


For an Urchin / Google Analytics string, we could put that into a Netlify variable and inject it into production builds. The string isn't secret but putting it into a variable helps avoid tainting the metrics with forks and stale site.

@Caesarsage
Copy link
Copy Markdown
Contributor Author

Thanks for this @Caesarsage

A concern: this may circumvent the steering committee's ability to approve site-wide changes. Usually any update to the banner needs to be approved. Tho, I suppose if this is run and generates a PR that could be approved that would alleviate the concern.

Also, each banner has a UTM link associated with it generated by the LF Marketing team that wouldn't be captured by scraping the event page.

How would this manage scheduling the banners (and ensure there is no overlap between existing banners, or if there is, how would this decide which has precedence)?

The proposed change here is a utility function that can be used to generate the data used by the shortcode for the event list section on the https://k8.io/ . So yes someone will need to generate the data with the function and raise the PR for the changes.

And as Tim mentioned it doesn't tough the site wide banner .

@nate-double-u
Copy link
Copy Markdown
Contributor

Thanks for clarifying the context, I had it in my head this was a banner tool.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 14, 2025
@seokho-son
Copy link
Copy Markdown
Member

I'd say that the region is "North America". KubeCon North America was most recently held in the city of Atlanta.

Yes, i agree with this

Hello @Caesarsage and @lmktfy, thank you for proposing this automation approach.

Regarding localization, my understanding is that the current discussion leans toward registering only the region names in i18n, such as North America, Europe, India, and similar, and making those translatable via Hugo i18n. Is that correct?

If so, locations like Amsterdam or Mumbai would not be localized and would always be displayed as their original English names. I just wanted to confirm whether this matches your intention.
(localized pages may end up mixing the local language with English for the location names. this could potentially hurt the user experience on localized sites)

Thanks in advance for the clarification.

@dkarczmarski
Copy link
Copy Markdown
Member

dkarczmarski commented Jan 5, 2026

If so, locations like Amsterdam or Mumbai would not be localized and would always be displayed as their original English names. I just wanted to confirm whether this matches your intention. (localized pages may end up mixing the local language with English for the location names. this could potentially hurt the user experience on localized sites)

I’m not sure if my previous question was understood correctly, but I was trying to refer to exactly the same thing :)

@seokho-son
Copy link
Copy Markdown
Member

Yes @dkarczmarski, thanks. I’m aware this point has already been raised by you :),
and I just wanted to check the current understanding and any consensus around it so we can continue the discussion.

@seokho-son
Copy link
Copy Markdown
Member

Hi @Caesarsage,
Could you please follow up on the discussion above so that we can proceed?

@Caesarsage
Copy link
Copy Markdown
Contributor Author

I'd say that the region is "North America". KubeCon North America was most recently held in the city of Atlanta.

Yes, i agree with this

Hello @Caesarsage and @lmktfy, thank you for proposing this automation approach.

Regarding localization, my understanding is that the current discussion leans toward registering only the region names in i18n, such as North America, Europe, India, and similar, and making those translatable via Hugo i18n. Is that correct?

If so, locations like Amsterdam or Mumbai would not be localized and would always be displayed as their original English names. I just wanted to confirm whether this matches your intention. (localized pages may end up mixing the local language with English for the location names. this could potentially hurt the user experience on localized sites)

Thanks in advance for the clarification.

Yes @seokho-son

@Caesarsage Caesarsage force-pushed the automate-kubecon-events branch from 538ca43 to 12ec04b Compare March 16, 2026 23:08
@Caesarsage Caesarsage force-pushed the automate-kubecon-events branch from 499a09b to b6c34a6 Compare April 1, 2026 18:38
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 1, 2026
Comment thread i18n/pl/pl.toml

[kubectl_ref_view_full]
other = "Zobacz pełną dokumentację"

Copy link
Copy Markdown
Member

@dkarczmarski dkarczmarski May 7, 2026

Choose a reason for hiding this comment

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

the change at line 290 seems unnecessary :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agreed, we should probably not change localizations in this PR.

Copy link
Copy Markdown
Contributor

@nate-double-u nate-double-u left a comment

Choose a reason for hiding this comment

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

We may be able to build an API to call to get the same data in a cleaner way. Could you add the spec you want as an issue to the Events site here: https://github.com/linuxfoundation/lfevents/issues/new

Otherwise, in the meantime, this looks good to me, thanks @Caesarsage.

/lgtm

Comment thread i18n/pl/pl.toml

[kubectl_ref_view_full]
other = "Zobacz pełną dokumentację"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agreed, we should probably not change localizations in this PR.


# Configuration
CALENDAR_URL = "https://events.linuxfoundation.org/about/calendar/?_sf_s=kubecon"
EVENT_LIMIT = 2
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: why 2? If there are 3 events coming up this would skip one.

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.

I guess if we really want to show 3 upcoming events, change this locally and run the script with that setting.

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

LGTM label has been added.

DetailsGit tree hash: d055d7ddeeb4935a896af6d63185e0450a8f256d

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 16, 2026
{{ range $data.events -}}
{{ $startDate := time.AsTime .start_date -}}
{{ $endDate := time.AsTime .end_date -}}
{{ $regionKeys := dict "North America" "kubecon_region_north_america" "Europe" "kubecon_region_europe" "India" "kubecon_region_india" "Japan" "kubecon_region_japan" "China" "kubecon_region_china" "Event" "kubecon_region_event" }}
Copy link
Copy Markdown
Member

@lmktfy lmktfy May 17, 2026

Choose a reason for hiding this comment

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

nit: could put this mapping in (eg) data/events/region_name_heuristics.yaml

Copy link
Copy Markdown
Member

@lmktfy lmktfy left a comment

Choose a reason for hiding this comment

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

/lgtm

I don't see harm from merging this as-is.

Comment on lines +28 to +34
REGIONS = {
"North America": "North America",
"Europe": "Europe",
"India": "India",
"Japan": "Japan",
"China": "China",
}
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 tidier.

"""Check if title matches the expected KubeCon event pattern."""
if KUBECON_TITLE_MATCH_RE.match(title):
return True
print(f" Skipped (not a main KubeCon event): {title}")
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)

Suggested change
print(f" Skipped (not a main KubeCon event): {title}")
print(f" Skipped (not a main KubeCon event): {title}", file=sys.stderr)

soup = BeautifulSoup(response.text, 'html.parser')
ld_event = _extract_json_ld_event(soup)
if not ld_event:
print(f" Warning: No JSON-LD Event found at {url}")
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)

Suggested change
print(f" Warning: No JSON-LD Event found at {url}")
print(f" Warning: No JSON-LD Event found at {url}", file=sys.stderr)

Comment on lines +240 to +241
print("\nNo matching KubeCon events found!")
print(" Looking for: 'KubeCon + CloudNativeCon <region>'")
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: could write this to stderr

Comment on lines +263 to +264
print(f"\nNetwork Error: {e}")
print(" Could not fetch the events 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.

nit: could write this to stderr

print(" Could not fetch the events page.")
exit(1)
except Exception as e:
print(f"\nError: {e}")
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.

Suggested change
print(f"\nError: {e}")
print(f"\nError: {e}", file=sys.stderr)

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

LGTM label has been added.

DetailsGit tree hash: 2f7aec8fa3f0bf2cf1461d979da7783bdf2eace4

@Caesarsage
Copy link
Copy Markdown
Contributor Author

Could use a follow PR, especially after the linuxfoundation/lfevents#1107

@Caesarsage
Copy link
Copy Markdown
Contributor Author

Cc @dipesh-rawat for approval

@cjyabraham
Copy link
Copy Markdown
Contributor

Could use a follow PR, especially after the linuxfoundation/lfevents#1107

This PR is ready to address that issue.

@reylejano
Copy link
Copy Markdown
Member

In a follow-up PR, please add this script to the scripts README.md https://github.com/kubernetes/website/blob/main/scripts/README.md
/approve

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: reylejano, singh1203

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

The pull request process is described 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 26, 2026
@k8s-ci-robot k8s-ci-robot merged commit 936dff4 into kubernetes:main May 26, 2026
6 checks passed
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 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 language/pl Issues or PRs related to Polish 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/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.

9 participants