-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/enable-documentDB
Signed-off-by: Stanchev Aleksandar <[email protected]>
- Loading branch information
Showing
757 changed files
with
32,087 additions
and
5,192 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright (c) 2023 Contributors to the Eclipse Foundation | ||
# | ||
# See the NOTICE file(s) distributed with this work for additional | ||
# information regarding copyright ownership. | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Eclipse Public License 2.0 which is available at | ||
# http://www.eclipse.org/legal/epl-2.0 | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
|
||
# consider helm install to be failed after 10 minutes | ||
helm-extra-args: --timeout 10m | ||
check-version-increment: true | ||
debug: true | ||
chart-dirs: | ||
- deployment/helm | ||
chart-repos: | ||
- stable=https://charts.helm.sh/stable | ||
- bitnami=https://charts.bitnami.com/bitnami |
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,37 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2023 Contributors to the Eclipse Foundation | ||
# | ||
# See the NOTICE file(s) distributed with this work for additional | ||
# information regarding copyright ownership. | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Eclipse Public License 2.0 which is available at | ||
# http://www.eclipse.org/legal/epl-2.0 | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
|
||
# | ||
# use kubeval to validate helm generated kubernetes manifest | ||
# | ||
|
||
set -o errexit | ||
set -o pipefail | ||
|
||
CHART_DIR=deployment/helm/ditto | ||
KUBEVAL_VERSION="v0.16.1" | ||
SCHEMA_LOCATION="https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/" | ||
|
||
# install kubeval | ||
curl --silent --show-error --fail --location --output /tmp/kubeval.tar.gz https://github.com/instrumenta/kubeval/releases/download/"${KUBEVAL_VERSION}"/kubeval-linux-amd64.tar.gz | ||
sudo tar -C /usr/local/bin -xf /tmp/kubeval.tar.gz kubeval | ||
|
||
# add helm repos to resolve dependencies | ||
helm repo add stable https://charts.helm.sh/stable | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
|
||
# validate chart | ||
echo "helm dependency build..." | ||
helm dependency build "${CHART_DIR}" | ||
|
||
echo "kubeval(idating) ${CHART_DIR} chart..." | ||
helm template "${CHART_DIR}" | kubeval --strict --ignore-missing-schemas --kubernetes-version "${KUBERNETES_VERSION#v}" --schema-location "${SCHEMA_LOCATION}" |
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,56 @@ | ||
# Copyright (c) 2023 Contributors to the Eclipse Foundation | ||
# | ||
# See the NOTICE file(s) distributed with this work for additional | ||
# information regarding copyright ownership. | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Eclipse Public License 2.0 which is available at | ||
# http://www.eclipse.org/legal/epl-2.0 | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
name: Release and publish Helm chart | ||
|
||
env: | ||
VERSION_HELM: "v3.11.2" | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
chartVersion: | ||
description: 'Helm chart version' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: ${{ env.VERSION_HELM }} | ||
|
||
- name: Helm | Login | ||
shell: bash | ||
run: echo ${{ secrets.DOCKER_HUB_TOKEN }} | helm registry login -u eclipsedittobot --password-stdin registry-1.docker.io | ||
|
||
- name: Helm | Package | ||
shell: bash | ||
run: helm package deployment/helm/ditto --dependency-update --version ${{ inputs.chartVersion }} | ||
|
||
- name: Helm | Push | ||
shell: bash | ||
run: helm push ditto-${{ inputs.chartVersion }}.tgz oci://registry-1.docker.io/eclipse | ||
|
||
- name: Helm | Logout | ||
shell: bash | ||
run: helm registry logout registry-1.docker.io | ||
|
||
- name: Helm | Output | ||
id: output | ||
shell: bash | ||
run: echo "image=registry-1.docker.io/eclipse/ditto:${{ inputs.chartVersion }}" >> $GITHUB_OUTPUT |
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,129 @@ | ||
# Copyright (c) 2023 Contributors to the Eclipse Foundation | ||
# | ||
# See the NOTICE file(s) distributed with this work for additional | ||
# information regarding copyright ownership. | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Eclipse Public License 2.0 which is available at | ||
# http://www.eclipse.org/legal/epl-2.0 | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
name: Lint and test Helm chart | ||
|
||
env: | ||
CONFIG_OPTION_CHART_TESTING: "--config .github/ct.yml" | ||
VERSION_CHART_TESTING: "v3.8.0" | ||
VERSION_HELM: "v3.11.2" | ||
VERSION_PYTHON: "3.9" | ||
on: | ||
pull_request: | ||
paths: | ||
- 'deployment/helm/**' | ||
- '.github/workflows/helm-chart.yml' | ||
- '.github/ct.yml' | ||
- '.github/kubeval.sh' | ||
|
||
jobs: | ||
lint-chart: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Helm | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: ${{ env.VERSION_HELM }} | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.VERSION_PYTHON }} | ||
check-latest: true | ||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
with: | ||
version: ${{ env.VERSION_CHART_TESTING }} | ||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed ${{ env.CONFIG_OPTION_CHART_TESTING }} --target-branch ${{ github.event.repository.default_branch }}) | ||
if [[ -n "$changed" ]]; then | ||
echo "changed=true" >> "$GITHUB_OUTPUT" | ||
fi | ||
- name: Run chart-testing (lint) | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: ct lint ${{ env.CONFIG_OPTION_CHART_TESTING }} --target-branch ${{ github.event.repository.default_branch }} | ||
|
||
kubeval-chart: | ||
runs-on: ubuntu-latest | ||
needs: lint-chart | ||
strategy: | ||
matrix: | ||
# the versions supported by kubeval are the ones for | ||
# which a folder exists at | ||
# https://github.com/yannh/kubernetes-json-schema/ | ||
k8s: | ||
- v1.25.2 | ||
- v1.26.4 | ||
- v1.27.1 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Fetch history for chart testing | ||
run: git fetch --prune --unshallow | ||
- name: Set up Helm | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: ${{ env.VERSION_HELM }} | ||
- name: Run kubeval | ||
env: | ||
KUBERNETES_VERSION: ${{ matrix.k8s }} | ||
run: .github/kubeval.sh | ||
|
||
install-chart: | ||
name: install-chart | ||
runs-on: ubuntu-latest | ||
needs: | ||
- lint-chart | ||
- kubeval-chart | ||
strategy: | ||
matrix: | ||
# the versions supported by chart-testing are the tags | ||
# available for the docker.io/kindest/node image | ||
# https://hub.docker.com/r/kindest/node/tags | ||
k8s: | ||
- v1.25.2 | ||
- v1.26.4 | ||
- v1.27.1 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Fetch history for chart testing | ||
run: git fetch --prune --unshallow | ||
- name: Set up Helm | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: ${{ env.VERSION_HELM }} | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.VERSION_PYTHON }} | ||
check-latest: true | ||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
with: | ||
version: ${{ env.VERSION_CHART_TESTING }} | ||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed ${{ env.CONFIG_OPTION_CHART_TESTING }} --target-branch ${{ github.event.repository.default_branch }}) | ||
if [[ -n "$changed" ]]; then | ||
echo "changed=true" >> "$GITHUB_OUTPUT" | ||
fi | ||
- name: Create kind ${{ matrix.k8s }} cluster | ||
if: steps.list-changed.outputs.changed == 'true' | ||
uses: helm/[email protected] | ||
with: | ||
node_image: kindest/node:${{ matrix.k8s }} | ||
- name: Run chart-testing (install) | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: ct install ${{ env.CONFIG_OPTION_CHART_TESTING }} --target-branch ${{ github.event.repository.default_branch }} |
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,31 +1,15 @@ | ||
<!-- | ||
~ Copyright (c) 2022 Contributors to the Eclipse Foundation | ||
~ | ||
~ See the NOTICE file(s) distributed with this work for additional | ||
~ information regarding copyright ownership. | ||
~ | ||
~ This program and the accompanying materials are made available under the | ||
~ terms of the Eclipse Public License 2.0 which is available at | ||
~ http://www.eclipse.org/legal/epl-2.0 | ||
~ | ||
~ SPDX-License-Identifier: EPL-2.0 | ||
--> | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="ConnectivityService" type="Application" factoryName="Application" folderName="Ditto" nameIsGenerated="true"> | ||
<envs> | ||
<env name="LOG_LEVEL_APPLICATION" value="INFO" /> | ||
<env name="CLEANUP_HISTORY_RETENTION_DURATION" value="6d" /> | ||
<env name="CONNECTION_EVENT_HISTORICAL_HEADERS_TO_PERSIST.0" value="ditto-originator" /> | ||
</envs> | ||
<option name="MAIN_CLASS_NAME" value="org.eclipse.ditto.connectivity.service.ConnectivityService" /> | ||
<module name="ditto-connectivity-service" /> | ||
<option name="VM_PARAMETERS" value="-Xms512m -Xmx512m --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/sun.security.util=ALL-UNNAMED" /> | ||
<extension name="coverage"> | ||
<pattern> | ||
<option name="PATTERN" value="org.eclipse.ditto.services.connectivity.*" /> | ||
<option name="ENABLED" value="true" /> | ||
</pattern> | ||
</extension> | ||
<method v="2"> | ||
<option name="Make" enabled="true" /> | ||
</method> | ||
</configuration> | ||
</component> | ||
</component> |
Oops, something went wrong.