Skip to content

Commit

Permalink
build: base image, golang, controller-runtime (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
isindir authored Mar 9, 2024
1 parent eac1569 commit 4a6be01
Show file tree
Hide file tree
Showing 16 changed files with 198 additions and 163 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,23 @@ jobs:
environment: ci-cd
# UPDATE_HERE
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
# UPDATE_HERE
# https://hub.docker.com/r/rancher/k3s/tags
K3S_VERSION: v1.29.1-k3s1
K3S_VERSION: v1.29.2-k3s1
# https://github.com/helm-unittest/helm-unittest/releases
HELM_UNITTEST_VERSION: 0.4.1
HELM_UNITTEST_VERSION: 0.4.2

steps:

# UPDATE_HERE
# https://github.com/actions/checkout/releases
- uses: actions/checkout@v4
name: Check out code

# UPDATE_HERE
# https://github.com/asdf-vm/actions/releases
- name: Install asdf tools
uses: asdf-vm/actions/install@v3

Expand Down Expand Up @@ -167,21 +169,25 @@ jobs:
echo "IMAGE_CACHE_NAME=$(make image_cache_name)" >> $GITHUB_ENV
# UPDATE_HERE
# https://github.com/docker/setup-qemu-action/releases
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

# UPDATE_HERE
# https://github.com/docker/setup-buildx-action/releases
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# UPDATE_HERE
# https://github.com/docker/login-action/releases
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASS }}

# UPDATE_HERE
# https://github.com/docker/build-push-action/releases
- name: Docker build
uses: docker/build-push-action@v5
with:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
steps:

# UPDATE_HERE
# https://github.com/actions/checkout/releases
- uses: actions/checkout@v4
name: Check out code
with:
Expand All @@ -40,21 +41,25 @@ jobs:
echo "Skip release, tag found for ${VERSION}"
# UPDATE_HERE
# https://github.com/asdf-vm/actions/releases
- name: Install asdf tools
if: env.SKIP_RELEASE == ''
uses: asdf-vm/actions/install@v3

# UPDATE_HERE
# https://github.com/docker/setup-qemu-action/releases
- name: Set up QEMU
if: env.SKIP_RELEASE == ''
uses: docker/setup-qemu-action@v3

# UPDATE_HERE
# https://github.com/docker/setup-buildx-action/releases
- name: Set up Docker Buildx
if: env.SKIP_RELEASE == ''
uses: docker/setup-buildx-action@v3

# UPDATE_HERE
# https://github.com/docker/login-action/releases
- name: Log in to Docker Hub
if: env.SKIP_RELEASE == ''
uses: docker/login-action@v3
Expand All @@ -73,6 +78,7 @@ jobs:
gh release create "${SOPS_SEC_OPERATOR_VERSION}" -F chglog.tmp
# UPDATE_HERE
# https://github.com/docker/build-push-action/releases
- name: Docker build
if: env.SKIP_RELEASE == ''
uses: docker/build-push-action@v5
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/reviewdog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,24 @@ jobs:
runs-on: ubuntu-22.04
steps:
# UPDATE_HERE
# https://github.com/actions/checkout/releases
- name: Check out code into the Go module directory
uses: actions/checkout@v4

# UPDATE_HERE
# https://github.com/reviewdog/action-golangci-lint/releases
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
golangci_lint_flags: "--timeout=4m"

# UPDATE_HERE
# https://github.com/reviewdog/action-actionlint/releases
- name: action-lint
uses: reviewdog/action-actionlint@v1

# UPDATE_HERE
# https://github.com/reviewdog/action-hadolint/releases
- name: docker hadolint
uses: reviewdog/action-hadolint@v1
with:
Expand Down
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
repos:
- repo: https://github.com/norwoodj/helm-docs
# https://github.com/norwoodj/helm-docs/releases
rev: v1.12.0
rev: v1.13.1
hooks:
- id: helm-docs
args:
Expand All @@ -11,6 +11,7 @@ repos:
# The `./` makes it relative to the chart-search-root set above
- --template-files=./README.md.gotmpl
- repo: https://github.com/pre-commit/pre-commit-hooks
# https://github.com/pre-commit/pre-commit-hooks/releases
rev: v4.5.0
hooks:
- id: check-symlinks
Expand Down
12 changes: 6 additions & 6 deletions .tool-versions
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
# https://github.com/kubernetes-sigs/kubebuilder/releases
kubebuilder 3.14.0
# https://golang.org/dl/
golang 1.21.7
golang 1.21.8
# https://github.com/mozilla/sops/releases
sops 3.8.1
# https://github.com/kubernetes-sigs/kustomize/releases
kustomize 5.3.0
# https://github.com/rancher/k3d/releases
k3d 5.6.0
# https://github.com/kubernetes/kubernetes/releases
kubectl 1.29.1
kubectl 1.29.2
# https://github.com/helm/helm/releases
helm 3.14.0
helm 3.14.2
# https://github.com/norwoodj/helm-docs/releases
helm-docs 1.12.0
helm-docs 1.13.1
# https://github.com/yannh/kubeconform/releases
kubeconform 0.6.4
# https://github.com/git-chglog/git-chglog/releases
git-chglog 0.15.4
# https://github.com/golangci/golangci-lint/releases
golangci-lint 1.56.1
golangci-lint 1.56.2
# https://github.com/cli/cli/releases
github-cli 2.43.1
github-cli 2.45.0
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
# https://wiki.ubuntu.com/Releases
# https://hub.docker.com/_/ubuntu/tags?page=1&name=noble
# UPDATE_HERE
FROM ubuntu:noble-20240114 as asdf-builder
FROM ubuntu:noble-20240225 as asdf-builder

