Documentation ¶
Index ¶
- Constants
- Variables
- func NatsGVK() schema.GroupVersionResource
- type Client
- type KubeClient
- func (c *KubeClient) APIRuleCRDExists(ctx context.Context) (bool, error)
- func (c *KubeClient) ApplicationCRDExists(ctx context.Context) (bool, error)
- func (c *KubeClient) DeleteClusterRole(ctx context.Context, name, namespace string) error
- func (c *KubeClient) DeleteClusterRoleBinding(ctx context.Context, name, namespace string) error
- func (c *KubeClient) DeleteDeployment(ctx context.Context, name, namespace string) error
- func (c *KubeClient) DeleteResource(ctx context.Context, object client.Object) error
- func (c *KubeClient) GetCRD(ctx context.Context, name string) (*kapiextensionsv1.CustomResourceDefinition, error)
- func (c *KubeClient) GetConfigMap(ctx context.Context, name, namespace string) (*kcorev1.ConfigMap, error)
- func (c *KubeClient) GetDeployment(ctx context.Context, name, namespace string) (*kappsv1.Deployment, error)
- func (c *KubeClient) GetDeploymentDynamic(ctx context.Context, name, namespace string) (*kappsv1.Deployment, error)
- func (c *KubeClient) GetNATSResources(ctx context.Context, namespace string) (*natsv1alpha1.NATSList, error)
- func (c *KubeClient) GetSecret(ctx context.Context, namespacedName string) (*kcorev1.Secret, error)
- func (c *KubeClient) GetSubscriptions(ctx context.Context) (*eventingv1alpha2.SubscriptionList, error)
- func (c *KubeClient) PatchApply(ctx context.Context, object client.Object) error
- func (c *KubeClient) PatchApplyPeerAuthentication(ctx context.Context, pa *istiopkgsecurityv1beta1.PeerAuthentication) error
- func (c *KubeClient) PeerAuthenticationCRDExists(ctx context.Context) (bool, error)
- func (c *KubeClient) UpdateDeployment(ctx context.Context, deployment *kappsv1.Deployment) error
Constants ¶
View Source
const ( // ApplicationCrdName defines the CRD name for Application of application-connector module. ApplicationCrdName string = "applications.applicationconnector.kyma-project.io" // ApplicationKind defines the Kind name for Application of application-connector module. ApplicationKind string = "Application" // ApplicationAPIVersion defines the API version for Application of application-connector module. ApplicationAPIVersion string = "applicationconnector.kyma-project.io/v1alpha1" // APIRuleCrdName defines the CRD name for APIRule of kyma api-gateway module. APIRuleCrdName string = "apirules.gateway.kyma-project.io" // PeerAuthenticationCRDName is the name of the Istio peer authentication CRD. PeerAuthenticationCRDName = "peerauthentications.security.istio.io" )
Variables ¶
View Source
var ErrSecretRefInvalid = errors.New("invalid namespaced name. It must be in the format of 'namespace/name'")
Functions ¶
func NatsGVK ¶
func NatsGVK() schema.GroupVersionResource
Types ¶
type Client ¶
type Client interface { GetDeployment(ctx context.Context, name, namespace string) (*kappsv1.Deployment, error) GetDeploymentDynamic(ctx context.Context, name, namespace string) (*kappsv1.Deployment, error) UpdateDeployment(ctx context.Context, deployment *kappsv1.Deployment) error DeleteDeployment(ctx context.Context, name, namespace string) error DeleteClusterRole(ctx context.Context, name, namespace string) error DeleteClusterRoleBinding(ctx context.Context, name, namespace string) error DeleteResource(ctx context.Context, object client.Object) error GetNATSResources(ctx context.Context, namespace string) (*natsv1alpha1.NATSList, error) PatchApply(ctx context.Context, object client.Object) error GetSecret(ctx context.Context, namespacedName string) (*kcorev1.Secret, error) GetCRD(ctx context.Context, name string) (*kapiextensionsv1.CustomResourceDefinition, error) ApplicationCRDExists(ctx context.Context) (bool, error) PeerAuthenticationCRDExists(ctx context.Context) (bool, error) APIRuleCRDExists(ctx context.Context) (bool, error) GetSubscriptions(ctx context.Context) (*eventingv1alpha2.SubscriptionList, error) GetConfigMap(ctx context.Context, name, namespace string) (*kcorev1.ConfigMap, error) PatchApplyPeerAuthentication(ctx context.Context, authentication *istiopkgsecurityv1beta1.PeerAuthentication) error }
func NewKubeClient ¶
type KubeClient ¶
type KubeClient struct {
// contains filtered or unexported fields
}
func (*KubeClient) APIRuleCRDExists ¶
func (c *KubeClient) APIRuleCRDExists(ctx context.Context) (bool, error)
func (*KubeClient) ApplicationCRDExists ¶
func (c *KubeClient) ApplicationCRDExists(ctx context.Context) (bool, error)
func (*KubeClient) DeleteClusterRole ¶
func (c *KubeClient) DeleteClusterRole(ctx context.Context, name, namespace string) error
func (*KubeClient) DeleteClusterRoleBinding ¶
func (c *KubeClient) DeleteClusterRoleBinding(ctx context.Context, name, namespace string) error
func (*KubeClient) DeleteDeployment ¶
func (c *KubeClient) DeleteDeployment(ctx context.Context, name, namespace string) error
func (*KubeClient) DeleteResource ¶
func (*KubeClient) GetCRD ¶
func (c *KubeClient) GetCRD(ctx context.Context, name string) (*kapiextensionsv1.CustomResourceDefinition, error)
func (*KubeClient) GetConfigMap ¶
func (c *KubeClient) GetConfigMap(ctx context.Context, name, namespace string) (*kcorev1.ConfigMap, error)
GetConfigMap returns a ConfigMap based on the given name and namespace.
func (*KubeClient) GetDeployment ¶
func (c *KubeClient) GetDeployment(ctx context.Context, name, namespace string) (*kappsv1.Deployment, error)
func (*KubeClient) GetDeploymentDynamic ¶
func (c *KubeClient) GetDeploymentDynamic(ctx context.Context, name, namespace string) (*kappsv1.Deployment, error)
func (*KubeClient) GetNATSResources ¶
func (c *KubeClient) GetNATSResources(ctx context.Context, namespace string) (*natsv1alpha1.NATSList, error)
func (*KubeClient) GetSecret ¶
GetSecret returns the secret with the given namespaced name. namespacedName is in the format of "namespace/name".
func (*KubeClient) GetSubscriptions ¶
func (c *KubeClient) GetSubscriptions(ctx context.Context) (*eventingv1alpha2.SubscriptionList, error)
func (*KubeClient) PatchApply ¶
PatchApply uses the server-side apply to create/update the resource. The object must define `GVK` (i.e. object.TypeMeta).
func (*KubeClient) PatchApplyPeerAuthentication ¶
func (c *KubeClient) PatchApplyPeerAuthentication(ctx context.Context, pa *istiopkgsecurityv1beta1.PeerAuthentication) error
PatchApplyPeerAuthentication creates the Istio PeerAuthentications.
func (*KubeClient) PeerAuthenticationCRDExists ¶
func (c *KubeClient) PeerAuthenticationCRDExists(ctx context.Context) (bool, error)
func (*KubeClient) UpdateDeployment ¶
func (c *KubeClient) UpdateDeployment(ctx context.Context, deployment *kappsv1.Deployment) error
Click to show internal directories.
Click to hide internal directories.