Documentation ¶
Overview ¶
Copyright 2018 Oracle and/or its affiliates. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2018 Oracle and/or its affiliates. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func CreateOrUpdateCluster(c clientset.Interface, cluster *cloudv1alpha1.Cluster, ...) (*cev1alpha1.Cluster, bool, error)
- func CreateOrUpdateCompute(c clientset.Interface, cluster *cloudv1alpha1.Cluster, ...) (*cloudv1alpha1.Compute, bool, error)
- func CreateOrUpdateLoadBalancer(c clientset.Interface, cluster *cloudv1alpha1.Cluster, ...) (*cloudv1alpha1.LoadBalancer, bool, error)
- func CreateOrUpdateNetwork(c clientset.Interface, cluster *cloudv1alpha1.Cluster, ...) (*cloudv1alpha1.Network, bool, error)
- func CreateOrUpdateNodePool(c clientset.Interface, cluster *cloudv1alpha1.Cluster, ...) (*cev1alpha1.NodePool, bool, error)
- func CreateOrUpdatePolicy(c clientset.Interface, cluster *cloudv1alpha1.Cluster, ...) (*idv1alpha1.Policy, bool, error)
- func CreateOrUpdateSecurity(c clientset.Interface, cluster *cloudv1alpha1.Cluster, ...) (*cloudv1alpha1.Security, bool, error)
- func DeleteCluster(c clientset.Interface, namespace string, name string) (*cev1alpha1.Cluster, error)
- func DeleteCompute(c clientset.Interface, namespace string, instanceName string) (*cloudv1alpha1.Compute, error)
- func DeleteLoadBalancer(c clientset.Interface, namespace string, lbName string) (*cloudv1alpha1.LoadBalancer, error)
- func DeleteNetwork(c clientset.Interface, namespace string, name string) (*cloudv1alpha1.Network, error)
- func DeleteNodePool(c clientset.Interface, namespace string, name string) (*cev1alpha1.NodePool, error)
- func DeletePolicy(c clientset.Interface, namespace string, name string) (*idv1alpha1.Policy, error)
- func DeleteSecret(c kubernetes.Interface, namespace string, name string) (*v1.Secret, error)
- func DeleteSecurity(c clientset.Interface, namespace string, securityName string) (*cloudv1alpha1.Security, error)
- func NewClusterAdapter(clientSet versioned.Interface, kubeclient kubernetes.Interface) cloudcommon.CloudTypeAdapter
- type ClusterAdapter
- func (a *ClusterAdapter) CallbackForResource(resource schema.GroupVersionResource) cache.ResourceEventHandlerFuncs
- func (a *ClusterAdapter) Delete(obj runtime.Object) (runtime.Object, error)
- func (a *ClusterAdapter) Equivalent(obj1, obj2 runtime.Object) bool
- func (a *ClusterAdapter) GroupVersionWithResource() schema.GroupVersionResource
- func (a *ClusterAdapter) Kind() string
- func (a *ClusterAdapter) ObjectMeta(obj runtime.Object) *metav1.ObjectMeta
- func (a *ClusterAdapter) Reconcile(obj runtime.Object) (runtime.Object, error)
- func (a *ClusterAdapter) Resource() string
- func (a *ClusterAdapter) SetLister(lister cache.GenericLister)
- func (a *ClusterAdapter) SetQueue(q workqueue.RateLimitingInterface)
- func (a *ClusterAdapter) Subscriptions() []schema.GroupVersionResource
- func (a *ClusterAdapter) Update(obj runtime.Object) (runtime.Object, error)
Constants ¶
const ( MASTER_KIND = "master" WORKER_KIND = "worker" LB_SVC_KIND = "lb" NODE_KIND = "node" ADMIN_RBAC = `` /* 254-byte string literal not displayed */ BASE_KUBEADM_INSTALL = `` /* 792-byte string literal not displayed */ // TCP for ssl passthru LB_PROTOCOL = "TCP" LB_PORT = 443 BACKEND_K8S_API_PORT = 6443 )
const (
ADMIN_USER = "kubernetes-admin"
)
const (
CloudDomain = "cluster"
)
Variables ¶
var K8S_GROUPS = []string{MASTER_KIND, WORKER_KIND}
var MASTER_RULES = []string{"0.0.0.0/0 tcp 22", "0.0.0.0/0 tcp 6443", "0.0.0.0/0 tcp 443"}
var POD_NETWORK = "10.244.0.0/16"
const/vars needed for references
var SERVICE_NETWORK = "10.96.0.0/16"
var WORKER_RULES = []string{"0.0.0.0/0 tcp 22", "0.0.0.0/0 tcp 10250"}
Functions ¶
func CreateOrUpdateCluster ¶
func CreateOrUpdateCluster(c clientset.Interface, cluster *cloudv1alpha1.Cluster, controllerRef *metav1.OwnerReference, serviceLbSubnetRefs *[]string, clusterName *string) (*cev1alpha1.Cluster, bool, error)
CreateOrUpdateCluster reconciles the ce cluster resource
func CreateOrUpdateCompute ¶
func CreateOrUpdateCompute(c clientset.Interface, cluster *cloudv1alpha1.Cluster, controllerRef *metav1.OwnerReference, kind string, extraSans string) (*cloudv1alpha1.Compute, bool, error)
CreateOrUpdateCompute reconciles the compute resource
func CreateOrUpdateLoadBalancer ¶
func CreateOrUpdateLoadBalancer(c clientset.Interface, cluster *cloudv1alpha1.Cluster, controllerRef *metav1.OwnerReference) (*cloudv1alpha1.LoadBalancer, bool, error)
CreateOrUpdateLoadBalancer reconciles the LoadBalancer resource
func CreateOrUpdateNetwork ¶
func CreateOrUpdateNetwork(c clientset.Interface, cluster *cloudv1alpha1.Cluster, controllerRef *metav1.OwnerReference) (*cloudv1alpha1.Network, bool, error)
CreateOrUpdateNetwork reconciles the network resource
func CreateOrUpdateNodePool ¶
func CreateOrUpdateNodePool(c clientset.Interface, cluster *cloudv1alpha1.Cluster, controllerRef *metav1.OwnerReference, nodeSubnetRefs *[]string, clusterName *string) (*cev1alpha1.NodePool, bool, error)
CreateOrUpdateNodePool reconciles the nodepool resource
func CreateOrUpdatePolicy ¶
func CreateOrUpdatePolicy(c clientset.Interface, cluster *cloudv1alpha1.Cluster, controllerRef *metav1.OwnerReference) (*idv1alpha1.Policy, bool, error)
CreateOrUpdatePolicy reconciles the policy resource
func CreateOrUpdateSecurity ¶
func CreateOrUpdateSecurity(c clientset.Interface, cluster *cloudv1alpha1.Cluster, controllerRef *metav1.OwnerReference, kind string) (*cloudv1alpha1.Security, bool, error)
CreateOrUpdateSecurity reconciles the security resource
func DeleteCluster ¶
func DeleteCluster(c clientset.Interface, namespace string, name string) (*cev1alpha1.Cluster, error)
DeleteCluster deletes the cluster resource
func DeleteCompute ¶
func DeleteCompute(c clientset.Interface, namespace string, instanceName string) (*cloudv1alpha1.Compute, error)
DeleteCompute deletes the compute resource
func DeleteLoadBalancer ¶
func DeleteLoadBalancer(c clientset.Interface, namespace string, lbName string) (*cloudv1alpha1.LoadBalancer, error)
DeleteLoadBalancer deletes the loadbalancer resource
func DeleteNetwork ¶
func DeleteNetwork(c clientset.Interface, namespace string, name string) (*cloudv1alpha1.Network, error)
DeleteNetwork deletes the subnet resource
func DeleteNodePool ¶
func DeleteNodePool(c clientset.Interface, namespace string, name string) (*cev1alpha1.NodePool, error)
DeleteNodePool deletes the nodepool resource
func DeletePolicy ¶
DeletePolicy deletes the policy resource
func DeleteSecret ¶
DeleteSecret deletes the secret resource
func DeleteSecurity ¶
func DeleteSecurity(c clientset.Interface, namespace string, securityName string) (*cloudv1alpha1.Security, error)
DeleteSecurity deletes the security resource
func NewClusterAdapter ¶
func NewClusterAdapter(clientSet versioned.Interface, kubeclient kubernetes.Interface) cloudcommon.CloudTypeAdapter
factory method
Types ¶
type ClusterAdapter ¶
type ClusterAdapter struct {
// contains filtered or unexported fields
}
func (*ClusterAdapter) CallbackForResource ¶
func (a *ClusterAdapter) CallbackForResource(resource schema.GroupVersionResource) cache.ResourceEventHandlerFuncs
callback for resource
func (*ClusterAdapter) Equivalent ¶
func (a *ClusterAdapter) Equivalent(obj1, obj2 runtime.Object) bool
equivalent
func (*ClusterAdapter) GroupVersionWithResource ¶
func (a *ClusterAdapter) GroupVersionWithResource() schema.GroupVersionResource
group version with resource
func (*ClusterAdapter) ObjectMeta ¶
func (a *ClusterAdapter) ObjectMeta(obj runtime.Object) *metav1.ObjectMeta
object meta
func (*ClusterAdapter) SetLister ¶
func (a *ClusterAdapter) SetLister(lister cache.GenericLister)
set lister
func (*ClusterAdapter) SetQueue ¶
func (a *ClusterAdapter) SetQueue(q workqueue.RateLimitingInterface)
set queue
func (*ClusterAdapter) Subscriptions ¶
func (a *ClusterAdapter) Subscriptions() []schema.GroupVersionResource
subscriptions