GithubHelp home page GithubHelp logo

cilium / cilium.io Goto Github PK

View Code? Open in Web Editor NEW
32.0 17.0 50.0 252.95 MB

Cilium project website

Home Page: https://cilium.io

License: Creative Commons Attribution 4.0 International

Shell 0.03% JavaScript 98.96% CSS 1.01%

cilium.io's Introduction

Cilium Website

Table of Contents

Contributing

Please see Contributing for guidelines on adding blogs, documentation, Cilium distributions and trainings, or any other content to the website.

Getting Started

  1. Clone this repository
git clone [email protected]:cilium/cilium.io.git
  1. Install dependencies
npm install
  1. Copy .env.example and rename it into .env
cp .env.example .env

Usage

Run the website

npm run start

Build the website

npm run build

Run the built website

npm run serve

Clean Gatsby cache

npm run clean

Project Structure

├── src
│   ├── components
│   │  ├── pages — React components that are being used specifically on a certain page
│   │  └── shared — React components that are being used across the whole website
│   ├── hooks
│   ├── images — Images that are being quired using graphql. Read more about it here — gatsbyjs.org/docs/working-with-images. Also note, that folder structure should be equal to the structure of components folder
│   ├── pages
│   ├── styles
│   ├── templates
│   ├── utils
│   └── html.js — HTML template for all generated pages. Read more about it here — gatsbyjs.org/docs/custom-html
├── static
│   └── fonts - Self-hosted fonts
├── gatsby-browser.js — This file is where Gatsby expects to find any usage of the Gatsby browser APIs (if any). These allow customization/extension of default Gatsby settings affecting the browser. Read more about it here — gatsbyjs.org/docs/browser-apis
├── gatsby-config.js — This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins you’d like to include, etc. Read more about it here — gatsbyjs.org/docs/gatsby-config
├── gatsby-node.js — This file is where Gatsby expects to find any usage of the Gatsby Node APIs (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process. Read more about it here — gatsbyjs.org/docs/node-apis
└── gatsby-ssr.js — This file is where Gatsby expects to find any usage of the Gatsby server-side rendering APIs (if any). These allow customization of default Gatsby settings affecting server-side rendering. Read more about it here — gatsbyjs.org/docs/ssr-apis

Component Folder Structure

Each component includes

  1. Main JavaScript File
  2. Index File

Each component optionally may include

  1. Folder with icons and images

Also, each component may include another component that follows all above listed rules.

Example structure

component
├── nested-component
│  ├── images
│  │  ├── image.png
│  │  └── icon.svg
│  ├── nested-component.jsx
│  └── index.js
├── images
│  ├── image.png
│  └── icon.svg
├── component.jsx
└── index.js

Code Style

ESLint

ESLint helps find and fix code style issues and force developers to follow same rules. Current configuration is based on Airbnb style guide.

Additional commands:

npm run lint

Run it to check the current status of eslint issues across project.

npm run lint:fix

Run it to fix all possible issues.

Prettier

Prettier helps to format code based on defined rules. Difference between Prettier and ESLint.

Additional commands:

npm run format

Run it to format all files across the project.

VS Code

Following extensions required to simplify the process of keeping the same code style across the project:

After installation enable "ESLint on save" by adding to your VS Code settings.json the following line:

"editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
}

You can navigate to settings.json by using Command Pallete (CMD+Shift+P) and then type "Open settings.json".

To enable Prettier go to Preferences -> Settings -> type "Format". Then check that you have esbenp.prettier-vscode as default formatter, and also enable "Format On Save".

Reload VS Code and auto-format will work for you.

How to create blog post

The blog is created using gatsby-source-filesystem plugin and gatsby-plugin-mdx along with the createPages Gatsby Node API. The blog is configured to dynamically create pages with .md files from src/posts/.

In .md files we can declare frontmatter at the beginning:

  • path: the path of blog post;
  • date: the publish date of blog post;
  • title: the title of blog post;
  • isPopular: the boolean value that defines posts in block Popular posts;
  • isFeatured: the boolean value that defines the post in block Featured Story (NOTE: featured post can be only 1);
  • draft: the boolean value that defines the post is still in the process of being written. (it's false by default, if it's true, the post will not be rendered on production, but only on localhost);
  • categories: the categories of blog post;
  • tags: the tags of blog post, which is displayed in Twitter share card;
  • ogImage: the og:image in SEO metadata, also it is the cover image, which is displayed in the blog post card (featured story, popular posts);
  • ogSummary: the og:description in SEO metadata, also it is the description text, which is displayed in the blog post card (featured story, popular posts).
  • externalUrl: the external blog post url
  • ogImageUrl: the image url for the og:image in SEO metadata (use for the external blog posts)

