Skip to content

Commit

Permalink
Cube Cloud DNS Solver initial implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
bsod90 committed Oct 22, 2024
1 parent 0dcb653 commit 07b960c
Show file tree
Hide file tree
Showing 18 changed files with 109 additions and 723 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build

on:
push:
branches:
- 'master'
pull_request:

env:
DOCKER_IMAGE_PATH: us-docker.pkg.dev/cubejs-cloud/cloud/cloud-dns-solver

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
name: Builder

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Authenticate with Google Cloud
run: echo "${{ secrets.GCP_SERVICE_ACCOUNT_KEY_JSON }}" | gcloud auth activate-service-account --key-file=-
env:
CLOUDSDK_CORE_DISABLE_PROMPTS: 1
- name: Configure Docker to use gcloud as a credential helper
run: gcloud auth configure-docker us-docker.pkg.dev
env:
CLOUDSDK_CORE_DISABLE_PROMPTS: 1
# - name: Login to Artifact Registry
# uses: docker/login-action@v3
# with:
# registry: us-docker.pkg.dev
# username: _json_key_base64
# password: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY_JSON }}
- name: Build docker image
run: |
docker build -t $DOCKER_IMAGE_PATH:latest .
- name: Push docker Image
run: |
docker push $DOCKER_IMAGE_PATH:latest
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Ignore the built binary
cert-manager-webhook-example

# Make artifacts
_out
_test

cloud-dns-solver
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22-alpine3.19 AS build_deps
FROM golang:1.23-alpine AS build_deps

RUN apk add --no-cache git

Expand All @@ -13,12 +13,12 @@ FROM build_deps AS build

COPY . .

RUN CGO_ENABLED=0 go build -o webhook -ldflags '-w -extldflags "-static"' .
RUN CGO_ENABLED=0 go build -o cloud-dns-solver -ldflags '-w -extldflags "-static"' .

FROM alpine:3.18

RUN apk add --no-cache ca-certificates

COPY --from=build /workspace/webhook /usr/local/bin/webhook
COPY --from=build /workspace/cloud-dns-solver /usr/local/bin/cloud-dns-solver

ENTRYPOINT ["webhook"]
ENTRYPOINT ["cloud-dns-solver"]
21 changes: 0 additions & 21 deletions deploy/example-webhook/.helmignore

This file was deleted.

5 changes: 0 additions & 5 deletions deploy/example-webhook/Chart.yaml

This file was deleted.

Empty file.
48 changes: 0 additions & 48 deletions deploy/example-webhook/templates/_helpers.tpl

This file was deleted.

19 changes: 0 additions & 19 deletions deploy/example-webhook/templates/apiservice.yaml

This file was deleted.

69 changes: 0 additions & 69 deletions deploy/example-webhook/templates/deployment.yaml

This file was deleted.

76 changes: 0 additions & 76 deletions deploy/example-webhook/templates/pki.yaml

This file was deleted.

Loading

0 comments on commit 07b960c

Please sign in to comment.