config

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgoCDConfig

type ArgoCDConfig struct {
	// Namespace is the name of namespace where Argo CD is running
	Namespace string `json:"namespace"`

	// AppProjectTemplate is a template for AppProject resources that is created for each tenant
	AppProjectTemplate string `json:"appProjectTemplate"`

	// PreventAppCreationInArgoCDNamespace is a flag to prevent creating applications in the Argo CD namespace
	PreventAppCreationInArgoCDNamespace bool `json:"preventAppCreationInArgoCDNamespace"`
}

ArgoCDConfig represents the configuration about Argo CD

type Config

type Config struct {
	Namespace NamespaceConfig `json:"namespace,omitempty"`
	ArgoCD    ArgoCDConfig    `json:"argocd,omitempty"`
}

Config represents the configuration file of cattage.

func (*Config) Load

func (c *Config) Load(data []byte) error

Load loads configurations.

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the configurations.

type NamespaceConfig

type NamespaceConfig struct {
	// CommonLabels are labels to be added to all namespaces belonging to a tenant
	// This may be overridden by `rootNamespaces.labels` of a tenant resource.
	CommonLabels map[string]string `json:"commonLabels,omitempty"`

	// CommonAnnotations are annotations to be added to all namespaces belonging to a tenant
	// This may be overridden by `rootNamespaces.annotations` of a tenant resource.
	CommonAnnotations map[string]string `json:"commonAnnotations,omitempty"`

	// RoleBindingTemplate is a template for RoleBinding resource that is created on all namespaces belonging to a tenant
	RoleBindingTemplate string `json:"roleBindingTemplate"`
}

NamespaceConfig represents the configuration about Namespaces

Jump to

Keyboard shortcuts

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