manifests

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 23, 2018 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AlertmanagerConfig             = "assets/alertmanager/alertmanager-config.yaml"
	AlertmanagerService            = "assets/alertmanager/alertmanager-service.yaml"
	AlertmanagerProxySecret        = "assets/alertmanager/alertmanager-proxy-secret.yaml"
	AlertmanagerMain               = "assets/alertmanager/alertmanager.yaml"
	AlertmanagerServiceAccount     = "assets/alertmanager/alertmanager-service-account.yaml"
	AlertmanagerClusterRoleBinding = "assets/alertmanager/alertmanager-cluster-role-binding.yaml"
	AlertmanagerClusterRole        = "assets/alertmanager/alertmanager-cluster-role.yaml"
	AlertmanagerRoute              = "assets/alertmanager/alertmanager-route.yaml"

	KubeStateMetricsClusterRoleBinding = "assets/kube-state-metrics/kube-state-metrics-cluster-role-binding.yaml"
	KubeStateMetricsClusterRole        = "assets/kube-state-metrics/kube-state-metrics-cluster-role.yaml"
	KubeStateMetricsDeployment         = "assets/kube-state-metrics/kube-state-metrics-deployment.yaml"
	KubeStateMetricsServiceAccount     = "assets/kube-state-metrics/kube-state-metrics-service-account.yaml"
	KubeStateMetricsService            = "assets/kube-state-metrics/kube-state-metrics-service.yaml"

	NodeExporterDaemonSet                  = "assets/node-exporter/node-exporter-ds.yaml"
	NodeExporterService                    = "assets/node-exporter/node-exporter-svc.yaml"
	NodeExporterServiceAccount             = "assets/node-exporter/node-exporter-service-account.yaml"
	NodeExporterClusterRole                = "assets/node-exporter/node-exporter-cluster-role.yaml"
	NodeExporterClusterRoleBinding         = "assets/node-exporter/node-exporter-cluster-role-binding.yaml"
	NodeExporterSecurityContextConstraints = "assets/node-exporter/node-exporter-security-context-constraints.yaml"

	PrometheusK8sClusterRoleBinding               = "assets/prometheus-k8s/prometheus-k8s-cluster-role-binding.yaml"
	PrometheusK8sRoleBindingDefault               = "assets/prometheus-k8s/prometheus-k8s-role-binding-default.yaml"
	PrometheusK8sRoleBindingKubeSystem            = "assets/prometheus-k8s/prometheus-k8s-role-binding-kube-system.yaml"
	PrometheusK8sRoleBinding                      = "assets/prometheus-k8s/prometheus-k8s-role-binding.yaml"
	PrometheusK8sClusterRole                      = "assets/prometheus-k8s/prometheus-k8s-cluster-role.yaml"
	PrometheusK8sRoleDefault                      = "assets/prometheus-k8s/prometheus-k8s-role-default.yaml"
	PrometheusK8sRoleKubeSystem                   = "assets/prometheus-k8s/prometheus-k8s-role-kube-system.yaml"
	PrometheusK8sRole                             = "assets/prometheus-k8s/prometheus-k8s-role.yaml"
	PrometheusK8sRules                            = "assets/prometheus-k8s/prometheus-k8s-rules.yaml"
	PrometheusK8sServiceAccount                   = "assets/prometheus-k8s/prometheus-k8s-service-account.yaml"
	PrometheusK8s                                 = "assets/prometheus-k8s/prometheus-k8s.yaml"
	PrometheusK8sKubeletServiceMonitor            = "assets/prometheus-k8s/prometheus-k8s-service-monitor-kubelet.yaml"
	PrometheusK8sNodeExporterServiceMonitor       = "assets/prometheus-k8s/prometheus-k8s-service-monitor-node-exporter.yaml"
	PrometheusK8sApiserverServiceMonitor          = "assets/prometheus-k8s/prometheus-k8s-service-monitor-apiserver.yaml"
	PrometheusK8sKubeStateMetricsServiceMonitor   = "assets/prometheus-k8s/prometheus-k8s-service-monitor-kube-state-metrics.yaml"
	PrometheusK8sPrometheusServiceMonitor         = "assets/prometheus-k8s/prometheus-k8s-service-monitor-prometheus.yaml"
	PrometheusK8sAlertmanagerServiceMonitor       = "assets/prometheus-k8s/prometheus-k8s-service-monitor-alertmanager.yaml"
	PrometheusK8sKubeControllersServiceMonitor    = "assets/prometheus-k8s/prometheus-k8s-service-monitor-kube-controllers.yaml"
	PrometheusK8sKubeDNSServiceMonitor            = "assets/prometheus-k8s/prometheus-k8s-service-monitor-kube-dns.yaml"
	PrometheusK8sPrometheusOperatorServiceMonitor = "assets/prometheus-k8s/prometheus-k8s-service-monitor-prometheus-operator.yaml"
	PrometheusK8sService                          = "assets/prometheus-k8s/prometheus-k8s-svc.yaml"
	PrometheusK8sProxySecret                      = "assets/prometheus-k8s/prometheus-k8s-proxy-secret.yaml"
	PrometheusK8sRoute                            = "assets/prometheus-k8s/prometheus-k8s-route.yaml"

	PrometheusOperatorClusterRoleBinding = "assets/prometheus-operator/prometheus-operator-cluster-role-binding.yaml"
	PrometheusOperatorClusterRole        = "assets/prometheus-operator/prometheus-operator-cluster-role.yaml"
	PrometheusOperatorServiceAccount     = "assets/prometheus-operator/prometheus-operator-service-account.yaml"
	PrometheusOperatorDeployment         = "assets/prometheus-operator/prometheus-operator.yaml"
	PrometheusOperatorService            = "assets/prometheus-operator/prometheus-operator-svc.yaml"

	KubeControllersService = "assets/prometheus-k8s/kube-controllers-svc.yaml"
)
View Source
var (
	PrometheusConfigReloaderFlag = "--prometheus-config-reloader="
	ConfigReloaderImageFlag      = "--config-reloader-image="

	AuthProxyExternalURLFlag  = "-external-url="
	AuthProxyCookieDomainFlag = "-cookie-domain="
	AuthProxyRedirectURLFlag  = "-redirect-url="
)
View Source
var InvalidImage = errors.New("image string invalid")

