Documentation ¶
Index ¶
- Constants
- func FindFluxHelmReleaseContainers(values map[string]interface{}, ...) error
- func Load(base string, paths []string) (map[string]resource.Resource, error)
- func ParseMultidoc(multidoc []byte, source string) (map[string]resource.Resource, error)
- type Args
- type ContainerPort
- type ContainerSpec
- type CronJob
- type CronJobSpec
- type DaemonSet
- type Deployment
- type DeploymentSpec
- type Env
- type EnvEntry
- type FluxHelmRelease
- func (o FluxHelmRelease) Bytes() []byte
- func (fhr FluxHelmRelease) Containers() []resource.Container
- func (o FluxHelmRelease) Policy() policy.Set
- func (o FluxHelmRelease) ResourceID() flux.ResourceID
- func (fhr FluxHelmRelease) SetContainerImage(container string, ref image.Ref) error
- func (o FluxHelmRelease) Source() string
- type ImageSetter
- type List
- type Namespace
- type ObjectMeta
- type PodSpec
- type PodTemplate
- type StatefulSet
- type StatefulSetSpec
- type Volume
- type VolumeMount
Constants ¶
const (
PolicyPrefix = "flux.weave.works/"
)
const ReleaseContainerName = "chart-image"
ReleaseContainerName is the name used when flux interprets a FluxHelmRelease as having a container with an image, by virtue of having a `values` stanza with an image field:
spec:
... values: image: some/image:version
The name refers to the source of the image value.
Variables ¶
This section is empty.
Functions ¶
func FindFluxHelmReleaseContainers ¶
func FindFluxHelmReleaseContainers(values map[string]interface{}, visit func(string, image.Ref, ImageSetter) error) error
FindFluxHelmReleaseContainers examines the Values from a FluxHelmRelease (manifest, or cluster resource, or otherwise) and calls visit with each container name and image it finds, as well as procedure for changing the image value. It will return an error if it cannot interpret the values as specifying images, or if the `visit` function itself returns an error.
Types ¶
type ContainerPort ¶
type ContainerSpec ¶
type ContainerSpec struct { Name string Image string Args Args Ports []ContainerPort Env Env }
type CronJob ¶
type CronJob struct { Spec CronJobSpec // contains filtered or unexported fields }
func (CronJob) Containers ¶
func (CronJob) ResourceID ¶
func (o CronJob) ResourceID() flux.ResourceID
func (CronJob) SetContainerImage ¶
type CronJobSpec ¶
type CronJobSpec struct { JobTemplate struct { Spec struct { Template PodTemplate } } `yaml:"jobTemplate"` }
type DaemonSet ¶
type DaemonSet struct { Spec struct { Template PodTemplate } // contains filtered or unexported fields }
func (DaemonSet) Containers ¶
func (DaemonSet) ResourceID ¶
func (o DaemonSet) ResourceID() flux.ResourceID
func (DaemonSet) SetContainerImage ¶
type Deployment ¶
type Deployment struct { Spec DeploymentSpec // contains filtered or unexported fields }
func (Deployment) Containers ¶
func (d Deployment) Containers() []resource.Container
func (Deployment) ResourceID ¶
func (o Deployment) ResourceID() flux.ResourceID
func (Deployment) SetContainerImage ¶
func (d Deployment) SetContainerImage(container string, ref image.Ref) error
type DeploymentSpec ¶
type DeploymentSpec struct { Replicas int Template PodTemplate }
type Env ¶
type Env []EnvEntry
Env is a bag of Name, Value pairs that are treated somewhat like a map.
type FluxHelmRelease ¶
type FluxHelmRelease struct { Spec struct { Values map[string]interface{} } // contains filtered or unexported fields }
FluxHelmRelease echoes the generated type for the custom resource definition. It's here so we can 1. get `baseObject` in there, and 3. control the YAML serialisation of fields, which we can't do (easily?) with the generated type.
func (FluxHelmRelease) Containers ¶
func (fhr FluxHelmRelease) Containers() []resource.Container
Containers returns the containers that are defined in the FluxHelmRelease.
func (FluxHelmRelease) ResourceID ¶
func (o FluxHelmRelease) ResourceID() flux.ResourceID
func (FluxHelmRelease) SetContainerImage ¶
func (fhr FluxHelmRelease) SetContainerImage(container string, ref image.Ref) error
SetContainerImage mutates this resource by setting the `image` field of `values`, or a subvalue therein, per one of the interpretations in `FindFluxHelmReleaseContainers` above. NB we can get away with a value-typed receiver because we set a map entry.
type ImageSetter ¶
type List ¶
func (List) ResourceID ¶
func (o List) ResourceID() flux.ResourceID
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
func (Namespace) ResourceID ¶
func (o Namespace) ResourceID() flux.ResourceID
type PodSpec ¶
type PodSpec struct { ImagePullSecrets []struct{ Name string } Volumes []Volume Containers []ContainerSpec InitContainers []ContainerSpec `yaml:"initContainers"` }
type PodTemplate ¶
type PodTemplate struct { Metadata ObjectMeta Spec PodSpec }
func (PodTemplate) Containers ¶
func (t PodTemplate) Containers() []resource.Container
func (PodTemplate) SetContainerImage ¶
func (t PodTemplate) SetContainerImage(container string, ref image.Ref) error
type StatefulSet ¶
type StatefulSet struct { Spec StatefulSetSpec // contains filtered or unexported fields }
func (StatefulSet) Containers ¶
func (ss StatefulSet) Containers() []resource.Container
func (StatefulSet) ResourceID ¶
func (o StatefulSet) ResourceID() flux.ResourceID
func (StatefulSet) SetContainerImage ¶
func (ss StatefulSet) SetContainerImage(container string, ref image.Ref) error
type StatefulSetSpec ¶
type StatefulSetSpec struct { Replicas int Template PodTemplate }