Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
181ea95
extend TargetSource CRD by http token
denyost Apr 16, 2026
2fddddf
add pull logic as poc
denyost Apr 16, 2026
64a83cd
fix request header typo
denyost Apr 16, 2026
98823e8
refactor pull implementation
denyost Apr 16, 2026
cfe0273
Merge branch 'feature/target-loading-architecture' of https://github.…
denyost Apr 16, 2026
e76c6f3
restructure discovery structs
denyost Apr 17, 2026
3c18fb5
offload sending logic from loader implementation
denyost Apr 17, 2026
86ab0f3
implement type assertion based on received message
denyost Apr 17, 2026
10a9978
Merge branch 'feature/limit-target-loading' of https://github.com/gnm…
denyost Apr 17, 2026
8b36d7d
add http_push skeleton
denyost Apr 17, 2026
efbf727
add http_push skeleton
denyost Apr 17, 2026
60a5eb3
refactor targetsource_controller.go
denyost Apr 17, 2026
1bc5d2b
remove targetsource ressource to not impact main
denyost Apr 17, 2026
14e7765
add batching to DiscoveryEvent's
denyost Apr 17, 2026
b4337ea
refactored sender.go
denyost Apr 17, 2026
30f3ecb
load buffer and chunk size from env variable
denyost Apr 17, 2026
201ccb3
Merge branch 'feature/targetsource-crd-fields' into feature/limit-tar…
mcdillson Apr 21, 2026
c8dfdf1
Merge branch 'feature/limit-target-loading' of https://github.com/gnm…
denyost Apr 22, 2026
6cc0eb1
Merge branch 'feature/target-loading-architecture' of https://github.…
denyost Apr 22, 2026
e7ff5f8
Merge branch 'feature/limit-target-loading' of https://github.com/gnm…
denyost Apr 22, 2026
3cb9160
Merge branch 'feature/limit-target-loading' of https://github.com/gnm…
denyost Apr 22, 2026
586001e
rename file to helpers
denyost Apr 22, 2026
7430815
rebuild and reformat
denyost Apr 22, 2026
255a1f3
consolidate pull and push to http
denyost Apr 23, 2026
bd2b45f
rename target manager to target applier
denyost Apr 23, 2026
5a561a7
implement a generic registry
denyost Apr 23, 2026
f5481b8
add a discoveryTegistry to share targetchannel between apiserver and …
denyost Apr 23, 2026
22683f4
remove unused event action from DiscoverySnapshot
denyost Apr 23, 2026
922bbc6
rename target manager to target applier
denyost Apr 24, 2026
733927f
implement key for registry as a comparable
denyost Apr 24, 2026
9d30560
fix error message and add a word of caution for key comparables
denyost Apr 24, 2026
dafa82b
consistently use namespaced name as refference to the targetsource
denyost Apr 24, 2026
2973c03
improve context cancling and error handling
denyost Apr 24, 2026
c95bdaf
add supervised goroutines
denyost Apr 24, 2026
0aa883d
refactor target applier
denyost Apr 24, 2026
27b2b1f
add supervisor for the discovery pipelines
denyost Apr 24, 2026
22fe2d8
improve readability
denyost Apr 24, 2026
58538c7
remove side-effects from getter getTargetSource
denyost Apr 24, 2026
4f0457e
redesign supervisor
denyost Apr 24, 2026
60491be
add dependency handling of discovery pipeline components
denyost Apr 25, 2026
b8a6d27
refactor code
denyost Apr 25, 2026
eedfedf
improve context handling of and target applier semantics
denyost Apr 25, 2026
a66accb
moved finalizer label into const file
mcdillson Apr 27, 2026
3b2d925
fixed typo
mcdillson Apr 27, 2026
3ba86cb
restructured loaders package
mcdillson Apr 27, 2026
d0ac86b
restructured target handler
mcdillson Apr 27, 2026
240a2bc
ran go mod tidy
mcdillson Apr 27, 2026
7ef1281
renamed target applier to message processor & created client.go for g…
mcdillson Apr 27, 2026
7bcbcc0
added const file for common labels
mcdillson Apr 24, 2026
4fa58b6
Merge branch 'feature/limit-target-loading' into feature/restructuring
mcdillson Apr 27, 2026
d10fc9a
removed all package
mcdillson Apr 27, 2026
108bd2d
changed error lookup to apierrors
mcdillson Apr 27, 2026
b7dd036
remove unused fiels
denyost Apr 29, 2026
d3a9b5c
rename files and restructure packages
denyost Apr 29, 2026
0c80394
rename target handler to target reconciler
denyost Apr 29, 2026
04208bf
rename handler to reconciler
denyost Apr 29, 2026
c3818ce
clarify interface files
denyost Apr 29, 2026
e4df0d4
define EventAction to be go idomatic
denyost Apr 29, 2026
86c0af0
add webhook activation info to metadata of DiscoveryRegistry
denyost Apr 29, 2026
284b1f2
moved reconciler files to discovery
mcdillson Apr 29, 2026
b59897c
renamed messageProcessor to targetReconciler
mcdillson Apr 29, 2026
c268808
moved registry.go to discovery
mcdillson Apr 29, 2026
0295896
moved supervisor to discovery
mcdillson Apr 29, 2026
4d32c40
moved factory.go to discovery/loaders.go
mcdillson Apr 29, 2026
7671c1a
moved send.go to loaders package
mcdillson Apr 29, 2026
5f1e9cb
eliminated message.go
mcdillson Apr 29, 2026
6d67537
moved const.go to discovery.go
mcdillson Apr 29, 2026
3914630
renamed core package within targetsource controller
mcdillson Apr 29, 2026
46a201f
changed events to delete / apply
mcdillson Apr 29, 2026
7b17f7e
moved send.go into separate utils for loaders
mcdillson Apr 29, 2026
4540163
replaced legacy registry package
mcdillson Apr 29, 2026
2c3260e
Merge pull request #57 from gnmic/feature/restructuring
mcdillson Apr 29, 2026
f269a85
Merge branch 'main' of https://github.com/gnmic/operator into feature…
denyost Apr 30, 2026
c728fa2
add supervisor restart policy to targetsource spec configuration
denyost Apr 30, 2026
589bc9f
add targetsource example for lab
denyost Apr 30, 2026
a5dde06
remove targetsource example to not add unnecassary logging to main
denyost Apr 30, 2026
4be9c27
update gitignore to not push targetsources in order to prevent loggin…
denyost Apr 30, 2026
65eb7f6
Merge branch 'feature/limit-target-loading' of https://github.com/gnm…
denyost Apr 30, 2026
7337541
add component info to logging
denyost Apr 30, 2026
4ec0bb6
Merge branch 'feature/limit-target-loading' of https://github.com/gnm…
denyost Apr 30, 2026
41d5498
make snapshot id a bit smaller
denyost Apr 30, 2026
3ec3203
if context is canceled return with ctx.Err() not a clean exit
denyost Apr 30, 2026
0eaffdc
applied kubebuilder best-practise logging
denyost Apr 30, 2026
5140605
Merge branch 'feature/limit-target-loading' of https://github.com/gnm…
denyost Apr 30, 2026
e447b3b
improved logging
denyost Apr 30, 2026
fca37e0
improved logging
denyost Apr 30, 2026
fd4abe7
improved logging
denyost Apr 30, 2026
a6bc114
simplified pipeline context handling
denyost Apr 30, 2026
34cd51e
Merge branch 'feature/limit-target-loading' of https://github.com/gnm…
denyost Apr 30, 2026
54c41fd
add timeout as a const
denyost Apr 30, 2026
535ee49
rename target reconciler to message processor
denyost May 1, 2026
c09c68f
rename pipeline to runtime
denyost May 1, 2026
e4c01ba
removed supervisor
denyost May 1, 2026
77dbd7e
tidy loader configuration abstraction
denyost May 1, 2026
fe900e3
regenearte manifests without restartPolicy
denyost May 1, 2026
c1d7a91
tidy up comments
denyost May 1, 2026
05c7538
move webhook spec into provider and rename it to acceptPush
denyost May 1, 2026
061d4b8
regenerate manifests
denyost May 1, 2026
41655a0
remove spec from laoder config
denyost May 1, 2026
97849ae
update LoaderConfig in registry
denyost May 1, 2026
426e27a
fix: use defined variable
denyost May 4, 2026
c472f48
Merge branch 'feature/limit-target-loading' of https://github.com/gnm…
denyost May 6, 2026
a6e449d
load spec into loader
denyost May 6, 2026
e908953
update httpconfig
denyost May 6, 2026
85278df
use httpconfig within loader
denyost May 6, 2026
6c82320
refactor
denyost May 6, 2026
deb9e90
git ignore sonar scanner
denyost May 8, 2026
b088db2
add defaulting for targetsource crd
denyost May 8, 2026
9208766
remove closeChannel and fix cleanup logic
denyost May 13, 2026
209948e
fix: resolved pointer and returns smells
denyost May 13, 2026
1a0f447
improved logging message
denyost May 13, 2026
d94c23f
improved error handling
denyost May 13, 2026
e3f18d8
refactor: ctx should flow not be stored
denyost May 13, 2026
bc1b350
refactor: resetSnapshot
denyost May 13, 2026
020be5a
refactor: context cancellation
denyost May 13, 2026
3280229
refactor: default error handling now logs errors instead of terminati…
denyost May 13, 2026
cf49f83
Merge branch 'feature/limit-target-loading' of https://github.com/gnm…
denyost May 13, 2026
39f1650
refactor: pointer missuse
denyost May 13, 2026
f1d8c31
move defaulting logic to kubebuilder:default
denyost May 13, 2026
b0c63ff
remove pointer from bool
denyost May 13, 2026
c422dff
update deepcopy
denyost May 13, 2026
abb7180
fix: pointer issue
denyost May 13, 2026
36cf9fd
add helper to read secrets
denyost May 14, 2026
4f70c43
implement basic and token authentication
denyost May 14, 2026
966cd59
support .Key for TokenSecretRef
denyost May 14, 2026
862e28d
update targetsource
denyost May 14, 2026
e6e9439
support TLS verification
denyost May 14, 2026
055bfb0
make manifest and generate
denyost May 14, 2026
1deb8cc
fix CRD issues
denyost May 14, 2026
816b04f
add support for pagination
denyost May 15, 2026
c01b199
refactor
denyost May 15, 2026
5d95c90
add support for JSONPath mapping
denyost May 15, 2026
6a83f49
add support for TargetProfile supplied by provider
denyost May 15, 2026
1e9feb6
refactor
denyost May 15, 2026
0e8ea1a
fix interfaces
denyost May 15, 2026
262760c
fix incorrect conversion between integer types
denyost May 15, 2026
9d35608
update targetsource
denyost May 14, 2026
bcc0b4f
cherry-pick 5d95c90: DiscoveredTarget type changes
mcdillson May 20, 2026
d523adb
renamed IP to Address
mcdillson May 20, 2026
2c0d7cb
disabled JWTAuthSpec validations
mcdillson May 20, 2026
77a5bd4
cherry-pick 6a83f49: added TargetProfile variable to DiscoveredTarget
mcdillson May 21, 2026
85571f4
return if pagination field is empty
denyost May 21, 2026
8cdd529
refactor
denyost May 21, 2026
f94e8d1
use itemsField independent of pagination
denyost May 21, 2026
29f201f
rename ItemsField to TargetsField
denyost May 21, 2026
4d008c2
make tls caBundle more user friendly
denyost May 21, 2026
a69abdd
increase default poll interval
denyost May 21, 2026
4342d66
refactor fetchTargetsFromHTTPEndpoint
denyost May 21, 2026
4f06a21
Merge branch 'main' into feature/type-updates
mcdillson May 21, 2026
0d744ba
added port + targetProfile handling to mapper
mcdillson May 21, 2026
5b612f2
added webhook spec for authorization
mcdillson May 21, 2026
58b77d4
removed inline credential fields
mcdillson May 21, 2026
aa023ab
use itemsField independent of pagination
denyost May 21, 2026
fc6008d
rename ItemsField to TargetsField
denyost May 21, 2026
0c1b414
changed assertion to new webhook spec
mcdillson May 21, 2026
7e06e14
moved TargetsField to ResponseMappingSpec
mcdillson May 21, 2026
421d40f
changed validation rule for url or webhook
mcdillson May 21, 2026
85c46b5
reworked kubebuilder validations
mcdillson May 21, 2026
e7a62df
generated manifests
mcdillson May 21, 2026
513e539
update targetsource CRD
denyost May 22, 2026
bc2182f
cleanup secret fetching
denyost May 22, 2026
022ed92
refactor
denyost May 22, 2026
214810c
removed old webhook statements
mcdillson May 22, 2026
89bfbf5
changed pushSpec comment
mcdillson May 22, 2026
feb3717
Merge branch 'feature/type-updates' of https://github.com/gnmic/opera…
denyost May 22, 2026
0e14751
update webhook to push
denyost May 22, 2026
8d9730f
Merge branch 'feature/type-updates' of https://github.com/gnmic/opera…
denyost May 22, 2026
51cbf8c
Merge branch 'feature/type-updates' of https://github.com/gnmic/opera…
denyost May 22, 2026
e8c298e
fix after unlean merge
denyost May 22, 2026
b62f3f5
refactor CRD
denyost May 22, 2026
b3f4bbb
Merge branch 'feature/type-updates' of https://github.com/gnmic/opera…
denyost May 22, 2026
f390eae
fixes after merge
denyost May 22, 2026
722f53c
fix ip/address after merge
denyost May 22, 2026
d5be9a8
implement secret and configmap fetcher
denyost May 22, 2026
647e2a9
replace JSONPath mapping with CEL mapping
denyost May 22, 2026
1a486b1
update targetsource base
denyost May 22, 2026
b931a02
mapping of labels via CEL
denyost May 23, 2026
c2d49cb
fix nil pointer issue
denyost May 25, 2026
a9ddacd
remove missleading old comment
denyost May 25, 2026
f4fcf78
enable CEL extensions for advanced mapping
denyost May 25, 2026
0995dfe
fix: add optional types for CEL regex
denyost May 25, 2026
5c337e6
fix CEL OptionalTypes order
denyost May 25, 2026
eecee72
add support for POST and custom headers and body
denyost May 25, 2026
8a17aad
Handle different map representations returned by CEL
denyost May 25, 2026
1316082
changed interface{} to any
denyost May 25, 2026
c4a553c
normalize CEL returns
denyost May 25, 2026
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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,10 @@ docs/public
docs/resources/_gen/
docs/.hugo_build.lock
test/integration/**/clab-*


