Skip to content

Commit 5d49b42

Browse files
authored
Merge pull request #1151 from fluxcd/watch-label
Introduce label selector for watching Secrets referenced in Receivers
2 parents 8f4c7b2 + fd7385b commit 5d49b42

File tree

8 files changed

+148
-67
lines changed

8 files changed

+148
-67
lines changed

api/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/fluxcd/notification-controller/api
33
go 1.24.0
44

55
require (
6-
github.com/fluxcd/pkg/apis/meta v1.17.0
6+
github.com/fluxcd/pkg/apis/meta v1.18.0
77
k8s.io/apimachinery v0.33.2
88
sigs.k8s.io/controller-runtime v0.21.0
99
)

api/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
22
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
33
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
44
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
5-
github.com/fluxcd/pkg/apis/meta v1.17.0 h1:KVMDyJQj1NYCsppsFUkbJGMnKxsqJVpnKBFolHf/q8E=
6-
github.com/fluxcd/pkg/apis/meta v1.17.0/go.mod h1:97l3hTwBpJbXBY+wetNbqrUsvES8B1jGioKcBUxmqd8=
5+
github.com/fluxcd/pkg/apis/meta v1.18.0 h1:ACHrMIjlcioE9GKS7NGk62KX4NshqNewr8sBwMcXABs=
6+
github.com/fluxcd/pkg/apis/meta v1.18.0/go.mod h1:97l3hTwBpJbXBY+wetNbqrUsvES8B1jGioKcBUxmqd8=
77
github.com/fxamacker/cbor/v2 v2.8.0 h1:fFtUGXUzXPHTIUdne5+zzMPTfffl3RD5qYnkY40vtxU=
88
github.com/fxamacker/cbor/v2 v2.8.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
99
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=

