asset

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AssetPathSecrets                     = "tls"
	AssetPathCAKey                       = "tls/ca.key"
	AssetPathCACert                      = "tls/ca.crt"
	AssetPathAPIServerKey                = "tls/apiserver.key"
	AssetPathAPIServerCert               = "tls/apiserver.crt"
	AssetPathEtcdClientCA                = "tls/etcd-client-ca.crt"
	AssetPathEtcdClientCert              = "tls/etcd-client.crt"
	AssetPathEtcdClientKey               = "tls/etcd-client.key"
	AssetPathEtcdServerCA                = "tls/etcd/server-ca.crt"
	AssetPathEtcdServerCert              = "tls/etcd/server.crt"
	AssetPathEtcdServerKey               = "tls/etcd/server.key"
	AssetPathEtcdPeerCA                  = "tls/etcd/peer-ca.crt"
	AssetPathEtcdPeerCert                = "tls/etcd/peer.crt"
	AssetPathEtcdPeerKey                 = "tls/etcd/peer.key"
	AssetPathServiceAccountPrivKey       = "tls/service-account.key"
	AssetPathServiceAccountPubKey        = "tls/service-account.pub"
	AssetPathAdminKey                    = "tls/admin.key"
	AssetPathAdminCert                   = "tls/admin.crt"
	AssetPathAdminKubeConfig             = "auth/kubeconfig"
	AssetPathKubeletKubeConfig           = "auth/kubeconfig-kubelet"
	AssetPathManifests                   = "manifests"
	AssetPathKubeConfigInCluster         = "manifests/kubeconfig-in-cluster.yaml"
	AssetPathKubeletBootstrapToken       = "manifests/kubelet-bootstrap-token.yaml"
	AssetPathProxy                       = "manifests/kube-proxy.yaml"
	AssetPathProxySA                     = "manifests/kube-proxy-sa.yaml"
	AssetPathProxyRoleBinding            = "manifests/kube-proxy-role-binding.yaml"
	AssetPathKubeFlannel                 = "manifests/kube-flannel.yaml"
	AssetPathKubeFlannelCfg              = "manifests/kube-flannel-cfg.yaml"
	AssetPathCalico                      = "manifests/calico.yaml"
	AssetPathCalicoPolicyOnly            = "manifests/calico-policy-only.yaml"
	AssetPathCalicoCfg                   = "manifests/calico-config.yaml"
	AssetPathCalicoSA                    = "manifests/calico-service-account.yaml"
	AssetPathCalicoRole                  = "manifests/calico-role.yaml"
	AssetPathCalicoRoleBinding           = "manifests/calico-role-binding.yaml"
	AssetPathCalicoBGPConfigsCRD         = "manifests/calico-bgp-configs-crd.yaml"
	AssetPathCalicoFelixConfigsCRD       = "manifests/calico-felix-configs-crd.yaml"
	AssetPathCalicoNetworkPoliciesCRD    = "manifests/calico-network-policies-crd.yaml"
	AssetPathCalicoIPPoolsCRD            = "manifests/calico-ip-pools-crd.yaml"
	AssetPathAPIServerSecret             = "manifests/kube-apiserver-secret.yaml"
	AssetPathAPIServer                   = "manifests/kube-apiserver.yaml"
	AssetPathControllerManager           = "manifests/kube-controller-manager.yaml"
	AssetPathControllerManagerSA         = "manifests/kube-controller-manager-service-account.yaml"
	AssetPathControllerManagerRB         = "manifests/kube-controller-manager-role-binding.yaml"
	AssetPathControllerManagerSecret     = "manifests/kube-controller-manager-secret.yaml"
	AssetPathControllerManagerDisruption = "manifests/kube-controller-manager-disruption.yaml"
	AssetPathScheduler                   = "manifests/kube-scheduler.yaml"
	AssetPathSchedulerDisruption         = "manifests/kube-scheduler-disruption.yaml"
	AssetPathKubeDNSDeployment           = "manifests/kube-dns-deployment.yaml"
	AssetPathKubeDNSSvc                  = "manifests/kube-dns-svc.yaml"
	AssetPathSystemNamespace             = "manifests/kube-system-ns.yaml"
	AssetPathCheckpointer                = "manifests/pod-checkpointer.yaml"
	AssetPathCheckpointerSA              = "manifests/pod-checkpointer-sa.yaml"
	AssetPathCheckpointerRole            = "manifests/pod-checkpointer-role.yaml"
	AssetPathCheckpointerRoleBinding     = "manifests/pod-checkpointer-role-binding.yaml"
	AssetPathEtcdOperator                = "manifests/etcd-operator.yaml"
	AssetPathEtcdSvc                     = "manifests/etcd-service.yaml"
	AssetPathEtcdClientSecret            = "manifests/etcd-client-tls.yaml"
	AssetPathEtcdPeerSecret              = "manifests/etcd-peer-tls.yaml"
	AssetPathEtcdServerSecret            = "manifests/etcd-server-tls.yaml"
	AssetPathKenc                        = "manifests/kube-etcd-network-checkpointer.yaml"
	AssetPathCSRBootstrapRoleBinding     = "manifests/csr-bootstrap-role-binding.yaml"
	AssetPathCSRApproverRoleBinding      = "manifests/csr-approver-role-binding.yaml"
	AssetPathCSRRenewalRoleBinding       = "manifests/csr-renewal-role-binding.yaml"
	AssetPathKubeSystemSARoleBinding     = "manifests/kube-system-rbac-role-binding.yaml"
	AssetPathBootstrapManifests          = "bootstrap-manifests"
	AssetPathBootstrapAPIServer          = "bootstrap-manifests/bootstrap-apiserver.yaml"
	AssetPathBootstrapControllerManager  = "bootstrap-manifests/bootstrap-controller-manager.yaml"
	AssetPathBootstrapScheduler          = "bootstrap-manifests/bootstrap-scheduler.yaml"
	AssetPathBootstrapEtcd               = "bootstrap-manifests/bootstrap-etcd.yaml"
	AssetPathBootstrapEtcdService        = "etcd/bootstrap-etcd-service.json"
	AssetPathMigrateEtcdCluster          = "etcd/migrate-etcd-cluster.json"
)
View Source
const (
	// The name of the k8s service that selects self-hosted etcd pods
	EtcdServiceName = "etcd-service"

	SecretEtcdPeer   = "etcd-peer-tls"
	SecretEtcdServer = "etcd-server-tls"
	SecretEtcdClient = "etcd-client-tls"

	NetworkFlannel = "flannel"
	NetworkCalico  = "experimental-calico"
	NetworkCanal   = "experimental-canal"
)

