Documentation
¶
Index ¶
- func ListNamespaces(ctx context.Context, reader client.Reader, opts ...client.ListOption) (corev1.NamespaceList, error)
- func ListPods(ctx context.Context, reader client.Reader, opts ...client.ListOption) (corev1.PodList, error)
- func ListPodsForApplication(ctx context.Context, reader client.Reader, name, namespace string) (corev1.PodList, error)
- func ListReplicaSetsForApplication(ctx context.Context, reader client.Reader, name, namespace string) (appsv1.ReplicaSetList, error)
- func ListSharedNamespaces(ctx context.Context, reader client.Reader) (corev1.NamespaceList, error)
- func ObjectMeta(name, namespace string, labels map[string]string) metav1.ObjectMeta
- func OpaqueSecret(objectMeta metav1.ObjectMeta, stringData map[string]string) corev1.Secret
- func UniformResourceName(resource metav1.Object, clusterName string) string
- type SecretLists
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListNamespaces ¶
func ListNamespaces(ctx context.Context, reader client.Reader, opts ...client.ListOption) (corev1.NamespaceList, error)
func ListPodsForApplication ¶
func ListSharedNamespaces ¶
func ObjectMeta ¶
func ObjectMeta(name, namespace string, labels map[string]string) metav1.ObjectMeta
func OpaqueSecret ¶
Types ¶
type SecretLists ¶
type SecretLists struct { Used corev1.SecretList Unused corev1.SecretList }
func ListSecretsForApplication ¶
func ListSecretsForApplication(ctx context.Context, reader client.Reader, application client.ObjectKey, secretLabels client.MatchingLabels) (SecretLists, error)
ListSecretsForApplication finds all secrets matching the given labels and partitions them into SecretLists. A secret is considered "used" if it is mounted or referred to by a pod or any replica set that matches the given application.
func ListUsedAndUnusedSecretsForPods ¶
func ListUsedAndUnusedSecretsForPods(secrets corev1.SecretList, pods corev1.PodList) SecretLists
ListUsedAndUnusedSecretsForPods finds intersect between list of secrets and list of pods that uses (i.e. mounts or refers to the secret) these secrets, and separates the secret list into two lists; used and unused.
This is a low-level method that requires you to perform the list operations for the secrets and pod objects yourself. In most cases, you should prefer using ListSecretsForApplication instead.
Click to show internal directories.
Click to hide internal directories.