Functions

func Asset

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetDir

func AssetDir(name string) ([]string, error)

AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:

data/
  foo.txt
  img/
    a.png
    b.png

then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.

func AssetInfo

func AssetInfo(name string) (os.FileInfo, error)

AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetNames

func AssetNames() []string

AssetNames returns the names of the assets.

func GeneratePassword

func GeneratePassword(n int) (string, error)

GeneratePassword returns a base64 encoded securely random bytes.

func IsMissingPortInAddressError

func IsMissingPortInAddressError(err error) bool

func MustAsset

func MustAsset(name string) []byte

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

func MustAssetReader

func MustAssetReader(asset string) io.Reader

func NewAlertmanager

func NewAlertmanager(manifest io.Reader) (*monv1.Alertmanager, error)

func NewClusterRole

func NewClusterRole(manifest io.Reader) (*rbacv1beta1.ClusterRole, error)

func NewClusterRoleBinding

func NewClusterRoleBinding(manifest io.Reader) (*rbacv1beta1.ClusterRoleBinding, error)

func NewConfigMap

func NewConfigMap(manifest io.Reader) (*v1.ConfigMap, error)

func NewDaemonSet

func NewDaemonSet(manifest io.Reader) (*appsv1.DaemonSet, error)

func NewDeployment

func NewDeployment(manifest io.Reader) (*appsv1.Deployment, error)

func NewIngress

func NewIngress(manifest io.Reader) (*v1beta1.Ingress, error)

func NewPrometheus

func NewPrometheus(manifest io.Reader) (*monv1.Prometheus, error)

func NewRole

func NewRole(manifest io.Reader) (*rbacv1beta1.Role, error)

func NewRoleBinding

func NewRoleBinding(manifest io.Reader) (*rbacv1beta1.RoleBinding, error)

func NewRoute

func NewRoute(manifest io.Reader) (*routev1.Route, error)

func NewSecret

func NewSecret(manifest io.Reader) (*v1.Secret, error)

func NewSecurityContextConstraints

func NewSecurityContextConstraints(manifest io.Reader) (*securityv1.SecurityContextConstraints, error)

func NewService

func NewService(manifest io.Reader) (*v1.Service, error)

func NewServiceAccount

func NewServiceAccount(manifest io.Reader) (*v1.ServiceAccount, error)

func NewServiceMonitor