The preview tags in .md files (which is used in the old Cilium blog) are fully converted to ogImage and ogSummary in frontmatter.

---
path: "/blog/2021/10/13/cilium-joins-cncf"
date: "2021-10-13T17:00:00.000Z"
title: "Cilium joins the CNCF"
isPopular: true
isFeatured: false
draft: false
ogImage: cilium-cncf-card.png
ogSummary: "CNCF TOC chair Liz Rice explains why she's excited about the future of
Cilium as an Incubation project in the CNCF." 
categories:
  - Technology
  - Community
tags:
  - eBPF
  - BPF
  - Cilium
  - CNCF
---

import authors from 'utils/author-data.js';

![Cilium joins the CNCF](cilium-cncf-card.png)

I'm beyond thrilled that Cilium has joined the CNCF as an Incubation project!
I'm excited about it not just as an advocate for the Cilium project, but also as
an Isovalent team member, and in my role as Chair of the CNCF's Technical
Oversight Committee - and I'd like to share why.

In .md files, it's able to use the custom component Blog Author and pass header, bio as props to the component. For example:

<BlogAuthor
header="Thomas Graf"
bio={`Thomas Graf is a Co-Founder of Cilium and the CTO & Co-Founder of <a href="https://isovalent.com">Isovalent</a>, the company behind Cilium. Before that, Thomas spent 15 years as a kernel developer working on the <a href="https://kernel.org">Linux kernel</a> in networking, security and eventually eBPF.`}
/>

Or you can import the author data in .md files from src/utils/author-data.js:

import authors from 'utils/author-data';

<BlogAuthor {...authors.thomasGraf}/>

The default theme of Blog Author is primary.

If you want to use another theme, pass the prop theme with value secondary:

<BlogAuthor
theme="secondary"
header="Guest Blog Post:"
bio={`This is a guest blog by a Cilium user based on the <a href="https://davidlovezoe.club/wordpress/archives/851">the original blog post</a>. If you would like to publish a blog post as well, contact us on Slack.`}
/>

cilium.io's People

Contributors

americano98 avatar amitmavgupta avatar andrewgolovanov avatar distributethe6ix avatar flxflx avatar grayayer avatar hacktivist123 avatar k8isdead avatar katiestruthers avatar liquidat avatar lizrice avatar lnikell avatar m1ghtym0 avatar michi-covalent avatar mraerino avatar neilblaze avatar nerucheva avatar nikvoblikov avatar paularah avatar peterj avatar prosazhin avatar qmonnet avatar tgraf avatar tklauser avatar vannyle avatar xmulligan avatar yasell avatar yoshuarijk avatar youngnick avatar youssefazrak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cilium.io's Issues

Missing link(s) to video/doc

I noticed the following text on the main page (Security > Advanced Network Policy item) without any links:

Get started here or watch a video to learn more.

I can make a fix to add the links, but I am unsure what the intended link targets were here.

Migrate to Google Analytics 4 (GA4)

Google has deprecated Universal Analytics (UA), in favor of its successor, Google Analytics 4 (GA4). This issue is part of a CNCF-wide effort to upgrade project websites to GA4. For more details about the deprecation and the CNCF migration effort, see:

Tasks: stages 1 & 2

  • Create a GA4 site tag under the CNCF projects account.
    The new GA4 stream measurement ID is: G-V9SYWYG92Y
  • Enable GA4 site tag, ideally via Netlify snippet injection (leaving the GTM site tag in place), "Google Analytics 4 - only in production", just before </head>:
    {% if CONTEXT == 'production' %}
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-V9SYWYG92Y"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
    
      gtag('config', 'G-V9SYWYG92Y');
    </script>
    {% endif %}
  • Ensure that the GA4 site tag is receiving events.
  • I'm going to assume that the GTM tag is still processing events, since the registration code hasn't been touched. If someone with access to that Analytics account can confirm, that would be appreciated.

Tasks: followup

  • Eventually, the GTM tag will stop working. Either it will need to be upgraded, or simply dropped in favor of the GA4 site tag. #194

Sites

  • Main site: this issue is for the main site, cilium.io, which is currently setup with:
    • Google Tag Manager (GTM) tag, GTM-M533ZSF
    • UA-96283704-1
  • Docs: I'll be creating a separate issue for the docs subdomain, which is built from cilium/cilium. This docs issue is:
    cilium/cilium#22007

/cc @caniszczyk @nate-double-u

Use Cases pages

On the homepage, we currently have this section.

Screenshot 2023-01-20 at 15 56 26

It would be great for each of the uses cases to have its own page.

Networking

  • High Performance Networking (CNI)
  • Layer 4 Load Balancer
  • Cluster Mesh
  • Bandwidth and Latency Optimization
  • kube-proxy replacement
  • BGP
  • Egress Gateway
  • Service Mesh, including ingress, TLS termination, canary rollouts, rate limiting, circuit breaking

