Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAlphaFeatureSet ¶
IsAlphaFeatureSet checks if the comma separated features have the name set in it.
Types ¶
type CalicoAPIConfig ¶
type CalicoAPIConfig struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of the BGPConfiguration. Spec CalicoAPIConfigSpec `json:"spec,omitempty"` }
CalicoAPIConfig contains the connection information for a Calico CalicoAPIConfig resource
func LoadClientConfig ¶
func LoadClientConfig(filename string) (*CalicoAPIConfig, error)
LoadClientConfig loads the ClientConfig from the specified file (if specified) or from environment variables (if the file is not specified).
func LoadClientConfigFromBytes ¶
func LoadClientConfigFromBytes(b []byte) (*CalicoAPIConfig, error)
LoadClientConfig loads the ClientConfig from the supplied bytes containing YAML or JSON format data.
func LoadClientConfigFromEnvironment ¶
func LoadClientConfigFromEnvironment() (*CalicoAPIConfig, error)
LoadClientConfig loads the ClientConfig from the specified file (if specified) or from environment variables (if the file is not specified).
func NewCalicoAPIConfig ¶
func NewCalicoAPIConfig() *CalicoAPIConfig
NewCalicoAPIConfig creates a new (zeroed) CalicoAPIConfig struct with the TypeMetadata initialised to the current version.
type CalicoAPIConfigSpec ¶
type CalicoAPIConfigSpec struct { DatastoreType DatastoreType `json:"datastoreType" envconfig:"DATASTORE_TYPE" default:"etcdv3"` // Inline the ectd config fields EtcdConfig // Inline the k8s config fields. KubeConfig }
CalicoAPIConfigSpec contains the specification for a Calico CalicoAPIConfig resource.
type DatastoreType ¶
type DatastoreType string
const ( EtcdV3 DatastoreType = "etcdv3" Kubernetes DatastoreType = "kubernetes" KindCalicoAPIConfig = "CalicoAPIConfig" )
type EtcdConfig ¶
type EtcdConfig struct { EtcdEndpoints string `json:"etcdEndpoints" envconfig:"ETCD_ENDPOINTS"` EtcdUsername string `json:"etcdUsername" envconfig:"ETCD_USERNAME"` EtcdPassword string `json:"etcdPassword" envconfig:"ETCD_PASSWORD"` EtcdKeyFile string `json:"etcdKeyFile" envconfig:"ETCD_KEY_FILE"` EtcdCertFile string `json:"etcdCertFile" envconfig:"ETCD_CERT_FILE"` EtcdCACertFile string `json:"etcdCACertFile" envconfig:"ETCD_CA_CERT_FILE"` // These config file parameters are to support inline certificates, keys and CA / Trusted certificate. // There are no corresponding environment variables to avoid accidental exposure. EtcdKey string `json:"etcdKey" ignored:"true"` EtcdCert string `json:"etcdCert" ignored:"true"` EtcdCACert string `json:"etcdCACert" ignored:"true"` }
type KubeConfig ¶
type KubeConfig struct { Kubeconfig string `json:"kubeconfig" envconfig:"KUBECONFIG" default:""` K8sAPIEndpoint string `json:"k8sAPIEndpoint" envconfig:"K8S_API_ENDPOINT" default:""` K8sKeyFile string `json:"k8sKeyFile" envconfig:"K8S_KEY_FILE" default:""` K8sCertFile string `json:"k8sCertFile" envconfig:"K8S_CERT_FILE" default:""` K8sCAFile string `json:"k8sCAFile" envconfig:"K8S_CA_FILE" default:""` K8sAPIToken string `json:"k8sAPIToken" ignore:"true"` K8sInsecureSkipTLSVerify bool `json:"k8sInsecureSkipTLSVerify" envconfig:"K8S_INSECURE_SKIP_TLS_VERIFY" default:""` K8sDisableNodePoll bool `json:"k8sDisableNodePoll" envconfig:"K8S_DISABLE_NODE_POLL" default:""` // K8sUsePodCIDR controls whether or not IPAM blocks are generated based on Node.Spec.PodCIDR. Set this // to true when using host-local IPAM, and set to false when using calico-ipam. K8sUsePodCIDR bool `json:"usePodCIDR" envconfig:"USE_POD_CIDR" default:""` }