Documentation ¶
Index ¶
- Constants
- func NewClusterIPService(role *model.Role, headless bool) (*apiv1.Service, error)
- func NewDeployment(role *model.Role, settings *ExportSettings) (*extra.Deployment, *apiv1.Service, error)
- func NewJob(role *model.Role, settings *ExportSettings) (*extra.Job, error)
- func NewPodTemplate(role *model.Role, settings *ExportSettings) (v1.PodTemplateSpec, error)
- func NewSecret(name string) *apiv1.Secret
- func NewStatefulSet(role *model.Role, settings *ExportSettings) (*v1beta1.StatefulSet, *v1.List, error)
- func WriteYamlConfig(kubeObject runtime.Object, writer io.Writer) error
- type ExportSettings
- type SecretRef
- type SecretRefMap
Constants ¶
const ( // RoleNameLabel is a thing RoleNameLabel = "skiff-role-name" // VolumeStorageClassAnnotation is the annotation label for storage/v1beta1/StorageClass VolumeStorageClassAnnotation = "volume.beta.kubernetes.io/storage-class" )
Variables ¶
This section is empty.
Functions ¶
func NewClusterIPService ¶
NewClusterIPService creates a new k8s ClusterIP service
func NewDeployment ¶
func NewDeployment(role *model.Role, settings *ExportSettings) (*extra.Deployment, *apiv1.Service, error)
NewDeployment creates a Deployment for the given role, and its attached service
func NewPodTemplate ¶
func NewPodTemplate(role *model.Role, settings *ExportSettings) (v1.PodTemplateSpec, error)
NewPodTemplate creates a new pod template spec for a given role, as well as any objects it depends on
func NewStatefulSet ¶
func NewStatefulSet(role *model.Role, settings *ExportSettings) (*v1beta1.StatefulSet, *v1.List, error)
NewStatefulSet returns a k8s stateful set for the given role
Types ¶
type ExportSettings ¶
type ExportSettings struct { Repository string Defaults map[string]string Registry string Organization string UseMemoryLimits bool FissileVersion string Opinions *model.Opinions Secrets SecretRefMap }
ExportSettings are configuration for creating Kubernetes configs
type SecretRefMap ¶
SecretRefMap maps the names of secret CVs to the combination of secret and key used to store their value. Note that the key has to be stored, because of the transformation at (**). Ok, not truly, but then we would have to replicate the transform at the place where the mapping is used. I prefer to do it only once.
func MakeSecrets ¶
func MakeSecrets(secrets model.CVMap, defaults map[string]string) ([]*apiv1.Secret, SecretRefMap, error)
MakeSecrets creates an array of new Secrets filled with the key/value pairs from the specified map. It further returns a map showing which original CV name maps to what secret+key combination.