Skip to content

Commit 58c1ec1

Browse files
Merge pull request #5570 from atlanhq/MLH-1378-master
MLH-1378 Atlas Helm Package + Version + Publish - Master
2 parents 5528cc5 + 643c4c1 commit 58c1ec1

File tree

166 files changed

+20509
-33
lines changed

Some content is hidden

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

166 files changed

+20509
-33
lines changed

.github/workflows/maven.yml

Lines changed: 469 additions & 25 deletions
Large diffs are not rendered by default.

helm/atlas-read/Chart.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
apiVersion: v2
2+
name: atlas-read
3+
description: Apache Atlas Read Replica for Metadata Management
4+
type: application
5+
version: 1.0.0
6+
appVersion: "3.0.0" # Will be updated by CI with commit ID
7+
maintainers:
8+
- name: Atlan Engineering
9+
10+
keywords:
11+
- atlas
12+
- atlas-read
13+
- metadata
14+
- read-replica
15+
- apache-atlas
16+
sources:
17+
- https://github.com/atlanhq/atlas-metastore
18+
home: https://github.com/atlanhq/atlas-metastore
19+
dependencies:
20+
# Infrastructure charts - disabled by default (published separately as OCI)
21+
# Charts exist in charts/ subdirectory for individual OCI publishing
22+
# Consumed as peers in parent atlan chart, not as subcharts here
23+
- name: cassandra-online-dc
24+
repository: file://./charts/cassandra-online-dc
25+
version: 0.x.x
26+
condition: cassandra-online-dc.enabled # Disabled in values.yaml
27+
- name: elasticsearch-read
28+
repository: file://./charts/elasticsearch-read
29+
version: 7.x.x
30+
condition: elasticsearch-read.enabled # Disabled in values.yaml
31+
- name: elasticsearch-exporter-read
32+
repository: file://./charts/elasticsearch-exporter-read
33+
version: 3.3.0
34+
condition: elasticsearch-exporter-read.enabled # Disabled in values.yaml

helm/atlas-read/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# atlas
2+
This chart will install the apache atlas which use elasticsearch and cassandra.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
# Common backup files
9+
*.swp
10+
*.bak
11+
*.tmp
12+
*~
13+
# Various IDEs
14+
.project
15+
.idea/
16+
*.tmproj
17+
OWNERS
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: v2
2+
appVersion: 3.11.5
3+
description: Apache Cassandra is a free and open-source distributed database management
4+
system designed to handle large amounts of data across many commodity servers, providing
5+
high availability with no single point of failure.
6+
engine: gotpl
7+
home: http://cassandra.apache.org
8+
icon: https://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/Cassandra_logo.svg/330px-Cassandra_logo.svg.png
9+
keywords:
10+
- cassandra
11+
- database
12+
- nosql
13+
maintainers:
14+
15+
name: KongZ
16+
17+
name: maorfr
18+
name: cassandra-online-dc
19+
version: 0.14.4

helm/atlas-read/charts/cassandra-online-dc/README.md

