charts

package
v0.0.0-...-2bcb20d Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Namespace that rancher alerting drivers chart is installed
	RancherAlertingNamespace = RancherMonitoringNamespace
	// Name of the rancher alerting drivers chart
	RancherAlertingName = "rancher-alerting-drivers"
)
View Source
const (
	// Namespace that rancher gatekeeper chart is installed in
	RancherGatekeeperNamespace = "cattle-gatekeeper-system"
	// Name of the rancher gatekeeper chart
	RancherGatekeeperName = "rancher-gatekeeper"
	// Name of rancher gatekeeper crd chart
	RancherGatekeeperCRDName = "rancher-gatekeeper-crd"
)
View Source
const (
	// Namespace that rancher istio chart is installed in
	RancherIstioNamespace = "istio-system"
	// Name of the rancher istio chart
	RancherIstioName = "rancher-istio"
)
View Source
const (
	// Namespace that rancher logging chart is installed in
	RancherLoggingNamespace = "cattle-logging-system"
	// Name of the rancher logging chart
	RancherLoggingName = "rancher-logging"
	// Name of rancher logging crd chart
	RancherLoggingCRDName = "rancher-logging-crd"
)
View Source
const (
	// Namespace that rancher monitoring chart is installed in
	RancherMonitoringNamespace = "cattle-monitoring-system"
	// Name of the rancher monitoring chart
	RancherMonitoringName = "rancher-monitoring"
	// Name of the rancher monitoring alert config secret
	RancherMonitoringAlertSecret = "alertmanager-rancher-monitoring-alertmanager"
	// Name of rancher monitoring crd chart
	RancherMonitoringCRDName = "rancher-monitoring-crd"
)
View Source
const (
	// Namespace that rancher webhook chart is installed in
	RancherWebhookNamespace = "cattle-system"
	// Name of the rancher webhook chart
	RancherWebhookName = "rancher-webhook"
)
View Source
const (
	AwsUpstreamChartName = "aws-cloud-controller-manager"
)

Variables

This section is empty.

Functions

func CreateChartRepoFromGithub

func CreateChartRepoFromGithub(client *steveV1.Client, githubURL, githubBranch, repoName string) error

CreateChartRepoFromGithub creates a ClusterRepo in a given client via github instead of helm

func GenerateGatekeeperConfigYaml

func GenerateGatekeeperConfigYaml(excludedNamespaces []string, processes []string, name string, namespace string, apiVersion string, kind string) (string, error)

GenerateGatekeeperConfigYaml generates the yaml for a config for OPA gatekeeper https://open-policy-agent.github.io/gatekeeper/website/docs/exempt-namespaces#exempting-namespaces-from-gatekeeper-using-config-resource

func GenerateGatekeeperConstraintYaml

func GenerateGatekeeperConstraintYaml(apiGroups []string, excludedNamespaces []string, kinds []string, name string, namespaces []string, enforcementAction string, apiVersion string, kind string) (string, error)

GenerateGatekeeperConstraintYaml takes inputs to generate the yaml for an OPA Gatekeeper Constraint from an OPA Constraint Template. This can be used to dynamically generate OPA Constraints based on test data

func InstallAWSOutOfTreeChart

func InstallAWSOutOfTreeChart(client *rancher.Client, installOptions *InstallOptions, repoName, clusterID string, isLeaderMigration bool) error

InstallAWSOutOfTreeChart installs the CSI chart for aws cloud provider in a given cluster.

func InstallRancherAlertingChart

func InstallRancherAlertingChart(client *rancher.Client, installOptions *InstallOptions, rancherAlertingOpts *RancherAlertingOpts) error

InstallRancherALertingChart is a helper function that installs the rancher-alerting-drivers chart.

func InstallRancherGatekeeperChart

func InstallRancherGatekeeperChart(client *rancher.Client, installOptions *InstallOptions) error

InstallRancherGatekeeperChart installs the OPA gatekeeper chart

func InstallRancherIstioChart

func InstallRancherIstioChart(client *rancher.Client, installOptions *InstallOptions, rancherIstioOpts *RancherIstioOpts) error

