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

Refactor using docsy. #429

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions .github/workflows/postsubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,30 @@ on:
workflow_dispatch: {}
xuezhaojun marked this conversation as resolved.
Show resolved Hide resolved

jobs:
publish:
name: publish
deploy:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: checkout code
uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.119.0'
- name: build
run: make publish
hugo-version: '0.125.5'
extended: true
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- run: npm ci
- run: hugo --baseURL https://open-cluster-management.io --minify
- name: deploy
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./output
publish_dir: ./public
cname: open-cluster-management.io
15 changes: 11 additions & 4 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.119.0'
- name: build
run: make static
hugo-version: '0.125.5'
extended: true
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- run: npm ci
- run: hugo
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,13 @@ output/**
hugo
.vscode
.idea/**

.hugo_build.lock

public/

# Modules generated by node.js for CSS editing
node_modules/

# Resources directory generated by Hugo local build
resources/
Empty file removed .gitmodules
Empty file.
3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

19 changes: 0 additions & 19 deletions Makefile

This file was deleted.

2 changes: 2 additions & 0 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
approvers:
- xuezhaojun
xuezhaojun marked this conversation as resolved.
Show resolved Hide resolved
- qiujian16
- mikeshng
- gurnben
- dhaiducek
- mprahl

reviewers:
- xuezhaojun
- qiujian16
- mikeshng
- dhaiducek
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Website
This repo host the website code of open-cluster-management project. After the PR is merged, the compiled website page will be published to gh-page branch in this repo.

The open-cluster-management website is based on the [Hugo framework](https://github.com/gohugoio/hugo), with the [hugo-geekdoc theme](https://github.com/thegeeklab/hugo-geekdoc) applied, and is written in Markdown format.
The open-cluster-management website is based on the [Hugo framework](https://github.com/gohugoio/hugo), with the [Docsy](https://www.docsy.dev/) applied, and is written in Markdown format.

You can always click the Edit this page link at the top right of each page, but if you want to test your changes locally before submitting you can:

Expand All @@ -12,7 +12,7 @@ Check out your copy locally:
```
git clone ssh://[email protected]/<your-user>/open-cluster-management-io.github.io.git
cd open-cluster-management-io.github.io
make server
hugo server
```

An instance of the website is now running locally on your machine and is accessible at http://localhost:1313.
Expand Down
11 changes: 5 additions & 6 deletions archetypes/default.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

+++
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
date = {{ .Date }}
draft = true
+++
File renamed without changes
18 changes: 18 additions & 0 deletions assets/scss/_styles_project.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.td-footer {
background-color: #0e0f45;
}

// Change font size of "Open Cluster Management" and make it not wrap
.display-1 {
font-weight: bold;
white-space: nowrap;
font-size: clamp(1rem, 5vw, 5rem);
}

.github-link {
text-decoration: none;

&:hover {
color: #ffffff !important;
}
}
11 changes: 11 additions & 0 deletions assets/scss/_variables_project.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
Add styles or override the theme's variables here.
*/

html.smooth-scroll {
scroll-behavior: smooth;
}

// Theme colors
$primary: #0e0f45;
$secondary: #fff;
39 changes: 0 additions & 39 deletions config.toml

This file was deleted.

57 changes: 57 additions & 0 deletions content/en/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: Open Cluster Management
---

{{< blocks/cover title="Open Cluster Management" image_anchor="right" height="max" color="primary" >}}
<a class="btn btn-lg btn-secondary me-3 mb-4" href="/docs/">
Get Started
</a>
<a class="btn btn-lg btn-secondary me-3 mb-4" href="https://kubernetes.slack.com/channels/open-cluster-mgmt">
Join Our Slack
</a>
<p class="lead mb-6"></p> <!-- To create space between the buttons and the text below -->
<p class="lead mb-6">
Make working with many Kubernetes clusters super easy regardless of where they are deployed
</p>
<p class="lead mb-6">
Open Cluster Management is a community-driven project focused on multicluster and multicloud scenarios for Kubernetes apps. Open APIs are evolving within this project for cluster registration, work distribution, dynamic placement of policies and workloads, and much more.
</p>
<p>
If you like Open Cluster Management, give it a star on <a href="https://github.com/open-cluster-management-io/ocm" class="github-link">GitHub</a>!
</p>
{{< /blocks/cover >}}