# UPDATE_HERE
# https://github.com/asdf-vm/asdf/releases
ARG ASDF_VERSION=v0.14.0

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
Expand Down Expand Up @@ -54,7 +55,7 @@ RUN CGO_ENABLED=0 GO111MODULE=on go build -a -o manager cmd/main.go

############################################################
# UPDATE_HERE
FROM ubuntu:noble-20240114
FROM ubuntu:noble-20240225

# Install build tools
RUN apt-get -y update \
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# UPDATE_HERE
GO := GOPROXY=https://proxy.golang.org go
SOPS_SEC_OPERATOR_VERSION := 0.12.3
SOPS_SEC_OPERATOR_VERSION := 0.12.4

# https://github.com/kubernetes-sigs/controller-tools/releases
CONTROLLER_GEN_VERSION := "v0.14.0"
# https://github.com/kubernetes-sigs/controller-runtime/releases
CONTROLLER_RUNTIME_VERSION := "v0.17.1"
CONTROLLER_RUNTIME_VERSION := "v0.17.2"
# https://github.com/kubernetes-sigs/kustomize/releases
KUSTOMIZE_VERSION := "v5.3.0"
# use `setup-envtest list` to obtain the list of available versions
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ encrypted files stored in `git` repository.

| Kubernetes | Sops | Chart | Operator |
|---|---|---|---|
| v1.29.x | v3.8.1 | 0.18.3 | 0.12.3 |
| v1.29.x | v3.8.1 | 0.18.4 | 0.12.4 |
| v1.28.x | v3.8.1 | 0.17.4 | 0.11.4 |
| v1.27.x | v3.7.3 | 0.15.5 | 0.9.5 |
| v1.26.x | v3.7.3 | 0.14.2 | 0.8.2 |
Expand Down
4 changes: 2 additions & 2 deletions chart/helm3/sops-secrets-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
# UPDATE_HERE
version: 0.18.3
appVersion: 0.12.3
version: 0.18.4
appVersion: 0.12.4
type: application
description: Helm chart deploys sops-secrets-operator
name: sops-secrets-operator
Expand Down
4 changes: 2 additions & 2 deletions chart/helm3/sops-secrets-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ The following table lists the configurable parameters of the Sops-secrets-operat
| healthProbes.readiness | object | `{"initialDelaySeconds":5,"periodSeconds":10}` | Readiness probe configuration |
| image.pullPolicy | string | `"Always"` | Operator image pull policy |
| image.repository | string | `"isindir/sops-secrets-operator"` | Operator image name |
| image.tag | string | `"0.12.3"` | Operator image tag |
| image.tag | string | `"0.12.4"` | Operator image tag |
| imagePullSecrets | list | `[]` | Secrets to pull image from private docker repository |
| initImage.pullPolicy | string | `"Always"` | Init container image pull policy |
| initImage.repository | string | `"ubuntu"` | Init container image name |
| initImage.tag | string | `"noble-20240114"` | Init container image tag |
| initImage.tag | string | `"noble-20240225"` | Init container image tag |
| kubeconfig | object | `{"enabled":false,"path":null}` | Paths to a kubeconfig. Only required if out-of-cluster. |
| logging | object | `{"development":false,"encoder":"json","level":"info","stacktraceLevel":"error","timeEncoding":"iso8601"}` | Logging configuration section suggested values Development Mode (encoder=consoleEncoder,logLevel=Debug,stackTraceLevel=Warn). Production Mode (encoder=jsonEncoder,logLevel=Info,stackTraceLevel=Error) (default) |
| logging.development | bool | `false` | Zap Development Mode enabled |
Expand Down
8 changes: 4 additions & 4 deletions chart/helm3/sops-secrets-operator/tests/operator_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ tests:
app.kubernetes.io/instance: sops
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: sops-secrets-operator
app.kubernetes.io/version: 0.12.3
helm.sh/chart: sops-secrets-operator-0.18.3
app.kubernetes.io/version: 0.12.4
helm.sh/chart: sops-secrets-operator-0.18.4

# custom name
- it: should correctly render custome name
Expand Down Expand Up @@ -170,7 +170,7 @@ tests:
# UPDATE_HERE
- equal:
path: spec.template.spec.containers[0].image
value: isindir/sops-secrets-operator:0.12.3
value: isindir/sops-secrets-operator:0.12.4
- equal:
path: spec.template.spec.containers[0].imagePullPolicy
value: Always
Expand Down Expand Up @@ -198,7 +198,7 @@ tests:
- equal:
path: spec.template.spec.initContainers[0].image
# UPDATE_HERE
value: ubuntu:noble-20240114
value: ubuntu:noble-20240225
- equal:
path: spec.template.spec.initContainers[0].imagePullPolicy
value: Always
Expand Down
4 changes: 2 additions & 2 deletions chart/helm3/sops-secrets-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ image:
# -- Operator image name
repository: isindir/sops-secrets-operator
# -- Operator image tag
tag: 0.12.3
tag: 0.12.4
# -- Operator image pull policy
pullPolicy: Always

Expand All @@ -22,7 +22,7 @@ initImage:
# -- Init container image name
repository: ubuntu
# -- Init container image tag
tag: noble-20240114
tag: noble-20240225
# -- Init container image pull policy
pullPolicy: Always

Expand Down
Loading

0 comments on commit 4a6be01

Please sign in to comment.