secret

package
v0.0.0-...-841f565 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComputedAttrs

type ComputedAttrs struct {
	Optional    bool     `hcl:"optional,attr"`
	SecretName  string   `hcl:"secret_name,attr"`
	Namespace   string   `hcl:"namespace,optional"`
	Files       []string `hcl:"files,optional"`
	Environment []string `hcl:"environment,optional"`
}

ComputedAttrs is used to store the computed values from the Target expressions

type Target

type Target struct {
	*base.RawTarget `json:"-"`

	Optional    hcl.Expression `hcl:"optional,attr"`
	SecretName  hcl.Expression `hcl:"secret_name,attr"`
	Namespace   hcl.Expression `hcl:"namespace,optional"`
	Files       hcl.Expression `hcl:"files,optional"`
	Environment hcl.Expression `hcl:"environment,optional"`
}

Target defines the required and optional attributes for defining a secret

func (Target) Attributes

func (t Target) Attributes() map[string]cty.Value

Attributes return a combined map of rawTarget.Attributes and typedTarget.Attributes

func (Target) Build

func (t Target) Build() error

Build creates or updates a kubernetes secret

func (Target) CheckLocalBuildCache

func (t Target) CheckLocalBuildCache() (bool, error)

CheckLocalBuildCache checks the configured K8s context to see if a secret with the same target hash already exists in the cluster

func (Target) CheckRemoteCache

func (t Target) CheckRemoteCache() (bool, error)

CheckRemoteCache overrides the RawTarget interface method because it wouldn't work for this target

func (Target) ComputedAttrs

func (t Target) ComputedAttrs() *ComputedAttrs

ComputedAttrs returns a pointer to computed attributes from the state store. If attributes are not in the state store it will create a new pointer and insert it into the state store.

func (Target) PreBuild

func (t Target) PreBuild() error

PreBuild a lifecycle hook for calculating state before the build

func (Target) PullRemoteCache

func (t Target) PullRemoteCache() error

PullRemoteCache overrides the RawTarget interface method because it wouldn't work for this target

func (Target) PushRemoteCache

func (t Target) PushRemoteCache() error

PushRemoteCache overrides the RawTarget interface method because it wouldn't work for this target

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL