Skip to content

Commit 561775c

Browse files
authored
Merge pull request #113 from rancher/sync-2025-04-14-13-08-45
Create PR for extension sync: 2025-04-14-13-08-45
2 parents 0a16bd5 + 598059a commit 561775c

File tree

46 files changed

+478
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+478
-1
lines changed
1.49 KB
Binary file not shown.

charts/kubewarden/4.0.0/Chart.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
annotations:
2+
catalog.cattle.io/certified: rancher
3+
catalog.cattle.io/namespace: cattle-ui-plugin-system
4+
catalog.cattle.io/os: linux
5+
catalog.cattle.io/permits-os: linux, windows
6+
catalog.cattle.io/scope: management
7+
catalog.cattle.io/ui-component: plugins
8+
catalog.cattle.io/kube-version: '>= v1.16.0-0'
9+
catalog.cattle.io/rancher-version: '>= 2.11.0-0'
10+
catalog.cattle.io/ui-extensions-version: '>= 3.0.0 < 4.0.0'
11+
apiVersion: v2
12+
appVersion: 4.0.0
13+
description: Kubewarden extension for Rancher Manager
14+
name: kubewarden
15+
type: application
16+
version: 4.0.0
17+
icon: https://raw.githubusercontent.com/rancher/ui-plugin-charts/main/icons/kubewarden/4.0.0-icon-kubewarden.svg

charts/kubewarden/4.0.0/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Kubewarden Extension for Rancher Manager
2+
3+
An extension for Rancher Manager which allows you to interact with Kubewarden.
4+
5+
After installation, go to a cluster and you will see a new side navigation entry 'Kubewarden'. This will allow you to install Kubewarden into the cluster and manage Kubewarden resources and configuration.
6+
7+
For more information see https://www.kubewarden.io/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "extension-server.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "extension-server.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
27+
{{/*
28+
Create chart name and version as used by the chart label.
29+
*/}}
30+
{{- define "extension-server.chart" -}}
31+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
32+
{{- end }}
33+
34+
{{/*
35+
Common labels
36+
*/}}
37+
{{- define "extension-server.labels" -}}
38+
helm.sh/chart: {{ include "extension-server.chart" . }}
39+
{{ include "extension-server.selectorLabels" . }}
40+
{{- if .Chart.AppVersion }}
41+
app.kubernetes.io/version: {{ .Chart.AppVersion | replace "+" "_" | quote }}
42+
{{- end }}
43+
app.kubernetes.io/managed-by: {{ .Release.Service }}
44+
{{- end }}
45+
46+
{{/*
47+
Selector labels
48+
*/}}
49+
{{- define "extension-server.selectorLabels" -}}
50+
app.kubernetes.io/name: {{ include "extension-server.name" . }}
51+
app.kubernetes.io/instance: {{ .Release.Name }}
52+
{{- end }}
53+
54+
{{/*
55+
Pkg annotations
56+
*/}}
57+
{{- define "extension-server.pluginMetadata" -}}
58+
{{- with .Values.plugin.metadata }}
59+
{{- range $key, $value := . }}
60+
{{ $key }}: {{ $value | quote }}
61+
{{- end }}
62+
{{- end }}
63+
{{- end }}
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: catalog.cattle.io/v1
2+
kind: UIPlugin
3+
metadata:
4+
name: {{ include "extension-server.fullname" . }}
5+
namespace: {{ .Release.Namespace }}
6+
labels: {{ include "extension-server.labels" . | nindent 4 }}
7+
spec:
8+
plugin:
9+
name: {{ include "extension-server.fullname" . }}
10+
version: {{ (semver (default .Chart.AppVersion .Values.plugin.versionOverride)).Original }}
11+
endpoint: https://raw.githubusercontent.com/rancher/ui-plugin-charts/main/extensions/kubewarden/4.0.0
12+
noCache: {{ .Values.plugin.noCache }}
13+
noAuth: {{ .Values.plugin.noAuth }}
14+
metadata: {{ include "extension-server.pluginMetadata" . | indent 6 }}

