-
Notifications
You must be signed in to change notification settings - Fork 325
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 #3027 from wireapp/release_2023-01-26_14_27
Release 2023-01-26 - (expected chart version 4.31.0)
- Loading branch information
Showing
294 changed files
with
9,987 additions
and
9,230 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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
dependencies: | ||
- name: inbucket | ||
version: 2.0.1 | ||
version: 2.1.0 | ||
repository: https://inbucket.github.io/inbucket-community |
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,26 @@ | ||
{{/* Allow KubeVersion to be overridden. */}} | ||
{{- define "kubeVersion" -}} | ||
{{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride -}} | ||
{{- end -}} | ||
|
||
{{/* Get Ingress API Version */}} | ||
{{- define "ingress.apiVersion" -}} | ||
{{- if and (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= 1.19-0" (include "kubeVersion" .)) -}} | ||
{{- print "networking.k8s.io/v1" -}} | ||
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}} | ||
{{- print "networking.k8s.io/v1beta1" -}} | ||
{{- else -}} | ||
{{- print "extensions/v1beta1" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* Check Ingress stability */}} | ||
{{- define "ingress.isStable" -}} | ||
{{- eq (include "ingress.apiVersion" .) "networking.k8s.io/v1" -}} | ||
{{- end -}} | ||
|
||
{{/* Check Ingress supports pathType */}} | ||
{{/* pathType was added to networking.k8s.io/v1beta1 in Kubernetes 1.18 */}} | ||
{{- define "ingress.supportsPathType" -}} | ||
{{- or (eq (include "ingress.isStable" .) "true") (and (eq (include "ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" (include "kubeVersion" .))) -}} | ||
{{- 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
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,9 @@ | ||
apiVersion: v2 | ||
name: k8ssandra-test-cluster | ||
description: K8ssandra (Cassandra cluster) K8ssandraCluster object for wire test servers. (This does not install K8ssandra itself!) | ||
|
||
type: application | ||
|
||
version: 0.1.0 | ||
|
||
appVersion: "0.39.2" |
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,89 @@ | ||
# k8ssandra-test-cluster Helm chart | ||
|
||
`k8ssandra-test-cluster` provides a `K8ssandraCluster` object to create a | ||
*Cassandra* database with | ||
[`k8ssandra-operator`](https://artifacthub.io/packages/helm/k8ssandra/k8ssandra-operator). | ||
**It does not install `k8ssandra-operator` itself!** This configuration is meant | ||
to be used in test environments: **It lacks crucial parts like backups | ||
(`medusa`)!** | ||
|
||
## Usage in Helmfile | ||
|
||
### Prerequisites | ||
|
||
You need a *storage class* that can automatically request storage volumes. For | ||
Hetzner's cloud see: [Container Storage Interface driver for Hetzner | ||
Cloud](https://github.com/hetznercloud/csi-driver) | ||
|
||
### Usage | ||
|
||
These entries are used in the `helfile` file: | ||
|
||
``` yaml | ||
... | ||
|
||
repositories: | ||
- name: wire | ||
url: 'https://s3-eu-west-1.amazonaws.com/public.wire.com/charts' | ||
- name: k8ssandra-stable | ||
url: https://helm.k8ssandra.io/stable | ||
|
||
... | ||
|
||
releases: | ||
- name: k8ssandra-operator | ||
chart: 'k8ssandra-stable/k8ssandra-operator' | ||
namespace: databases | ||
version: 0.39.2 | ||
values: | ||
# Use a cass-operator image that is compatible to the K8s cluster version | ||
- cass-operator: | ||
image: | ||
tag: v1.10.5 | ||
|
||
# Installs CDRs automatically | ||
- name: k8ssandra-test-cluster | ||
chart: "wire/k8ssandra-test-cluster" | ||
namespace: "databases" | ||
version: {{ .Values.wireChartVersion | quote }} | ||
needs: | ||
- 'databases/k8ssandra-operator' | ||
wait: true | ||
waitForJobs: true | ||
|
||
- name: 'wire-server' | ||
namespace: 'wire' | ||
chart: 'wire/wire-server' | ||
version: {{ .Values.wireChartVersion | quote }} | ||
values: | ||
- './helm_vars/wire-server/values.yaml.gotmpl' | ||
secrets: | ||
- './helm_vars/wire-server/secrets.yaml' | ||
needs: | ||
- 'databases/k8ssandra-test-cluster' | ||
|
||
... | ||
``` | ||
|
||
Please note the `needs` relations of the releases: `wire-server` *needs* | ||
`k8ssandra-test-cluster` which *needs* `k8ssandra-operator`. | ||
|
||
`wait` and `waitForJobs` are mandatory for `k8ssandra-test-cluster` in this | ||
setup: These settings ensure that the database really exists before resuming | ||
with the deployment. | ||
|
||
## Implementation details | ||
|
||
### k8ssandra-cluster.yaml | ||
|
||
Contains the `K8ssandraCluster` object. Its schema is described in the [CRD | ||
reference](https://docs-v2.k8ssandra.io/reference/crd/k8ssandra-operator-crds-latest/#k8ssandracluster) | ||
|
||
The specified *Cassandra* cluster runs on a single Node with reasonable | ||
resources for test environments. | ||
|
||
### check-cluster-job.yaml | ||
|
||
Defines a job that tries to connect to the final *Cassandra* database. Other | ||
deployments can wait on this. This is useful because `wire-server` needs a | ||
working database right from the beginning of it's deployment. |
19 changes: 19 additions & 0 deletions
19
charts/k8ssandra-test-cluster/templates/check-cluster-job.yaml
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,19 @@ | ||
# This job fails until the Cassandra created database is reachable. The Helmfile | ||
# deployment can wait for it. This is used to start wire-server deployments only | ||
# with a reachable database. | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: check-cluster-job | ||
namespace: databases | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: cassandra | ||
image: cassandra:3.11 | ||
command: ["cqlsh", "k8ssandra-cluster-datacenter-1-service"] | ||
restartPolicy: OnFailure | ||
# Default is 6 retries. 8 is a bit arbitrary, but should be sufficient for | ||
# low resource environments (e.g. Wire-in-a-box.) | ||
backoffLimit: 8 |
Oops, something went wrong.