{{% blocks/section color="secondary" type="row" title="Features Overview" %}}
{{% blocks/feature icon="fa-server" title="Cluster Inventory" %}}
Registration of multiple clusters to a hub cluster to place them for management.
{{% /blocks/feature %}}

{{% blocks/feature icon="fa-tasks" title="Work Distribution" %}}
The work API that enables resources to be applied to managed clusters from a hub cluster.
{{% /blocks/feature %}}

{{% blocks/feature icon="fa-random" title="Content placement" %}}
Dynamic placement of content and behavior across multiple clusters.
{{% /blocks/feature %}}

{{% blocks/feature icon="fa-cloud" title="Vendor neutral APIs" %}}
Avoid vendor lock-in by using APIs that are not tied to any cloud providers or proprietary platforms.
{{% /blocks/feature %}}

{{% blocks/feature icon="fa-rocket" title="Launch apps everywhere" url="docs/getting-started/integration/app-lifecycle/" %}}
Use application lifecycle to create your application and deliver hybrid apps across one or more clusters, while you keep up with changes.
{{% /blocks/feature %}}

{{% blocks/feature icon="fa-cog" title="Configure, secure, and manage your resources." url="docs/concepts/policy" %}}
Policy and configuration management uses labels to help you deploy policies and control consistently across your resources. Keep your resources secure by using access control and manage for your quota and cost.
{{% /blocks/feature %}}
{{% /blocks/section %}}


{{% blocks/section color="primary" %}}
Open Cluster Management is a Cloud Native Computing Foundation sandbox project
{.h3 .text-center}
<div class="text-center">
<img src="https://raw.githubusercontent.com/cncf/artwork/master/other/cncf/horizontal/white/cncf-white.svg" alt="CNCF logo" style="max-width: 300px; margin-top: 20px;">
</div>
{{% /blocks/section %}}
4 changes: 0 additions & 4 deletions content/en/addon-framework.md

This file was deleted.

4 changes: 0 additions & 4 deletions content/en/api.md

This file was deleted.

Binary file added content/en/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 3 additions & 56 deletions content/en/blog/_index.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,6 @@
---
title: Blog
weight: 6
menu:
main:
weight: 30
---

