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

Update charts and docs #11

Merged
merged 5 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
CHART_VERSION = v0.2.0
Copy link
Member

@spjmurray spjmurray Jul 18, 2024

Choose a reason for hiding this comment

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

Note to self: you need to bump this in the next PR... and obviously change all the versions... again


# Defines the versions to use for cluster API components.
CAPI_VERSION = v1.7.2
CAPO_VERSION = v0.10.3
CAPI_VERSION = v1.7.4
CAPO_VERSION = v0.10.4

# All the charts we can generate.
CHARTS = cluster-api-core \
Expand Down
45 changes: 27 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

## Why?

`clusterctl` is very opinionated, it will pull down some kustomize generated maifests, then do some environment substitution on them.
`clusterctl` is very opinionated, it will pull down some kustomize generated manifests, then do some environment substitution on them.
This isn't compatible with ArgoCD for example, hence this project.

## How

In simple terms, we run `kubectl kustomize`, chop up the manifests and auto generate templates.
When we encounter one of the annoying evironment variables, we replace it with Go templating, then add the replacement into `values.yaml`.
When we encounter one of the annoying environment variables, we replace it with Go templating, then add the replacement into `values.yaml`.

## Deploying Prerequisites

Expand All @@ -22,14 +22,15 @@ This chart requires the following to be installed on the target cluster first:
```shell
helm repo add jetstack https://charts.jetstack.io
helm repo update
helm install cert-manager jetstack/cert-manager --version v1.10.1 --namespace cert-manager --create-namespace
helm install cert-manager jetstack/cert-manager --version v1.15.1 --namespace cert-manager --create-namespace --set crds.enabled=true
Copy link
Member

Choose a reason for hiding this comment

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

Note to self: delete this, we shouldn't be telling users how to install a 3rd part application, and have to update the instructions all the time in different locations, a link to the docs will suffice.

```
</details>

<details>
<summary>ArgoCD</summary>

```yaml
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
Expand All @@ -40,14 +41,14 @@ spec:
source:
chart: cert-manager
repoURL: https://charts.jetstack.io
targetRevision: v1.10.1
targetRevision: v1.15.1
helm:
releaseName: cert-manager
parameters:
- name: installCRDs
value: true
value: "true"
destination:
name: ${TARGET_VCLUSTER}
server: https://kubernetes.default.svc
namespace: cert-manager
syncPolicy:
automated:
Expand All @@ -67,14 +68,15 @@ There is a top level chart-of-charts that will just install everything as a big
```shell
helm repo add unikorn-cloud-capi https://unikorn-cloud.github.io/helm-cluster-api
helm repo update
helm install unikorn-cloud-capi/cluster-api --version v0.1.1
helm install cluster-api unikorn-cloud-capi/cluster-api --version v0.2.0
Copy link
Member

Choose a reason for hiding this comment

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

