-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4234500
commit bba4072
Showing
17 changed files
with
108 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,21 +21,30 @@ jobs: | |
- name: helm lint | ||
run: | | ||
helm lint . --strict | ||
helm lint . --strict -f test-linter/values-lint.yaml | ||
helm dep up test-linter/subchart && helm lint test-linter/subchart --strict | ||
helm lint . --strict -f test/linter/values-lint.yaml | ||
helm dep up test/linter/subchart && helm lint test/linter/subchart --strict | ||
- uses: volesen/[email protected] | ||
with: | ||
version: 'v1.20.0' | ||
- run: | | ||
skaffold version | ||
- uses: AbsaOSS/[email protected] | ||
name: create cluster | ||
- name: start k8s with k3d | ||
uses: AbsaOSS/[email protected] | ||
with: | ||
cluster-name: "cmak" | ||
use-default-registry: true | ||
args: >- | ||
--config ./k3d.yaml | ||
- name: build cmak-operator | ||
run: | | ||
skaffold config set default-repo "registry.localhost:5000" | ||
skaffold build | ||
- name: deploy cmak-operator | ||
run: | | ||
set -x | ||
set -e | ||
skaffold config set default-repo "registry.localhost:5000" | ||
skaffold run -p e2e | ||
- name: e2e test | ||
run: | | ||
sleep 20 | ||
./e2e.sh | ||
set -x | ||
set -e | ||
helm test cmak-operator --logs |
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,7 +1,9 @@ | ||
FROM python:3.8-alpine3.11 | ||
FROM python:3.8-alpine3.12 | ||
|
||
COPY *.py /opt/ | ||
|
||
RUN pip install click~=7.0 kazoo~=2.8 | ||
RUN set -x && \ | ||
apk add --update --no-cache jq curl && \ | ||
pip install click~=7.0 kazoo~=2.8 | ||
|
||
WORKDIR /opt |
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,33 @@ | ||
{{- $nm := include "cmak.name" . -}} | ||
{{- $dict := .Values.image | default (dict "tag" .Chart.Version "repository" (printf "%s/eshepelyuk/json2zk" .Values.imageRegistry)) -}} | ||
{{- $image := printf "%s:%s" $dict.repository $dict.tag -}} | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: {{ $nm }}-setup | ||
labels: | ||
{{- include "cmak.labels" . | nindent 4 }} | ||
annotations: | ||
"helm.sh/hook": post-install,post-upgrade | ||
"helm.sh/hook-delete-policy": hook-succeeded | ||
spec: | ||
backoffLimit: 3 | ||
template: | ||
spec: | ||
restartPolicy: Never | ||
volumes: | ||
- name: {{ $nm }}-clusters | ||
configMap: | ||
name: {{ $nm }}-clusters | ||
containers: | ||
- name: setup | ||
image: {{ $image | quote }} | ||
command: ['python3', './json2zk.py'] | ||
args: | ||
- '{{ .Values.reconcile.overwriteZk | ternary "--" "--no-" }}overwrite-zk' | ||
- '{{ $nm }}.{{ $.Release.Namespace }}:2181' | ||
- '/kafka-manager/configs' | ||
- '/opt/clusters' | ||
volumeMounts: | ||
- name: {{ $nm }}-clusters | ||
mountPath: /opt/clusters |
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 @@ | ||
{{- $nm := include "cmak.name" . -}} | ||
{{- $uiUrl := printf "http://%v.%v:%v/api/status/clusters" $nm .Release.Namespace .Values.ui.port -}} | ||
{{- $dict := .Values.image | default (dict "tag" .Chart.Version "repository" (printf "%s/eshepelyuk/json2zk" .Values.imageRegistry)) -}} | ||
{{- $image := printf "%s:%s" $dict.repository $dict.tag -}} | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: {{ $nm }}-values-clusters | ||
annotations: | ||
"helm.sh/hook": test | ||
spec: | ||
restartPolicy: Never | ||
containers: | ||
- name: values-clusters | ||
image: {{ $image | quote }} | ||
command: | ||
- '/bin/sh' | ||
- '-c' | ||
- | | ||
set -x | ||
set -e | ||
[ "$(curl -s {{ $uiUrl }} | jq '.clusters.active | length')" -eq 2 ] | ||
curl -s {{ $uiUrl }} | jq '.clusters.active[].name' |
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 @@ | ||
cmak: | ||
clusters: | ||
- name: cluster | ||
curatorConfig: | ||
zkConnect: kafka1.local | ||
- name: cluster-disabled | ||
enabled: false | ||
curatorConfig: | ||
zkConnect: kafka2.local |
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
|
@@ -6,3 +6,7 @@ propStr: "true" | |
|
||
global: | ||
globalStr: "false" | ||
|
||
image: | ||
tag: xxx | ||
repository: yyy |
File renamed without changes.
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