----
### [The HA Hub clusters solution -- MultipleHubs]({{< ref "/blog/multiplehubs" >}})
- Authors: [Zhao Xue](https://github.com/xuezhaojun)
- Date: Aug 26, 2024
----
----
### [Using the GitOps way to deal with the upgrade challenges of multi-cluster tool chains]({{< ref "/blog/addon-rollout" >}})
- Authors: [郝青](https://github.com/haoqing0110)
- Date: 2024年01月19日
----
----
### [Open Cluster Management - Configuring Your Kubernetes Fleet With the Policy Addon](https://www.youtube.com/watch?v=ZZH654t5YpI)
- Authors: [Matt Prahl](https://github.com/mprahl)
- Date: Nov 22, 2023
----
### [How to distribute workloads using Open Cluster Management](https://developers.redhat.com/articles/2023/01/19/how-distribute-workloads-using-open-cluster-management)
- Authors: [Tomer Figenblat](https://github.com/TomerFi)
- Date: Jan 19, 2023
----
### [KubeCon NA 2022 - OCM Workload distribution with Placement API](/kubecon-na-2022-ocm-workload-distribution-with-placement-api.pdf)
- Authors: [Qing Hao](https://github.com/haoqing0110), [Jian Qiu](https://github.com/qiujian16) and [Le Yang](https://github.com/elgnay)
- Date: Oct 26, 2022
----
### [KubeCon NA 2022 - OCM Multicluster App & Config Management](/kubecon-na-2022-ocm-multicluster-app-and-config-management.pdf)
- Authors: [Maggie Chen](https://github.com/chenz4027) and [Matt Prahl](https://github.com/mprahl)
- Date: Oct 26, 2022
----
### [Karmada and Open Cluster Management: two new approaches to the multicluster fleet management challenge](https://www.cncf.io/blog/2022/09/26/karmada-and-open-cluster-management-two-new-approaches-to-the-multicluster-fleet-management-challenge/)
- Authors: [David Eads](https://github.com/deads2k) and [Kevin Wang](https://github.com/kevin-wangzefeng)
- Date: Sep 26, 2022
----
### [Extending the Multicluster Scheduling Capabilities with Open Cluster Management Placement](https://cloud.redhat.com/blog/extending-the-multicluster-scheduling-capabilities-with-open-cluster-management-placement)
- Authors: [Qing Hao](https://github.com/haoqing0110)
- Date: Sep 15, 2022
----
### [Using the Open Cluster Management Placement for Multicluster Scheduling](https://cloud.redhat.com/blog/using-the-open-cluster-management-placement-for-multicluster-scheduling)
- Authors: [Jian Qiu](https://github.com/qiujian16), [Le Yang](https://github.com/elgnay) and [Qing Hao](https://github.com/haoqing0110)
- Date: Jan 12, 2022
----
### [Using the Open Cluster Management Add-on Framework to Develop a Managed Cluster Add-on](https://cloud.redhat.com/blog/using-the-open-cluster-management-add-on-framework-to-develop-a-managed-cluster-add-on)
- Authors: [Jian Qiu](https://github.com/qiujian16), [Le Yang](https://github.com/elgnay) and [Wei Liu](https://github.com/skeeey)
- Date: Oct 12, 2021
----
### [The Next Kubernetes Frontier: Multicluster Management](https://containerjournal.com/features/the-next-kubernetes-frontier-multicluster-management/)
- Authors: [Min Kim](https://github.com/yue9944882) and [Jian Qiu](https://github.com/qiujian16)
- Date: Sep 22, 2021
----
### [Put together a user walk through for the basic Open Cluster Management API using `kind`, `olm`, and other open source technologies](https://github.com/mdelder/open-cluster-management-getting-started)
- Authors: [Michael Elder](https://github.com/mdelder)
- Date: May 24, 2021
----
### [Setting up Open Cluster Management the hard way](https://github.com/sdminonne/ocm-the-hard-way)
- Authors: [Dario Minonne](https://github.com/sdminonne)
- Date: April 22, 2021
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---
title: 通过OCM访问不同VPC下的集群
author: 薛昭 [@xuezhaojun](https://github.com/xuezhaojun)
date: 2022-04-20
toc_hide: true
---

2022年4月20日 [薛昭](https://github.com/xuezhaojun)

{{< toc >}}

## 问题背景

当我们拥有多个集群时,一个很常见的需求是:不同的用户希望能访问位于不同VPC下的集群。比如,开发人员希望能够在测试集群部署应用,或者运维人员希望能够在生产集群上进行故障排查。
Expand Down Expand Up @@ -42,7 +41,7 @@ OCM 全称为 Open Cluster Management,旨在解决多集群场景下的集群

![](./assets/diagram-2.png)

更多有关于OCM的架构细节,请参考[官方文档]({{< ref "/concepts/architecture" >}})。
更多有关于OCM的架构细节,请参考[官方文档]({{< ref "docs/concepts/architecture" >}})。

### cluster-proxy是什么?

Expand All @@ -54,7 +53,7 @@ cluster-proxy是使用OCM的[addon-framework](https://github.com/open-cluster-ma

![](./assets/diagram-3.png)

更多有关cluster-proxy的信息,请参考[官方文档]({{< ref "/getting-started/integration/cluster-proxy" >}})。
更多有关cluster-proxy的信息,请参考[官方文档]({{< ref "docs/getting-started/integration/cluster-proxy" >}})。

### managed-serviceaccount是什么?

Expand All @@ -68,7 +67,7 @@ Managed-serviceaccount(后文简写为:MSA)也是利用OCM的[addon-framew

![](./assets/diagram-4.png)

更多有关managed-serviceaccount的信息,请参考[官方文档]({{< ref "/getting-started/integration/managed-serviceaccount" >}})。
更多有关managed-serviceaccount的信息,请参考[官方文档]({{< ref "docs/getting-started/integration/managed-serviceaccount" >}})。

## 样例

Expand Down Expand Up @@ -122,7 +121,7 @@ default-token-r89gs kubernetes.io/service-account-token 3 6d22h
dep Opaque 2 6d21h
```

接着,管理员需要通过OCM的[Manifestwork]({{< ref "/concepts/manifestwork" >}}), 即工作负载分发功能,在cluster1上创建一个`ClusterRole`,给dep绑定了cluster1上的对应权限:
接着,管理员需要通过OCM的[Manifestwork]({{< ref "docs/concepts/manifestwork" >}}), 即工作负载分发功能,在cluster1上创建一个`ClusterRole`,给dep绑定了cluster1上的对应权限:

```bash
# 创建ClusterRole, 仅具有操作Deployment的权限
Expand Down
Loading
Loading