Skip to content

Commit

Permalink
feat(api): add credential comment for api (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
whg517 authored Sep 20, 2024
1 parent 8c1be5e commit f2ea2c1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions pkg/apis/authentication/v1alpha1/authentication_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ type OIDCProvider struct {
// +kubebuilder:validation:Optional
Port int `json:"port,omitempty"`

// +kubebuilder:validation:Required
PrincipalClaim string `json:"principalClaim"`

// +kubebuilder:validation:Required
Expand Down Expand Up @@ -89,11 +90,17 @@ type StaticProvider struct {
}

type StaticCredentialsSecret struct {
// The secret name that contains the user credentials.
// The data contained in secret is related to the data required for the specific product certification function.
// +kubebuilder:validation:Required
Name string `json:"name"`
}

type LDAPProvider struct {
// Provide ldap credentials mounts for Pods via k8s-search secret-class.
// The secret searched by k8s-search must contain the following data:
// - user: bind user, e.g. cn=admin,dc=example,dc=com
// - password: bind password
// +kubebuilder:validation:Required
BindCredentials *commonsv1alpha1.Credentials `json:"bindCredentials"`

Expand Down
4 changes: 3 additions & 1 deletion pkg/apis/s3/v1alpha1/s3_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ import (
// S3ConnectionSpec defines the desired credential of S3Connection
type S3ConnectionSpec struct {

// Provides access credentials for S3Connection through SecretClass. SecretClass only needs to include the ACCESS_KEY and SECRET_KEY fields.
// Provides access credentials for S3Connection through SecretClass. SecretClass only needs to include:
// - ACCESS_KEY
// - SECRET_KEY
// +kubebuilder:validation:Required
Credentials *commonsv1alpha1.Credentials `json:"credentials"`

Expand Down

0 comments on commit f2ea2c1

Please sign in to comment.