Skip to content

Commit

Permalink
Merge pull request #120 from TouK/ververica-configuration
Browse files Browse the repository at this point in the history
Added ververica configuration
  • Loading branch information
pielas authored Nov 3, 2023
2 parents f574e26 + 223329c commit 8770c7a
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 25 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/helm-test-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ env:
CHART_REPOSITORY_AUTH: "${{ secrets.CHARTS_PUBLIC_AUTH}}"
CHARTS_PUBLIC_SNAPSHOTS_URL: "https://helm-charts.touk.pl/nexus/repository/helm-snapshots/"
CHARTS_PUBLIC_RELEASES_URL: "https://helm-charts.touk.pl/nexus/repository/helm-releases/"

HELM_VERSION: 'version.BuildInfo{Version:"v3.13.1", GitCommit:"3547a4b5bf5edb5478ce352e18858d8a552a4110", GitTreeState:"clean", GoVersion:"go1.20.8"}'
defaults:
run:
shell: bash
Expand All @@ -37,22 +37,24 @@ jobs:
outputs:
version: ${{ steps.setVersion.outputs.version }}
steps:
- name: Verify helm version
run: current_helm_version=$(helm version) && echo "Current helm version $current_helm_version" && [ "$current_helm_version" = "$HELM_VERSION" ] && echo "Helm is in expected version" || echo "::warning title=Helm version is different than expected!::Helm has been updated on runner's image. It could lead to unexpected behaviour during pipeline execution!"
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Print Nussknacker version
run: |
echo "Nussknacker version: $NUSSKNACKER_VERSION"
- name: setVersion
id: setVersion
run: echo "::set-output name=version::$(helm show chart ${{env.CHART_SRC_DIR}} | grep ^version | sed -e "s/.*:\ //;s/SNAPSHOT/SNAPSHOT.${{github.run_id}}/")"
run: echo "version=$(helm show chart ${{env.CHART_SRC_DIR}} | grep ^version | sed -e "s/.*:\ //;s/SNAPSHOT/SNAPSHOT.${{github.run_id}}/")" >> $GITHUB_OUTPUT
- name: buildAll
run: ./setup.sh
- name: checkTemplate
run: helm template -f deploy-values.yaml --set "image.tag=${{env.NUSSKNACKER_VERSION}}" ${{env.CHART_SRC_DIR}}
- name: packageAll
run: helm package ${{env.CHART_SRC_DIR}} -d dist --version "${{steps.setVersion.outputs.version}}"
- name: Store target
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: helm-build
path: "dist/${{env.NAME}}-${{steps.setVersion.outputs.version}}.tgz"
Expand All @@ -64,8 +66,8 @@ jobs:
NUSSKNACKER_VERSION: staging-latest_scala-2.12
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/download-artifact@v2
uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: helm-build
path: dist
Expand All @@ -86,8 +88,8 @@ jobs:
needs: [ build ]
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/download-artifact@v2
uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: helm-build
path: dist
Expand All @@ -107,8 +109,8 @@ jobs:
needs: [ build ]
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/download-artifact@v2
uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: helm-build
path: dist
Expand All @@ -128,7 +130,7 @@ jobs:
runs-on: ubuntu-latest
needs: [ build, test-flink, test-streaming-lite, test-request-response ]
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: helm-build
path: dist
Expand Down
2 changes: 1 addition & 1 deletion src/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ dependencies:
repository: https://helm.influxdata.com/
version: 1.8.37
digest: sha256:3e7c6c0be071ea42c0aec1287bf0e727029a7d4c79685b2918322d9fe18debb9
generated: "2023-10-27T12:38:52.7919+02:00"
generated: "2023-10-27T12:38:52.7919+02:00"
2 changes: 2 additions & 0 deletions src/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ nussknacker-request-response-scenario
{{ tpl ( mustToJson .Values.nussknacker.modelClassPath) . }}
{{- else if eq .Values.nussknacker.mode "flink" -}}
["model/defaultModel.jar", "model/flinkExecutor.jar", "components/flink", "components/common"]
{{- else if eq .Values.nussknacker.mode "ververica" -}}
["model/defaultModel.jar", "model/flinkExecutor.jar", "components/flink", "components/common", "compatibility-provider/nussknacker-ververica-compatibility-provider.jar"]
{{- else if eq .Values.nussknacker.mode "streaming-lite" -}}
["model/defaultModel.jar", "components/lite/liteBase.jar", "components/lite/liteKafka.jar", "components/common"]
{{- else if eq .Values.nussknacker.mode "request-response" -}}
Expand Down
10 changes: 9 additions & 1 deletion src/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@ data:
restUrl: "{{ include "nussknacker.flinkJobManagerUrl" . }}"
queryableStateProxyUrl: "{{ include "nussknacker.flinkTaskManagerUrl" . }}"
} {{ tpl (.Values.nussknacker.flinkConfig | mustToJson) . }}
{{- else if eq .Values.nussknacker.mode "ververica" }}
deploymentConfig: {
type: "ververica"
username: {{ .Values.nussknacker.ververica.username | quote }}
password: {{ .Values.nussknacker.ververica.password | quote }}
remoteSyslogIp: {{ .Values.nussknacker.ververica.remoteSyslogIp | quote }}
remoteSyslogPort: {{ .Values.nussknacker.ververica.remoteSyslogPort }}
engineVersion: {{ .Values.nussknacker.ververica.engineVersion | quote }}
}
{{- else if or (eq .Values.nussknacker.mode "streaming-lite") (eq .Values.nussknacker.mode "request-response") }}
deploymentConfig: {
type: "lite-k8s"
Expand Down
25 changes: 13 additions & 12 deletions src/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

global:
kafka:
name: kafka
port: 9092
zookeeper: &zookeeper_ports_config
ports:
client: 2181
schemaRegistry:
name: apicurio-registry
path: /apis/ccompat/v6/

replicaCount: 1

image:
Expand Down Expand Up @@ -166,9 +177,7 @@ postgresql:

zookeeper:
enabled: true
service:
ports:
client: 2181
service: *zookeeper_ports_config

kafka:
enabled: true
Expand All @@ -180,7 +189,7 @@ kafka:
enabled: false
externalZookeeper:
servers:
- "{{ .Release.Name }}-zookeeper:2181"
- "{{ .Release.Name }}-zookeeper:{{ .Values.global.zookeeper.ports.client }}"

apicurio-registry:
enabled: true
Expand Down Expand Up @@ -270,14 +279,6 @@ telegraf:
#We suppress default influxDB configuration from chart, as we cannot easily template influxdb url
outputs: []

global:
kafka:
name: kafka
port: 9092
schemaRegistry:
name: apicurio-registry
path: /apis/ccompat/v6/

nussknackerInitContainers: [ ]

#Extra resources to deploy
Expand Down

0 comments on commit 8770c7a

Please sign in to comment.