Lines changed: 215 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Cassandra CQL can be accessed via port {{ .Values.config.ports.cql }} on the following DNS name from within your cluster:
2+
Cassandra Thrift can be accessed via port {{ .Values.config.ports.thrift }} on the following DNS name from within your cluster:
3+
4+
If you want to connect to the remote instance with your local Cassandra CQL cli. To forward the API port to localhost:9042 run the following:
5+
- kubectl port-forward --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "cassandra.name" . }},release={{ .Release.Name }} -o jsonpath='{ .items[0].metadata.name }') 9042:{{ .Values.config.ports.cql }}
6+
7+
If you want to connect to the Cassandra CQL run the following:
8+
{{- if contains "NodePort" .Values.service.type }}
9+
- export CQL_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "cassandra.fullname" . }})
10+
- export CQL_HOST=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
11+
- cqlsh $CQL_HOST $CQL_PORT
12+
13+
{{- else if contains "LoadBalancer" .Values.service.type }}
14+
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
15+
Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "cassandra.fullname" . }}'
16+
- export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "cassandra.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
17+
- echo cqlsh $SERVICE_IP
18+
{{- else if contains "ClusterIP" .Values.service.type }}
19+
- kubectl port-forward --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "cassandra.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 9042:{{ .Values.config.ports.cql }}
20+
echo cqlsh 127.0.0.1 9042
21+
{{- end }}
22+
23+
You can also see the cluster status by run the following:
24+
- kubectl exec -it --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "cassandra.name" . }},release={{ .Release.Name }} -o jsonpath='{.items[0].metadata.name}') nodetool status
25+
26+
To tail the logs for the Cassandra pod run the following:
27+
- kubectl logs -f --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "cassandra.name" . }},release={{ .Release.Name }} -o jsonpath='{ .items[0].metadata.name }')
28+
29+
{{- if not .Values.persistence.enabled }}
30+
31+
Note that the cluster is running with node-local storage instead of PersistentVolumes. In order to prevent data loss,
32+
pods will be decommissioned upon termination. Decommissioning may take some time, so you might also want to adjust the
33+
pod termination gace period, which is currently set to {{ .Values.podSettings.terminationGracePeriodSeconds }} seconds.
34+
35+
{{- end}}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{{/* vim: set filetype=mustache: */}}
2+
{{/*
3+
Expand the name of the chart.
4+
*/}}
5+
{{- define "cassandra.name" -}}
6+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7+
{{- end -}}
8+
9+
{{/*
10+
Create a default fully qualified app name.
11+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12+
If release name contains chart name it will be used as a full name.
13+
*/}}
14+
{{- define "cassandra.fullname" -}}
15+
{{- if .Values.fullnameOverride -}}
16+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
17+
{{- else -}}
18+
{{- $name := default .Chart.Name .Values.nameOverride -}}
19+
{{- if contains $name .Release.Name -}}
20+
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
21+
{{- else -}}
22+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
23+
{{- end -}}
24+
{{- end -}}
25+
{{- end -}}
26+
27+
{{/*
28+
Create chart name and version as used by the chart label.
29+
*/}}
30+
{{- define "cassandra.chart" -}}
31+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
32+
{{- end -}}
33+
34+
{{/*
35+
Create the name of the service account to use
36+
*/}}
37+
{{- define "cassandra.serviceAccountName" -}}
38+
{{- if .Values.serviceAccount.create -}}
39+
{{ default (include "cassandra.fullname" .) .Values.serviceAccount.name }}
40+
{{- else -}}
41+
{{ default "default" .Values.serviceAccount.name }}
42+
{{- end -}}
43+
{{- end -}}
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
{{- if or .Values.global.svcIsolation.enabled .Values.global.globalSvcIsolation.enabled }}
2+
{{- if .Values.backup.enabled }}
3+
{{- $release := .Release }}
4+
{{- $values := .Values }}
5+
{{- $backup := $values.backup }}
6+
{{- range $index, $schedule := $backup.schedule }}
7+
---
8+
apiVersion: batch/v1beta1
9+
kind: CronJob
10+
metadata:
11+
name: {{ template "cassandra.fullname" $ }}-backup
12+
namespace: {{ $.Values.Namespace }}
13+
labels:
14+
app: {{ template "cassandra.name" $ }}-cain
15+
chart: {{ template "cassandra.chart" $ }}
16+
release: "{{ $release.Name }}"
17+
heritage: "{{ $release.Service }}"
18+
spec:
19+
schedule: {{ $schedule.cron | quote }}
20+
concurrencyPolicy: Forbid
21+
startingDeadlineSeconds: 120
22+
jobTemplate:
23+
spec:
24+
template:
25+
metadata:
26+
annotations:
27+
{{ toYaml $backup.annotations }}
28+
spec:
29+
restartPolicy: OnFailure
30+
serviceAccountName: {{ template "cassandra.serviceAccountName" $ }}
31+
{{- with $.Values.nodeSelector }}
32+
nodeSelector:
33+
{{- toYaml . | nindent 12 }}
34+
{{- end }}
35+
{{- $multiarchEnabled := and $.Values.multiarch (eq $.Values.multiarch.enabled true) }}
36+
{{- if or $.Values.tolerations $multiarchEnabled }}
37+
tolerations:
38+
{{- if $.Values.tolerations }}
39+
{{ toYaml $.Values.tolerations | nindent 12 }}
40+
{{- end }}
41+
{{- if $multiarchEnabled }}
42+
- key: "archtype"
43+
operator: "Equal"
44+
value: "arm64"
45+
effect: "NoSchedule"
46+
{{- end }}
47+
{{- end }}
48+
containers:
49+
- name: cassandra-backup
50+
{{- if and $.Values.multiarch.enabled $.Values.multiarch.image.cain }}
51+
image: {{ $.Values.multiarch.image.cain }}
52+
{{- else }}
53+
image: "{{ $backup.image.repository }}:{{ $backup.image.tag }}"
54+
{{- end }}
55+
command: ["cain"]
56+
args:
57+
- backup
58+
- --namespace
59+
- {{ $release.Namespace }}
60+
- --selector
61+
- release={{ $release.Name }},app={{ template "cassandra.name" $ }}
62+
- --keyspace
63+
- {{ $schedule.keyspace }}
64+
- --dst
65+
- {{ $backup.destination }}
66+
{{- with $backup.extraArgs }}
67+
{{ toYaml . | indent 12 }}
68+
{{- end }}
69+
env:
70+
{{- if $backup.google.serviceAccountSecret }}
71+
- name: GOOGLE_APPLICATION_CREDENTIALS
72+
value: "/etc/secrets/google/credentials.json"
73+
{{- end }}
74+
{{- with $backup.env }}
75+
{{ toYaml . | indent 12 }}
76+
{{- end }}
77+
{{- $tierType := $.Values.global.Tier_Type | default "" }}
78+
{{- if or (eq $tierType "Enterprise") (eq $tierType "") }}
79+
{{- with $backup.resources }}
80+
resources:
81+
{{ toYaml . | indent 14 }}
82+
{{- end }}
83+
{{- end }}
84+
{{- if $backup.google.serviceAccountSecret }}
85+
volumeMounts:
86+
- name: google-service-account
87+
mountPath: /etc/secrets/google/
88+
{{- end }}
89+
{{- if $backup.google.serviceAccountSecret }}
90+
volumes:
91+
- name: google-service-account
92+
secret:
93+
secretName: {{ $backup.google.serviceAccountSecret | quote }}
94+
{{- end }}
95+
affinity:
96+
podAffinity:
97+
preferredDuringSchedulingIgnoredDuringExecution:
98+
- weight: 1
99+
podAffinityTerm:
100+
labelSelector:
101+
matchExpressions:
102+
- key: app
103+
operator: In
104+
values:
105+
- {{ template "cassandra.fullname" $ }}
106+
- key: release
107+
operator: In
108+
values:
109+
- {{ $release.Name }}
110+
topologyKey: "kubernetes.io/hostname"
111+
{{- with $values.tolerations }}
112+
tolerations:
113+
{{ toYaml . | indent 12 }}
114+
{{- end }}
115+
{{- end }}
116+
{{- end }}
117+
{{- end }}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{{- if or .Values.global.svcIsolation.enabled .Values.global.globalSvcIsolation.enabled }}
2+
{{- if .Values.backup.enabled }}
3+
{{- if .Values.serviceAccount.create }}
4+
apiVersion: v1
5+
kind: ServiceAccount
6+
metadata:
7+
name: {{ template "cassandra.serviceAccountName" . }}
8+
namespace: {{ .Values.Namespace }}
9+
labels:
10+
app: {{ template "cassandra.name" . }}
11+
chart: {{ template "cassandra.chart" . }}
12+
release: "{{ .Release.Name }}"
13+
heritage: "{{ .Release.Service }}"
14+
---
15+
{{- end }}
16+
{{- if .Values.rbac.create }}
17+
apiVersion: rbac.authorization.k8s.io/v1
18+
kind: Role
19+
metadata:
20+
name: {{ template "cassandra.fullname" . }}-backup
21+
namespace: {{ .Values.Namespace }}
22+
labels:
23+
app: {{ template "cassandra.name" . }}
24+
chart: {{ template "cassandra.chart" . }}
25+
release: "{{ .Release.Name }}"
26+
heritage: "{{ .Release.Service }}"
27+
rules:
28+
- apiGroups: [""]
29+
resources: ["pods", "pods/log"]
30+
verbs: ["get", "list"]
31+
- apiGroups: [""]
32+
resources: ["pods/exec"]
33+
verbs: ["create"]
34+
---
35+
apiVersion: rbac.authorization.k8s.io/v1
36+
kind: RoleBinding
37+
metadata:
38+
name: {{ template "cassandra.fullname" . }}-backup
39+
namespace: {{ .Values.Namespace }}
40+
labels:
41+
app: {{ template "cassandra.name" . }}
42+
chart: {{ template "cassandra.chart" . }}
43+
release: "{{ .Release.Name }}"
44+
heritage: "{{ .Release.Service }}"
45+
roleRef:
46+
apiGroup: rbac.authorization.k8s.io
47+
kind: Role
48+
name: {{ template "cassandra.fullname" . }}-backup
49+
subjects:
50+
- kind: ServiceAccount
51+
name: {{ template "cassandra.serviceAccountName" . }}
52+
namespace: {{ .Release.Namespace }}
53+
{{- end }}
54+
{{- end }}
55+
{{- end }}

0 commit comments

Comments
 (0)