Provisioning: Add inline secure values to repository schema (#109594)

This commit is contained in:
Ryan McKinley
2025-08-20 09:05:41 +00:00
committed by GitHub
parent c37a03263f
commit fa81fae1e3
13 changed files with 333 additions and 28 deletions
@@ -16,6 +16,7 @@ type RepositoryApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *RepositorySpecApplyConfiguration `json:"spec,omitempty"`
Secure *SecureValuesApplyConfiguration `json:"secure,omitempty"`
Status *RepositoryStatusApplyConfiguration `json:"status,omitempty"`
}
@@ -196,6 +197,14 @@ func (b *RepositoryApplyConfiguration) WithSpec(value *RepositorySpecApplyConfig
return b
}
// WithSecure sets the Secure field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Secure field is set to the value of the last call.
func (b *RepositoryApplyConfiguration) WithSecure(value *SecureValuesApplyConfiguration) *RepositoryApplyConfiguration {
b.Secure = value
return b
}
// WithStatus sets the Status field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Status field is set to the value of the last call.
@@ -0,0 +1,38 @@
// SPDX-License-Identifier: AGPL-3.0-only
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v0alpha1
import (
commonv0alpha1 "github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1"
)
// SecureValuesApplyConfiguration represents a declarative configuration of the SecureValues type for use
// with apply.
type SecureValuesApplyConfiguration struct {
Token *commonv0alpha1.InlineSecureValue `json:"token,omitempty"`
WebhookSecret *commonv0alpha1.InlineSecureValue `json:"webhookSecret,omitempty"`
}
// SecureValuesApplyConfiguration constructs a declarative configuration of the SecureValues type for use with
// apply.
func SecureValues() *SecureValuesApplyConfiguration {
return &SecureValuesApplyConfiguration{}
}
// WithToken sets the Token field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Token field is set to the value of the last call.
func (b *SecureValuesApplyConfiguration) WithToken(value commonv0alpha1.InlineSecureValue) *SecureValuesApplyConfiguration {
b.Token = &value
return b
}
// WithWebhookSecret sets the WebhookSecret field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the WebhookSecret field is set to the value of the last call.
func (b *SecureValuesApplyConfiguration) WithWebhookSecret(value commonv0alpha1.InlineSecureValue) *SecureValuesApplyConfiguration {
b.WebhookSecret = &value
return b
}
@@ -62,6 +62,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &provisioningv0alpha1.ResourceCountApplyConfiguration{}
case v0alpha1.SchemeGroupVersion.WithKind("ResourceRef"):
return &provisioningv0alpha1.ResourceRefApplyConfiguration{}
case v0alpha1.SchemeGroupVersion.WithKind("SecureValues"):
return &provisioningv0alpha1.SecureValuesApplyConfiguration{}
case v0alpha1.SchemeGroupVersion.WithKind("SyncJobOptions"):
return &provisioningv0alpha1.SyncJobOptionsApplyConfiguration{}
case v0alpha1.SchemeGroupVersion.WithKind("SyncOptions"):