Documentation ¶
Index ¶
- Variables
- func CreateSecret(secretResource dynamic.ResourceInterface, secret *corev1.Secret) (*corev1.Secret, error)
- func CreateSecretForCluster(client *rancher.Client, secret *corev1.Secret, clusterID, namespace string) (*corev1.Secret, error)
- func GetSecretByName(client *rancher.Client, clusterID, namespace, secretName string, ...) (*coreV1.Secret, error)
- func NewBasicAuthSecret(name, namespace, username, password string) *coreV1.Secret
- func PatchSecret(client *rancher.Client, clusterID, secretName, namespace string, ...) (*coreV1.Secret, error)
- type PatchOP
- type SecretList
Constants ¶
This section is empty.
Variables ¶
var SecretGroupVersionResource = schema.GroupVersionResource{
Group: "",
Version: "v1",
Resource: "secrets",
}
SecretGroupVersionResource is the required Group Version Resource for accessing secrets in a cluster, using the dynamic client.
Functions ¶
func CreateSecret ¶
func CreateSecret(secretResource dynamic.ResourceInterface, secret *corev1.Secret) (*corev1.Secret, error)
CreateSecret is a helper function that uses the dynamic client to create a secret in a namespace for a specific cluster.
func CreateSecretForCluster ¶
func CreateSecretForCluster(client *rancher.Client, secret *corev1.Secret, clusterID, namespace string) (*corev1.Secret, error)
CreateSecretForCluster is a helper function that uses the rancher client to create a secret in a namespace for a specific cluster.
func GetSecretByName ¶
func GetSecretByName(client *rancher.Client, clusterID, namespace, secretName string, getOpts metav1.GetOptions) (*coreV1.Secret, error)
GetSecretByName is a helper function that uses the dynamic client to get a specific secret on a namespace for a specific cluster.
func NewBasicAuthSecret ¶
NewBasicAuthSecret is a constructor for a Basic Auth secret type
func PatchSecret ¶
func PatchSecret(client *rancher.Client, clusterID, secretName, namespace string, patchType types.PatchType, patchOp PatchOP, patchPath, patchData string, patchOpts metav1.PatchOptions) (*coreV1.Secret, error)
PatchSecret is a helper function that uses the dynamic client to patch a secret in a namespace for a specific cluster. Different secret operations are supported: add, replace, remove.
Types ¶
type SecretList ¶
SecretList is a struct that contains a list of secrets.
func ListSecrets ¶
func ListSecrets(client *rancher.Client, clusterID, namespace string, listOpts metav1.ListOptions) (*SecretList, error)
ListSecrets is a helper function that uses the dynamic client to list secrets in a cluster with its list options.
func (*SecretList) Names ¶
func (list *SecretList) Names() []string
Names is a method that accepts SecretList as a receiver, returns each secret name in the list as a new slice of strings.