Documentation ¶
Index ¶
- Constants
- func FromInt(i int32) intstr.IntOrString
- func FromString(s string) intstr.IntOrString
- func ResourceName(fullName string) string
- type DaemonSet
- func (ds *DaemonSet) Content() string
- func (ds *DaemonSet) Destroy(cs k8s.Client, events chan string) error
- func (ds *DaemonSet) GetCurrent(cs k8s.Client) (interface{}, error)
- func (ds *DaemonSet) IsEqual(other interface{}) ([]string, bool, error)
- func (ds *DaemonSet) IsValidState(cs k8s.Client) (bool, string, error)
- func (ds *DaemonSet) Name() string
- func (ds *DaemonSet) Namespace() string
- func (ds *DaemonSet) ObjectMeta() *k8s.ObjectMeta
- func (ds *DaemonSet) Start(cs k8s.Client, events chan string) error
- type Deployment
- func (ds *Deployment) Content() string
- func (ds *Deployment) Destroy(cs k8s.Client, events chan string) error
- func (ds *Deployment) GetCurrent(cs k8s.Client) (interface{}, error)
- func (ds *Deployment) IsEqual(other interface{}) ([]string, bool, error)
- func (ds *Deployment) IsValidState(cs k8s.Client) (bool, string, error)
- func (ds *Deployment) Name() string
- func (ds *Deployment) Namespace() string
- func (ds *Deployment) ObjectMeta() *k8s.ObjectMeta
- func (ds *Deployment) Start(cs k8s.Client, events chan string) error
- type Ingress
- func (ds *Ingress) Content() string
- func (ds *Ingress) Destroy(cs k8s.Client, events chan string) error
- func (ds *Ingress) GetCurrent(cs k8s.Client) (interface{}, error)
- func (ds *Ingress) IsEqual(other interface{}) ([]string, bool, error)
- func (ds *Ingress) IsValidState(cs k8s.Client) (bool, string, error)
- func (ds *Ingress) Name() string
- func (ds *Ingress) Namespace() string
- func (ds *Ingress) ObjectMeta() *k8s.ObjectMeta
- func (ds *Ingress) Start(cs k8s.Client, events chan string) error
- type Job
- func (ds *Job) Content() string
- func (ds *Job) Destroy(cs k8s.Client, events chan string) error
- func (ds *Job) GetCurrent(cs k8s.Client) (interface{}, error)
- func (ds *Job) IsEqual(other interface{}) ([]string, bool, error)
- func (ds *Job) IsValidState(cs k8s.Client) (bool, string, error)
- func (ds *Job) Name() string
- func (ds *Job) Namespace() string
- func (ds *Job) ObjectMeta() *k8s.ObjectMeta
- func (ds *Job) Start(cs k8s.Client, events chan string) error
- type Secret
- func (ds *Secret) Content() string
- func (ds *Secret) Destroy(cs k8s.Client, events chan string) error
- func (ds *Secret) GetCurrent(cs k8s.Client) (interface{}, error)
- func (ds *Secret) IsEqual(other interface{}) ([]string, bool, error)
- func (ds *Secret) IsValidState(cs k8s.Client) (bool, string, error)
- func (ds *Secret) Name() string
- func (ds *Secret) Namespace() string
- func (ds *Secret) ObjectMeta() *k8s.ObjectMeta
- func (ds *Secret) Start(cs k8s.Client, events chan string) error
- type Service
- func (ds *Service) Content() string
- func (ds *Service) Destroy(cs k8s.Client, events chan string) error
- func (ds *Service) GetCurrent(cs k8s.Client) (interface{}, error)
- func (ds *Service) IsEqual(other interface{}) ([]string, bool, error)
- func (ds *Service) IsValidState(cs k8s.Client) (bool, string, error)
- func (ds *Service) Name() string
- func (ds *Service) Namespace() string
- func (ds *Service) ObjectMeta() *k8s.ObjectMeta
- func (ds *Service) Start(cs k8s.Client, events chan string) error
Constants ¶
const ( // label keys LabelPrefix = "j2." LabelJobName = LabelPrefix + "job.name" LabelTaskGroupName = LabelPrefix + "taskgroup.name" LabelTaskGroupFullName = LabelPrefix + "taskgroup.fullname" LabelPodName = LabelPrefix + "pod.name" )
const ( // environment variable names EnvVarPodIP = "J2_POD_IP" EnvVarPodName = "J2_POD_NAME" EnvVarNodeName = "J2_NODE_NAME" EnvVarNamespace = "J2_NAMESPACE" // Secret related EnvVarClusterID = "CLUSTER_ID" EnvVarVaultAddress = "VAULT_ADDR" EnvVarVaultCACert = "VAULT_CACERT" EnvVarVaultCAPath = "VAULT_CAPATH" )
const ( // Well known secret names SecretClusterInfo = "j2-cluster-info" SecretVaultInfo = "j2-vault-info" )
const ( // Docker registry secret field names DockerRegistrySecretDataFieldDockerConfigJSON = ".dockerconfigjson" DockerRegistrySecretTypeDockerConfigJSON = "kubernetes.io/dockerconfigjson" )
const (
// Load-balancer names
LoadBalancerDNS = "lb-lb-srv.base"
)
Variables ¶
This section is empty.
Functions ¶
func FromInt ¶
func FromInt(i int32) intstr.IntOrString
func FromString ¶
func FromString(s string) intstr.IntOrString
func ResourceName ¶
ResourceName replaces all characters in the given name that are not valid for K8S resource names.
Types ¶
type DaemonSet ¶
DaemonSet is a wrapper for a kubernetes v1beta1.DaemonSet that implements scheduler.UnitData.
func (*DaemonSet) GetCurrent ¶
GetCurrent loads the current version of the object on the cluster
func (*DaemonSet) IsEqual ¶
IsEqual returns true of all values configured in myself are the same in the other object.
func (*DaemonSet) IsValidState ¶
IsValidState returns true if the current state of the resource on the cluster is OK.
func (*DaemonSet) ObjectMeta ¶
func (ds *DaemonSet) ObjectMeta() *k8s.ObjectMeta
ObjectMeta returns the ObjectMeta of the resource.
type Deployment ¶
type Deployment struct {
k8s.Deployment
}
Deployment is a wrapper for a kubernetes v1beta1.Deployment that implements scheduler.UnitData.
func (*Deployment) Content ¶
func (ds *Deployment) Content() string
Content returns a JSON representation of the resource.
func (*Deployment) Destroy ¶
func (ds *Deployment) Destroy(cs k8s.Client, events chan string) error
Destroy deletes the deployment from the cluster.
func (*Deployment) GetCurrent ¶
func (ds *Deployment) GetCurrent(cs k8s.Client) (interface{}, error)
GetCurrent loads the current version of the object on the cluster
func (*Deployment) IsEqual ¶
func (ds *Deployment) IsEqual(other interface{}) ([]string, bool, error)
IsEqual returns true of all values configured in myself are the same in the other object.
func (*Deployment) IsValidState ¶
IsValidState returns true if the current state of the resource on the cluster is OK.
func (*Deployment) Namespace ¶
func (ds *Deployment) Namespace() string
Namespace returns the namespace the resource should be added to.
func (*Deployment) ObjectMeta ¶
func (ds *Deployment) ObjectMeta() *k8s.ObjectMeta
ObjectMeta returns the ObjectMeta of the resource.
type Ingress ¶
Ingress is a wrapper for a kubernetes v1beta1.Ingress that implements scheduler.UnitData.
func (*Ingress) GetCurrent ¶
GetCurrent loads the current version of the object on the cluster
func (*Ingress) IsEqual ¶
IsEqual returns true of all values configured in myself are the same in the other object.
func (*Ingress) IsValidState ¶
IsValidState returns true if the current state of the resource on the cluster is OK.
func (*Ingress) ObjectMeta ¶
func (ds *Ingress) ObjectMeta() *k8s.ObjectMeta
ObjectMeta returns the ObjectMeta of the resource.
type Job ¶
Job is a wrapper for a kubernetes batch.Job that implements scheduler.UnitData.
func (*Job) GetCurrent ¶
GetCurrent loads the current version of the object on the cluster
func (*Job) IsEqual ¶
IsEqual returns true of all values configured in myself are the same in the other object.
func (*Job) IsValidState ¶
IsValidState returns true if the current state of the resource on the cluster is OK.
func (*Job) ObjectMeta ¶
func (ds *Job) ObjectMeta() *k8s.ObjectMeta
ObjectMeta returns the ObjectMeta of the resource.
type Secret ¶
Secret is a wrapper for a kubernetes v1.Secret that implements scheduler.UnitData.
func (*Secret) GetCurrent ¶
GetCurrent loads the current version of the object on the cluster
func (*Secret) IsEqual ¶
IsEqual returns true of all values configured in myself are the same in the other object.
func (*Secret) IsValidState ¶
IsValidState returns true if the current state of the resource on the cluster is OK.
func (*Secret) ObjectMeta ¶
func (ds *Secret) ObjectMeta() *k8s.ObjectMeta
ObjectMeta returns the ObjectMeta of the resource.
type Service ¶
Service is a wrapper for a kubernetes v1.Service that implements scheduler.UnitData.
func (*Service) GetCurrent ¶
GetCurrent loads the current version of the object on the cluster
func (*Service) IsEqual ¶
IsEqual returns true of all values configured in myself are the same in the other object.
func (*Service) IsValidState ¶
IsValidState returns true if the current state of the resource on the cluster is OK.
func (*Service) ObjectMeta ¶
func (ds *Service) ObjectMeta() *k8s.ObjectMeta
ObjectMeta returns the ObjectMeta of the resource.