charts/kubewarden/4.0.0/values.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
nameOverride: ""
2+
fullnameOverride: ""
3+
plugin:
4+
enabled: true
5+
versionOverride: ""
6+
noCache: false
7+
noAuth: false
8+
metadata:
9+
catalog.cattle.io/kube-version: ">= v1.16.0-0"
10+
catalog.cattle.io/rancher-version: ">= 2.11.0-0"
11+
catalog.cattle.io/ui-extensions-version: ">= 3.0.0 < 4.0.0"

extensions/kubewarden/4.0.0/files.txt

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
plugin/assets/airgap-installation.md
2+
plugin/img/generic-catalog.1842a50e.svg
3+
plugin/img/harvester.20240f8a.png
4+
plugin/img/icon-kubewarden.46f880a3.svg
5+
plugin/kubewarden-4.0.0.umd.min.284.js
6+
plugin/kubewarden-4.0.0.umd.min.284.js.map
7+
plugin/kubewarden-4.0.0.umd.min.37.js
8+
plugin/kubewarden-4.0.0.umd.min.37.js.map
9+
plugin/kubewarden-4.0.0.umd.min.463.js
10+
plugin/kubewarden-4.0.0.umd.min.463.js.map
11+
plugin/kubewarden-4.0.0.umd.min.60.js
12+
plugin/kubewarden-4.0.0.umd.min.60.js.map
13+
plugin/kubewarden-4.0.0.umd.min.766.js
14+
plugin/kubewarden-4.0.0.umd.min.766.js.map
15+
plugin/kubewarden-4.0.0.umd.min.887.js
16+
plugin/kubewarden-4.0.0.umd.min.887.js.map
17+
plugin/kubewarden-4.0.0.umd.min.953.js
18+
plugin/kubewarden-4.0.0.umd.min.953.js.map
19+
plugin/kubewarden-4.0.0.umd.min.airgap-docs.js
20+
plugin/kubewarden-4.0.0.umd.min.airgap-docs.js.map
21+
plugin/kubewarden-4.0.0.umd.min.detail.js
22+
plugin/kubewarden-4.0.0.umd.min.detail.js.map
23+
plugin/kubewarden-4.0.0.umd.min.dialog.js
24+
plugin/kubewarden-4.0.0.umd.min.dialog.js.map
25+
plugin/kubewarden-4.0.0.umd.min.edit.js
26+
plugin/kubewarden-4.0.0.umd.min.edit.js.map
27+
plugin/kubewarden-4.0.0.umd.min.formatters.js
28+
plugin/kubewarden-4.0.0.umd.min.formatters.js.map
29+
plugin/kubewarden-4.0.0.umd.min.js
30+
plugin/kubewarden-4.0.0.umd.min.js.map
31+
plugin/kubewarden-4.0.0.umd.min.list.js
32+
plugin/kubewarden-4.0.0.umd.min.list.js.map
33+
plugin/kubewarden-4.0.0.umd.min.markdown.js
34+
plugin/kubewarden-4.0.0.umd.min.markdown.js.map
35+
plugin/kubewarden-4.0.0.umd.min.policyDashboard0.js
36+
plugin/kubewarden-4.0.0.umd.min.policyDashboard1.js
37+
plugin/package.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# Air gap installation
2+
3+
This guide will show you how to install Kubewarden in air-gapped environments. In an air-gapped installation of Kubewarden,
4+
you will need a private OCI registry accessible by your Kubernetes cluster. Kubewarden Policies
5+
are WebAssembly modules; therefore, they can be stored inside an OCI-compliant registry as OCI artifacts.
6+
You need to add Kubewarden's images and policies to this OCI registry. Let's see how to do that.
7+
8+
## Requirements
9+
10+
1. Private registry that supports OCI artifacts, [here](../../distributing-policies/oci-registries-support) you can find a list of supported OCI registries. It will be used for storing the container images and policies.
11+
2. [kwctl](https://github.com/kubewarden/kwctl) 1.3.1 or above
12+
3. docker v20.10.6 or above
13+
14+
## Save container images in your workstation
15+
16+
1. Download `kubewarden-images.txt` from the Kubewarden [release page](https://github.com/kubewarden/helm-charts/releases/). Alternatively, the `imagelist.txt` and `policylist.txt` files are shipped inside the helm charts containing the used container images and policy wasm modules, respectively.
17+
18+
>**Note:** Optionally, you can verify the signatures of the [helm charts](../../security/verifying-kubewarden#helm-charts) and [container images](../../security/verifying-kubewarden#container-images)
19+
20+
2. Add `cert-manager` if it is not available in your private registry.
21+
22+
```
23+
helm repo add jetstack https://charts.jetstack.io
24+
helm repo update
25+
helm pull jetstack/cert-manager
26+
helm template ./cert-manager-<Version>.tgz | \
27+
awk '$1 ~ /image:/ {print $2}' | sed s/\"//g >> ./kubewarden-images.txt
28+
```
29+
30+
3. Download `kubewarden-save-images.sh` and `kubewarden-load-images.sh` from the [utils repository](https://github.com/kubewarden/utils).
31+
4. Save Kubewarden container images into a .tar.gz file:
32+
33+
```
34+
./kubewarden-save-images.sh \
35+
--image-list ./kubewarden-images.txt \
36+
--images kubewarden-images.tar.gz
37+
```
38+
39+
Docker begins pulling the images used for an air gap install. Be patient. This process takes a few minutes.
40+
When the process completes, your current directory will output a tarball named `kubewarden-images.tar.gz`. It will be present in the same directory where you executed the command.
41+
42+
## Save policies in your workstation
43+
44+
1. Add all the policies you want to use in a `policies.txt` file. A file with a list of the default policies can be found in the Kubewarden defaults [release page](https://github.com/kubewarden/helm-charts/releases/)
45+
2. Download `kubewarden-save-policies.sh` and `kubewarden-load-policies.sh` from the [kwctl repository](https://github.com/kubewarden/kwctl/tree/main/scripts)
46+
3. Save policies into a .tar.gz file:
47+
48+
```
49+
./kubewarden-save-policies.sh --policies-list policies.txt
50+
```
51+
52+
kwctl downloads all the policies and stores them as `kubewarden-policies.tar.gz` archive.
53+
54+
## Helm charts
55+
56+
You need to download the following helm charts in your workstation:
57+
58+
```
59+
helm pull kubewarden/kubewarden-crds
60+
helm pull kubewarden/kubewarden-controller
61+
helm pull kubewarden/kubewarden-defaults
62+
```
63+
64+
Download `cert-manager` if it is not installed in the air gap cluster.
65+
66+
```
67+
helm pull jetstack/cert-manager
68+
```
69+
70+
## Populate private registry
71+
72+
Move `kubewarden-policies.tar.gz`, `kubewarden-images.tar.gz`, `kubewarden-load-images.sh`, `kubewarden-load-policies.sh` and `policies.txt`
73+
to the air gap environment.
74+
75+
1. Load Kubewarden images into the private registry. Docker client must be authenticated against the local registry
76+
```
77+
./kubewarden-load-images.sh \
78+
--image-list ./kubewarden-images.txt \
79+
--images kubewarden-images.tar.gz \
80+
--registry <REGISTRY.YOURDOMAIN.COM:PORT>
81+
```
82+
2. Load Kubewarden policies into the private registry. Kwctl must be authenticated against the local registry (`kwctl` uses the same mechanism to authenticate as `docker`, a `~/.docker/config.json` file)
83+
```
84+
./kubewarden-load-policies.sh \
85+
--policies-list policies.txt \
86+
--policies kubewarden-policies.tar.gz \
87+
--registry <REGISTRY.YOURDOMAIN.COM:PORT> \
88+
--sources-path sources.yml
89+
```
90+
91+
>***Caution:***
92+
>The `sources.yaml` file is needed by kwctl to connect to registries that fall into these categories:
93+
>
94+
>* Authentication is required
95+
>* Self signed certificate is being used
96+
>* No TLS termination is done
97+
>
98+
>Please refer to [the section on custom certificate authorities](../../distributing-policies/custom-certificate-authorities.md) in our documentation to learn more about configuring the `sources.yaml` file
99+
100+
101+
## Install Kubewarden
102+
103+
Let's install Kubewarden now that we have everything we need in our private registry. The only difference with a normal
104+
Kubewarden installation is that we need to change the registry in the container images and policies to our private registry.
105+
106+
Install `cert-manager` if it is not already installed in the air gap cluster:
107+
108+
```
109+
helm install --create-namespace cert-manager ./cert-manager-<Version>.tgz \
110+
-n kubewarden \
111+
--set installCRDs=true \
112+
--set image.repository=<REGISTRY.YOURDOMAIN.COM:PORT>/jetstack/cert-manager-controller \
113+
--set webhook.image.repository=<REGISTRY.YOURDOMAIN.COM:PORT>/jetstack/cert-manager-webhook \
114+
--set cainjector.image.repository=<REGISTRY.YOURDOMAIN.COM:PORT>/jetstack/cert-manager-cainjector \
115+
--set startupapicheck.image.repository=<REGISTRY.YOURDOMAIN.COM:PORT>/jetstack/cert-manager-ctl
116+
```
117+
118+
Let's install the Kubewarden stack:
119+
120+
```
121+
helm install --wait -n kubewarden \
122+
kubewarden-crds kubewarden-crds.tgz
123+
```
124+
125+
```
126+
helm install --wait -n kubewarden \
127+
kubewarden-controller kubewarden-controller.tgz \
128+
--set global.cattle.systemDefaultRegistry=<REGISTRY.YOURDOMAIN.COM:PORT>
129+
```
130+
131+
```
132+
helm install --wait -n kubewarden \
133+
kubewarden-defaults kubewarden-defaults.tgz \
134+
--set global.cattle.systemDefaultRegistry=<REGISTRY.YOURDOMAIN.COM:PORT>
135+
```
136+
137+
>***Caution***
138+
>To download the recommended policies installed by the `kubewarden-defaults` Helm
139+
>Chart from a registry other than `global.cattle.systemDefaultRegistry`, you can
140+
>utilize the `recommendedPolicies.defaultPoliciesRegistry` configuration. This
141+
>configuration allows users to specify a registry dedicated to pulling the OCI
142+
>artifacts of the policies. It is particularly useful when their container image
143+
>repository does not support OCI artifacts.
144+
>
145+
>To install and wait for the installation to complete, use the following command:
146+
>
147+
>```console
148+
>helm install --wait -n kubewarden \
149+
> kubewarden-defaults kubewarden-defaults.tgz \
150+
> --set global.cattle.systemDefaultRegistry=<REGISTRY.YOURDOMAIN.COM:PORT> \
151+
> --set recommendedPolicies.defaultPoliciesRegistry=<REGISTRY.YOURDOMAIN.COM:PORT>
152+
>```
153+
>
154+
>If the `recommendedPolicies.defaultPoliciesRegistry` configuration is not set,
155+
>the `global.cattle.systemDefaultRegistry` will be used as the default registry.
Loading
Loading
Loading

extensions/kubewarden/4.0.0/plugin/kubewarden-4.0.0.umd.min.284.js

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extensions/kubewarden/4.0.0/plugin/kubewarden-4.0.0.umd.min.284.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extensions/kubewarden/4.0.0/plugin/kubewarden-4.0.0.umd.min.37.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extensions/kubewarden/4.0.0/plugin/kubewarden-4.0.0.umd.min.37.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)