Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b042e70
dexop: initialize
skrobul Apr 15, 2025
171b1fd
dexop: fix broken go.mod and upgrade tools
skrobul Apr 15, 2025
3f1b141
dexop: generate Client resource
skrobul Apr 15, 2025
b2f57e0
dexop: example manifest
skrobul Apr 15, 2025
9e84ef6
dexop: install dex client APIs
skrobul Apr 15, 2025
d5138e7
dexop: add Dex client
skrobul Apr 15, 2025
2b6391c
dexop: handle create and delete correctly
skrobul Apr 15, 2025
f166fe2
dexop: UpdateOauth2Client can set logo and trusted peers
skrobul Apr 15, 2025
b26af26
dexop: add support for reading Secrets
skrobul Apr 15, 2025
92252d1
dexop: add support for generating secrets
skrobul Apr 16, 2025
7cf5805
dexop: generate secure secret values
skrobul Apr 16, 2025
4f16a05
dexop: refactor Reconcile part 1
skrobul Apr 16, 2025
2a2062b
dexop: improve tests
skrobul Apr 17, 2025
5270e93
dexop: add more comprehensive tests
skrobul Apr 23, 2025
b40e40f
dexop: implement update by recreate
skrobul Apr 23, 2025
060c53f
dexop: update rbac
skrobul Apr 23, 2025
39a04fa
dexop: ability to configure certs
skrobul Apr 23, 2025
bbe9171
dexop: use dedicated instance of Dex for testing
skrobul Apr 24, 2025
b8f7509
dexop: fix most linting issues
skrobul Apr 24, 2025
8317aa2
dexop: migrate from deprecated grpc.Dial
skrobul Apr 24, 2025
eff30b6
dexop: build container with go 1.23
skrobul Apr 24, 2025
1983fc0
dexop: add github container builds workflow
skrobul Apr 28, 2025
a85c764
dexop: update the README
skrobul Apr 28, 2025
18e9cd3
dexop: add autogenerated install
skrobul Apr 28, 2025
6fe521f
dexop: add Helm chart
skrobul Apr 28, 2025
1a45cc6
dexop: refactor deletion
skrobul Apr 28, 2025
a312acf
dexop: refactor adding finalizer
skrobul Apr 28, 2025
6429441
dexop: refactor secret handling
skrobul Apr 28, 2025
e245b5b
dexop: refactor adding/updating client
skrobul Apr 28, 2025
95b9ed8
dexop: refactor secret handling further
skrobul Apr 28, 2025
ddf8f53
dexop: don't build images on PR
skrobul Apr 28, 2025
9b699c2
dexop: migrate to new golangci
skrobul Apr 29, 2025
fd741d7
dexop: make Secrets compatible with Understack
skrobul Apr 29, 2025
2ea0d15
dexop: remove unnecessary TypeMeta
skrobul Apr 29, 2025
44f966f
dexop: better error handling for certs
skrobul May 7, 2025
1357548
dexop: style
skrobul May 7, 2025
d237a17
dexop: add missing nil checks
skrobul May 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/build-dexop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: build-dexop-images

on:
workflow_dispatch:
push:
tags:
- dexop-v*
paths:
- "go/dexop/**"

jobs:
build-ghcr-registry:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3

- name: Login to ghcr.io
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3
with:
registry: "ghcr.io"
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract tag name
id: extract_tag
run: echo "tag=${GITHUB_REF#refs/tags/dexop-v}" >> $GITHUB_OUTPUT

- name: Build and deploy Dexop image
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6
with:
context: go/dexop/
file: go/dexop/Dockerfile
# push for all main branch commits
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/${{ github.repository }}/dexop:latest,ghcr.io/${{ github.repository }}/dexop:${{ steps.extract_tag.outputs.tag }}
labels: |
org.opencontainers.image.version=${{ steps.extract_tag.outputs.tag }}
1 change: 1 addition & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ extend-exclude = [
"schema/argo-workflows.json",
"python/understack-workflows/tests/json_samples/",
"containers/*/patches",
"go.mod"
]

[default]
Expand Down
3 changes: 3 additions & 0 deletions go/dexop/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
# Ignore build and test binaries.
bin/
27 changes: 27 additions & 0 deletions go/dexop/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
bin/*
Dockerfile.cross

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Go workspace file
go.work

# Kubernetes Generated files - skip generated files, except for vendored files
!vendor/**/zz_generated.*

# editor and IDE paraphernalia
.idea
.vscode
*.swp
*.swo
*~
49 changes: 49 additions & 0 deletions go/dexop/.golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
version: "2"
run:
allow-parallel-runners: true
linters:
default: none
enable:
- dupl
- errcheck
- goconst
- gocyclo
- govet
- ineffassign
- lll
- misspell
- nakedret
- prealloc
- staticcheck
- unconvert
- unparam
- unused
exclusions:
generated: lax
rules:
- linters:
- lll
path: api/*
- linters:
- dupl
- lll
path: internal/*
paths:
- third_party$
- builtin$
- examples$
settings:
staticcheck:
dot-import-whitelist:
- fmt
- github.com/onsi/ginkgo/v2
formatters:
enable:
- gofmt
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
1 change: 1 addition & 0 deletions go/dexop/.tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
golang 1.23.6
34 changes: 34 additions & 0 deletions go/dexop/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Build the manager binary
FROM golang:1.23 AS builder
ARG TARGETOS
ARG TARGETARCH

WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download

# Copy the go source
COPY cmd/main.go cmd/main.go
COPY api/ api/
COPY internal/controller/ internal/controller/
COPY dex/ dex/

# Build
# the GOARCH has not a default value to allow the binary be built according to the host where the command
# was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO
# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore,
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=builder /workspace/manager .
USER 65532:65532

ENTRYPOINT ["/manager"]
Loading
Loading