Skip to content

Commit 8e59ad9

Browse files
authored
Merge pull request #479 from gianlucam76/workload-identity
(feat) add workload identity support
2 parents 7a91325 + 1ca7614 commit 8e59ad9

6 files changed

Lines changed: 158 additions & 82 deletions

File tree

.github/workflows/main.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: checkout
17-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
17+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
1818
- name: Set up Go
1919
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
2020
with:
@@ -33,7 +33,7 @@ jobs:
3333
runs-on: ubuntu-latest
3434
steps:
3535
- name: checkout
36-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
36+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
3737
- name: Set up Go
3838
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
3939
with:
@@ -46,7 +46,7 @@ jobs:
4646
runs-on: ubuntu-latest
4747
steps:
4848
- name: checkout
49-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
49+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
5050
- name: Set up Go
5151
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
5252
with:
@@ -59,7 +59,7 @@ jobs:
5959
runs-on: ubuntu-latest
6060
steps:
6161
- name: checkout
62-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
62+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
6363
- name: Set up Go
6464
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
6565
with:
@@ -72,7 +72,7 @@ jobs:
7272
runs-on: ubuntu-latest
7373
steps:
7474
- name: checkout
75-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
75+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
7676
- name: Set up Go
7777
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
7878
with:
@@ -85,7 +85,7 @@ jobs:
8585
runs-on: ubuntu-latest
8686
steps:
8787
- name: checkout
88-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
88+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
8989
- name: Set up Go
9090
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
9191
with:
@@ -98,7 +98,7 @@ jobs:
9898
runs-on: ubuntu-latest
9999
steps:
100100
- name: checkout
101-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
101+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
102102
- name: Set up Go
103103
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
104104
with:

controllers/sveltoscluster_controller.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import (
3232
"sigs.k8s.io/controller-runtime/pkg/reconcile"
3333

3434
libsveltosv1beta1 "github.com/projectsveltos/libsveltos/api/v1beta1"
35+
"github.com/projectsveltos/libsveltos/lib/clusterproxy"
3536
logs "github.com/projectsveltos/libsveltos/lib/logsettings"
3637
)
3738