InstallRancherIstioChart is a helper function that installs the rancher-istio chart.

func InstallRancherLoggingChart

func InstallRancherLoggingChart(client *rancher.Client, installOptions *InstallOptions, rancherLoggingOpts *RancherLoggingOpts) error

InstallRancherLoggingChart is a helper function that installs the rancher-logging chart.

func InstallRancherMonitoringChart

func InstallRancherMonitoringChart(client *rancher.Client, installOptions *InstallOptions, rancherMonitoringOpts *RancherMonitoringOpts) error

InstallRancherMonitoringChart is a helper function that installs the rancher-monitoring chart.

func InstallVsphereOutOfTreeCharts

func InstallVsphereOutOfTreeCharts(client *rancher.Client, vsphereTemplate *nodetemplates.NodeTemplate, repoName, clusterName string) error

InstallVsphereOutOfTreeCharts installs the CPI and CSI chart for aws cloud provider in a given cluster.

func UpgradeRancherGatekeeperChart

func UpgradeRancherGatekeeperChart(client *rancher.Client, installOptions *InstallOptions) error

UpgradeRanchergatekeeperChart is a helper function that upgrades the rancher-gatekeeper chart.

func UpgradeRancherIstioChart

func UpgradeRancherIstioChart(client *rancher.Client, installOptions *InstallOptions, rancherIstioOpts *RancherIstioOpts) error

UpgradeRancherIstioChart is a helper function that upgrades the rancher-istio chart.

func UpgradeRancherMonitoringChart

func UpgradeRancherMonitoringChart(client *rancher.Client, installOptions *InstallOptions, rancherMonitoringOpts *RancherMonitoringOpts) error

UpgradeMonitoringChart is a helper function that upgrades the rancher-monitoring chart.

func VerifyChartInstall

func VerifyChartInstall(client *catalog.Client, chartNamespace, chartName string) error

VerifyChartInstall verifies that the app from a chart was successfully deployed

func WatchAndWaitDaemonSets

func WatchAndWaitDaemonSets(client *rancher.Client, clusterID, namespace string, listOptions metav1.ListOptions) error

WatchAndWaitDaemonSets is a helper function that watches the DaemonSets sequentially in a specific namespace and waits until number of available DeamonSets is equal to number of desired scheduled Daemonsets.

func WatchAndWaitDeploymentForAnnotation

func WatchAndWaitDeploymentForAnnotation(client *rancher.Client, clusterID, namespace, deploymentName, annotationKey, annotationValue string) error

WatchAndWaitDeploymentForAnnotation is a helper function that watches the deployment in a specific namespace and waits until expected annotation key and its value.

func WatchAndWaitDeployments

func WatchAndWaitDeployments(client *rancher.Client, clusterID, namespace string, listOptions metav1.ListOptions) error

WatchAndWaitDeployments is a helper function that watches the deployments sequentially in a specific namespace and waits until number of expected replicas is equal to number of available replicas.

func WatchAndWaitStatefulSets

func WatchAndWaitStatefulSets(client *rancher.Client, clusterID, namespace string, listOptions metav1.ListOptions) error

WatchAndWaitStatefulSets is a helper function that watches the StatefulSets sequentially in a specific namespace and waits until number of expected replicas is equal to number of ready replicas.

Types

type ChartStatus

type ChartStatus struct {
	IsAlreadyInstalled bool
	ChartDetails       *catalogv1.App
}

ChartStatus is a struct that GetChartStatus helper function returns. It contains the boolean for is already installed and the chart information.

func GetChartStatus

func GetChartStatus(client *rancher.Client, clusterID, chartNamespace, chartName string) (*ChartStatus, error)

GetChartStatus is a helper function that takes client, clusterID, chartNamespace and chartName as args, uses admin catalog client to check if chart is already installed, if the chart is already installed returns chart information.

type ConfigMatch

type ConfigMatch []struct {
	ExcludedNamespaces []string `yaml:"excludedNamespaces"`
	Processes          []string `yaml:"processes"`
}