Note to self: history repeating itself... we need a way to not have to change versions all over the place and every time something changes. Now asciidoc is good in that it has attributes, so that's a single place, markdown less so. Ideally we'd like the source of truth to be the chart version. So I guess the proposal would be to have a pre-commit hook that looks at charts/*/Chart.yaml and generates a README.md from a template, modifying in place just isn't going to fly given most of these things live in verbatim sections so markup of these things is impossible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

@spjmurray spjmurray Jul 18, 2024

Choose a reason for hiding this comment

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

sed... sounds a bit flaky 🤣 Inspiration of what not to do certainly!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

aaah yeah, just looked at that script (for probably the first time!).

ok yes, probably some parsing of the Chart.yeaml in the latest release for this would be sufficient then.

```
</details>

<details>
<summary>ArgoCD</summary>

```yaml
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
Expand All @@ -85,9 +87,10 @@ spec:
source:
repoURL: https://unikorn-cloud.github.io/helm-cluster-api
chart: cluster-api
targetRevision: v0.1.9
targetRevision: v0.2.0
destination:
server: https://172.18.255.200:443
server: https://kubernetes.default.svc
namespace: foo
ignoreDifferences:
# Aggregated roles are mangically updated by the API.
- group: rbac.authorization.k8s.io
Expand Down Expand Up @@ -125,14 +128,15 @@ You may want to be a little less gung-ho and deploy the pieces as separate appli
```shell
helm repo add unikorn-cloud-capi https://unikorn-cloud.github.io/helm-cluster-api
helm repo update
helm install unikorn-cloud-capi/cluster-api-core --version v0.1.1
helm install cluster-api-core unikorn-cloud-capi/cluster-api-core --version v0.2.0
```
</details>

<details>
<summary>ArgoCD</summary>

```yaml
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
Expand All @@ -143,9 +147,10 @@ spec:
source:
repoURL: https://unikorn-cloud.github.io/helm-cluster-api
chart: cluster-api-core
targetRevision: v0.1.9
targetRevision: v0.2.0
destination:
server: https://172.18.255.200:443
server: https://kubernetes.default.svc
namespace: foo
ignoreDifferences:
# Aggregated roles are mangically updated by the API.
- group: rbac.authorization.k8s.io
Expand Down Expand Up @@ -174,14 +179,15 @@ spec:
```shell
helm repo add unikorn-cloud-capi https://unikorn-cloud.github.io/helm-cluster-api
helm repo update
helm install unikorn-cloud-capi/cluster-api-bootstrap-kubeadm --version v0.1.1
helm install cluster-api-bootstrap-kubeadm unikorn-cloud-capi/cluster-api-bootstrap-kubeadm --version v0.2.0
```
</details>

<details>
<summary>ArgoCD</summary>

```yaml
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
Expand All @@ -192,9 +198,10 @@ spec:
source:
repoURL: https://unikorn-cloud.github.io/helm-cluster-api
chart: cluster-api-bootstrap-kubeadm
targetRevision: v0.1.9
targetRevision: v0.2.0
destination:
server: https://172.18.255.200:443
server: https://kubernetes.default.svc
namespace: foo
ignoreDifferences:
- group: apiextensions.k8s.io
jsonPointers:
Expand All @@ -216,14 +223,15 @@ spec:
```shell
helm repo add unikorn-cloud-capi https://unikorn-cloud.github.io/helm-cluster-api
helm repo update
helm install unikorn-cloud-capi/cluster-api-control-plane-kubeadm --version v0.1.1
helm install cluster-api-control-plane-kubeadm unikorn-cloud-capi/cluster-api-control-plane-kubeadm --version v0.2.0
```
</details>

<details>
<summary>ArgoCD</summary>

```yaml
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
Expand All @@ -234,9 +242,10 @@ spec:
source:
repoURL: https://unikorn-cloud.github.io/helm-cluster-api
chart: cluster-api-control-plane-kubeadm
targetRevision: v0.1.9
targetRevision: v0.2.0
destination:
server: https://172.18.255.200:443
server: https://kubernetes.default.svc
namespace: foo
ignoreDifferences:
- group: rbac.authorization.k8s.io
jsonPointers:
Expand Down
2 changes: 1 addition & 1 deletion charts/cluster-api-bootstrap-kubeadm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
appVersion: v1.7.2
appVersion: v1.7.4
description: A Helm chart for deploying cluster API.
icon: https://assets.unikorn-cloud.org/assets/images/logos/dark-on-light/icon.png
name: cluster-api-bootstrap-kubeadm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3503,6 +3503,181 @@ spec:

BootstrapToken and File are mutually exclusive'
properties:
kubeConfig:
description: 'KubeConfig is used (optionally) to generate
a KubeConfig based on the KubeadmConfig''s information.

The file is generated at the path specified in KubeConfigPath.



Host address (server field) information is automatically
populated based on the Cluster''s ControlPlaneEndpoint.

Certificate Authority (certificate-authority-data field)
is gathered from the cluster''s CA secret.'
properties:
cluster:
description: 'Cluster contains information about how
to communicate with the kubernetes cluster.



By default the following fields are automatically
populated:

- Server with the Cluster''s ControlPlaneEndpoint.

- CertificateAuthorityData with the Cluster''s CA
certificate.'
properties:
certificateAuthorityData:
description: 'CertificateAuthorityData contains
PEM-encoded certificate authority certificates.



Defaults to the Cluster''s CA certificate if
empty.'
format: byte
type: string
insecureSkipTLSVerify:
description: InsecureSkipTLSVerify skips the validity
check for the server's certificate. This will
make your HTTPS connections insecure.
type: boolean
proxyURL:
description: 'ProxyURL is the URL to the proxy
to be used for all requests made by this

client. URLs with "http", "https", and "socks5"
schemes are supported. If

this configuration is not provided or the empty
string, the client

attempts to construct a proxy configuration
from http_proxy and

https_proxy environment variables. If these
environment variables are not

set, the client does not attempt to proxy requests.



socks5 proxying does not currently support spdy
streaming endpoints (exec,

attach, port forward).'
type: string
server:
description: 'Server is the address of the kubernetes
cluster (https://hostname:port).



Defaults to https:// + Cluster.Spec.ControlPlaneEndpoint.'
type: string
tlsServerName:
description: TLSServerName is used to check server
certificate. If TLSServerName is empty, the
hostname used to contact the server is used.
type: string
type: object
user:
description: 'User contains information that describes
identity information.

This is used to tell the kubernetes cluster who
you are.'
properties:
authProvider:
description: AuthProvider specifies a custom authentication
plugin for the kubernetes cluster.
properties:
config:
additionalProperties:
type: string
description: Config holds the parameters for
the authentication plugin.
type: object
name:
description: Name is the name of the authentication
plugin.
type: string
required:
- name
type: object
exec:
description: Exec specifies a custom exec-based
authentication plugin for the kubernetes cluster.
properties:
apiVersion:
description: 'Preferred input version of the
ExecInfo. The returned ExecCredentials MUST
use

the same encoding version as the input.

Defaults to client.authentication.k8s.io/v1
if not set.'
type: string
args:
description: Arguments to pass to the command
when executing it.
items:
type: string
type: array
command:
description: Command to execute.
type: string
env:
description: 'Env defines additional environment
variables to expose to the process. These

are unioned with the host''s environment,
as well as variables client-go uses

to pass argument to the plugin.'
items:
description: 'KubeConfigAuthExecEnv is used
for setting environment variables when
executing an exec-based

credential plugin.'
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: object
type: array
provideClusterInfo:
description: 'ProvideClusterInfo determines
whether or not to provide cluster information,

which could potentially contain very large
CA data, to this exec plugin as a

part of the KUBERNETES_EXEC_INFO environment
variable. By default, it is set

to false. Package k8s.io/client-go/tools/auth/exec
provides helper methods for

reading this environment variable.'
type: boolean
required:
- command
type: object
type: object
required:
- user
type: object
kubeConfigPath:
description: KubeConfigPath is used to specify the actual
file path or URL to the kubeconfig file from which to
Expand Down
Loading
Loading