Documentation ¶
Index ¶
- Constants
- func AppClientID(source resource.Source, cluster string) string
- func ConfigureAffinity(appName string, tolerations []corev1.Toleration) *corev1.Affinity
- func CreateAppContainer(app Source, ast *resource.Ast, cfg Config) error
- func CreateAppObjectMeta(app Source, ast *resource.Ast, cfg Config) metav1.ObjectMeta
- func CreateContainerEnvVars(app EnvSource, ast *resource.Ast, cfg Config)
- func CreateNaisjobContainer(naisjob *nais_io_v1.Naisjob, ast *resource.Ast, cfg Config) error
- func CreateNaisjobObjectMeta(naisjob *nais_io_v1.Naisjob, ast *resource.Ast, cfg Config) metav1.ObjectMeta
- func CreateSpec(ast *resource.Ast, cfg Config, appName string, annotations map[string]string, ...) (*corev1.PodSpec, error)
- func DefaultContainerSecurityContext() *corev1.SecurityContext
- func EnvFromSecret(name string) corev1.EnvFromSource
- func FilesFromEmptyDir(volumeName string, medium nais_io_v1.MediumType) corev1.Volume
- func FromFilesPVCVolume(volumeName, pvcName string) corev1.Volume
- func FromFilesSecretVolume(volumeName, secretName string, items []corev1.KeyToPath) corev1.Volume
- func FromFilesSecretVolumeWithMode(volumeName, secretName string, items []corev1.KeyToPath, mode *int32) corev1.Volume
- func FromFilesVolumeMount(name, mountPath, defaultMountPath string, readOnly bool) corev1.VolumeMount
- func ResourceLimits(reqs nais_io_v1.ResourceRequirements) corev1.ResourceRequirements
- func SetupTolerations(cfg Config, image string) []corev1.Toleration
- func WithAdditionalEnvFromSecret(ast *resource.Ast, secretName string)
- func WithAdditionalSecret(ast *resource.Ast, secretName, mountPath string)
- type Config
- type EnvSource
- type Source
Constants ¶
View Source
const ( NaisGarTolerationKey = "nais.io/gar" NaisGarNodeSelectorKey = "nais.io/gar-node-pool" GarImagePrefix = "europe-north1-docker.pkg.dev/" )
Variables ¶
This section is empty.
Functions ¶
func ConfigureAffinity ¶
func ConfigureAffinity(appName string, tolerations []corev1.Toleration) *corev1.Affinity
func CreateAppObjectMeta ¶
func CreateContainerEnvVars ¶
func CreateNaisjobContainer ¶
func CreateNaisjobObjectMeta ¶
func CreateNaisjobObjectMeta(naisjob *nais_io_v1.Naisjob, ast *resource.Ast, cfg Config) metav1.ObjectMeta
func CreateSpec ¶
func DefaultContainerSecurityContext ¶
func DefaultContainerSecurityContext() *corev1.SecurityContext
func EnvFromSecret ¶
func EnvFromSecret(name string) corev1.EnvFromSource
func FilesFromEmptyDir ¶
func FilesFromEmptyDir(volumeName string, medium nais_io_v1.MediumType) corev1.Volume
func FromFilesPVCVolume ¶
func FromFilesSecretVolume ¶
func FromFilesVolumeMount ¶
func FromFilesVolumeMount(name, mountPath, defaultMountPath string, readOnly bool) corev1.VolumeMount
func ResourceLimits ¶
func ResourceLimits(reqs nais_io_v1.ResourceRequirements) corev1.ResourceRequirements
func SetupTolerations ¶
func SetupTolerations(cfg Config, image string) []corev1.Toleration
func WithAdditionalSecret ¶
Types ¶
type EnvSource ¶
type EnvSource interface { resource.Source GetEnv() nais_io_v1.EnvVars GetImage() string }
type Source ¶
type Source interface { resource.Source GetCommand() []string GetEnv() nais_io_v1.EnvVars GetEnvFrom() []nais_io_v1.EnvFrom GetFilesFrom() []nais_io_v1.FilesFrom GetImage() string GetLiveness() *nais_io_v1.Probe GetLogformat() string GetLogtransform() string GetPort() int GetPreStopHook() *nais_io_v1.PreStopHook GetPreStopHookPath() string GetPrometheus() *nais_io_v1.PrometheusConfig GetReadiness() *nais_io_v1.Probe GetResources() *nais_io_v1.ResourceRequirements GetStartup() *nais_io_v1.Probe }
Click to show internal directories.
Click to hide internal directories.