# Only for development and testing purposes
# To be removed after development of targetsource
# ignored in order to not add unnecassary logging messages
lab/dev/resources/targetsources
.scannerwork/
309 changes: 302 additions & 7 deletions api/v1alpha1/targetsource_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,332 @@ limitations under the License.
package v1alpha1

import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// TargetSourceSpec defines the desired state of TargetSource
// +kubebuilder:validation:Required
type TargetSourceSpec struct {
// Provider defines the source of targets for this TargetSource
// Only one provider can be specified per TargetSource
// +kubebuilder:validation:Required
Provider *ProviderSpec `json:"provider"`

// TODO: implement in message processor
// Optional port to use for discovered targets if not specified by the provider
// +kubebuilder:validation:Optional
TargetPort int32 `json:"targetPort,omitempty"`

// Optional labels to apply to all targets discovered by this TargetSource
// +kubebuilder:validation:Optional
TargetLabels map[string]string `json:"targetLabels,omitempty"`

// The TargetProfile to use for targets discovered by this TargetSource
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinLength=1
TargetProfile string `json:"targetProfile"`
}

// +kubebuilder:validation:ExactlyOneOf=http;consul
// ProviderSpec defines the source of targets for a TargetSource
// Only one provider can be specified per TargetSource
// +kubebuilder:validation:ExactlyOneOf=http
type ProviderSpec struct {
HTTP *HTTPConfig `json:"http,omitempty"`
Consul *ConsulConfig `json:"consul,omitempty"`
// HTTP defines the configuration for a HTTP provider
HTTP *HTTPConfig `json:"http,omitempty"`
}