@@ -65,6 +66,7 @@ func (r *SveltosClusterReconciler) Reconcile(ctx context.Context, req ctrl.Reque
6566

6667
// Handle deleted SveltosCluster
6768
if !sveltosCluster.DeletionTimestamp.IsZero() {
69+
clusterproxy.EvictWorkloadIdentityCache(req.Namespace, req.Name)
6870
return cleanClusterStaleResources(ctx, r.Client, req.Namespace, req.Name,
6971
libsveltosv1beta1.ClusterTypeSveltos, logger)
7072
}

go.mod

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,48 @@ require (
66
github.com/TwiN/go-color v1.4.1
77
github.com/gdexlab/go-render v1.0.1
88
github.com/go-logr/logr v1.4.3
9-
github.com/onsi/ginkgo/v2 v2.29.0
10-
github.com/onsi/gomega v1.41.0
9+
github.com/onsi/ginkgo/v2 v2.31.0
10+
github.com/onsi/gomega v1.42.0
1111
github.com/pkg/errors v0.9.1
12-
github.com/projectsveltos/libsveltos v1.11.0
12+
github.com/projectsveltos/libsveltos v1.11.2-0.20260622062629-79f5f1f526c0
1313
github.com/prometheus/client_golang v1.23.2
1414
github.com/spf13/pflag v1.0.10
1515
golang.org/x/text v0.38.0
16-
k8s.io/api v0.36.1
17-
k8s.io/apiextensions-apiserver v0.36.1
18-
k8s.io/apimachinery v0.36.1
19-
k8s.io/client-go v0.36.1
20-
k8s.io/component-base v0.36.1
16+
k8s.io/api v0.36.2
17+
k8s.io/apiextensions-apiserver v0.36.2
18+
k8s.io/apimachinery v0.36.2
19+
k8s.io/client-go v0.36.2
20+
k8s.io/component-base v0.36.2
2121
k8s.io/klog/v2 v2.140.0
22-
k8s.io/utils v0.0.0-20260507154919-ff6756f316d2
22+
k8s.io/utils v0.0.0-20260617174310-a95e086a2553
2323
sigs.k8s.io/cluster-api v1.13.2
2424
sigs.k8s.io/controller-runtime v0.24.1
2525
sigs.k8s.io/yaml v1.6.0
2626
)
2727

2828
require (
2929
cel.dev/expr v0.25.1 // indirect
30+
cloud.google.com/go/compute/metadata v0.9.0 // indirect
31+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.22.0 // indirect
32+
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.14.0 // indirect
33+
github.com/Azure/azure-sdk-for-go/sdk/internal v1.12.0 // indirect
34+
github.com/AzureAD/microsoft-authentication-library-for-go v1.7.2 // indirect
3035
github.com/Masterminds/semver/v3 v3.4.0 // indirect
3136
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
37+
github.com/aws/aws-sdk-go-v2 v1.42.0 // indirect
38+
github.com/aws/aws-sdk-go-v2/config v1.32.25 // indirect
39+
github.com/aws/aws-sdk-go-v2/credentials v1.19.24 // indirect
40+
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.29 // indirect
41+
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.29 // indirect
42+
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.29 // indirect
43+
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.30 // indirect
44+
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12 // indirect
45+
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.29 // indirect
46+
github.com/aws/aws-sdk-go-v2/service/signin v1.2.0 // indirect
47+
github.com/aws/aws-sdk-go-v2/service/sso v1.31.3 // indirect
48+
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.6 // indirect
49+
github.com/aws/aws-sdk-go-v2/service/sts v1.43.3 // indirect
50+
github.com/aws/smithy-go v1.27.1 // indirect
3251
github.com/beorn7/perks v1.0.1 // indirect
3352
github.com/blang/semver/v4 v4.0.0 // indirect
3453
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
@@ -46,6 +65,7 @@ require (
4665
github.com/go-openapi/swag v0.23.0 // indirect
4766
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
4867
github.com/gobuffalo/flect v1.0.3 // indirect
68+
github.com/golang-jwt/jwt/v5 v5.3.1 // indirect
4969
github.com/google/cel-go v0.28.1 // indirect
5070
github.com/google/gnostic-models v0.7.0 // indirect
5171
github.com/google/go-cmp v0.7.0 // indirect
@@ -56,11 +76,13 @@ require (
5676
github.com/inconshreveable/mousetrap v1.1.0 // indirect
5777
github.com/josharian/intern v1.0.0 // indirect
5878
github.com/json-iterator/go v1.1.12 // indirect
79+
github.com/kylelemons/godebug v1.1.0 // indirect
5980
github.com/mailru/easyjson v0.7.7 // indirect
6081
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
6182
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
6283
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
6384
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
85+
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
6486
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
6587
github.com/prometheus/client_model v0.6.2 // indirect
6688
github.com/prometheus/common v0.67.5 // indirect
@@ -79,12 +101,13 @@ require (
79101
go.opentelemetry.io/proto/otlp v1.10.0 // indirect
80102
go.yaml.in/yaml/v2 v2.4.3 // indirect
81103
go.yaml.in/yaml/v3 v3.0.4 // indirect
104+
golang.org/x/crypto v0.51.0 // indirect
82105
golang.org/x/exp v0.0.0-20251219203646-944ab1f22d93 // indirect
83106
golang.org/x/mod v0.36.0 // indirect
84-
golang.org/x/net v0.54.0 // indirect
107+
golang.org/x/net v0.55.0 // indirect
85108
golang.org/x/oauth2 v0.36.0 // indirect
86109
golang.org/x/sync v0.21.0 // indirect
87-
golang.org/x/sys v0.44.0 // indirect
110+
golang.org/x/sys v0.45.0 // indirect
88111
golang.org/x/term v0.43.0 // indirect
89112
golang.org/x/time v0.14.0 // indirect
90113
golang.org/x/tools v0.45.0 // indirect
@@ -96,10 +119,10 @@ require (
96119
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
97120
gopkg.in/inf.v0 v0.9.1 // indirect
98121
gopkg.in/yaml.v3 v3.0.1 // indirect
99-
k8s.io/apiserver v0.36.1 // indirect
122+
k8s.io/apiserver v0.36.2 // indirect
100123
k8s.io/cluster-bootstrap v0.36.0 // indirect
101124
k8s.io/kube-openapi v0.0.0-20260427204847-8949caaa1199 // indirect
102-
k8s.io/streaming v0.36.1 // indirect
125+
k8s.io/streaming v0.36.2 // indirect
103126
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.34.0 // indirect
104127
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
105128
sigs.k8s.io/kustomize/api v0.21.1 // indirect

0 commit comments

Comments
 (0)