This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Eliatra
committed
Nov 26, 2023
1 parent
4174371
commit 2046d8d
Showing
158 changed files
with
1,173 additions
and
1,264 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 |
---|---|---|
@@ -1,30 +1,29 @@ | ||
# A special manual workflow to push a busybox image into our public ecr registry. This image is used for the init helper containers | ||
name: Push busybox image to ecr | ||
# A special manual workflow to push a busybox image into our public registry. This image is used for the init helper containers | ||
name: Push busybox image to docker hub | ||
on: workflow_dispatch | ||
|
||
|
||
jobs: | ||
release: | ||
name: Push busybox image to ecr | ||
name: Push busybox image to docker hub | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: k8s-operator | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Pull and Push docker image | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
cd opensearch-operator | ||
export IMG=public.ecr.aws/opsterio/busybox:1.27.2-buildx | ||
export IMG=docker.io/eliatra/eoko-busybox:1.27.2-buildx | ||
echo $IMG | ||
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/opsterio | ||
docker buildx build -f Dockerfile-busybox --platform="linux/amd64,linux/arm,linux/arm64" . -t $IMG --push | ||
cd .. |
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,5 +1,6 @@ | ||
name: "Docker Build" | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- "main" | ||
|
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,5 +1,5 @@ | ||
name: Golang Lint | ||
on: [pull_request] | ||
on: [pull_request,workflow_dispatch] | ||
|
||
jobs: | ||
golangci: | ||
|
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 |
---|---|---|
|
@@ -3,16 +3,14 @@ on: | |
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version for the release, semver, NO "v" prefix' | ||
description: 'Version for the release, semver, NO "v" prefix, semver x.y.z' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
release: | ||
name: Prepare and publish release | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: k8s-operator | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
@@ -22,6 +20,11 @@ jobs: | |
go-version: "1.19" | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Run tests | ||
run: | | ||
# Run test suite to make sure we have a functional commit | ||
|
@@ -31,7 +34,7 @@ jobs: | |
- name: Prepare helm chart | ||
run: | | ||
# Copy CRDs to chart to make sure they are identical | ||
cp opensearch-operator/config/crd/bases/opensearch.opster.io_*.yaml charts/opensearch-operator/files/ | ||
cp opensearch-operator/config/crd/bases/opensearch.eliatra.io_*.yaml charts/opensearch-operator/files/ | ||
# Set versions in helm chart | ||
sed -i -e 's/^appVersion:.*/appVersion: '$RELEASE_VERSION'/' charts/opensearch-operator/Chart.yaml | ||
sed -i -e 's/^version:.*/version: '$RELEASE_VERSION'/' charts/opensearch-operator/Chart.yaml | ||
|
@@ -52,16 +55,12 @@ jobs: | |
|
||
- name: Build and Push docker image | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
RELEASE_VERSION: ${{ inputs.version }} | ||
run: | | ||
cd opensearch-operator | ||
export IMG=public.ecr.aws/opsterio/opensearch-operator:$RELEASE_VERSION | ||
export IMG=docker.io/eliatra/eoko:$RELEASE_VERSION | ||
echo $IMG | ||
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/opsterio | ||
docker buildx build -t $IMG --platform="linux/amd64,linux/arm,linux/arm64" . -f Dockerfile --push | ||
cd .. | ||
|
@@ -70,11 +69,29 @@ jobs: | |
with: | ||
version: v3.8.1 | ||
|
||
- name: Publish helm chart | ||
uses: stefanprodan/helm-gh-pages@master | ||
- name: Publish opensearch-cluster helm chart | ||
uses: appany/[email protected] | ||
with: | ||
name: eoko-cluster | ||
path: charts/opensearch-cluster | ||
repository: ${{ secrets.DOCKERHUB_USERNAME }} | ||
tag: ${{ github.ref }} | ||
registry: docker.io | ||
registry_username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
registry_password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
update_dependencies: 'true' # Defaults to false | ||
|
||
- name: Publish opensearch-operator helm chart | ||
uses: appany/[email protected] | ||
with: | ||
charts_dir: charts/ | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
name: eoko | ||
path: charts/opensearch-operator | ||
repository: ${{ secrets.DOCKERHUB_USERNAME }} | ||
tag: ${{ github.ref }} | ||
registry: docker.io | ||
registry_username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
registry_password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
update_dependencies: 'true' # Defaults to false | ||
|
||
- name: Create Release | ||
id: create_release | ||
|
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,8 +6,6 @@ on: | |
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: k8s-operator | ||
name: Release | ||
steps: | ||
- name: Checkout | ||
|
@@ -18,23 +16,24 @@ jobs: | |
go-version: '1.19' | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: set Env | ||
id: github-ver | ||
run: | | ||
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV | ||
- name: Build and Push docker image | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
cd opensearch-operator | ||
make test | ||
export IMG=public.ecr.aws/opsterio/opensearch-operator:$RELEASE_VERSION | ||
export IMG=docker.io/eliatra/opensearch-operator:$RELEASE_VERSION | ||
echo $IMG | ||
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/opsterio | ||
docker buildx build -t $IMG --platform="linux/amd64,linux/arm,linux/arm64" . -f Dockerfile --push | ||
- name: Make sure helm chart has correct versions | ||
|
@@ -47,11 +46,29 @@ jobs: | |
with: | ||
version: v3.8.1 | ||
|
||
- name: Publish helm chart | ||
uses: stefanprodan/helm-gh-pages@master | ||
- name: Publish opensearch-cluster helm chart | ||
uses: appany/[email protected] | ||
with: | ||
name: eoko-cluster | ||
path: charts/opensearch-cluster | ||
repository: ${{ secrets.DOCKERHUB_USERNAME }} | ||
tag: ${{ github.ref }} | ||
registry: docker.io | ||
registry_username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
registry_password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
update_dependencies: 'true' # Defaults to false | ||
|
||
- name: Publish opensearch-operator helm chart | ||
uses: appany/[email protected] | ||
with: | ||
charts_dir: charts/ | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
name: eoko | ||
path: charts/opensearch-operator | ||
repository: ${{ secrets.DOCKERHUB_USERNAME }} | ||
tag: ${{ github.ref }} | ||
registry: docker.io | ||
registry_username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
registry_password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
update_dependencies: 'true' # Defaults to false | ||
|
||
- name: Create Release | ||
id: create_release | ||
|
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,5 +1,5 @@ | ||
name: Testing | ||
on: [pull_request] | ||
on: [pull_request,workflow_dispatch] | ||
|
||
jobs: | ||
unit-tests: | ||
|
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,6 @@ | ||
Eliatra OpenSearch Kubernetes Operator (EOKO) (https://github.com/eliatra/opensearch-k8s-operator) | ||
Copyright Eliatra Contributors | ||
|
||
This product includes software developed by | ||
Opster (https://opster.com/). | ||
Copyright 2019-2023 Opster Ltd. |
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,6 +1,6 @@ | ||
apiVersion: v2 | ||
name: opensearch-cluster | ||
description: A Helm chart for OpenSearch Cluster | ||
name: eoko-cluster | ||
description: A Helm chart for OpenSearch Cluster managed by EOKO | ||
type: application | ||
version: 2.4.0 | ||
appVersion: 2.4.0 |
Oops, something went wrong.