// HTTPConfig defines the configuration for the HTTP provider
// +kubebuilder:validation:AtLeastOneOf:=url;push
type HTTPConfig struct {
// URL of the HTTP endpoint to pull targets from
// If defined, the loader will periodically poll this endpoint for targets
// +kubebuilder:validation:Optional
URL string `json:"url,omitempty"`

// HTTP method used for the request.
//
// Defaults to GET if not specified.
//
// Supported values:
// - GET (default, no request body)
// - POST (supports request body)
//
// +kubebuilder:validation:Enum=GET;POST
// +kubebuilder:validation:Optional
Method string `json:"method,omitempty"`

// Optional HTTP headers to include in the request.
//
// These map directly to HTTP headers (key-value pairs).
//
// Example:
// headers:
// Content-Type: application/json
// X-Custom-Header: value
//
// Precedence:
// - Authorization configuration overrides any conflicting headers
//
// +kubebuilder:validation:Optional
Headers map[string]string `json:"headers,omitempty"`

// Optional raw request body.
//
// Typically used with POST requests and contains JSON payload.
//
// Example:
// body: |
// {
// "limit": 100,
// "status": "active"
// }
//
// Notes:
// - Ignored for GET requests
// - User must set appropriate Content-Type header if needed
//
// +kubebuilder:validation:Optional
Body string `json:"body,omitempty"`

// Optional authorization configuration for accessing the HTTP endpoint
// +kubebuilder:validation:Optional
Authorization *AuthorizationSpec `json:"authorization,omitempty"`

// Optional interval for polling the HTTP endpoint for targets
// TODO: document about default value
// +kubebuilder:default="6h"
// +kubebuilder:validation:Optional
Interval *metav1.Duration `json:"interval,omitempty"`

// Optional timeout for HTTP requests to the endpoint
// +kubebuilder:default="10s"
// +kubebuilder:validation:Optional
Timeout *metav1.Duration `json:"timeout,omitempty"`

// Optional TLS configuration for connecting to the HTTP endpoint
// If it is an HTTP endpoint, this will be ignored
// +kubebuilder:validation:Optional
TLS *ClientTLSConfig `json:"tls,omitempty"`

// Optional pagination configuration for parsing responses from the HTTP endpoint
// +kubebuilder:validation:Optional
Pagination *PaginationSpec `json:"pagination,omitempty"`

// Optional mapping configuration for parsing responses from the HTTP endpoint
// +kubebuilder:validation:Optional
ResponseMapping *ResponseMappingSpec `json:"mapping,omitempty"`

// Optional configuration to enable push
// +kubebuilder:validation:Optional
Push *PushSpec `json:"push,omitempty"`
}