func NewServiceMonitor(manifest io.Reader) (*monv1.ServiceMonitor, error)

func RestoreAsset

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory

func RestoreAssets

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively

Types

type AlertmanagerMainConfig

type AlertmanagerMainConfig struct {
	BaseImage           string                    `json:"baseImage"`
	NodeSelector        map[string]string         `json:"nodeSelector"`
	Resources           *v1.ResourceRequirements  `json:"resources"`
	VolumeClaimTemplate *v1.PersistentVolumeClaim `json:"volumeClaimTemplate"`
	Hostport            string                    `json:"hostport"`
}

type AuthConfig

type AuthConfig struct {
	BaseImage string `json:"baseImage"`
}

type Config

type Config struct {
	PrometheusOperatorConfig *PrometheusOperatorConfig `json:"prometheusOperator"`
	PrometheusK8sConfig      *PrometheusK8sConfig      `json:"prometheusK8s"`
	AlertmanagerMainConfig   *AlertmanagerMainConfig   `json:"alertmanagerMain"`
	AuthConfig               *AuthConfig               `json:"auth"`
	NodeExporterConfig       *NodeExporterConfig       `json:"nodeExporter"`
	KubeStateMetricsConfig   *KubeStateMetricsConfig   `json:"kubeStateMetrics"`
	KubeRbacProxyConfig      *KubeRbacProxyConfig      `json:"kubeRbacProxy"`
}

func NewConfig

func NewConfig(content io.Reader) (*Config, error)

func NewConfigFromString

func NewConfigFromString(content string) (*Config, error)

func NewDefaultConfig

func NewDefaultConfig() *Config

type Factory

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

func NewFactory

func NewFactory(namespace string, c *Config) *Factory

func (*Factory) AlertmanagerClusterRole

func (f *Factory) AlertmanagerClusterRole() (*rbacv1beta1.ClusterRole, error)

func (*Factory) AlertmanagerClusterRoleBinding

func (f *Factory) AlertmanagerClusterRoleBinding() (*rbacv1beta1.ClusterRoleBinding, error)

func (*Factory) AlertmanagerConfig

func (f *Factory) AlertmanagerConfig() (*v1.Secret, error)

func (*Factory) AlertmanagerExternalURL

func (f *Factory) AlertmanagerExternalURL(host string) *url.URL

func (*Factory) AlertmanagerMain

func (f *Factory) AlertmanagerMain(host string) (*monv1.Alertmanager, error)

func (*Factory) AlertmanagerProxySecret

func (f *Factory) AlertmanagerProxySecret() (*v1.Secret, error)

func (*Factory) AlertmanagerRoute

func (f *Factory) AlertmanagerRoute() (*routev1.Route, error)

func (*Factory) AlertmanagerService

func (f *Factory) AlertmanagerService() (*v1.Service, error)

func (*Factory) AlertmanagerServiceAccount

func (f *Factory) AlertmanagerServiceAccount() (*v1.ServiceAccount, error)

func (*Factory) KubeControllersService

func (f *Factory) KubeControllersService() (*v1.Service, error)

func (*Factory) KubeStateMetricsClusterRole

func (f *Factory) KubeStateMetricsClusterRole() (*rbacv1beta1.ClusterRole, error)

func (*Factory) KubeStateMetricsClusterRoleBinding

func (f *Factory) KubeStateMetricsClusterRoleBinding() (*rbacv1beta1.ClusterRoleBinding, error)

func (*Factory) KubeStateMetricsDeployment

func (f *Factory) KubeStateMetricsDeployment() (*appsv1.Deployment, error)

func (*Factory) KubeStateMetricsService

func (f *Factory) KubeStateMetricsService() (*v1.Service, error)

func (*Factory) KubeStateMetricsServiceAccount

func (f *Factory) KubeStateMetricsServiceAccount() (*v1.ServiceAccount, error)

func (*Factory) NewAlertmanager

func (f *Factory) NewAlertmanager(manifest io.Reader) (*monv1.Alertmanager, error)

func (*Factory) NewClusterRole

func (f *Factory) NewClusterRole(manifest io.Reader) (*rbacv1beta1.ClusterRole, error)

func (*Factory) NewClusterRoleBinding

func (f *Factory) NewClusterRoleBinding(manifest io.Reader) (*rbacv1beta1.ClusterRoleBinding, error)

func (*Factory) NewConfigMap

