Skip to content

Commit

Permalink
Merge branch 'main' into aws_sns_arn_in_secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
darkanakin41 authored Dec 10, 2024
2 parents 3222f5a + 26a30ba commit 7cc3ec4
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
echo "analysis_cache_key_int=$(make go.lint.analysiskey-interval)" >> $GITHUB_OUTPUT
- name: Cache Linter Analysis
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
id: cache-analysis
with:
path: ${{ steps.analysis_cache.outputs.analysis_cache }}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export SUBPACKAGES := $(SUBPACKAGES)
# ====================================================================================
# Setup Kubernetes tools

KIND_VERSION = v0.24.0
KIND_VERSION = v0.25.0
UP_VERSION = v0.34.2
UP_CHANNEL = stable
UPTEST_VERSION = v0.11.1
Expand Down
2 changes: 1 addition & 1 deletion cluster/images/provider-aws/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.20.3
FROM alpine:3.21.0
RUN apk --no-cache add ca-certificates bash

ARG TARGETOS
Expand Down
35 changes: 35 additions & 0 deletions config/elasticache/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,41 @@ func Configure(p *config.Provider) { //nolint:gocyclo
r.References["kms_key_id"] = config.Reference{
TerraformName: "aws_kms_key",
}

r.Sensitive.AdditionalConnectionDetailsFn = func(attr map[string]any) (map[string][]byte, error) {
conn := map[string][]byte{}

if endpoints, ok := attr["endpoint"].([]any); ok {
for i, ep := range endpoints {
if endpoint, ok := ep.(map[string]any); ok && len(endpoint) > 0 {
if address, ok := endpoint["address"].(string); ok {
key := fmt.Sprintf("endpoint_%d_address", i)
conn[key] = []byte(address)
}
if port, ok := endpoint["port"]; ok {
key := fmt.Sprintf("endpoint_%d_port", i)
conn[key] = []byte(fmt.Sprintf("%v", port))
}
}
}
}
if readerendpoints, ok := attr["reader_endpoint"].([]any); ok {
for i, rp := range readerendpoints {
if readerendpoint, ok := rp.(map[string]any); ok && len(readerendpoint) > 0 {
if address, ok := readerendpoint["address"].(string); ok {
key := fmt.Sprintf("reader_endpoint_%d_address", i)
conn[key] = []byte(address)
}
if port, ok := readerendpoint["port"]; ok {
key := fmt.Sprintf("reader_endpoint_%d_port", i)
conn[key] = []byte(fmt.Sprintf("%v", port))
}
}
}
}

return conn, nil
}
})

p.AddResourceConfigurator("aws_elasticache_user_group", func(r *config.Resource) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ require (
k8s.io/api v0.29.4
k8s.io/apimachinery v0.29.4
k8s.io/client-go v0.29.4
k8s.io/utils v0.0.0-20241104163129-6fe5fd82f078
k8s.io/utils v0.0.0-20241210054802-24370beab758
sigs.k8s.io/controller-runtime v0.17.3
sigs.k8s.io/controller-tools v0.14.0
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1051,8 +1051,8 @@ k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0=
k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo=
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780=
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
k8s.io/utils v0.0.0-20241104163129-6fe5fd82f078 h1:jGnCPejIetjiy2gqaJ5V0NLwTpF4wbQ6cZIItJCSHno=
k8s.io/utils v0.0.0-20241104163129-6fe5fd82f078/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJJI8IUa1AmH/qa0=
k8s.io/utils v0.0.0-20241210054802-24370beab758/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/controller-runtime v0.17.3 h1:65QmN7r3FWgTxDMz9fvGnO1kbf2nu+acg9p2R9oYYYk=
sigs.k8s.io/controller-runtime v0.17.3/go.mod h1:N0jpP5Lo7lMTF9aL56Z/B2oWBJjey6StQM0jRbKQXtY=
sigs.k8s.io/controller-tools v0.14.0 h1:rnNoCC5wSXlrNoBKKzL70LNJKIQKEzT6lloG6/LF73A=
Expand Down

0 comments on commit 7cc3ec4

Please sign in to comment.