type ClientTLSConfig struct {
// Skip TLS verification of the Provider's certificate.
// +kubebuilder:default:=false
InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"`

// Reference to a ConfigMap containing a bundle of PEM-encoded CAs to use when
// verifying the certificate chain presented by the Provider when using HTTPS.
// Mutually exclusive with CABundle.
// +kubebuilder:validation:Optional
CABundleRef *corev1.ConfigMapKeySelector `json:"caBundleRef,omitempty"`
}

// AuthorizationSpec defines the configuration for authentication
// +kubebuilder:validation:ExactlyOneOf=basic;token
type AuthorizationSpec struct {
// Basic authentication configuration
Basic *BasicAuthSpec `json:"basic,omitempty"`
// Token-based authentication configuration
Token *TokenAuthSpec `json:"token,omitempty"`
}

// BasicAuthSpec defines the configuration for basic authentication
type BasicAuthSpec struct {
// Reference to a Secret containing "username" and "password" keys to use for
// basic authentication when connecting to the Provider.
// +kubebuilder:validation:Required
CredentialsSecretRef *corev1.SecretKeySelector `json:"credentialsSecretRef"`
}

// TokenAuthSpec defines the configuration for token-based authentication
type TokenAuthSpec struct {
// Scheme for the token, e.g. "Bearer"
// +kubebuilder:validation:MinLength=1
URL string `json:"url"`
Scheme string `json:"scheme"`
// Reference to a Secret containing a key with the token value to use for
// authentication when connecting to the Provider.
// +kubebuilder:validation:Required
TokenSecretRef *corev1.SecretKeySelector `json:"tokenSecretRef,omitempty"`
}

