constants

package
v1.0.0-alpha.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultCalicoVersion           = "v3.9.5"
	DefaultInstallCniImageRepo     = DefaultImageProject + "/calico-cni-amd64"
	DefaultNodeImageRepo           = DefaultImageProject + "/calico-node-amd64"
	DefaultFlexvolDriverImageRepo  = DefaultImageProject + "/calico-pod2daemon-flexvol-amd64"
	DefaultKubeControllerImageRepo = DefaultImageProject + "/calico-kube-controllers-amd64"
	DefaultIpAutodetectionMethod   = "can-reach=114.114.114.114"
	DefaultIpv4poolIpip            = "Always"
	DefaultIpv4poolCidr            = "100.64.0.0/14"

	UnableToDecodeCalico = "unable to decode calico"
)
View Source
const (
	CalicoConfigMap = `` /* 1180-byte string literal not displayed */

	CalicoKubeControllerClusterRole = `` /* 1071-byte string literal not displayed */

	CalicoKubeControllerClusterRoleBinding = `` /* 298-byte string literal not displayed */

	CalicoNodeClusterRole = `` /* 3190-byte string literal not displayed */

	CalicoNodeClusterRoleBinding = `` /* 262-byte string literal not displayed */

	CalicoNodeDaemonset = `` /* 8954-byte string literal not displayed */

	CalicoNodeServiceAccount = `
apiVersion: v1
kind: ServiceAccount
metadata:
  name: calico-node
  namespace: kube-system
`
	CalicoKubeControllersDeployment = `` /* 1474-byte string literal not displayed */

	CalicoKubeControllerServiceAccount = `
apiVersion: v1
kind: ServiceAccount
metadata:
  name: calico-kube-controllers
  namespace: kube-system
`
)
View Source
const (
	CalicoCrdFelixconfigurations = `` /* 345-byte string literal not displayed */

	CalicoCrdIpamblocks = `` /* 268-byte string literal not displayed */

	CalicoCrdBlockaffinities = `` /* 286-byte string literal not displayed */

	CalicoCrdIpamhandles = `` /* 272-byte string literal not displayed */

	CalicoCrdIpamconfigs = `` /* 272-byte string literal not displayed */

	CalicoCrdBgppeers = `` /* 260-byte string literal not displayed */

	CalicoCrdBgpconfigurations = `` /* 296-byte string literal not displayed */

	CalicoCrdIppools = `` /* 256-byte string literal not displayed */

	CalicoCrdHostendpoints = `` /* 280-byte string literal not displayed */

	CalicoCrdClusterinformations = `` /* 304-byte string literal not displayed */

	CalicoCrdGlobalnetworkpolicies = `` /* 310-byte string literal not displayed */

	CalicoCrdGlobalnetworksets = `` /* 296-byte string literal not displayed */

	CalicoCrdNetworkpolicies = `` /* 289-byte string literal not displayed */

	CalicoCrdnetworksets = `` /* 275-byte string literal not displayed */

)
View Source
const (
	DefaultImageRegistry = "docker.io"
	DefaultImageProject  = "xwcheng"

	DefaultEtcdStorageDir      = "/data/etcd"
	DefaultFinalizer           = "crd.cxw.com"
	DefaultAdminKubeconfigPath = "/data/matrix"
)
View Source
const (
	// LabelNodeRoleMaster specifies that a node is a control-plane
	// This is a duplicate definition of the constant in pkg/controller/service/service_controller.go
	LabelNodeRoleMaster   = "node-role.kubernetes.io/master"
	CoreDNSDeploymentName = "coredns"
	UnableToDecodeCoreDNS = "unable to decode CoreDNS"

	// KubeDNSDeployment is the kube-dns Deployment manifest for the kube-dns manifest for v1.7+
	KubeDNSDeployment = `` /* 4623-byte string literal not displayed */

	// KubeDNSService is the kube-dns Service manifest
	KubeDNSService = `` /* 779-byte string literal not displayed */

	// CoreDNSDeployment is the CoreDNS Deployment manifest
	CoreDNSDeployment = `` /* 2048-byte string literal not displayed */

	// CoreDNSConfigMap is the CoreDNS ConfigMap manifest
	CoreDNSConfigMap = `` /* 496-byte string literal not displayed */

	// CoreDNSClusterRole is the CoreDNS ClusterRole manifest
	CoreDNSClusterRole = `` /* 272-byte string literal not displayed */

	// CoreDNSClusterRoleBinding is the CoreDNS Clusterrolebinding manifest
	CoreDNSClusterRoleBinding = `` /* 264-byte string literal not displayed */

	// CoreDNSServiceAccount is the CoreDNS ServiceAccount manifest
	CoreDNSServiceAccount = `
apiVersion: v1
kind: ServiceAccount
metadata:
  name: coredns
  namespace: kube-system
`
)
View Source
const (
	// KubeProxyConfigMap specifies in what ConfigMap in the kube-system namespace the kube-proxy configuration should be stored
	KubeProxyConfigMap = "kube-proxy"

	// KubeProxyConfigMapKey specifies in what ConfigMap key the component config of kube-proxy should be stored
	KubeProxyConfigMapKey = "config.conf"

	// KubeProxyClusterRoleName sets the name for the kube-proxy ClusterRole
	KubeProxyClusterRoleName = "system:node-proxier"

	// KubeProxyServiceAccountName describes the name of the ServiceAccount for the kube-proxy addon
	KubeProxyServiceAccountName = "kube-proxy"

	// NodeBootstrapTokenAuthGroup specifies which group a Node Bootstrap Token should be authenticated in
	NodeBootstrapTokenAuthGroup = "system:bootstrappers:kubeadm:default-node-token"

	// KubeProxyConfigMap19 is the proxy ConfigMap manifest for Kubernetes 1.9 and above
	KubeProxyConfigMap19 = `` /* 1724-byte string literal not displayed */

	// KubeProxyDaemonSet19 is the proxy DaemonSet manifest for Kubernetes 1.9 and above
	KubeProxyDaemonSet19 = `` /* 1570-byte string literal not displayed */

)
View Source
const (
	NodesGroup                     = "system:nodes"
	KubeletConfigmapKubeletData115 = `` /* 1743-byte string literal not displayed */

)
View Source
const EtcdPreStopCommand = `` /* 303-byte string literal not displayed */
View Source
const EtcdStartCommand = `` /* 6053-byte string literal not displayed */