Observability

  • Service Map
  • Identity-aware L3/L4/DNS Network Flow Logs
  • Network Policy Events
  • Advanced Network Protocol Visibility
  • Metrics & Tracing Export

Security

  • Transparent Encryption
  • Network Policy
  • Runtime Enforcement

Each page can be filled out with a description of the use case, links to relevant talks, blogs, or other content, and any community quotes available.

Update to tagline on home page

Since Cilium isn't just limited to container workloads these days, we are changing the tagline on the home page slightly (and also making a little grammar improvement while we're at it).

Old version:

Cilium is an open source software for providing, securing and observing network connectivity between container workloads - cloud native, and fueled by the revolutionary Kernel technology eBPF.

Change to:

Cilium is an open source, cloud native solution for providing, security and observing network connectivity between workloads, fueled by the revolutionary Kernel technology eBPF

feature-request: Open search results in separate page

Currently when searching on the cilium blog, the results are displayed in a small list pop-up in the page, and has an option to "expand" to see more. Ideally we would also offer an option to open the results in a new page, which would be easier to look for results in.

Highlight end users and industries

It would be great to highlight the adopters by moving that to the nav bar and maybe creating pages for specific industries that Cilium is helpful in

Search results ordering is sub-optimal

We should show newer blogs ahead of older ones.

Currently, when searching “cilium release” I see: 1.12 release, then 0.10, then 1.7, service mesh beta, 0.9, kafka, 1.0.0-rc4. Ideally, newer releases should come first in that list.

Screenshot:
Screenshot 2022-11-22 at 2 54 01 PM

Feature Request - add corresponding routing traffic for network policy example

Here is the documentation to allow a service to route traffic to a service in another cluster https://docs.cilium.io/en/stable/network/clustermesh/policy/#gs-clustermesh-network-policy

however, documentation to routing traffic to a specific service in another cluster seems evasive, there is docs for same service in multi cluster but looking for routing one service traffic to another cluster as shown in the network policy.

Support Localization of the website

Many people like to read website in their mother tongue. For example, in Kubernetes documentation, only 50% of the page views are in English. Supporting localization of the Cilium website will help grow our community and provide good entry points for new contributors from different backgrounds to the Cilium community.

Describe the feature you'd like

To help people start a new localization, they need:

  1. Community guidelines on how to start a localization
  2. Technical tutorials how to create and build the localization
  3. Minimum requirements for having a localization be part of the website
  4. Build fall back into the docs for when a page hasn't been translated

The Kubernetes project has a good framework that we could follow:

See https://kubernetes.io/docs/contribute/localization/. Some key parts would be:
a) If you want the Kubernetes documentation localized into a new language, here's what you need to do. Because contributors can't approve their own pull requests, you need at least two contributors to begin a localization. All localization teams must be self-sustaining. The Kubernetes website is happy to host your work, but it's up to you to translate it and keep existing localized content current.
b) Localizing all of the Kubernetes documentation is an enormous task. It's okay to start small and expand over time. When you start a new localization, you must localize all the minimum required content before the Kubernetes project can publish your changes to the live website.
c) Localizing the README and CoC

Create a README (Kubernetes example) that tells people how to build, test, and troubleshoot the documentation.

Decide upon a set of minimum required content for localized documentation to be mereged into master. I would suggest

  • Use cases
  • get started
  • get involved
  • get help
  • events
  • blog
  • enterprise
  • newsletter

Make sure the docs fall back to English rather than 404 when a page has not been translated yet.

Reference

These two talks from Zach Corleissen are also helpful to understand how Kubernetes did it:

Multilingual Kubernetes: The kubernetes.io stack, how we got there, and what it took to get there

Localize your open source documentation: a Kubernetes case study

Post Google Analytics 4 (GA4) migration cleanup

Followup to:

Tasks:

  • Drop GTM ID setup code:
    resolve: 'gatsby-plugin-google-tagmanager',

    CNCF does't have access to the GTM account, so I'm (@chalin) unsure how you have things setup. If you've registered UA IDs, those will stop working in 2023. We can [connect] the UA ID from the GA4 web data-stream if necessary, if we want to remove the GTM ID setup code now but keep receiving events between now and their EOL.

Rename Netlify preview-only host or host docs via Netlify

Originally posted by @michi-covalent in #164 (comment)

  • Docs have two hosts: I'd like some insights as to why there seem to be two hosting services active for the docs.

https://docs.cilium.io is currently using readthedocs to host the production site. we use cncf netlify account for deploy previews. https://docs-cilium-io.netlify.app comes from that. not sure if there is a way to disable *.netlify.app domain.