Variables

View Source
var (
	BootstrapSecretsDir = "/etc/kubernetes/bootstrap-secrets" // Overridden for testing.
)
View Source
var DefaultImages = ImageVersions{
	Etcd:            "quay.io/coreos/etcd:v3.1.8",
	EtcdOperator:    "quay.io/coreos/etcd-operator:v0.5.0",
	Flannel:         "quay.io/coreos/flannel:v0.9.1-amd64",
	FlannelCNI:      "quay.io/coreos/flannel-cni:v0.3.0",
	Calico:          "quay.io/calico/node:v2.6.4",
	CalicoCNI:       "quay.io/calico/cni:v1.11.2",
	Hyperkube:       "gcr.io/google_containers/hyperkube:v1.9.2",
	Kenc:            "quay.io/coreos/kenc:0.0.2",
	KubeDNS:         "gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.14.5",
	KubeDNSMasq:     "gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64:1.14.5",
	KubeDNSSidecar:  "gcr.io/google_containers/k8s-dns-sidecar-amd64:1.14.5",
	PodCheckpointer: "quay.io/coreos/pod-checkpointer:3cd08279c564e95c8b42a0b97c073522d4a6b965",
}

DefaultImages are the defualt images bootkube components use.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Name string
	Data []byte
}

func MustCreateAssetFromTemplate added in v0.4.4

func MustCreateAssetFromTemplate(name string, template []byte, data interface{}) Asset

func (Asset) WriteFile added in v0.4.4

func (a Asset) WriteFile(path string) error

type Assets

type Assets []Asset

func NewDefaultAssets

func NewDefaultAssets(conf Config) (Assets, error)

NewDefaultAssets returns a list of default assets, optionally configured via a user provided AssetConfig. Default assets include TLS assets (certs, keys and secrets), and k8s component manifests.

func (Assets) Get

func (as Assets) Get(name string) (Asset, error)

func (Assets) WriteFiles

func (as Assets) WriteFiles(path string) error

type Config

type Config struct {
	EtcdCACert             *x509.Certificate
	EtcdClientCert         *x509.Certificate
	EtcdClientKey          *rsa.PrivateKey
	EtcdServers            []*url.URL
	EtcdUseTLS             bool
	APIServers             []*url.URL
	CACert                 *x509.Certificate
	CAPrivKey              *rsa.PrivateKey
	AltNames               *tlsutil.AltNames
	PodCIDR                *net.IPNet
	ServiceCIDR            *net.IPNet
	APIServiceIP           net.IP
	BootEtcdServiceIP      net.IP
	DNSServiceIP           net.IP
	EtcdServiceIP          net.IP
	EtcdServiceName        string
	CloudProvider          string
	NetworkProvider        string
	BootstrapSecretsSubdir string
	Images                 ImageVersions
}

AssetConfig holds all configuration needed when generating the default set of assets.

type ImageVersions added in v0.4.3

type ImageVersions struct {
	Etcd            string
	EtcdOperator    string
	Flannel         string
	FlannelCNI      string
	Calico          string
	CalicoCNI       string
	Hyperkube       string
	Kenc            string
	KubeDNS         string
	KubeDNSMasq     string
	KubeDNSSidecar  string
	PodCheckpointer string
}

ImageVersions holds all the images (and their versions) that are rendered into the templates.

Directories

Path Synopsis
Package internal holds asset templates used by bootkube.
Package internal holds asset templates used by bootkube.

Jump to

Keyboard shortcuts

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