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 Kubecon page for KubeCon Paris 2024 #1804

Merged
merged 1 commit into from
Mar 1, 2024
Merged

Add Kubecon page for KubeCon Paris 2024 #1804

merged 1 commit into from
Mar 1, 2024

Conversation

kingdonb
Copy link
Member

@kingdonb kingdonb commented Feb 8, 2024

The deploy preview is ready at:

https://deploy-preview-1804--fluxcd.netlify.app/kubecon/

How this is supposed to work, you can just edit the Google Sites page, and this workflow in:

...comes along every 6 hours, wget's the html and feeds it through html2md, a Go tool that does a good job of converting HTML into Markdown

Then it runs a bunch of string substitutions on the Markdown output, to make sure we can serve the images from fluxcd.io instead of hot-linking Google Sites. The images all have some semantic associations that are conveyed through alt tags. We can change anything here, but I think it's pretty good for a first pass, and it should only open a Pull Request when there is a substantive change on the Sites.

Then, further string substitutions ensure that the things which should be shown as columns are given semantic containers so we can use CSS to turn them into columns.

We can trigger the workflow every 6 hours (we can shorten this interval during Kubecon - the workflow is fast) or you can trigger it manually, through the workflow dispatch.

The script has a debug mode you can enable with export DEBUG=1 - the instructions to operate the script are in the header, if you run the script on MacOS, then it will try to use gsed and ghead that are like the sed and head commands we'll find on our GitHub Actions runner workflow.

kingdonb added a commit to fluxcd/community that referenced this pull request Feb 9, 2024
This is associated with fluxcd/website#1804

It will not be published on the website before we merge
fluxcd/website#1804

We can see that it works in the preview build, (but we will need to
merge this one first before we can see it working in the preview.)

I don't see why we would publish this page any earlier than ~1-2 weeks
before KubeCon at earliest.

But there may be no reason to hold it up, either!

Signed-off-by: Kingdon P Barrett <[email protected]>
@kingdonb kingdonb force-pushed the kubecon-page branch 2 times, most recently from 912ba4b to 94d60ae Compare February 22, 2024 16:42
@kingdonb kingdonb marked this pull request as ready for review February 22, 2024 16:42
@kingdonb
Copy link
Member Author

I marked this one as ready for review, but we should not merge it before:

(and the preview deploy will fail unless that one is merged first.)

@kingdonb kingdonb changed the title WIP (Kubecon page) Add Kubecon page for KubeCon Paris 2024 Feb 22, 2024
@kingdonb
Copy link
Member Author

There's a workflow included in fluxcd/community#349 now that does the automatic pull from @mewzherder Google Site and populates a PR. Because this workflow is automated, @mewzherder doesn't need a second reviewer to merge a PR to the site - I think this addresses the main issue for Kubecon. If you can give me access to the Google Sites page then I'll make the necessary updates to the images in this PR, so they are hard links to local static content.

(Look at the generated PR to see what I mean: there's some dynamic cache key thing that changes depending on which Google site cache serves up the page. That will make the PRs spammy and annoying, so let's fix it... I know what it needs)

kingdonb added a commit to fluxcd/community that referenced this pull request Feb 24, 2024
This is associated with fluxcd/website#1804

It will not be published on the website before we merge
fluxcd/website#1804

We can see that it works in the preview build, (but we will need to
merge this one first before we can see it working in the preview.)

I don't see why we would publish this page any earlier than ~1-2 weeks
before KubeCon at earliest.

But there may be no reason to hold it up, either!

update KUBECON.md to match

scraped with minor edits via:
https://sites.google.com/view/flux-kubecon-paris-2024/home
https://codebeautify.org/html-to-markdown

remove weird pointless whitespace links

Formatting differences from

wget https://sites.google.com/view/flux-kubecon-paris-2024/home -O kubecon.html && html2md -i kubecon.html |sed '1,6d'|ghead -n -13 > KUBECON.md && rm kubecon.html

Add "Update Kubecon.md" workflow

* fixup: kingdonb
* add contents: write, pull-requests: write

do not pass GITHUB_TOKEN explicitly (it is the default value)

* permissions: contents, pull-requests
* don't try building go inline in the action

there is a release binary we can download and use, it's faster

improve filter (remove Copy heading link)

effect of script update

Make this script easier to test

Signed-off-by: Kingdon P Barrett <[email protected]>
Signed-off-by: Kingdon B <[email protected]>
@kingdonb kingdonb force-pushed the kubecon-page branch 2 times, most recently from 1d0dec8 to 1563588 Compare February 27, 2024 14:01
kingdonb added a commit to fluxcd/community that referenced this pull request Feb 27, 2024
This is associated with fluxcd/website#1804

It will not be published on the website before we merge
fluxcd/website#1804

We can see that it works in the preview build, (but we will need to
merge this one first before we can see it working in the preview.)

I don't see why we would publish this page any earlier than ~1-2 weeks
before KubeCon at earliest.

But there may be no reason to hold it up, either!

update KUBECON.md to match

scraped with minor edits via:
https://sites.google.com/view/flux-kubecon-paris-2024/home
https://codebeautify.org/html-to-markdown

remove weird pointless whitespace links

Formatting differences from

wget https://sites.google.com/view/flux-kubecon-paris-2024/home -O kubecon.html && html2md -i kubecon.html |sed '1,6d'|ghead -n -13 > KUBECON.md && rm kubecon.html

Add "Update Kubecon.md" workflow

* fixup: kingdonb
* add contents: write, pull-requests: write

