Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAppNamespaceHash ¶
We concatenate name, namespace and add a hash in order to avoid duplicate names when creating service accounts in common service accounts namespace. Also making sure to not exceed name length restrictions of 30 characters
func CreateObjectMeta ¶
func CreateObjectMeta(source Source) metav1.ObjectMeta
Types ¶
type Ast ¶
type Ast struct {
Operations Operations
// For podSpec
Annotations map[string]string
Containers []corev1.Container
Env []corev1.EnvVar
EnvFrom []corev1.EnvFromSource
InitContainers []corev1.Container
Labels map[string]string
Volumes []corev1.Volume
VolumeMounts []corev1.VolumeMount
}
func (*Ast) AppendEnv ¶
Use AppendEnv for adding environment variables that depend on other environment variables, or to ensure that they can not be overridden by the user.
func (*Ast) AppendOperation ¶
func (ast *Ast) AppendOperation(operationType OperationType, resource client.Object)
func (*Ast) PrependEnv ¶
Use PrependEnv for adding environment variables that can be referenced by other environment variables or allowed to be overriden by the user.
type Operation ¶
type Operation struct {
Resource client.Object `json:"resource"`
Operation OperationType `json:"operation"`
}
Operation is the combination of a Kubernetes resource and what operation to perform on it.
type OperationType ¶
type OperationType string
OperationType defines what should be done with a resource.
const ( OperationCreateOrUpdate OperationType = `CreateOrUpdate` OperationCreateOrRecreate OperationType = `CreateOrRecreate` OperationCreateIfNotExists OperationType = `CreateIfNotExists` OperationDeleteIfExists OperationType = `CreateDeleteIfExists` AnnotateIfExists OperationType = `AnnotateIfExists` )
type Operations ¶
type Operations []Operation
func (*Operations) Extract ¶
func (r *Operations) Extract(operation OperationType) Operations
Extract return a new slice of Operations where only one type of operation matches.
type Source ¶
type Source interface {
client.Object
metav1.ObjectMetaAccessor
metav1.Common
SetStatus(*nais_io_v1.Status)
GetStatus() *nais_io_v1.Status
GetObjectReference() corev1.ObjectReference
GetOwnerReference() metav1.OwnerReference
GetGCP() *nais_io_v1.GCP
GetPort() int
CorrelationID() string
SkipDeploymentMessage() bool
LogFields() log.Fields
ApplyDefaults() error
Hash(aivenGeneration int) (string, error)
}