The current situation is a bit confusing. Two options come to mind:

  1. Consider renaming the Netlify preview-only host to contain "preview" in the name. That makes it clear that the hosting service is used for previews only (I know of at least one other CNCF project that has done this).
  2. Consider actually hosting the production site and docs via Netlify. I seem to recall a CNCF project that had done this, but I might be confusing this with Mkdocs. I'll have to double check and get back to you. See next comment for details.

Thoughts @michi-covalent @lizrice @xmulligan @qmonnet

Can't build site locally - GRAPHQL error due to missing HubspotEmails

Hi. It would be great if contributors could build the website locally. The instructions in the README don't work for me. So far, I've discovered that I need to export GATSBY_DEFAULT_SITE_URL=http://localhost, but even then, I'm getting this error:

$ npm run build

> [email protected] build
> gatsby build

success compile gatsby files - 1.708s
...
success onPreExtractQueries - 0.002s

 ERROR #85923  GRAPHQL

There was an error in your GraphQL query:

Cannot query field "objects" on type "HubspotEmails".

If you don't expect "objects" to exist on the type "HubspotEmails" it is most likely a typo. However, if you expect "objects" to exist there are a couple of
 solutions to common problems:

- If you added a new data source and/or changed something inside gatsby-node/gatsby-config, please try a restart of your development server.
- You want to optionally use your field "objects" and right now it is not used anywhere.

It is recommended to explicitly type your GraphQL schema if you want to use optional fields.

File: src/components/pages/newsletter/issues/issues.jsx:16:9

See our docs page for more info on this error: https://gatsby.dev/creating-type-definitions

not finished Running gatsby-plugin-sharp.IMAGE_PROCESSING jobs - 55.484s
failed extract queries from components - 5.402s

Maybe I need a bogus HUBSPOT_API_KEY, or some code changes might be required to allow that query to fail?

/cc @caniszczyk @nate-double-u

Broken link in configmap

https://docs.cilium.io/en/stable/network/kubernetes/configuration/#bpffs-systemd
https://cilium.link/etcd-config

The following ConfigMap is an example where the etcd cluster is running in 2 nodes, node-1 and node-2 with TLS, and client to server authentication enabled.

apiVersion: v1
kind: ConfigMap
metadata:
name: cilium-config
namespace: kube-system
data:

The kvstore configuration is used to enable use of a kvstore for state

storage.

kvstore: etcd
kvstore-opt: '{"etcd.config": "/var/lib/etcd-config/etcd.config"}'

This etcd-config contains the etcd endpoints of your cluster. If you use

TLS please make sure you follow the tutorial in https://cilium.link/etcd-config

etcd-config: |-
---
endpoints:
- https://node-1:31079
- https://node-2:31079
#
# In case you want to use TLS in etcd, uncomment the 'trusted-ca-file' line
# and create a kubernetes secret by following the tutorial in
# https://cilium.link/etcd-config
trusted-ca-file: '/var/lib/etcd-secrets/etcd-client-ca.crt'
#
# In case you want client to server authentication, uncomment the following
# lines and create a kubernetes secret by following the tutorial in
# https://cilium.link/etcd-config
key-file: '/var/lib/etcd-secrets/etcd-client.key'
cert-file: '/var/lib/etcd-secrets/etcd-client.crt'

[Urgent] Opt-out of "Automatically set up a basic Google Analytics 4 property"

In March (next week), Google will start creating new GA4 site tags if there's no existing GA4 ID connected to an existing UA ID. But Cilium.io already has a GA4 property.

  1. So, Cilium.io needs to opt out of Google's forced & automatic GA4 migration. To do so:

    Unfortunately, I have access to the panel but I don't have the permissions to opt out. Can you either grant me the permissions or make the change?

  2. Note that according to the Google Tag Assistant, the Cilium docs are also being tracked via another UA property with ID UA-17997319-1. I don't have access to that account. You'll need to opt out of there too.

  3. If you have access to the ReadTheDocs account for the Cilium docs, it might be a good idea to remove the UA IDs from the config there.

For context regarding the GA4 opt-out issue, see:

/cc @nate-double-u @lizrice @qmonnet

Add Technical outcome pages

On the homepage we currently have use cases and industry verticals. It'd be great to have a dedicated section for technical outcomes.

These are the current ones we have in mind:

  • Zero Trust Networking
  • Network Automation
  • Distributed Firewalling
  • Cost and Carbon Savings
  • Multi-cloud Connectivity

rephrasing point no.3 in getting started of the contribution guide.

hello maintainers, I was implementing the steps to run cilium.io website on localhost and thus make some changes. But i really stumbled upon this.
image

the 3rd point says "Copy .env.example and rename it into .env" but what to copy at the first place.. I think it should just be
"rename.env.example to.env." just my opinion. thankyou 😊

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.