// PaginationSpec defines the configuration for paginating through responses from providers
type PaginationSpec struct {
// Field name in the JSON response that contains the next page reference.
// The value can be either:
// - a full URL (used directly for the next request), or
// - a pagination token (appended as a query parameter using this field name as the key).
//
// Must refer to a top-level key in the response object.
// Example: "next" or "nextToken"
NextField string `json:"nextField,omitempty"`
}

// ResponseMappingSpec controls how targets are extracted from an HTTP JSON response.
//
// This allows you to map fields from a JSON API into targets using either:
// - simple direct field access (e.g. item["name"])
// - or CEL expressions for more advanced logic
//
// General behavior:
//
// 1. Selecting targets:
// - `targetsField` is a CEL expression that selects the list of targets
// - It runs once on the full response (`self`) and MUST return a list
// - If not set, the response itself must be a JSON array
//
// 2. Extracting fields:
// - Each field (name, address, port, labels, etc.) is handled independently
// - If a CEL expression is provided → it is evaluated
// - If not provided → the value is read directly from the target object
//
// 3. Available variables in CEL:
// - item -> the current target object
// - self -> the full HTTP response JSON
//
// Example:
//
// Response:
// {
// "results": [
// { "name": "device1", "ip": "10.0.0.1", "env": "prod" }
// ],
// "meta": { "region": "eu-west" }
// }
//
// Mapping:
// targetsField: "self.results"
//
// name: "" # direct → item["name"]
// address: "item.ip" # CEL
//
// labels:
// env: "item.env"
// region: "self.meta.region"
type ResponseMappingSpec struct {
// CEL expression that selects the list of target objects from the response.
//
// This is evaluated once using:
// self -> full JSON response
//
// Example:
// targetsField: "self.results"
//
// If not set, the response itself must be a JSON array with the targets.
//
// +kubebuilder:validation:Optional
TargetsField string `json:"targetsField,omitempty"`

// CEL expression for the target name.
//
// If not set, defaults to:
// item["name"]
//
// Example:
// "item.hostname"
//
// +kubebuilder:validation:Optional
Name string `json:"name,omitempty"`

// CEL expression for the target address.
//
// If not set, defaults to:
// item["address"]
//
// Example:
// "item.ip"
//
// +kubebuilder:validation:Optional
Address string `json:"address,omitempty"`

// CEL expression for the target port.
//
// If not set, defaults to:
// item["port"]
//
// Example:
// "item.port"
//
// +kubebuilder:validation:Optional
Port string `json:"port,omitempty"`

// CEL expression that returns a map of labels.
// The expression must evaluate to an object (map).
//
// Example:
//
// labels: |
// {
// "env": item.environment,
// "region": self.meta.region,
// item.dynamicKey: "value"
// }
//
// If not set, defaults to:
// item["labels"]
//
// The resulting map will be converted into labels.
// The extracted labels will be merged with the static TargetLabels defined in the TargetSourceSpec,
// with values from the response taking precedence in case of conflicts.
//
// +kubebuilder:validation:Optional
AcceptPush bool `json:"acceptPush,omitempty"`
Labels string `json:"labels,omitempty"`

// CEL expression for the target profile.
//
// If not set, defaults to:
// item["targetProfile"]
//
// Example:
// "item.type == 'edge' ? 'edge-profile' : 'default'"
//
// +kubebuilder:validation:Optional
TargetProfile string `json:"targetProfile,omitempty"`
}

