service

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Log         logr.Logger
	VaultClient *vaultclient.WrappedVaultClient

	Dir            string
	Installation   string
	SOPSKeysDir    string
	SOPSKeysSource string
	Verbose        bool
}

type DynamicService added in v1.2.0

type DynamicService struct {
	// contains filtered or unexported fields
}

func NewDynamicService added in v1.2.0

func NewDynamicService(config DynamicServiceConfig) *DynamicService

func (*DynamicService) Render added in v1.2.0

func (s *DynamicService) Render(in RenderInput) (configmap *corev1.ConfigMap, secret *corev1.Secret, err error)

func (*DynamicService) RenderRaw added in v1.2.0

func (s *DynamicService) RenderRaw(dir, schema string, primitiveVariables []string) (configmapData string, secretData string, err error)

type DynamicServiceConfig added in v1.2.0

type DynamicServiceConfig struct {
	Log logr.Logger
}

type GenerateInput

type GenerateInput struct {
	// App for which the configuration is generated.
	App string

	// Name of the generated ConfigMap and Secret.
	Name string
	// Namespace of the generated ConfigMap and Secret.
	Namespace string

	// ExtraAnnotations are additional annotations to be set on the
	// generated ConfigMap and Secret. By default
	// "config.giantswarm.io/version" annotation is set.
	ExtraAnnotations map[string]string
	// ExtraLabels are additional labels to be set on the generated
	// ConfigMap and Secret.
	ExtraLabels map[string]string
	// VersionOverride allows user to set version manually.
	VersionOverride string
}

type InvalidConfigError

type InvalidConfigError struct {
	// contains filtered or unexported fields
}

func (*InvalidConfigError) Error

func (e *InvalidConfigError) Error() string

func (*InvalidConfigError) Is

func (e *InvalidConfigError) Is(target error) bool

type RenderInput added in v1.2.0

type RenderInput struct {
	// Root directory of the config repository.
	Dir string

	// Path to the schema file.
	Schema string

	// List of variables for the schema in primitive format of 'name=value'.
	Variables []string

	// The name of the generated ConfigMap and Secret.
	Name string

	// The namespace of the generated ConfigMap and Secret.
	Namespace string

	// Additional annotations to be set on the generated ConfigMap and Secret.
	ExtraAnnotations map[string]string

	// Additional labels to be set on the generated ConfigMap and Secret.
	ExtraLabels map[string]string

	// The key to store the rendered data in the generated ConfigMap
	ConfigMapDataKey string

	// The key to store the rendered data in the generated Secret
	SecretDataKey string
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(config Config) (*Service, error)

func (*Service) Generate

func (s *Service) Generate(ctx context.Context, in GenerateInput) (configmap *corev1.ConfigMap, secret *corev1.Secret, err error)

func (*Service) GetDir

func (s *Service) GetDir() string

func (*Service) GetInstallation

func (s *Service) GetInstallation() string

Jump to

Keyboard shortcuts

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