Documentation ¶
Index ¶
- Constants
- func DeleteRadiusSecret(ctx context.Context, oldResource *datamodel.SecretStore, ...) (rest.Response, error)
- func NewListSecrets(opts ctrl.Options) (ctrl.Controller, error)
- func UpsertSecret(ctx context.Context, newResource, old *datamodel.SecretStore, ...) (rest.Response, error)
- func ValidateAndMutateRequest(ctx context.Context, newResource *datamodel.SecretStore, ...) (rest.Response, error)
- type ListSecrets
Constants ¶
const ( // ResourceTypeName is the resource type name for secret stores. ResourceTypeName = "Applications.Core/secretStores" // UsernameKey is a required key in a secret store when SecretType is Basic Authentication. UsernameKey = "username" // PasswordKey is a required key in a secret store when SecretType is Basic Authentication. PasswordKey = "password" // ClientIdKey is a required key in a secret store when SecretType is Azure Workload Identity. ClientIdKey = "clientId" // TenantIdKey is a required key in a secret store when SecretType is Azure workload Identity. TenantIdKey = "tenantId" // RoleARNKey is a required key in a secret store when SecretType is AWS IRSA. RoleARNKey = "roleARN" )
const (
OperationListSecrets = "LISTSECRETS"
)
Variables ¶
This section is empty.
Functions ¶
func DeleteRadiusSecret ¶
func DeleteRadiusSecret(ctx context.Context, oldResource *datamodel.SecretStore, options *controller.Options) (rest.Response, error)
DeleteRadiusSecret deletes the Kubernetes secret associated with the given secret store if it is a Radius managed resource.
func NewListSecrets ¶
func NewListSecrets(opts ctrl.Options) (ctrl.Controller, error)
NewListSecrets creates a new controller for listing secrets from the secret store.
func UpsertSecret ¶
func UpsertSecret(ctx context.Context, newResource, old *datamodel.SecretStore, options *controller.Options) (rest.Response, error)
UpsertSecret creates or updates a Kubernetes secret based on the incoming request and returns the secret's location in the output resource.
func ValidateAndMutateRequest ¶
func ValidateAndMutateRequest(ctx context.Context, newResource *datamodel.SecretStore, oldResource *datamodel.SecretStore, options *controller.Options) (rest.Response, error)
ValidateAndMutateRequest checks the type and encoding of the secret store, and ensures that the secret store data is valid and required keys are present for the secret type. If any of these checks fail, a BadRequestResponse is returned.
Types ¶
type ListSecrets ¶
type ListSecrets struct { ctrl.Operation[*datamodel.SecretStore, datamodel.SecretStore] }
ListSecrets is the controller implementing listSecret custom action for Applications.Core/secretStores.
func (*ListSecrets) Run ¶
func (l *ListSecrets) Run(ctx context.Context, w http.ResponseWriter, req *http.Request) (rest.Response, error)
Run retrieves the values of the referenced secret from Kubernetes and returns them in a response. If the secret is not found, an error is returned. Currently, we support only kubernetes secret store.