Skip to content

Commit f0831f2

Browse files
KRA-287 - change restclient (#18)
* feat: change restclient * feat: changed restclient * chore: testing controller. minor fixes * test: fixing test * chore: cleaning code * chore: updated go version * chore: updated go version * chore: libopenapi update * chore: code cleaning * ci: add release-note action * chore: minor fixes * fix: closes #19 --------- Co-authored-by: Diego Braga <[email protected]>
1 parent c4641c7 commit f0831f2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+2175
-1743
lines changed

.github/workflows/release-tag.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ jobs:
2222
runs-on: ${{ matrix.runner }}
2323

2424
permissions:
25-
contents: read
25+
contents: write
2626
packages: write
27+
pull-requests: write
2728

2829
steps:
2930
- name: Prepare
@@ -111,6 +112,12 @@ jobs:
111112
run: |
112113
docker buildx imagetools inspect ${{ env.GHCR_REPO }}:${{ steps.meta.outputs.version }}
113114
115+
- uses: googleapis/release-please-action@v4
116+
with:
117+
# this is a built-in strategy in release-please, see "Action Inputs"
118+
# for more options
119+
release-type: simple
120+
114121
test:
115122
runs-on: ubuntu-latest
116123
steps:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Build environment
22
# -----------------
3-
FROM golang:1.23-bullseye as builder
3+
FROM golang:1.24-bookworm AS builder
44
LABEL stage=builder
55

66
ARG DEBIAN_FRONTEND=noninteractive

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@ The following environment variables can be configured in the rest-dynamic-contro
9090
|------|--------------|---------------|
9191
| REST_CONTROLLER_DEBUG | Enable verbose output | `false` |
9292
| REST_CONTROLLER_WORKERS | Number of worker threads | `1` |
93-
| REST_CONTROLLER_RESYNC_INTERVAL | Interval between resyncs | `3m` |
93+
| REST_CONTROLLER_RESYNC_INTERVAL | Interval between resyncs | `1m` |
9494
| REST_CONTROLLER_GROUP | Resource API group | - |
9595
| REST_CONTROLLER_VERSION | Resource API version | - |
9696
| REST_CONTROLLER_RESOURCE | Resource plural name | - |
97+
| REST_CONTROLLER_NAMESPACE | Namespace to watch for CRs | `""` (all namespaces) |
9798
| URL_PLURALS | BFF plurals endpoint | `http://snowplow.krateo-system.svc.cluster.local:8081/api-info/names` |
9899
| REST_CONTROLLER_MAX_ERROR_RETRY_INTERVAL | The maximum interval between retries when an error occurs. This should be less than the half of the resync interval. | `30s` |
99100
| REST_CONTROLLER_MIN_ERROR_RETRY_INTERVAL | The minimum interval between retries when an error occurs. This should be less than max-error-retry-interval. | `1s` |

go.mod

Lines changed: 44 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
11
module github.com/krateoplatformops/rest-dynamic-controller
22

3-
go 1.23.3
4-
5-
toolchain go1.23.4
3+
go 1.24.0
64

75
require (
86
github.com/gobuffalo/flect v1.0.3
97
github.com/krateoplatformops/snowplow v0.0.0-20250311104630-6e215130151f
10-
github.com/krateoplatformops/unstructured-runtime v0.1.1
11-
github.com/lucasepe/httplib v0.2.2
12-
github.com/pb33f/libopenapi v0.16.8
13-
github.com/rs/zerolog v1.33.0
14-
k8s.io/api v0.32.1
15-
k8s.io/apimachinery v0.32.1
16-
k8s.io/client-go v0.32.1
8+
github.com/krateoplatformops/unstructured-runtime v0.1.2
9+
github.com/pb33f/libopenapi v0.21.8
10+
github.com/rs/zerolog v1.34.0
11+
github.com/stretchr/testify v1.10.0
12+
k8s.io/api v0.32.3
13+
k8s.io/apimachinery v0.32.3
14+
k8s.io/client-go v0.32.3
1715
sigs.k8s.io/controller-runtime v0.20.0
16+
sigs.k8s.io/e2e-framework v0.6.0
1817
)
1918

2019
require (
2120
github.com/bahlo/generic-list-go v0.2.0 // indirect
21+
github.com/beorn7/perks v1.0.1 // indirect
22+
github.com/blang/semver/v4 v4.0.0 // indirect
2223
github.com/buger/jsonparser v1.1.1 // indirect
24+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
2325
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
24-
github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 // indirect
2526
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
27+
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
28+
github.com/fatih/color v1.18.0 // indirect
2629
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
2730
github.com/go-logr/logr v1.4.2 // indirect
2831
github.com/go-logr/zapr v1.3.0 // indirect
@@ -35,39 +38,58 @@ require (
3538
github.com/google/go-cmp v0.6.0 // indirect
3639
github.com/google/gofuzz v1.2.0 // indirect
3740
github.com/google/uuid v1.6.0 // indirect
41+
github.com/gorilla/websocket v1.5.1 // indirect
42+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
3843
github.com/josharian/intern v1.0.0 // indirect
3944
github.com/json-iterator/go v1.1.12 // indirect
4045
github.com/mailru/easyjson v0.7.7 // indirect
4146
github.com/mattn/go-colorable v0.1.13 // indirect
4247
github.com/mattn/go-isatty v0.0.20 // indirect
48+
github.com/moby/spdystream v0.5.0 // indirect
4349
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
4450
github.com/modern-go/reflect2 v1.0.2 // indirect
4551
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
46-
github.com/onsi/ginkgo v1.16.5 // indirect
52+
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
4753
github.com/pkg/errors v0.9.1 // indirect
54+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
55+
github.com/prometheus/client_golang v1.19.1 // indirect
56+
github.com/prometheus/client_model v0.6.1 // indirect
57+
github.com/prometheus/common v0.55.0 // indirect
58+
github.com/prometheus/procfs v0.15.1 // indirect
59+
github.com/speakeasy-api/jsonpath v0.6.1 // indirect
60+
github.com/spf13/cobra v1.8.1 // indirect
4861
github.com/spf13/pflag v1.0.5 // indirect
4962
github.com/twmb/murmur3 v1.1.8 // indirect
50-
github.com/vmware-labs/yaml-jsonpath v0.3.2 // indirect
51-
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
63+
github.com/vladimirvivien/gexe v0.4.1 // indirect
64+
github.com/wk8/go-ordered-map/v2 v2.1.9-0.20240815153524-6ea36470d1bd // indirect
5265
github.com/x448/float16 v0.8.4 // indirect
66+
go.opentelemetry.io/otel v1.28.0 // indirect
67+
go.opentelemetry.io/otel/trace v1.28.0 // indirect
5368
go.uber.org/multierr v1.11.0 // indirect
5469
go.uber.org/zap v1.27.0 // indirect
55-
golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 // indirect
56-
golang.org/x/net v0.33.0 // indirect
57-
golang.org/x/oauth2 v0.23.0 // indirect
58-
golang.org/x/sync v0.10.0 // indirect
59-
golang.org/x/sys v0.28.0 // indirect
60-
golang.org/x/term v0.27.0 // indirect
61-
golang.org/x/text v0.21.0 // indirect
62-
golang.org/x/time v0.7.0 // indirect
70+
golang.org/x/mod v0.21.0 // indirect
71+
golang.org/x/net v0.39.0 // indirect
72+
golang.org/x/oauth2 v0.29.0 // indirect
73+
golang.org/x/sync v0.13.0 // indirect
74+
golang.org/x/sys v0.32.0 // indirect
75+
golang.org/x/term v0.31.0 // indirect
76+
golang.org/x/text v0.24.0 // indirect
77+
golang.org/x/time v0.11.0 // indirect
78+
golang.org/x/tools v0.26.0 // indirect
6379
google.golang.org/protobuf v1.35.1 // indirect
6480
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
6581
gopkg.in/inf.v0 v0.9.1 // indirect
82+
gopkg.in/yaml.v2 v2.4.0 // indirect
6683
gopkg.in/yaml.v3 v3.0.1 // indirect
84+
k8s.io/apiextensions-apiserver v0.32.0 // indirect
85+
k8s.io/component-base v0.32.1 // indirect
6786
k8s.io/klog/v2 v2.130.1 // indirect
6887
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect
6988
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
89+
sigs.k8s.io/controller-tools v0.16.5 // indirect
7090
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
7191
sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect
7292
sigs.k8s.io/yaml v1.4.0 // indirect
7393
)
94+
95+
replace github.com/pb33f/libopenapi => github.com/krateoplatformops/libopenapi v0.21.8

0 commit comments

Comments
 (0)