cluster

package
v0.0.0-...-b3f0fa4 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2018 License: Apache-2.0 Imports: 32 Imported by: 0

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

View Source
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
)
View Source
const (
	ADMIN_USER = "kubernetes-admin"
)
View Source
const (
	CloudDomain = "cluster"
)

Variables

View Source
var K8S_GROUPS = []string{MASTER_KIND, WORKER_KIND}
View Source
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"}
View Source
var POD_NETWORK = "10.244.0.0/16"

const/vars needed for references

View Source
var SERVICE_NETWORK = "10.96.0.0/16"
View Source
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

func DeletePolicy(c clientset.Interface, namespace string, name string) (*idv1alpha1.Policy, error)

DeletePolicy deletes the policy resource

func DeleteSecret

func DeleteSecret(c kubernetes.Interface, namespace string, name string) (*v1.Secret, error)

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

callback for resource

func (*ClusterAdapter) Delete

func (a *ClusterAdapter) Delete(obj runtime.Object) (runtime.Object, error)

delete cluster cloud event handler

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) Kind

func (a *ClusterAdapter) Kind() string

kind

func (*ClusterAdapter) ObjectMeta

func (a *ClusterAdapter) ObjectMeta(obj runtime.Object) *metav1.ObjectMeta

object meta

func (*ClusterAdapter) Reconcile

func (a *ClusterAdapter) Reconcile(obj runtime.Object) (runtime.Object, error)

reconcile - handles create and updates

func (*ClusterAdapter) Resource

func (a *ClusterAdapter) Resource() string

resource

func (*ClusterAdapter) SetLister

func (a *ClusterAdapter) SetLister(lister cache.GenericLister)

set lister

func (*ClusterAdapter) SetQueue

set queue

func (*ClusterAdapter) Subscriptions

func (a *ClusterAdapter) Subscriptions() []schema.GroupVersionResource

subscriptions

func (*ClusterAdapter) Update

func (a *ClusterAdapter) Update(obj runtime.Object) (runtime.Object, error)

update cluster cloud event handler

Jump to

Keyboard shortcuts

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