Documentation ¶
Index ¶
- type Deployment
- func (d *Deployment) AuthToken() string
- func (d Deployment) BuildRevision() int
- func (d *Deployment) Copy() (*Deployment, error)
- func (d *Deployment) GetClusterPlan() *MapValue
- func (d *Deployment) GetContainers() []v1.Container
- func (d *Deployment) GetObject() *v1beta1.Deployment
- func (d *Deployment) GetStoragePlan() *MapValue
- func (d *Deployment) GitBranch() string
- func (d *Deployment) GitCompare() string
- func (d *Deployment) GitHubUser() *MapValue
- func (d *Deployment) GitHubWebHookSecret() string
- func (d *Deployment) GitRepository() string
- func (d *Deployment) GitRevision() (*SHA, error)
- func (d *Deployment) GitSource() string
- func (d *Deployment) HasAutoDeployAnnotation() bool
- func (d *Deployment) HasBuildAnnotation() bool
- func (d *Deployment) HasContainers() bool
- func (d *Deployment) HasMultipleReplicas() bool
- func (d *Deployment) HasSetupPVCAnnotation() bool
- func (d *Deployment) IsMarkedForDeletion() bool
- func (d *Deployment) PodSpec() *v1.PodSpec
- func (d *Deployment) SetClusterPlan(planName string)
- func (d *Deployment) SetStoragePlan(planName string)
- type DeploymentInterface
- type DraftMeta
- func (o *DraftMeta) GetAnnotation(key string) *MapValue
- func (o *DraftMeta) GetKubernetesObjectMeta() *metav1.ObjectMeta
- func (o *DraftMeta) GetLabel(key string) *MapValue
- func (o *DraftMeta) GetNamespaceMetadata() *NamespaceMeta
- func (o *DraftMeta) SetAnnotation(key, value string)
- func (o *DraftMeta) SetLabel(key, value string)
- type ErrInvalidGitSha
- type Ingress
- type MapValue
- type NamespaceMeta
- type Object
- type SHA
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deployment ¶
type Deployment struct { DraftMeta v1beta1.Deployment }
Deployment it's a draft for composing and acessing platform attributes from a v1beta1.Deployment more easily
func NewDeployment ¶
func NewDeployment(obj *v1beta1.Deployment) *Deployment
NewDeployment generates a new draft.Deployment
func (*Deployment) AuthToken ¶
func (d *Deployment) AuthToken() string
func (Deployment) BuildRevision ¶
func (d Deployment) BuildRevision() int
func (*Deployment) Copy ¶
func (d *Deployment) Copy() (*Deployment, error)
Copy performs a deep copy of the resource
func (*Deployment) GetClusterPlan ¶
func (d *Deployment) GetClusterPlan() *MapValue
func (*Deployment) GetContainers ¶
func (d *Deployment) GetContainers() []v1.Container
func (*Deployment) GetObject ¶
func (d *Deployment) GetObject() *v1beta1.Deployment
GetObject returns the original resource
func (*Deployment) GetStoragePlan ¶
func (d *Deployment) GetStoragePlan() *MapValue
func (*Deployment) GitBranch ¶
func (d *Deployment) GitBranch() string
func (*Deployment) GitCompare ¶
func (d *Deployment) GitCompare() string
func (*Deployment) GitHubUser ¶
func (d *Deployment) GitHubUser() *MapValue
func (*Deployment) GitHubWebHookSecret ¶
func (d *Deployment) GitHubWebHookSecret() string
func (*Deployment) GitRepository ¶
func (d *Deployment) GitRepository() string
func (*Deployment) GitRevision ¶
func (d *Deployment) GitRevision() (*SHA, error)
func (*Deployment) GitSource ¶
func (d *Deployment) GitSource() string
func (*Deployment) HasAutoDeployAnnotation ¶
func (d *Deployment) HasAutoDeployAnnotation() bool
func (*Deployment) HasBuildAnnotation ¶
func (d *Deployment) HasBuildAnnotation() bool
func (*Deployment) HasContainers ¶
func (d *Deployment) HasContainers() bool
func (*Deployment) HasMultipleReplicas ¶
func (d *Deployment) HasMultipleReplicas() bool
func (*Deployment) HasSetupPVCAnnotation ¶
func (d *Deployment) HasSetupPVCAnnotation() bool
func (*Deployment) IsMarkedForDeletion ¶
func (d *Deployment) IsMarkedForDeletion() bool
IsMarkedForDeletion verifies if the metadata.deletionTimestamp is set, meaning the resource is marked to be excluded
func (*Deployment) PodSpec ¶
func (d *Deployment) PodSpec() *v1.PodSpec
func (*Deployment) SetClusterPlan ¶
func (d *Deployment) SetClusterPlan(planName string)
func (*Deployment) SetStoragePlan ¶
func (d *Deployment) SetStoragePlan(planName string)
type DeploymentInterface ¶
type DeploymentInterface interface { Object // Labels GetClusterPlan() *MapValue GetStoragePlan() *MapValue SetStoragePlan(planName string) SetClusterPlan(planName string) // Annotations BuildRevision() int HasAutoDeployAnnotation() bool HasSetupPVCAnnotation() bool HasBuildAnnotation() bool GitRepository() string GitRevision() (*SHA, error) GitBranch() string GitSource() string GitCompare() string GitHubUser() string GitHubWebHookSecret() string AuthToken() string GetObject() *v1beta1.Deployment HasMultipleReplicas() bool IsMarkedForDeletion() bool GetContainers() []v1.Container HasContainers() bool PodSpec() *v1.PodSpec DeepCopy() (*Deployment, error) }
type DraftMeta ¶
type DraftMeta struct {
// contains filtered or unexported fields
}
DraftMeta contains common helper methods for all draft objects
func (*DraftMeta) GetAnnotation ¶
func (*DraftMeta) GetKubernetesObjectMeta ¶
func (o *DraftMeta) GetKubernetesObjectMeta() *metav1.ObjectMeta
func (*DraftMeta) GetNamespaceMetadata ¶
func (o *DraftMeta) GetNamespaceMetadata() *NamespaceMeta
GetNamespaceMetadata parses the kubernetes namespace and returns a *NamespaceMeta
func (*DraftMeta) SetAnnotation ¶
SetAnnotation initializes and add a new key-value annotation
type ErrInvalidGitSha ¶
type ErrInvalidGitSha struct {
// contains filtered or unexported fields
}
ErrInvalidGitSha is returned by NewSha if the given raw sha is invalid for any reason.
func (ErrInvalidGitSha) Error ¶
func (e ErrInvalidGitSha) Error() string
Error is the error interface implementation.
type Ingress ¶
Ingress provides the primitives for interacting with platform attributes
func NewIngress ¶
NewDeployment generates a new draft.Deployment
func (*Ingress) DomainPrimaryKeys ¶
DomainPrimaryKeys returns annotations matching domains, e.g.: 'kolihub.io/domain.tld'
type MapValue ¶
type MapValue struct {
Val string
}
MapValue represents the value from a map[string]string
type NamespaceMeta ¶
type NamespaceMeta struct {
// contains filtered or unexported fields
}
NamespaceMeta is a object to extract metadata information about a kubernetes namespace, the platform could enforce policies based with this information. The namespace is created using the JWT claims from an user
func NewNamespaceMetadata ¶
func NewNamespaceMetadata(namespace string) *NamespaceMeta
func (NamespaceMeta) Customer ¶
func (n NamespaceMeta) Customer() string
func (NamespaceMeta) IsValid ¶
func (n NamespaceMeta) IsValid() bool
func (NamespaceMeta) KubernetesNamespace ¶
func (n NamespaceMeta) KubernetesNamespace() string
func (NamespaceMeta) Namespace ¶
func (n NamespaceMeta) Namespace() string
func (NamespaceMeta) Organization ¶
func (n NamespaceMeta) Organization() string
func (NamespaceMeta) Valid ¶
func (n NamespaceMeta) Valid() bool
type Object ¶
type Object interface { GetKubernetesObjectMeta() *metav1.ObjectMeta GetLabel(key string) *MapValue GetAnnotation(key string) *MapValue GetNamespaceMetadata() *NamespaceMeta SetAnnotation(key, value string) SetLabel(key, value string) }