func (f *Factory) NewConfigMap(manifest io.Reader) (*v1.ConfigMap, error)

func (*Factory) NewDaemonSet

func (f *Factory) NewDaemonSet(manifest io.Reader) (*appsv1.DaemonSet, error)

func (*Factory) NewDeployment

func (f *Factory) NewDeployment(manifest io.Reader) (*appsv1.Deployment, error)

func (*Factory) NewIngress

func (f *Factory) NewIngress(manifest io.Reader) (*v1beta1.Ingress, error)

func (*Factory) NewPrometheus

func (f *Factory) NewPrometheus(manifest io.Reader) (*monv1.Prometheus, error)

func (*Factory) NewRole

func (f *Factory) NewRole(manifest io.Reader) (*rbacv1beta1.Role, error)

func (*Factory) NewRoleBinding

func (f *Factory) NewRoleBinding(manifest io.Reader) (*rbacv1beta1.RoleBinding, error)

func (*Factory) NewRoute

func (f *Factory) NewRoute(manifest io.Reader) (*routev1.Route, error)

func (*Factory) NewSecret

func (f *Factory) NewSecret(manifest io.Reader) (*v1.Secret, error)

func (*Factory) NewSecurityContextConstraints

func (f *Factory) NewSecurityContextConstraints(manifest io.Reader) (*securityv1.SecurityContextConstraints, error)

func (*Factory) NewService

func (f *Factory) NewService(manifest io.Reader) (*v1.Service, error)

func (*Factory) NewServiceAccount

func (f *Factory) NewServiceAccount(manifest io.Reader) (*v1.ServiceAccount, error)

func (*Factory) NewServiceMonitor

func (f *Factory) NewServiceMonitor(manifest io.Reader) (*monv1.ServiceMonitor, error)

func (*Factory) NodeExporterClusterRole

func (f *Factory) NodeExporterClusterRole() (*rbacv1beta1.ClusterRole, error)

func (*Factory) NodeExporterClusterRoleBinding

func (f *Factory) NodeExporterClusterRoleBinding() (*rbacv1beta1.ClusterRoleBinding, error)

func (*Factory) NodeExporterDaemonSet

func (f *Factory) NodeExporterDaemonSet() (*appsv1.DaemonSet, error)

func (*Factory) NodeExporterSecurityContextConstraints

func (f *Factory) NodeExporterSecurityContextConstraints() (*securityv1.SecurityContextConstraints, error)

func (*Factory) NodeExporterService

func (f *Factory) NodeExporterService() (*v1.Service, error)

func (*Factory) NodeExporterServiceAccount

func (f *Factory) NodeExporterServiceAccount() (*v1.ServiceAccount, error)

func (*Factory) PrometheusExternalURL

func (f *Factory) PrometheusExternalURL(host string) *url.URL

func (*Factory) PrometheusK8s

func (f *Factory) PrometheusK8s(host string) (*monv1.Prometheus, error)

func (*Factory) PrometheusK8sAlertmanagerServiceMonitor

func (f *Factory) PrometheusK8sAlertmanagerServiceMonitor() (*monv1.ServiceMonitor, error)

func (*Factory) PrometheusK8sApiserverServiceMonitor

func (f *Factory) PrometheusK8sApiserverServiceMonitor() (*monv1.ServiceMonitor, error)

func (*Factory) PrometheusK8sClusterRole

func (f *Factory) PrometheusK8sClusterRole() (*rbacv1beta1.ClusterRole, error)

func (*Factory) PrometheusK8sClusterRoleBinding

func (f *Factory) PrometheusK8sClusterRoleBinding() (*rbacv1beta1.ClusterRoleBinding, error)

func (*Factory) PrometheusK8sKubeControllersServiceMonitor

func (f *Factory) PrometheusK8sKubeControllersServiceMonitor() (*monv1.ServiceMonitor, error)

func (*Factory) PrometheusK8sKubeDNSServiceMonitor

func (f *Factory) PrometheusK8sKubeDNSServiceMonitor() (*monv1.ServiceMonitor, error)

func (*Factory) PrometheusK8sKubeStateMetricsServiceMonitor

func (f *Factory) PrometheusK8sKubeStateMetricsServiceMonitor() (*monv1.ServiceMonitor, error)

func (*Factory) PrometheusK8sKubeletServiceMonitor

func (f *Factory) PrometheusK8sKubeletServiceMonitor() (*monv1.ServiceMonitor, error)

