yaml

package
v0.0.0-...-274850b Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddApplicationsYaml

func AddApplicationsYaml(path string, name string) (string, error)

func DecryptionClusterApplicationsYaml

func DecryptionClusterApplicationsYaml(path string, secretName string) (string, error)

func Encrypt

func Encrypt(opts EncryptOpts) (encryptedFile []byte, err error)

func EncryptYaml

func EncryptYaml(fileName string, keyP string) (string, error)

func ExportKustomization

func ExportKustomization(kustomization kustomize.Kustomization) (string, error)

func NewKustomizationYaml

func NewKustomizationYaml(decryption bool, sourceSecret bool) (string, error)

func NewPatchYaml

func NewPatchYaml(namespace string, name string, path string) (string, error)

func NewRbacYaml

func NewRbacYaml(
	namespace string,
	tenant string,
	roleName string,
	clusterRole bool,
	serviceAccountName string,
) (string, error)

func NewSecretSopsYaml

func NewSecretSopsYaml(name string) (string, *age.X25519Identity, error)

func NewSourceSecretYaml

func NewSourceSecretYaml(repositoryURL *url.URL, options *SourceSecretOptions) (string, string, error)

func NewSyncYaml

func NewSyncYaml(
	namespace string,
	name string,
	URL string,
	branch string,
	decryption bool,
	decryptionSecret string,
	dependsOn []meta.NamespacedObjectReference,
	serviceAccountName string,
	sourceSecret bool,
	sourceSecretName string,
) (string, error)

func Read

func Read(path string) (string, error)

func ReadKustomization

func ReadKustomization(y string) (kustomize.Kustomization, error)

func RemoveApplicationsYaml

func RemoveApplicationsYaml(path string, name string) (string, error)

func Save

func Save(yaml string, path string) error

func UpdateDependsOnSyncYaml

func UpdateDependsOnSyncYaml(
	syncY string,
	dependsOn []meta.NamespacedObjectReference,
) (string, error)

func UpdatePathPatchYaml

func UpdatePathPatchYaml(patchY, path string) (string, error)

Types

type EncryptOpts

type EncryptOpts struct {
	Cipher            sops.Cipher
	InputStore        sops.Store
	OutputStore       sops.Store
	InputPath         string
	KeyServices       []keyservice.KeyServiceClient
	UnencryptedSuffix string
	EncryptedSuffix   string
	UnencryptedRegex  string
	EncryptedRegex    string
	KeyGroups         []sops.KeyGroup
	GroupThreshold    int
}

type SourceSecretOptions

type SourceSecretOptions struct {
	Namespace      string
	Name           string
	Username       string
	Password       string
	TokenAuth      bool
	CaFile         string
	KeyAlgorithm   flags.PublicKeyAlgorithm
	KeyRSABits     flags.RSAKeyBits
	KeyECDSACurve  flags.ECDSACurve
	Hostname       string
	SshHostname    string
	PrivateKeyFile string
	PlainProvider  bool
}

Jump to

Keyboard shortcuts

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