// PushSpec defines the settings for event-based update mechanism (i.e. webhooks sent from the server)
type PushSpec struct {
// +kubebuilder:default=false
Enabled bool `json:"enabled"`

// +kubebuilder:validation:Optional
Auth *PushAuthSpec `json:"auth,omitempty"`
}

// +kubebuilder:validation:ExactlyOneOf:=bearer;signature
type PushAuthSpec struct {
Bearer *PushBearerAuthSpec `json:"bearer,omitempty"`
Signature *PushSignatureAuthSpec `json:"signature,omitempty"`
}

type ConsulConfig struct {
// +kubebuilder:validation:Required
type PushBearerAuthSpec struct {
TokenSecretRef *corev1.SecretKeySelector `json:"tokenSecretRef,omitempty"`
}

// +kubebuilder:validation:Required
type PushSignatureAuthSpec struct {
SecretRef *corev1.SecretKeySelector `json:"secretRef"`

// Header containing the signature
// +kubebuilder:validation:MinLength=1
URL string `json:"url,omitempty"`
Header string `json:"header"`

// +kubebuilder:default="sha512"
// +kubebuilder:validation:Enum=sha1;sha256;sha512
Algorithm string `json:"algorithm"`
}

// TargetSourceStatus defines the observed state of TargetSource
Expand Down
Loading
Loading