Skip to content
Draft
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
5 changes: 5 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ jobs:
- kubectl-install
- oc-install
- kind-install
- helm-install
- attach_workspace:
at: .
- run:
Expand Down Expand Up @@ -402,13 +403,17 @@ jobs:
- run: make generate-network-observer
- run: make generate-network-observer-httpbasic
- run: make generate-network-observer-openshift
- run: make generate-skupper-crds
- run: make generate-skupper-crds-chart
- run: mkdir skupper-setup
- run: cp ./*.yaml skupper-setup
- run: helm registry login -u ${QUAY_LOGIN} -p ${QUAY_PASSWORD} quay.io
- run: make pack-skupper-helm-chart
- run: helm push skupper-*.tgz oci://quay.io/skupper/helm
- run: make pack-network-observer-helm-chart
- run: helm push network-observer-*.tgz oci://quay.io/skupper/helm
- run: make pack-skupper-crds-helm-chart
- run: helm push skupper-crds-*.tgz oci://quay.io/skupper/helm
- run:
name: Verify skupper-setup Directory Contents
command: |
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ oci-archives/
skupper-cluster-scope.yaml
skupper-namespace-scope.yaml
skupper-network-observer*.yaml
skupper-crds.yaml
charts/skupper-crds/templates/
bundle.Dockerfile
./bundle/
!charts/skupper/README.md
charts/skupper/
skupper-*.tgz
artifacthub-repo.yml
network-observer-*.tgz
Expand Down
36 changes: 29 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,28 @@ generate-manifest: skupper
generate-docs: generate-doc
./generate-doc ./doc/cli

generate-skupper-helm-chart:
./scripts/skupper-helm-chart-generator.sh ${IMAGE_TAG} ${ROUTER_IMAGE_TAG}

generate-skupper-deployment-cluster-scoped:
./scripts/skupper-deployment-generator.sh cluster ${IMAGE_TAG} ${ROUTER_IMAGE_TAG} false > skupper-cluster-scope.yaml
./scripts/skupper-deployment-generator.sh cluster ${IMAGE_TAG} ${ROUTER_IMAGE_TAG} > skupper-cluster-scope.yaml

generate-skupper-deployment-namespace-scoped:
./scripts/skupper-deployment-generator.sh namespace ${IMAGE_TAG} ${ROUTER_IMAGE_TAG} false > skupper-namespace-scope.yaml

pack-skupper-helm-chart: generate-skupper-helm-chart
./scripts/skupper-deployment-generator.sh namespace ${IMAGE_TAG} ${ROUTER_IMAGE_TAG} > skupper-namespace-scope.yaml

# vet skupper helm chart for release: makes sure buried chart attributes get updated with releases
vet-skupper-helm-chart:
@chart_router_tag=$$(grep -A10 '^skupperRouter:' charts/skupper/values.yaml | grep '^\s*tag:' | head -1 | cut -d: -f2 | tr -d ' "'); \
if [ "$$chart_router_tag" != "$(ROUTER_IMAGE_TAG)" ]; then \
echo "ERROR: ROUTER_IMAGE_TAG ($(ROUTER_IMAGE_TAG)) does not match skupperRouter.tag ($$chart_router_tag) in charts/skupper/values.yaml"; \
exit 1; \
fi; \
if echo "$(IMAGE_TAG)" | grep -qE '^v?[0-9]+\.[0-9]+\.[0-9]+'; then \
chart_app_version=$$(grep '^appVersion:' charts/skupper/Chart.yaml | cut -d: -f2 | tr -d ' "'); \
if [ "$$chart_app_version" != "$(IMAGE_TAG)" ]; then \
echo "ERROR: IMAGE_TAG ($(IMAGE_TAG)) does not match appVersion ($$chart_app_version) in charts/skupper/Chart.yaml"; \
exit 1; \
fi; \
fi

pack-skupper-helm-chart: vet-skupper-helm-chart
helm package ./charts/skupper

pack-network-observer-helm-chart:
Expand Down Expand Up @@ -205,11 +217,21 @@ generate-network-observer-devel:
--set extraArgs={"-cors-allow-all"} \
--set skipManagementLabels=true > skupper-network-observer-devel.yaml

generate-skupper-crds:
kubectl kustomize config/crd > skupper-crds.yaml

generate-skupper-crds-chart:
./scripts/skupper-crds-chart-generator.sh

pack-skupper-crds-helm-chart: generate-skupper-crds-chart
helm package ./charts/skupper-crds

clean:
rm -rf skupper controller kube-adaptor \
network-observer generate-doc \
cover.out oci-archives bundle bundle.Dockerfile \
skupper-*.tgz artifacthub-repo.yml \
network-observer-*.tgz skupper-*-scope.yaml \
skupper-crds.yaml skupper-crds-*.tgz charts/skupper-crds/templates \
network-observer-operator \
must-gather.local.*
19 changes: 15 additions & 4 deletions charts/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
## Helm Charts in the Skupper Project

### Skupper chart
### Quick Start

[Instructions on how to deploy the Skupper chart](skupper/README.md)
```bash
# 1. Install CRDs (required)
helm install skupper-crds oci://quay.io/skupper/helm/skupper-crds
OR
kubectl apply -f https://github.com/skupperproject/skupper/releases/latest/download/skupper-crds.yaml

### Network-observer chart
# 2. Install Skupper controller
helm install skupper oci://quay.io/skupper/helm/skupper
```

[Instructions on how to deploy the network-observer chart](network-observer/README.md)
### Charts

| Chart | Description |
|-------|-------------|
| [skupper-crds](skupper-crds/README.md) | Skupper Custom Resource Definitions (install first) |
| [skupper](skupper/README.md) | Skupper controller |
| [network-observer](network-observer/README.md) | Network observer for monitoring Skupper networks |
9 changes: 9 additions & 0 deletions charts/skupper-crds/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v2
name: skupper-crds
description: Skupper Custom Resource Definitions (CRDs) for Kubernetes
version: 2.2.0-dev
appVersion: v2-dev
type: application
home: https://skupper.io/
sources:
- https://github.com/skupperproject/skupper
47 changes: 47 additions & 0 deletions charts/skupper-crds/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Skupper CRDs Helm Chart

This Helm chart installs Skupper Custom Resource Definitions (CRDs) for Kubernetes.

## Overview

The skupper-crds chart provides all CRDs required by Skupper. It is designed to be
installed separately from the main Skupper chart, allowing CRDs to persist across
Skupper upgrades and uninstalls.

## Installation

```bash
helm install skupper-crds oci://quay.io/skupper/helm/skupper-crds
```

## Uninstallation

```bash
helm uninstall skupper-crds
```

**Note:** CRDs are annotated with `helm.sh/resource-policy: keep`, which means they
will NOT be deleted when the chart is uninstalled. This is intentional to prevent
accidental data loss. To remove CRDs, delete them manually:

```bash
kubectl get crds -l app.kubernetes.io/name=skupper-crds -o name | xargs kubectl delete
```

## Important: Do Not Downgrade

**Caution:** Do not downgrade this chart to a previous version. Downgrading CRDs can
remove fields from the schema that are in use by existing resources, potentially
causing data loss or unexpected behavior. Always ensure you are upgrading to the
same or a newer version of the skupper-crds chart.

## Developer Notes

The templates directory is generated and not versioned. The canonical source of CRD
definitions is `config/crd`.

To regenerate the templates, run:

```bash
make generate-skupper-crds-chart
```
2 changes: 2 additions & 0 deletions charts/skupper-crds/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Skupper CRDs have no configurable values.
# This chart installs CustomResourceDefinitions only.
5 changes: 5 additions & 0 deletions charts/skupper/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v2
name: skupper
description: Helm chart for setting up Skupper.
version: 2.2.0-dev
appVersion: v2-dev
58 changes: 29 additions & 29 deletions charts/skupper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,29 @@ manager.

- Kubernetes 1.25+
- Helm 3
- Skupper CRDs

### Installing CRDs

Install Skupper CRDs before deploying this chart. Choose one of the following methods:

**Using the skupper-crds Helm chart:**
```
helm install skupper-crds oci://quay.io/skupper/helm/skupper-crds
```

**Using kubectl:**
```
kubectl apply -f https://github.com/skupperproject/skupper/releases/latest/download/skupper-crds.yaml
```

## Using the chart

Deploy a cluster-scoped Skupper controller in the current namespace:
```
helm install skupper oci://quay.io/skupper/helm/skupper
helm install skupper oci://quay.io/skupper/helm/skupper \
--namespace skupper \
--create-namespace
```

If you want to deploy the controller in a specific namespace:
Expand All @@ -27,28 +44,18 @@ helm install skupper oci://quay.io/skupper/helm/skupper \
--create-namespace
```

Deploy a controller with namespace-scope in the current namespace using `--set scope=namespace`:
Deploy a controller with namespace-scope in the current namespace using `--set rbac.clusterScoped=false`:
```
helm install skupper oci://quay.io/skupper/helm/skupper \
--set scope=namespace
--set rbac.clusterScoped=false
```

### CRDs

By default, the chart installs the Skupper CRDs required by the controller
to properly function. If you want to install CRDs separately from the Helm chart, use
the `--skip-crds` flag with `helm install`.

### Image Overrides
### Configuration

The chart exposes overrides for the three images required to run a skupper site.
See [values.yaml](values.yaml) for the full list of configurable options.

Example values.yaml file:
```
controllerImage: examplemirror.acme.com/skupper/controller:2.0.0
kubeAdaptorImage: examplemirror.acme.com/skupper/kube-adaptor:2.0.0
routerImage: examplemirror.acme.com/skupper/skupper-router:3.3.0
```
Common customizations include image repositories, pull policies, pod
tolerations, and resource limits.

## Alternative Installation Methods

Expand All @@ -57,19 +64,12 @@ deploying both cluster and namespace-scoped controllers.

## Development

The skupper chart is generated from common config files, so you will need to run:
```asciidoc
make generate-skupper-helm-chart
Install the chart from the local source:
```

This action will create a `skupper` chart inside the `charts` directory, that
you can install with a clustered scope with:
```
helm install skupper ./skupper --set scope=cluster
helm install skupper ./charts/skupper
```
Other option is to install it in a namespaced scope:

Or with namespace-scope:
```
helm install skupper ./skupper --set scope=namespace
helm install skupper ./charts/skupper --set rbac.clusterScoped=false
```

Check the `values.yaml` to modify the image tag of the controller, kube-adaptor and router images.
18 changes: 18 additions & 0 deletions charts/skupper/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- if eq (include "skupper.clusterScoped" .) "true" }}
Skupper controller installed in namespace "{{ .Release.Namespace }}" with cluster scope.
The controller will watch for Skupper resources in all namespaces.
{{- else }}
Skupper controller installed in namespace "{{ .Release.Namespace }}" with namespace scope.
The controller will only watch for Skupper resources in this namespace.
{{- end }}

To create a site:
kubectl apply -f - <<EOF
apiVersion: skupper.io/v2alpha1
kind: Site
metadata:
name: my-site
namespace: {{ .Release.Namespace }}
EOF

Documentation: https://skupper.io/docs
Loading