ConfigMatch match field for ConfigYaml, it contains different fields than ConstraintMatch

type ConfigSpec

type ConfigSpec struct {
	Match ConfigMatch `yaml:"match"`
}

ConfigSpec spec field for ConfigYaml, it contains different fields than ConstraintSpec

type ConfigYaml

type ConfigYaml struct {
	APIVersion string     `yaml:"apiVersion"`
	Kind       string     `yaml:"kind"`
	Metadata   Metadata   `yaml:"metadata"`
	Spec       ConfigSpec `yaml:"spec"`
}

ConfigYaml all the structs that make up a gatekeeper Config are nested in this struct, Configs and Constraints are similar K8s objects, but require different Specs

type ConstraintKinds

type ConstraintKinds []struct {
	APIGroups []string `yaml:"apiGroups"`
	Kinds     []string `yaml:"kinds"`
}

ConstraintKinds field

type ConstraintMatch

type ConstraintMatch struct {
	ExcludedNamespaces []string        `yaml:"excludedNamespaces"`
	Kinds              ConstraintKinds `yaml:"kinds"`
}

ConstraintMatch match field for ConstraintYaml, it contains different fields than ConfigMatch

type ConstraintParameters

type ConstraintParameters struct {
	Namespaces []string `yaml:"namespaces"`
}

ConstraintParameters field

type ConstraintSpec

type ConstraintSpec struct {
	EnforcementAction string               `yaml:"enforcementAction"`
	Match             ConstraintMatch      `yaml:"match"`
	Parameters        ConstraintParameters `yaml:"parameters"`
}

ConstraintSpec spec field for ConstraintYaml, it contains different fields than ConfigSpec

type ConstraintYaml

type ConstraintYaml struct {
	APIVersion string         `yaml:"apiVersion"`
	Kind       string         `yaml:"kind"`
	Metadata   Metadata       `yaml:"metadata"`
	Spec       ConstraintSpec `yaml:"spec"`
}

ConstraintYaml All the structs that make up a gatekeeper Constraint are nested in this struct, Configs and Constraints are similar K8s objects, but require different Specs

type GetChartCaseEndpointResult

type GetChartCaseEndpointResult struct {
	Ok   bool
	Body string
}

GetChartCaseEndpointResult is a struct that GetChartCaseEndpoint helper function returns. It contains the boolean for healthy response and the request body.

type InstallOptions

type InstallOptions struct {
	Cluster   *clusters.ClusterMeta
	Version   string
	ProjectID string
}

InstallOptions is a struct of the required options to install a chart.

type Metadata

type Metadata struct {
	Name      string `yaml:"name"`
	Namespace string `yaml:"namespace"`
}

Metadata struct can be shared by Configs and Constraints

type RancherAlertingOpts

type RancherAlertingOpts struct {
	SMS   bool
	Teams bool
}

RancherAlertingOpts is a struct of the required options to install Rancher Alerting Drivers with desired chart values.

type RancherIstioOpts

type RancherIstioOpts struct {
	IngressGateways bool
	EgressGateways  bool
	Pilot           bool
	Telemetry       bool
	Kiali           bool
	Tracing         bool
	CNI             bool
}

RancherIstioOpts is a struct of the required options to install Rancher Istio with desired chart values.

type RancherLoggingOpts

type RancherLoggingOpts struct {
	AdditionalLoggingSources bool
}

RancherLoggingOpts is a struct of the required options to install Rancher Logging with desired chart values.

type RancherMonitoringOpts

type RancherMonitoringOpts struct {
	IngressNginx      bool `json:"ingressNginx" yaml:"ingressNginx"`
	ControllerManager bool `json:"controllerManager" yaml:"controllerManager"`
	Etcd              bool `json:"etcd" yaml:"etcd"`
	Proxy             bool `json:"proxy" yaml:"proxy"`
	Scheduler         bool `json:"scheduler" yaml:"scheduler"`
}

RancherMonitoringOpts is a struct of the required options to install Rancher Monitoring with desired chart values.

Jump to

Keyboard shortcuts

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