func (*Factory) PrometheusK8sNodeExporterServiceMonitor

func (f *Factory) PrometheusK8sNodeExporterServiceMonitor() (*monv1.ServiceMonitor, error)

func (*Factory) PrometheusK8sPrometheusOperatorServiceMonitor

func (f *Factory) PrometheusK8sPrometheusOperatorServiceMonitor() (*monv1.ServiceMonitor, error)

func (*Factory) PrometheusK8sPrometheusServiceMonitor

func (f *Factory) PrometheusK8sPrometheusServiceMonitor() (*monv1.ServiceMonitor, error)

func (*Factory) PrometheusK8sProxySecret

func (f *Factory) PrometheusK8sProxySecret() (*v1.Secret, error)

func (*Factory) PrometheusK8sRole

func (f *Factory) PrometheusK8sRole() (*rbacv1beta1.Role, error)

func (*Factory) PrometheusK8sRoleBinding

func (f *Factory) PrometheusK8sRoleBinding() (*rbacv1beta1.RoleBinding, error)

func (*Factory) PrometheusK8sRoleBindingDefault

func (f *Factory) PrometheusK8sRoleBindingDefault() (*rbacv1beta1.RoleBinding, error)

func (*Factory) PrometheusK8sRoleBindingKubeSystem

func (f *Factory) PrometheusK8sRoleBindingKubeSystem() (*rbacv1beta1.RoleBinding, error)

func (*Factory) PrometheusK8sRoleDefault

func (f *Factory) PrometheusK8sRoleDefault() (*rbacv1beta1.Role, error)

func (*Factory) PrometheusK8sRoleKubeSystem

func (f *Factory) PrometheusK8sRoleKubeSystem() (*rbacv1beta1.Role, error)

func (*Factory) PrometheusK8sRoute

func (f *Factory) PrometheusK8sRoute() (*routev1.Route, error)

func (*Factory) PrometheusK8sRules

func (f *Factory) PrometheusK8sRules() (*v1.ConfigMap, error)

func (*Factory) PrometheusK8sService

func (f *Factory) PrometheusK8sService() (*v1.Service, error)

func (*Factory) PrometheusK8sServiceAccount

func (f *Factory) PrometheusK8sServiceAccount() (*v1.ServiceAccount, error)

func (*Factory) PrometheusOperatorClusterRole

func (f *Factory) PrometheusOperatorClusterRole() (*rbacv1beta1.ClusterRole, error)

func (*Factory) PrometheusOperatorClusterRoleBinding

func (f *Factory) PrometheusOperatorClusterRoleBinding() (*rbacv1beta1.ClusterRoleBinding, error)

func (*Factory) PrometheusOperatorDeployment

func (f *Factory) PrometheusOperatorDeployment() (*appsv1.Deployment, error)

func (*Factory) PrometheusOperatorService

func (f *Factory) PrometheusOperatorService() (*v1.Service, error)

func (*Factory) PrometheusOperatorServiceAccount

func (f *Factory) PrometheusOperatorServiceAccount() (*v1.ServiceAccount, error)

type KubeRbacProxyConfig

type KubeRbacProxyConfig struct {
	BaseImage string `json:"baseImage"`
}

type KubeStateMetricsConfig

type KubeStateMetricsConfig struct {
	BaseImage string `json:"baseImage"`
}

type NodeExporterConfig

type NodeExporterConfig struct {
	BaseImage string `json:"baseImage"`
}

type PrometheusK8sConfig

type PrometheusK8sConfig struct {
	Retention           string                    `json:"retention"`
	BaseImage           string                    `json:"baseImage"`
	NodeSelector        map[string]string         `json:"nodeSelector"`
	Resources           *v1.ResourceRequirements  `json:"resources"`
	ExternalLabels      map[string]string         `json:"externalLabels"`
	VolumeClaimTemplate *v1.PersistentVolumeClaim `json:"volumeClaimTemplate"`
	Hostport            string                    `json:"hostport"`
}

type PrometheusOperatorConfig

type PrometheusOperatorConfig struct {
	BaseImage                string `json:"baseImage"`
	PrometheusConfigReloader string `json:"prometheusConfigReloaderBaseImage"`
	ConfigReloaderImage      string `json:"configReloaderBaseImage"`
}

Jump to

Keyboard shortcuts

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