-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from T-Systems-MMS/helm
Add a Helm chart to create the custom resource.
- Loading branch information
Showing
13 changed files
with
322 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: v2 | ||
name: cmcc | ||
description: CoreMedia Content Cloud through cmcc-operator | ||
# this will be set during the release process | ||
version: 0.1.0-alpha1 | ||
appVersion: 0.1.0-alpha1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# CoreMedia Content Cloud | ||
|
||
This helm chart creates a custom resource for the [CoreMedia Content Cloud Operator](https://github.com/T-Systems-MMS/cmcc-operator), configures and manages a [CoreMedia Content Cloud](https://www.coremedia.com/) deployment based on the configuration in that resource. | ||
|
||
## TL;DR | ||
|
||
```console | ||
$ helm repo add cmcc-operator https://t-systems-mms.github.io/cmcc-operator/ | ||
$ helm upgrade --install my-release cmcc-operator/cmcc --values my-values.yaml | ||
``` | ||
|
||
## Introduction | ||
|
||
The [CoreMedia Content Cloud Operator](https://github.com/T-Systems-MMS/cmcc-operator) provides an easy to use way to | ||
manage deployments of [CoreMedia Content Cloud](https://www.coremedia.com/). This Helm chart helps managing the custom resource or config map to manage an individual deployment. | ||
|
||
## Prerequisites | ||
|
||
- Kubernetes 1.19+ | ||
- Helm 3.2.0+ | ||
|
||
## Installing the Chart | ||
|
||
To install the chart with the release name `my-release`: | ||
|
||
```console | ||
$ helm upgrade --install my-release cmcc-operator/cmcc --values my-values.yaml | ||
``` | ||
|
||
The command deploys CoreMedia Content Cloud on the Kubernetes cluster. You will need to set a number of parameters, in particular `default.image.registry` to the Docker registry hosting your CoreMedia Content Cloud images. The [Parameters](#parameters) section lists the parameters that can be configured during installation. | ||
|
||
> **Tip**: List all releases using `helm list` | ||
## Uninstalling the Chart | ||
|
||
To uninstall/delete the `my-release` deployment: | ||
|
||
```console | ||
$ helm delete my-release | ||
``` | ||
|
||
The command removes all the Kubernetes components associated with the chart and deletes the release. | ||
|
||
## Parameters | ||
|
||
| Name | Description | Value | | ||
|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------| | ||
| `cmcc` | The contents of the custom resource. See [Custom Resource CoreMediaContentClouds](https://github.com/T-Systems-MMS/cmcc-operator/blob/main/docs/custom-resource.md) for more information | – | | ||
| `fullnameOverride` | Overrides the full name of components, which is used for the deployment, clusterrole and clusterrolemapping, and the service account. | the chart name plus the release name | | ||
| `nameOverride` | Overrides the short name. Used for the selector labels. | the chart name | | ||
| `useConfigMap` | Instead of creating a custom resource with the deployment description, use a config map. | the chart name | | ||
|
||
|
||
## Configuration and Installation Details | ||
|
||
|
||
### Substitution of variables inside values | ||
|
||
The contents of the `cmcc` value is fed through the Helm [`tpl()`](https://helm.sh/docs/howto/charts_tips_and_tricks/#using-the-tpl-function) function. This allows you to refer to other values from values inside the `cmcc` map. For example, if you need to configure an HTTPS_PROXY for multiple components, you could write: | ||
|
||
```yaml | ||
httpProxy: https://proxy.example.com:3128 | ||
cmcc: | ||
... | ||
components: | ||
- name: import-theme | ||
type: management-tools | ||
env: | ||
- name: HTTPS_PROXY | ||
value: "{{ .Values.httpProxy }}" | ||
... | ||
- name: import-content | ||
type: management-tools | ||
env: | ||
- name: HTTPS_PROXY | ||
value: "{{ .Values.httpProxy }}" | ||
``` | ||
### Using a Config Map Instead | ||
The operator uses a custom resource definition to obtain the deployment description for the CoreMedia Content Cloud installation. If you've installed the operator with support for using a `ConfigMap` (instead of or in addition to the custom resource), you can set `--set useConfigMap=true` to have this Helm chart create a config map. | ||
|
||
## License | ||
|
||
Copyright © 2022 T-Systems Multimedia Solutions GmbH | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the | ||
License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an " | ||
AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific | ||
language governing permissions and limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CoreMedia Content Cloud deployment resource has been updated. | ||
|
||
You can watch the progress of the deployment using: | ||
kubectl --namespace {{ .Release.Namespace }} get cmcc {{ include "cmcc.fullname" . }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "cmcc.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "cmcc.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "cmcc.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "cmcc.labels" -}} | ||
helm.sh/chart: {{ include "cmcc.chart" . }} | ||
{{ include "cmcc.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "cmcc.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "cmcc.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "cmcc.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "cmcc.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- define "cmcc.cmcc" -}} | ||
{{- tpl (toYaml .Values.cmcc) . }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{{- if .Values.useConfigMap }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ .Release.Name }} | ||
labels: | ||
{{- include "cmcc.labels" . | nindent 4 }} | ||
data: | ||
spec: | | ||
{{- include "cmcc.cmcc" . | nindent 4 }} | ||
{{- else }} | ||
apiVersion: cmcc.tsystemsmms.com/v1 | ||
kind: CoreMediaContentCloud | ||
metadata: | ||
name: {{ .Release.Name }} | ||
labels: | ||
{{- include "cmcc.labels" . | nindent 4 }} | ||
spec: | ||
{{- include "cmcc.cmcc" . | nindent 2 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Default values for cmcc. | ||
# This is a YAML-formatted file. | ||
# Declare variables to be passed into your templates. | ||
|
||
cmcc: | ||
clientSecretRefs: {} | ||
comment: "" | ||
components: [] | ||
defaultIngressTls: | ||
enabled: true | ||
secretName: "" | ||
defaults: | ||
curlImage: docker.io/alpine/curl:latest | ||
image: | ||
pullPolicy: IfNotPresent | ||
registry: gitlab.exmaple.com/my-cmcc-project | ||
tag: latest | ||
insecureDatabasePassword: "" | ||
ingressDomain: 127.0.0.1.nip.io | ||
namePrefix: "" | ||
previewHostname: preview | ||
resources: {} | ||
studioHostname: studio | ||
job: "" | ||
# licenseSecrets: | ||
# cmsLicense: license-cms | ||
# mlsLicense: license-mls | ||
# rlsLicense: license-rls | ||
siteMappings: [] | ||
with: | ||
contentImport: true | ||
databases: true | ||
delivery: | ||
maxCae: 1 | ||
minCae: 1 | ||
rls: 0 | ||
management: true | ||
|
||
nameOverride: "" | ||
fullnameOverride: "" | ||
|
||
# should the deployment description be created as a config map instead of a custom resource? | ||
useConfigMap: false |
Oops, something went wrong.