docs/spec/v1/receivers.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ This token is used to salt the generated [webhook path](#webhook-path), and
779779
depending on the Receiver [type](#supported-receiver-types), to verify the
780780
authenticity of a request.
781781

782-
#### Secret example
782+
Example:
783783

784784
```yaml
785785
---
@@ -793,6 +793,21 @@ stringData:
793793
token: <random token>
794794
```
795795

796+
To trigger a reconciliation of the Receiver when changes occur in
797+
the referenced Secret, you can set the following label on the
798+
Secret:
799+
800+
```yaml
801+
metadata:
802+
labels:
803+
reconcile.fluxcd.io/watch: Enabled
804+
```
805+
806+
An alternative to labeling every Secret is setting the
807+
`--watch-configs-label-selector=owner!=helm` flag in
808+
notification-controller, which allows watching all
809+
Secrets except for Helm storage Secrets.
810+
796811
### Interval
797812

798813
`.spec.interval` is an optional field with a default of ten minutes that specifies

go.mod

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ require (
88
cloud.google.com/go/pubsub v1.49.0
99
code.gitea.io/sdk/gitea v0.21.0
1010
github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6
11-
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0
11+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.1
1212
github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/v2 v2.0.0
13-
github.com/DataDog/datadog-api-client-go/v2 v2.42.0
13+
github.com/DataDog/datadog-api-client-go/v2 v2.43.0
1414
github.com/PagerDuty/go-pagerduty v1.8.0
1515
github.com/cdevents/sdk-go v0.4.1
1616
github.com/chainguard-dev/git-urls v1.0.2
@@ -19,7 +19,7 @@ require (
1919
github.com/fluxcd/notification-controller/api v1.6.0
2020
github.com/fluxcd/pkg/apis/event v0.18.0
2121
github.com/fluxcd/pkg/apis/meta v1.18.0
22-
github.com/fluxcd/pkg/auth v0.21.0
22+
github.com/fluxcd/pkg/auth v0.23.0
2323
github.com/fluxcd/pkg/cache v0.10.0
2424
github.com/fluxcd/pkg/git v0.34.0
2525
github.com/fluxcd/pkg/masktoken v0.7.0
@@ -28,22 +28,22 @@ require (
2828
github.com/fluxcd/pkg/ssh v0.20.0
2929
github.com/getsentry/sentry-go v0.34.1
3030
github.com/go-logr/logr v1.4.3
31-
github.com/google/cel-go v0.25.0
31+
github.com/google/cel-go v0.26.0
3232
github.com/google/go-github/v64 v64.0.0
3333
github.com/google/uuid v1.6.0
3434
github.com/hashicorp/go-retryablehttp v0.7.8
3535
github.com/ktrysmt/go-bitbucket v0.9.86
3636
github.com/microsoft/azure-devops-go-api/azuredevops/v6 v6.0.1
3737
github.com/nats-io/nats.go v1.43.0
38-
github.com/onsi/gomega v1.37.0
38+
github.com/onsi/gomega v1.38.0
3939
github.com/sethvargo/go-limiter v1.0.0
4040
github.com/slok/go-http-metrics v0.13.0
41-
github.com/spf13/pflag v1.0.6
41+
github.com/spf13/pflag v1.0.7
4242
github.com/stretchr/testify v1.10.0
43-
gitlab.com/gitlab-org/api/client-go v0.134.0
43+
gitlab.com/gitlab-org/api/client-go v0.137.0
4444
golang.org/x/oauth2 v0.30.0
4545
golang.org/x/text v0.27.0
46-
google.golang.org/api v0.241.0
46+
google.golang.org/api v0.243.0
4747
k8s.io/api v0.33.2
4848
k8s.io/apimachinery v0.33.2
4949
k8s.io/client-go v0.33.2
@@ -56,9 +56,9 @@ require (
5656
replace gopkg.in/yaml.v3 => gopkg.in/yaml.v3 v3.0.1
5757

5858
require (
59-
cel.dev/expr v0.23.1 // indirect
59+
cel.dev/expr v0.24.0 // indirect
6060
cloud.google.com/go v0.120.0 // indirect
61-
cloud.google.com/go/auth v0.16.2 // indirect
61+
cloud.google.com/go/auth v0.16.3 // indirect
6262
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
6363
cloud.google.com/go/compute/metadata v0.7.0 // indirect
6464
cloud.google.com/go/iam v1.5.2 // indirect
@@ -119,7 +119,7 @@ require (
119119
github.com/google/go-querystring v1.1.0 // indirect
120120
github.com/google/s2a-go v0.1.9 // indirect
121121
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
122-
github.com/googleapis/gax-go/v2 v2.14.2 // indirect
122+
github.com/googleapis/gax-go/v2 v2.15.0 // indirect
123123
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
124124
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
125125
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
@@ -160,7 +160,7 @@ require (
160160
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
161161
github.com/sirupsen/logrus v1.9.3 // indirect
162162
github.com/spf13/cobra v1.9.1 // indirect
163-
github.com/stoewer/go-strcase v1.3.0 // indirect
163+
github.com/stoewer/go-strcase v1.3.1 // indirect
164164
github.com/x448/float16 v0.8.4 // indirect
165165
github.com/xlab/treeprint v1.2.0 // indirect
166166
go.opencensus.io v0.24.0 // indirect
@@ -174,18 +174,18 @@ require (
174174
go.uber.org/zap v1.27.0 // indirect
175175
go.yaml.in/yaml/v2 v2.4.2 // indirect
176176
go.yaml.in/yaml/v3 v3.0.4 // indirect
177-
golang.org/x/crypto v0.39.0 // indirect
177+
golang.org/x/crypto v0.40.0 // indirect
178178
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e // indirect
179179
golang.org/x/mod v0.25.0 // indirect
180-
golang.org/x/net v0.41.0 // indirect
180+
golang.org/x/net v0.42.0 // indirect
181181
golang.org/x/sync v0.16.0 // indirect
182182
golang.org/x/sys v0.34.0 // indirect
183183
golang.org/x/term v0.33.0 // indirect
184184
golang.org/x/time v0.12.0 // indirect
185185
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
186-
google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2 // indirect
187-
google.golang.org/genproto/googleapis/api v0.0.0-20250505200425-f936aa4a68b2 // indirect
188-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
186+
google.golang.org/genproto v0.0.0-20250603155806-513f23925822 // indirect
187+
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 // indirect
188+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250715232539-7130f93afb79 // indirect
189189
google.golang.org/grpc v1.73.0 // indirect
190190
google.golang.org/protobuf v1.36.6 // indirect
191191
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect

0 commit comments

Comments
 (0)