-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #193 from zeebe-io/os-zbchaos-namespace
Allow overriding k8s namespace
- Loading branch information
Showing
8 changed files
with
132 additions
and
25 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,29 @@ | ||
name: Release zbchaos Docker Image | ||
on: | ||
pull_request: {} | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish-image: | ||
runs-on: ubuntu-latest | ||
env: | ||
VERSION: ${{ github.event.release.name || github.sha }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup BuildKit | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: gcr.io | ||
username: _json_key | ||
password: ${{ secrets.DOCKER_GCR }} | ||
- name: Publish Docker Image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: go-chaos | ||
push: true | ||
tags: gcr.io/zeebe-io/zbchaos:${{ env.VERSION }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
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 @@ | ||
.* | ||
!cmd/ | ||
!internal | ||
!main.go | ||
!go.mod | ||
!go.sum |
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,21 @@ | ||
# syntax=docker/dockerfile:1.4 | ||
FROM golang:alpine as builder | ||
|
||
WORKDIR /app | ||
|
||
COPY --link go.mod go.sum . | ||
RUN go mod download | ||
|
||
COPY --link cmd/ ./cmd | ||
COPY --link internal ./internal | ||
COPY --link main.go ./ | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o zbchaos main.go | ||
|
||
FROM scratch | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=builder /app/zbchaos /usr/local/bin/ | ||
|
||
ENTRYPOINT ["zbchaos"] | ||
CMD ["worker"] |
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,24 @@ | ||
// Copyright 2022 Camunda Services GmbH | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package internal | ||
|
||
// defines whether the functions should print verbose output | ||
var Verbosity bool = false | ||
|
||
// defines if a custom kube config should be used instead of the default one found by k8s | ||
var KubeConfigPath string | ||
|
||
// sets the namespace to be used instead of the namespace from the current kube context | ||
var Namespace string |
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