Variables

View Source
var (
	ServiceTypemeta = metav1.TypeMeta{
		APIVersion: "v1",
		Kind:       "Service",
	}

	ConfigmapTypemeta = metav1.TypeMeta{
		APIVersion: "v1",
		Kind:       "ConfigMap",
	}

	StatefulsetTypemeta = metav1.TypeMeta{
		APIVersion: "apps/v1",
		Kind:       "StatefulSet",
	}

	DeploymentTypemeta = metav1.TypeMeta{
		APIVersion: "extensions/v1beta1",
		Kind:       "Deployment",
	}
)
View Source
var (
	DefaultEtcd = crdv1.EtcdCluster{
		TypeMeta: metav1.TypeMeta{
			APIVersion: "crd.cxwen.com/v1",
			Kind:       "EtcdCluster",
		},
		Spec: crdv1.EtcdClusterSpec{
			Version:       "3.3.17",
			Replicas:      1,
			ImageRegistry: DefaultImageRegistry,
			ImageRepo:     DefaultImageProject + "/etcd-amd64",
			StorageDir:    DefaultEtcdStorageDir,
		},
	}

	DefaultMaster = crdv1.Master{
		TypeMeta: metav1.TypeMeta{
			APIVersion: "crd.cxwen.com/v1",
			Kind:       "Master",
		},
		Spec: crdv1.MasterSpec{
			Version:       "v1.15.12",
			Replicas:      1,
			ImageRegistry: DefaultImageRegistry,
			ImageRepo: &crdv1.ImageRepo{
				Apiserver:         DefaultImageProject + "/kube-apiserver-amd64",
				ControllerManager: DefaultImageProject + "/kube-controller-manager-amd64",
				Scheduler:         DefaultImageProject + "/kube-scheduler-amd64",
				Proxy:             DefaultImageProject + "/kube-proxy-amd64",
			},
			Expose: &crdv1.Expose{
				Method: "NodePort",
				Node:   []string{"127.0.0.1"},
				Port:   "6443",
			},
		},
	}

	DefaultDns = crdv1.Dns{
		TypeMeta: metav1.TypeMeta{
			APIVersion: "crd.cxwen.com/v1",
			Kind:       "Dns",
		},
		Spec: crdv1.DnsSpec{
			Type:          "coredns",
			Version:       "1.6.5",
			Replicas:      2,
			ImageRegistry: DefaultImageRegistry,
			ImageRepo:     DefaultImageProject + "/coredns-amd64",
		},
	}

	DefaultNetworkPlugin = crdv1.NetworkPlugin{
		TypeMeta: metav1.TypeMeta{
			APIVersion: "crd.cxwen.com/v1",
			Kind:       "NetworkPlugin",
		},
		Spec: crdv1.NetworkPluginSpec{
			Type: "calico",
			Calico: &crdv1.CalicoConfig{
				Version:                 DefaultCalicoVersion,
				ImageRegistry:           DefaultImageRegistry,
				InstallCniImageRepo:     DefaultInstallCniImageRepo,
				NodeImageRepo:           DefaultNodeImageRepo,
				FlexvolDriverImageRepo:  DefaultFlexvolDriverImageRepo,
				KubeControllerImageRepo: DefaultKubeControllerImageRepo,
				IpAutodetectionMethod:   DefaultIpAutodetectionMethod,
				Ipv4poolIpip:            DefaultIpv4poolIpip,
				Ipv4poolCidr:            DefaultIpv4poolCidr,
			},
		},
	}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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