Skip to content

chore(hooks): impl generate secrets for dvcr hook in go #1001

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 5 additions & 1 deletion .github/workflows/dev_module_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,14 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Run test hooks
- name: Run test Python hooks
run: |
task hooks:test

- name: Run test GO hooks
run: |
task gohooks:test

- name: Run unit test virtualization-controller
run: |
task virtualization-controller:init
Expand Down
3 changes: 3 additions & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ includes:
hooks:
taskfile: ./hooks
dir: ./hooks
gohooks:
taskfile: ./images/hooks
dir: ./images/hooks
e2e:
taskfile: ./tests/e2e
dir: ./tests/e2e
Expand Down
1 change: 1 addition & 0 deletions base-images/virtualization_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ BASE_DEBIAN_BOOKWORM_SLIM: "debian:bookworm-slim@sha256:e9ac68ffde903b241342267a
BASE_CONTAINER_REGISTRY: "registry:2.8.3@sha256:ac0192b549007e22998eb74e8d8488dcfe70f1489520c3b144a6047ac5efbe90"
BASE_GOLANG_22_BOOKWORM: "golang:1.22.8-bookworm@sha256:9e7db50b9858e9cd804043200f1e6acd5a11111151ce886951c9fe3523002cea"
BASE_GOLANG_23_BOOKWORM: "golang:1.23.6-bookworm@sha256:441f59f8a2104b99320e1f5aaf59a81baabbc36c81f4e792d5715ef09dd29355"
BASE_GOLANG_24_BOOKWORM: "golang:1.24.2-bookworm@sha256:79390b5e5af9ee6e7b1173ee3eac7fadf6751a545297672916b59bfa0ecf6f71"

BASE_ALT_P10: "alt:p10@sha256:4fab03b8d23eb16147397b0bc41a5025ba59f4e834f7fb4b933ac5206431d740"
# Digest for image created at 2024-09-20.
Expand Down
143 changes: 0 additions & 143 deletions hooks/generate_secret_for_dvcr.py

This file was deleted.

156 changes: 0 additions & 156 deletions hooks/test_generate_secret_for_dvcr.py

This file was deleted.

13 changes: 13 additions & 0 deletions images/hooks/Taskfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: "3"

tasks:
test:
desc: Run tests
cmds:
- |
go tool ginkgo -v \
--race \
{{ if .FOCUS -}}
--focus "{{ .FOCUS }}" \
{{ end -}}
./...
3 changes: 2 additions & 1 deletion images/hooks/cmd/000-ca-discovery/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package main
import (
"context"
"fmt"

"hooks/pkg/common"

"github.com/deckhouse/module-sdk/pkg"
Expand Down Expand Up @@ -88,7 +89,7 @@ func handlerModuleCommonCA(_ context.Context, input *pkg.HookInput) error {
}

// CA secret is found, decode it and save to Values.
err := ca_secret[0].UnmarhalTo(&rootCA)
err := ca_secret[0].UnmarshalTo(&rootCA)
if err != nil {
return fmt.Errorf("unmarshalTo: %w", err)
}
Expand Down
Loading
Loading