Documentation ¶
Index ¶
- Constants
- func CreateChartRepoFromGithub(client *steveV1.Client, githubURL, githubBranch, repoName string) error
- func GenerateGatekeeperConfigYaml(excludedNamespaces []string, processes []string, name string, namespace string, ...) (string, error)
- func GenerateGatekeeperConstraintYaml(apiGroups []string, excludedNamespaces []string, kinds []string, name string, ...) (string, error)
- func InstallAWSOutOfTreeChart(client *rancher.Client, installOptions *InstallOptions, ...) error
- func InstallRancherAlertingChart(client *rancher.Client, installOptions *InstallOptions, ...) error
- func InstallRancherGatekeeperChart(client *rancher.Client, installOptions *InstallOptions) error
- func InstallRancherIstioChart(client *rancher.Client, installOptions *InstallOptions, ...) error
- func InstallRancherLoggingChart(client *rancher.Client, installOptions *InstallOptions, ...) error
- func InstallRancherMonitoringChart(client *rancher.Client, installOptions *InstallOptions, ...) error
- func InstallVsphereOutOfTreeCharts(client *rancher.Client, vsphereTemplate *nodetemplates.NodeTemplate, ...) error
- func UpgradeRancherGatekeeperChart(client *rancher.Client, installOptions *InstallOptions) error
- func UpgradeRancherIstioChart(client *rancher.Client, installOptions *InstallOptions, ...) error
- func UpgradeRancherMonitoringChart(client *rancher.Client, installOptions *InstallOptions, ...) error
- func VerifyChartInstall(client *catalog.Client, chartNamespace, chartName string) error
- func WatchAndWaitDaemonSets(client *rancher.Client, clusterID, namespace string, ...) error
- func WatchAndWaitDeploymentForAnnotation(client *rancher.Client, ...) error
- func WatchAndWaitDeployments(client *rancher.Client, clusterID, namespace string, ...) error
- func WatchAndWaitStatefulSets(client *rancher.Client, clusterID, namespace string, ...) error
- type ChartStatus
- type ConfigMatch
- type ConfigSpec
- type ConfigYaml
- type ConstraintKinds
- type ConstraintMatch
- type ConstraintParameters
- type ConstraintSpec
- type ConstraintYaml
- type GetChartCaseEndpointResult
- type InstallOptions
- type Metadata
- type RancherAlertingOpts
- type RancherIstioOpts
- type RancherLoggingOpts
- type RancherMonitoringOpts
Constants ¶
const ( // Namespace that rancher alerting drivers chart is installed RancherAlertingNamespace = RancherMonitoringNamespace // Name of the rancher alerting drivers chart RancherAlertingName = "rancher-alerting-drivers" )
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" )
const ( // Namespace that rancher istio chart is installed in RancherIstioNamespace = "istio-system" // Name of the rancher istio chart RancherIstioName = "rancher-istio" )
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" )
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" )
const ( // Namespace that rancher webhook chart is installed in RancherWebhookNamespace = "cattle-system" // Name of the rancher webhook chart RancherWebhookName = "rancher-webhook" )
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 ¶
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 ¶
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 ¶
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 RancherAlertingOpts ¶
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.