From 72ac8bb9038a29e6701c8f1c3efd6a2f8785991b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Korn=C3=A9l=20D=C3=A1vid?= <47784437+davidkornel@users.noreply.github.com> Date: Sun, 1 Dec 2024 21:25:34 +0100 Subject: [PATCH] feat: Artifacthub integration (#44) * feat: Some changes for artifacthub compatibility Signed-off-by: Kornel David * docs: Add generated parameter list to README Signed-off-by: Kornel David * docs: Remove whitespace Signed-off-by: Kornel David * docs: Add intro and install part to the sgw chart readme Signed-off-by: Kornel David * docs: Fix link Signed-off-by: Kornel David * docs: Add parameters from #40 #41 #42 Signed-off-by: Kornel David * docs: Add README to the og stunner chart Signed-off-by: Kornel David --------- Signed-off-by: Kornel David --- README.md | 2 +- helm/stunner-gateway-operator/Chart.yaml | 31 ++++---- helm/stunner-gateway-operator/README.md | 98 ++++++++++++++++++++++++ helm/stunner/README.md | 6 ++ 4 files changed, 118 insertions(+), 19 deletions(-) create mode 100644 helm/stunner-gateway-operator/README.md create mode 100644 helm/stunner/README.md diff --git a/README.md b/README.md index df16d45..3e2e715 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # STUNner Helm charts -This repo contains the Helm charts for installing STUNner. +This repo contains the Helm charts for installing STUNner. ## Documentation diff --git a/helm/stunner-gateway-operator/Chart.yaml b/helm/stunner-gateway-operator/Chart.yaml index 36665db..863fca9 100644 --- a/helm/stunner-gateway-operator/Chart.yaml +++ b/helm/stunner-gateway-operator/Chart.yaml @@ -1,3 +1,16 @@ +annotations: + artifacthub.io/category: networking + artifacthub.io/license: MIT License + artifacthub.io/images: | + - name: stunner + image: docker.io/l7mp/stunnerd:1.0.0 + - name: stunner-gateway-operator + image: docker.io/l7mp/stunner-gateway-operator:1.0.0 + - name: stunner-auth-server + image: docker.io/l7mp/stunner-auth-server:1.0.0 + - name: kube-rbac-proxy + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.16.0 + apiVersion: v2 name: stunner-gateway-operator description: STUNner Kubernetes Gateway Operator @@ -6,24 +19,6 @@ maintainers: email: info@l7mp.io url: https://l7mp.io icon: https://raw.githubusercontent.com/l7mp/stunner/main/docs/img/stunner.svg - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) version: 1.0.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. appVersion: 1.0.0 diff --git a/helm/stunner-gateway-operator/README.md b/helm/stunner-gateway-operator/README.md new file mode 100644 index 0000000..13455c5 --- /dev/null +++ b/helm/stunner-gateway-operator/README.md @@ -0,0 +1,98 @@ +# STUNner + +The Helm chart of STUNner: A Kubernetes media gateway for WebRTC. + +## Note + +The official documentation for the STUNner installation methods is in the repository of STUNner. For further information, see the [documentation](https://github.com/l7mp/stunner/blob/main/docs/INSTALL.md). + +## Installation + +This chart is the recommended way to deploy the STUNner ecosystem into your cluster. + +The below will install the stable version of STUNner. In particular, the this will install only the STUNner control plane, i.e., the gateway operator and the authentication service, the dataplane will be automatically provisioned by the operator when needed (but see below). We recommend to use the `stunner-system` namespace to keep the full STUNner control plane in a single scope. + +```console +helm install stunner-gateway-operator stunner/stunner-gateway-operator --create-namespace \ + --namespace=stunner-system +``` + +And that's all: you don't need to install the dataplane separately, this is handled automatically by the operator. The `stunnerd` pods created by the operator can be customized using the Dataplane custom resource: you can specify the `stunnerd` container image version, provision resources per each `stunnerd` pod, deploy into the host network namespace, etc.; see the documentation [here](https://pkg.go.dev/github.com/l7mp/stunner-gateway-operator/api/v1#DataplaneSpec). + +## Parameters + +### STUNner Gateway operator + +| Name | Description | Value | +| ------------------------------------------------------------------------------- | ---------------------------------------------------------------- | ----------------------------------------- | +| `stunnerGatewayOperator.enabled` | If enabled, the operator will be installed. | `true` | +| `stunnerGatewayOperator.deployment.name` | Name of the deployment for the operator. | `stunner-gateway-operator` | +| `stunnerGatewayOperator.deployment.podLabels` | Labels for the deployment pods. | `{}` | +| `stunnerGatewayOperator.deployment.tolerations` | Tolerations for pod assignment. | `[]` | +| `stunnerGatewayOperator.deployment.nodeSelector` | Node labels for pod assignment. | `{}` | +| `stunnerGatewayOperator.deployment.imagePullSecrets` | Image pull secrets for the image. | `[]` | +| `stunnerGatewayOperator.deployment.container` | Container configuration values. | | +| `stunnerGatewayOperator.deployment.container.manager` | Configuration values for the STUNner Gateway Operator container. | | +| `stunnerGatewayOperator.deployment.container.manager.image.name` | The name of the image to use. | `docker.io/l7mp/stunner-gateway-operator` | +| `stunnerGatewayOperator.deployment.container.manager.image.pullPolicy` | The pull policy for the image. | `IfNotPresent` | +| `stunnerGatewayOperator.deployment.container.manager.image.tag` | The tag for the image. | `1.0.0` | +| `stunnerGatewayOperator.deployment.container.manager.resources.limits.cpu` | CPU limits for the container. | `1000m` | +| `stunnerGatewayOperator.deployment.container.manager.resources.limits.memory` | Memory limits for the container. | `512Mi` | +| `stunnerGatewayOperator.deployment.container.manager.resources.requests.cpu` | CPU requests for the container. | `250m` | +| `stunnerGatewayOperator.deployment.container.manager.resources.requests.memory` | Memory requests for the container. | `128Mi` | +| `stunnerGatewayOperator.deployment.container.manager.args` | Arguments for the container. | `[]` | +| `stunnerGatewayOperator.deployment.container.kubeRbacProxy` | Configuration values for the Kube RBAC Proxy container. | | +| `stunnerGatewayOperator.deployment.container.kubeRbacProxy.image.name` | The name of the image to use. | `gcr.io/kubebuilder/kube-rbac-proxy` | +| `stunnerGatewayOperator.deployment.container.kubeRbacProxy.image.pullPolicy` | The pull policy for the image. | `IfNotPresent` | +| `stunnerGatewayOperator.deployment.container.kubeRbacProxy.image.tag` | The tag for the image. | `v0.16.0` | + +### Dataplane + +Default dataplane configuration for the operator to use. See more [here](https://github.com/l7mp/stunner/blob/main/docs/GATEWAY.md#dataplane). + +| Name | Description | Value | +| --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | +| `stunnerGatewayOperator.dataplane.mode` | Mode to use for the deployment of the dataplane. Can be either `managed` or `legacy`. Read about the modes [here](stunnerGatewayOperator.dataplane). | `managed` | +| `stunnerGatewayOperator.dataplane.spec.replicas` | The replica number of the dataplane to be deployed. | `1` | +| `stunnerGatewayOperator.dataplane.spec.image.name` | The name of the image to use for the dataplane. | `docker.io/l7mp/stunnerd` | +| `stunnerGatewayOperator.dataplane.spec.image.pullPolicy` | The pull policy for the image. | `IfNotPresent` | +| `stunnerGatewayOperator.dataplane.spec.image.tag` | The tag for the image. | `1.0.0` | +| `stunnerGatewayOperator.dataplane.spec.imagePullSecrets` | Image pull secrets for the image. | `[]` | +| `stunnerGatewayOperator.dataplane.spec.command` | The command for the image to run on startup. | `[]` | +| `stunnerGatewayOperator.dataplane.spec.args` | The arguments for the image to use with the command. | `[]` | +| `stunnerGatewayOperator.dataplane.spec.env` | Environment variables to set for the image. | `[]` | +| `stunnerGatewayOperator.dataplane.spec.resources.limits.cpu` | CPU limits for the container. | `2` | +| `stunnerGatewayOperator.dataplane.spec.resources.limits.memory` | Memory limits for the container. | `512Mi` | +| `stunnerGatewayOperator.dataplane.spec.resources.requests.cpu` | CPU requests for the container. | `500m` | +| `stunnerGatewayOperator.dataplane.spec.resources.requests.memory` | Memory requests for the container. | `128Mi` | +| `stunnerGatewayOperator.dataplane.spec.terminationGracePeriodSeconds` | Period in seconds to use for graceful shutdown. | `3600` | +| `stunnerGatewayOperator.dataplane.spec.enableMetricsEndpoint` | Enable metrics endpoint in the deployed stunner instance. | `false` | +| `stunnerGatewayOperator.dataplane.spec.hostNetwork` | Enable host networking in the deployed stunner instance. | `false` | +| `stunnerGatewayOperator.dataplane.spec.labels` | Labels to be applied to the deployed stunner instance. | `{}` | +| `stunnerGatewayOperator.dataplane.spec.annotations` | Annotations to be applied to the deployed stunner instance. | `{}` | +| `stunnerGatewayOperator.dataplane.spec.affinity` | Affinity settings for the deployed stunner instance. | `{}` | +| `stunnerGatewayOperator.dataplane.spec.securityContext` | Security context for the deployed stunner instance. | `{}` | +| `stunnerGatewayOperator.dataplane.spec.containerSecurityContext` | Security context for the container. | `{}` | +| `stunnerGatewayOperator.dataplane.spec.tolerations` | Tolerations for pod assignment. | `[]` | + +### STUNner Authentication Service + +Default configuration for the authentication service to be deployed. See more the authentication in STUNner [here](https://github.com/l7mp/stunner/blob/main/docs/AUTH.md). + +| Name | Description | Value | +| ------------------------------------------------------------------------------- | -------------------------------------------------------- | ------------------------------------ | +| `stunnerAuthService.enabled` | If enabled, the authentication service will be deployed. | `true` | +| `stunnerAuthService.deployment.podLabels` | Labels for the auth service pods. | `{}` | +| `stunnerAuthService.deployment.tolerations` | Tolerations for pod assignment. | `[]` | +| `stunnerAuthService.deployment.replicas` | Replicas for the auth-service deployment. | `1` | +| `stunnerAuthService.deployment.nodeSelector` | Node labels for pod assignment. | | +| `stunnerAuthService.deployment.imagePullSecrets` | Image pull secrets for the auth service image. | `[]` | +| `stunnerAuthService.deployment.container.authService.securityContext` | Security context for the auth-service pod. | `{}` | +| `stunnerAuthService.deployment.container.authService.image.name` | The name of the image to use. | `docker.io/l7mp/stunner-auth-server` | +| `stunnerAuthService.deployment.container.authService.image.pullPolicy` | The pull policy for the image. | `IfNotPresent` | +| `stunnerAuthService.deployment.container.authService.image.tag` | The tag for the image. | `1.0.0` | +| `stunnerAuthService.deployment.container.authService.resources.limits.cpu` | CPU limits for the container. | `200m` | +| `stunnerAuthService.deployment.container.authService.resources.limits.memory` | Memory limits for the container. | `128Mi` | +| `stunnerAuthService.deployment.container.authService.resources.requests.cpu` | CPU requests for the container. | `10m` | +| `stunnerAuthService.deployment.container.authService.resources.requests.memory` | Memory requests for the container. | `64Mi` | +| `stunnerAuthService.deployment.container.authService.args` | Arguments for the container. | `[]` | diff --git a/helm/stunner/README.md b/helm/stunner/README.md new file mode 100644 index 0000000..470e41a --- /dev/null +++ b/helm/stunner/README.md @@ -0,0 +1,6 @@ +# STUNner + + +Note that this chart is obsolete and will be removed in a future release. The stable, tested, supported and recommended way to install the STUNner ecosystem is by using the [STUNner-Gateway-Operator chart](https://artifacthub.io/packages/helm/stunner/stunner-gateway-operator). If you don't have any particular reason to use this chart, please use the mentioned chart. + +The STUNner-Gateway-Operator chart is available on [ArtifactHub](https://artifacthub.io/packages/helm/stunner/stunner-gateway-operator), in its official [GitHub repository](https://github.com/l7mp/stunner-helm/tree/main/helm/stunner-gateway-operator). \ No newline at end of file