latest

package
v0.0.0-...-4d112fb Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "v1alpha1"

Functions

func NewKruiseConfig

func NewKruiseConfig() version.IVersionedConfig

NewKruiseConfig represents the schema of the Kruise manifest

Types

type DeployConfig

type DeployConfig struct {
	Deployments []Deployment `mapstructure:"deployments"`
	Profiles    []Profile    `mapstructure:"profiles"`
}

DeployConfig represents a map of dynamic Deployments

type Deployment

type Deployment struct {
	Aliases     []string          `mapstructure:"aliases"`
	Description DeploymentDesc    `mapstructure:"description"`
	Helm        HelmDeployment    `mapstructure:"helm"`
	Kubectl     KubectlDeployment `mapstructure:"kubectl"`
	Name        string            `mapstructure:"name"`
}

Deployment represents a flexible means of mapping multiple Helm and Kubectl installers to a single key

Aliases and Description are used to determine how the Deployment appears in the Kruise CLI

type DeploymentDesc

type DeploymentDesc struct {
	Deploy string `mapstructure:"deploy"`
	Delete string `mapstructure:"delete"`
}

DeploymentDesc represents the descriptions of the Deployment for the deploy and delete commands

type HelmChart

type HelmChart struct {
	ChartName     string   `mapstructure:"chartName"`
	ReleaseName   string   `mapstructure:"releaseName"`
	RepoName      string   `mapstructure:"repoName"`
	Namespace     string   `mapstructure:"namespace"`
	Values        []string `mapstructure:"values"`
	SetValues     []string `mapstructure:"setValues"`
	InstallArgs   []string `mapstructure:"installArgs"`
	UninstallArgs []string `mapstructure:"uninstallArgs"`
	Priority      int      `mapstructure:"priority"`
	Version       string   `mapstructure:"version"`
	Init          bool     `mapstructure:"init"`
}

HelmChart represents Helm chart information

type HelmDeployment

type HelmDeployment struct {
	Repositories []HelmRepository `mapstructure:"repositories"`
	Charts       []HelmChart      `mapstructure:"charts"`
}

HelmDeployment represents multiple Helm repositories and Helm charts

type HelmRepository

type HelmRepository struct {
	Url     string `mapstructure:"url"`
	Name    string `mapstructure:"name"`
	Private bool   `mapstructure:"private"`
	Init    bool   `mapstructure:"init"`
}

HelmRepository represents Helm repository information

type KeyVal

type KeyVal struct {
	Key string `mapstructure:"key"`
	Val string `mapstructure:"value"`
}

KeyVal is used to defined key values pairs as separate parameters

type KruiseConfig

type KruiseConfig struct {
	APIVersion string       `mapstructure:"apiVersion"`
	Kind       string       `mapstructure:"kind"`
	Logger     LoggerConfig `mapstructure:"logger"`
	Deploy     DeployConfig `mapstructure:"deploy"`
}

KruiseConfig represents the top level keys of the Kruise manifest file

func (*KruiseConfig) GetVersion

func (c *KruiseConfig) GetVersion() string

GetVersion is used to get the apiVersion of the Kruise config

type KubectlDeployment

type KubectlDeployment struct {
	Secrets   KubectlSecrets    `mapstructure:"secrets"`
	Manifests []KubectlManifest `mapstructure:"manifests"`
}

KubectlDeployment represents multiple Kubectl secrets and Kubectl manifests

type KubectlDockerRegistrySecret

type KubectlDockerRegistrySecret struct {
	Name      string `mapstructure:"name"`
	Namespace string `mapstructure:"namespace"`
	Registry  string `mapstructure:"registry"`
	Init      bool   `mapstructure:"init"`
}

KubectlDockerRegistrySecret represents a docker-registry Kubernetes secret

type KubectlGenericSecret

type KubectlGenericSecret struct {
	Name      string   `mapstructure:"name"`
	Namespace string   `mapstructure:"namespace"`
	Literal   []KeyVal `mapstructure:"literal"`
	Init      bool     `mapstructure:"init"`
}

KubectlGenericSecret represents a generic Kubernetes secret

type KubectlManifest

type KubectlManifest struct {
	Namespace string   `mapstructure:"namespace"`
	Priority  int      `mapstructure:"priority"`
	Paths     []string `mapstructure:"paths"`
	Init      bool     `mapstructure:"init"`
}

KubectlManifest represents Kubectl manifest information

type KubectlSecrets

type KubectlSecrets struct {
	Generic        []KubectlGenericSecret        `mapstructure:"generic"`
	DockerRegistry []KubectlDockerRegistrySecret `mapstructure:"dockerRegistry"`
}

KubectlSecrets represents different types of Kubernetes secrets

type LoggerConfig

type LoggerConfig struct {
	Level      string `mapstructure:"level"`
	Caller     bool   `mapstructure:"enableCaller"`
	TimeStamp  bool   `mapstructure:"enableTimestamp"`
	TimeFormat string `mapstructure:"timeFormat"`
}

LoggerConfig is used to define charm log configuration

type Profile

type Profile struct {
	Aliases     []string       `mapstructure:"aliases"`
	Items       []string       `mapstructure:"items"`
	Name        string         `mapstructure:"name"`
	Description DeploymentDesc `mapstructure:"description"`
}

Profile represents a flexible means of bundling together other deployments

Jump to

Keyboard shortcuts

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