Documentation ¶
Index ¶
- func New(name string, ts Templates, o ...Option) *xpworkloadv1alpha1.KubernetesApplication
- type Option
- func WithAnnotations(annotations map[string]string) Option
- func WithCluster(c *corev1.ObjectReference) Option
- func WithClusterSelector(s *metav1.LabelSelector) Option
- func WithControllerReference(c *metav1.OwnerReference) Option
- func WithLabels(labels map[string]string) Option
- func WithNamespace(namespace string) Option
- func WithSecretMap(m SecretMap) Option
- type SecretMap
- type Templates
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(name string, ts Templates, o ...Option) *xpworkloadv1alpha1.KubernetesApplication
New returns a KubernetesApplication that will manage resources based on the supplied templates.
Types ¶
type Option ¶
type Option func(*options)
Option configures a Producer.
func WithAnnotations ¶
WithAnnotations configures the annotations of the produced application.
func WithCluster ¶
func WithCluster(c *corev1.ObjectReference) Option
WithCluster configures the cluster of the produced application, skipping scheduling.
func WithClusterSelector ¶
func WithClusterSelector(s *metav1.LabelSelector) Option
WithClusterSelector configures the cluster selector of the produced application. Applications will select all clusters by default.
func WithControllerReference ¶
func WithControllerReference(c *metav1.OwnerReference) Option
WithControllerReference configures the controller reference of the produced application. The supplied owner reference must not be nil.
func WithLabels ¶
WithLabels configures the labels of the produced application.
func WithNamespace ¶
WithNamespace configures the namespace of the produced application.
func WithSecretMap ¶
WithSecretMap configures the secret dependencies of the produced applciation.
type SecretMap ¶
type SecretMap map[corev1.ObjectReference][]string
A SecretMap associates resources with the secrets they depend upon.
func (SecretMap) Add ¶
func (s SecretMap) Add(u *unstructured.Unstructured, secretNames ...string)
Add secret dependencies.
func (SecretMap) Get ¶
func (s SecretMap) Get(u *unstructured.Unstructured) []string
Get secret dependencies.
type Templates ¶
type Templates []*unstructured.Unstructured
Templates used to create and manage resources on a remote KubernetesCluster.