do not pass GITHUB_TOKEN explicitly (it is the default value)

* permissions: contents, pull-requests
* don't try building go inline in the action

there is a release binary we can download and use, it's faster

improve filter (remove Copy heading link)

effect of script update

Make this script easier to test

Signed-off-by: Kingdon P Barrett <[email protected]>
Signed-off-by: Kingdon B <[email protected]>
@kingdonb
Copy link
Member Author

kingdonb commented Feb 27, 2024

I made the necessary changes in the Google Sites page upstream to support discerning the images and differentiating them with CSS classes, using the figure shortcode.

I added the images here, so we can use them: #1830

We should be able to add some CSS to the page once everything is connected and preview how it's going to look here. 🚀

@kingdonb
Copy link
Member Author

kingdonb commented Feb 27, 2024

I added a description to this PR for reviewers 👍

Still TODO before this one can merge:

  • CSS for the classes named in alt tags
  • flux-logo-inner-header-left Flux
  • inner-header-right-align Blob waving
  • stickers-float-left

Just confirming that these are all original works and we have the copyright permission from the original creator of this site @mewzherder to scrape it and reblog it on fluxcd.io/kubecon

Then LGTM after fluxcd/community#349 is merged

@kingdonb kingdonb marked this pull request as draft February 28, 2024 12:30
kingdonb added a commit to fluxcd/community that referenced this pull request Feb 28, 2024
This is now looking like an actual serviceable design

It replicates the original layout. It is a little bit brittle, but it's
not near as horrible as I thought it would be. We can add CSS as needed,
(the PR fluxcd/website#1804 will get the needed CSS updates to match
these classes)

Signed-off-by: Kingdon Barrett <[email protected]>
kingdonb added a commit to fluxcd/community that referenced this pull request Feb 28, 2024
Rearrange clearfix divs

This is now looking like an actual serviceable design

It replicates the original layout. It is a little bit brittle, but it's
not near as horrible as I thought it would be. We can add CSS as needed,
(the PR fluxcd/website#1804 will get the needed CSS updates to match
these classes)

sed ggEz

Signed-off-by: Kingdon Barrett <[email protected]>
There is no permalink on the fluxcd.io site for each content, we'll just
reuse /kubecon each time - for SEO purposes this is better.

(A permanent content archive will be hosted @ fluxcd/community repo,
where we can archive `KUBECON.md` as `attic/KUBECON24EU.md` for example)

* set KUBECON.md as external source
* try adding css rules to some classes
* Make more kubecon page formatting classes

I've added "clearfix" after reading w3schools about css float
https://www.w3schools.com/css/css_float.asp

* More CSS things

Signed-off-by: Kingdon Barrett <[email protected]>
@kingdonb
Copy link
Member Author

kingdonb commented Feb 28, 2024

Wow, it was not easy, but:

https://deploy-preview-1804--fluxcd.netlify.app/kubecon/

replicates the structure of

https://sites.google.com/view/flux-kubecon-paris-2024/home

🎉

Edits to the Google Sites page will result in some automation converting it from HTML into Markdown, and then partially back again, finally culminating in a pull-request auto-filing itself against this file:

https://github.com/fluxcd/community/blob/main/KUBECON.md

Any maintainer to the Community repo can approve and merge it, no second approver is needed

This PR pulls that file in via the existing external-sources magic, then the Website repo, on its next refresh, will intake the KUBECON.md and place it at content/en/kubecon.md where it then winds up served as https://fluxcd.io/kubecon

🥅 ⚽ 👣

I think this PR is ready to consider for merge. We can make improvements to the CSS if anyone has feedback on that, but replicating the column format after html2md was quite a trick. I hope we can use this.

@kingdonb kingdonb marked this pull request as ready for review February 28, 2024 20:49
Copy link
Member

@scottrigby scottrigby left a comment

Choose a reason for hiding this comment

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

looks super good!

@kingdonb kingdonb added area/events Events related issues and pull requests backport:v2-2 To be backported to v2-2 labels Feb 28, 2024
@kingdonb
Copy link
Member Author

kingdonb commented Feb 28, 2024

The other benefit here is that being in an external source, changes to KUBECON.md do not need to undergo a second PR to backport them to the live (stable release/docs) website. We could trigger the every-6-hours job across repositories, to quicken the response time from the two jobs that have to run in order, (since the goal was to be able to push a change out in less than 10 minutes I think we should do that - it's not much extra work)

I'll look into what else we would need to do. But if there are no objections, I think we can make this page live on Friday?

@kingdonb
Copy link
Member Author

There is one error I just spotted:

[the podinfo sample app](https://github.com/stefanprodan/podinfo)

This markdown link occurs inside an HTML block, so it doesn't get processed through markdown.

Fixed by fluxcd/community#362

Copy link
Member Author

@kingdonb kingdonb left a comment

Choose a reason for hiding this comment

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

TODO:

Follow-up notes in

(we should be able to trigger an immediate refresh by filtering the push: branches: main event for changes to any of the three files listed in external-sources)

but that's a small quality-of-life enhancement which will not take much time to implement. We need the site to go live today as planned, so we can begin testing the QR code, testing the workflow in production...

And there are no errors left in the copy as far as I can tell, 👍 LGTM

@kingdonb kingdonb merged commit 57b02a0 into main Mar 1, 2024
7 checks passed
@kingdonb kingdonb deleted the kubecon-page branch March 1, 2024 20:20
@fluxcdbot
Copy link
Member

Successfully created backport PR for v2-2:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/events Events related issues and pull requests backport:v2-2 To be backported to v2-2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants