Documentation ¶
Index ¶
- func ConvertJsonToYaml(data []byte) ([]byte, error)
- func ConvertYamlToJson(data []byte) ([]byte, error)
- func CreateOrUpdateClusterCAIssuerSecret(k8sClient *K8SClient, caCertData, caKeyData, caCertChainData []byte) error
- func CreateOrUpdateClusterIssuer(clusterCAIssuer string, k8sclient *K8SClient, forceUpdate bool) (*cert.CertificatesData, error)
- func GetK8SConfig(log logging.Logger) (*rest.Config, error)
- func RegisterDynamicInformers(resEvtHandler cache.ResourceEventHandler, client dynamic.Interface, ...) error
- func SetupCACertIssuser(clusterIssuerName string, log logging.Logger) error
- type Configuration
- type DynamicClientSet
- func (dc *DynamicClientSet) CreateResource(ctx context.Context, data []byte, clusterResource bool) (string, string, error)
- func (dc *DynamicClientSet) CreateResourceFromFile(ctx context.Context, filename string) (string, string, error)
- func (dc *DynamicClientSet) GetNameNamespace(jsonByte []byte) (string, string, error)
- func (dc *DynamicClientSet) GetResource(ctx context.Context, filename string) (*unstructured.Unstructured, error)
- func (dc *DynamicClientSet) ListAllNamespaceResource(ctx context.Context, gvk schema.GroupVersionResource) (*unstructured.UnstructuredList, error)
- func (dc *DynamicClientSet) ListNamespaceResource(ctx context.Context, gvk schema.GroupVersionResource, ns string) (*unstructured.UnstructuredList, error)
- type ExternalSecret
- type ExternalSecretData
- type ExternalSecretDataRemoteRef
- type ExternalSecretSpec
- type ExternalSecretTarget
- type ExternalSecretTargetTemplate
- type K8SClient
- func (k *K8SClient) CreateConfigmap(ctx context.Context, namespace, cmName string, data map[string]string, ...) error
- func (k *K8SClient) CreateNamespace(ctx context.Context, namespace string) error
- func (k *K8SClient) CreateOrUpdateClusterRoleBinding(ctx context.Context, serviceAccounts map[string]string, clusterRole string) error
- func (k *K8SClient) CreateOrUpdateExternalSecret(ctx context.Context, ...) (err error)
- func (k *K8SClient) CreateOrUpdateSecret(ctx context.Context, namespace, secretName string, secretType v1.SecretType, ...) error
- func (k *K8SClient) CreateOrUpdateSecretObject(ctx context.Context, secret *v1.Secret) error
- func (k *K8SClient) CreateOrUpdateSecretStore(ctx context.Context, ...) (err error)
- func (k *K8SClient) CreateOrUpdateServiceAccount(ctx context.Context, namespace, serviceAccountName string) error
- func (k *K8SClient) DeleteConfigmap(ctx context.Context, namespace, cmName string) error
- func (k *K8SClient) DeleteNamespace(ctx context.Context, namespace string) error
- func (k *K8SClient) DeleteSecret(ctx context.Context, namespace, secretName string) error
- func (k *K8SClient) GetConfigmap(ctx context.Context, namespace, cmName string) (map[string]string, error)
- func (k *K8SClient) GetSecretData(namespace, secretName string) (*SecretData, error)
- func (k *K8SClient) GetSecretObject(namespace, secretName string) (*v1.Secret, error)
- func (k *K8SClient) GetServiceData(namespace, serviceName string) (*ServiceData, error)
- func (k *K8SClient) ListPods(namespace string) ([]v1.Pod, error)
- func (k *K8SClient) UpdateConfigmap(ctx context.Context, namespace, cmName string, data map[string]string) error
- type ObjectMeta
- type SecretData
- type SecretKeySelector
- type SecretStore
- type SecretStoreProvider
- type SecretStoreRef
- type SecretStoreSpec
- type ServiceData
- type VaultAuth
- type VaultProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertJsonToYaml ¶
func ConvertYamlToJson ¶
func RegisterDynamicInformers ¶
func RegisterDynamicInformers(resEvtHandler cache.ResourceEventHandler, client dynamic.Interface, gvr schema.GroupVersionResource, ) error
Types ¶
type Configuration ¶
type Configuration struct {
KubeconfigPath string `envconfig:"KUBECONFIG_PATH" required:"false"`
}
func FetchConfiguration ¶
func FetchConfiguration() (*Configuration, error)
type DynamicClientSet ¶
type DynamicClientSet struct {
// contains filtered or unexported fields
}
func NewDynamicClientSet ¶
func NewDynamicClientSet(dynamicClient dynamic.Interface) *DynamicClientSet
func (*DynamicClientSet) CreateResource ¶
func (*DynamicClientSet) CreateResourceFromFile ¶
func (*DynamicClientSet) GetNameNamespace ¶
func (dc *DynamicClientSet) GetNameNamespace(jsonByte []byte) (string, string, error)
func (*DynamicClientSet) GetResource ¶
func (dc *DynamicClientSet) GetResource(ctx context.Context, filename string) (*unstructured.Unstructured, error)
func (*DynamicClientSet) ListAllNamespaceResource ¶
func (dc *DynamicClientSet) ListAllNamespaceResource(ctx context.Context, gvk schema.GroupVersionResource) (*unstructured.UnstructuredList, error)
func (*DynamicClientSet) ListNamespaceResource ¶
func (dc *DynamicClientSet) ListNamespaceResource(ctx context.Context, gvk schema.GroupVersionResource, ns string) (*unstructured.UnstructuredList, error)
type ExternalSecret ¶
type ExternalSecret struct { Kind string `yaml:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"` APIVersion string `yaml:"apiVersion,omitempty" protobuf:"bytes,2,opt,name=apiVersion"` Metadata ObjectMeta `yaml:"metadata,omitempty"` Spec ExternalSecretSpec `yaml:"spec,omitempty"` }
type ExternalSecretData ¶
type ExternalSecretData struct { SecretKey string `yaml:"secretKey"` RemoteRef ExternalSecretDataRemoteRef `yaml:"remoteRef"` }
type ExternalSecretSpec ¶
type ExternalSecretSpec struct { SecretStoreRef SecretStoreRef `yaml:"secretStoreRef,omitempty"` Target ExternalSecretTarget `yaml:"target,omitempty"` RefreshInterval string `yaml:"refreshInterval,omitempty"` Data []ExternalSecretData `yaml:"data,omitempty"` }
type ExternalSecretTarget ¶
type ExternalSecretTarget struct { Name string `yaml:"name,omitempty"` Template ExternalSecretTargetTemplate `yaml:"template,omitempty"` }
type ExternalSecretTargetTemplate ¶
type ExternalSecretTargetTemplate struct {
Type string `yaml:"type,omitempty"`
}
type K8SClient ¶
type K8SClient struct { Clientset kubernetes.Interface DynamicClientInterface dynamic.Interface DynamicClient *DynamicClientSet Config *rest.Config // contains filtered or unexported fields }
func NewK8SClientForCluster ¶
func (*K8SClient) CreateConfigmap ¶
func (*K8SClient) CreateNamespace ¶
func (*K8SClient) CreateOrUpdateClusterRoleBinding ¶
func (*K8SClient) CreateOrUpdateExternalSecret ¶
func (*K8SClient) CreateOrUpdateSecret ¶
func (*K8SClient) CreateOrUpdateSecretObject ¶
func (*K8SClient) CreateOrUpdateSecretStore ¶
func (*K8SClient) CreateOrUpdateServiceAccount ¶
func (*K8SClient) DeleteConfigmap ¶
func (*K8SClient) DeleteNamespace ¶
func (*K8SClient) DeleteSecret ¶
func (*K8SClient) GetConfigmap ¶
func (*K8SClient) GetSecretData ¶
func (k *K8SClient) GetSecretData(namespace, secretName string) (*SecretData, error)
func (*K8SClient) GetSecretObject ¶
func (*K8SClient) GetServiceData ¶
func (k *K8SClient) GetServiceData(namespace, serviceName string) (*ServiceData, error)
type ObjectMeta ¶
type SecretData ¶
type SecretKeySelector ¶
type SecretStore ¶
type SecretStore struct { Kind string `yaml:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"` APIVersion string `yaml:"apiVersion,omitempty" protobuf:"bytes,2,opt,name=apiVersion"` Metadata ObjectMeta `yaml:"metadata,omitempty"` Spec SecretStoreSpec `yaml:"spec,omitempty"` }
type SecretStoreProvider ¶
type SecretStoreProvider struct {
Vault *VaultProvider `yaml:"vault,omitempty"`
}
type SecretStoreRef ¶
type SecretStoreSpec ¶
type SecretStoreSpec struct { Provider *SecretStoreProvider `yaml:"provider"` RefreshInterval int `yaml:"refreshInterval,omitempty"` }
type ServiceData ¶
type VaultAuth ¶
type VaultAuth struct {
TokenSecretRef *SecretKeySelector `yaml:"tokenSecretRef,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.