resources

package
v0.2.17 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

*

  • Copyright © 2014-2020 The SiteWhere Authors *
  • 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 © 2014-2020 The SiteWhere Authors *
  • 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

This section is empty.

Variables

This section is empty.

Functions

func CreateClusterRoleBindingIfNotExists

func CreateClusterRoleBindingIfNotExists(crb *rbacv1.ClusterRoleBinding, clientset kubernetes.Interface) (*rbacv1.ClusterRoleBinding, error)

CreateClusterRoleBindingIfNotExists Create a ClusterRoleBinding if it does not exists.

func CreateClusterRoleIfNotExists

func CreateClusterRoleIfNotExists(cr *rbacv1.ClusterRole, clientset kubernetes.Interface) (*rbacv1.ClusterRole, error)

CreateClusterRoleIfNotExists Create a ClusterRole if it does not exists.

func CreateConfigMapIfNotExists

func CreateConfigMapIfNotExists(cm *v1.ConfigMap, clientset kubernetes.Interface, namespace string) (*v1.ConfigMap, error)

CreateConfigMapIfNotExists Create a Service Account if it does not exists.

func CreateCustomResourceDefinitionIfNotExists

func CreateCustomResourceDefinitionIfNotExists(crd *apiextv1beta1.CustomResourceDefinition, apiextensionsclientset apiextensionsclientset.Interface) (*apiextv1beta1.CustomResourceDefinition, error)

CreateCustomResourceDefinitionIfNotExists Create a CustomResourceDefinition if it does not exists.

func CreateCustomResourceFromFile

func CreateCustomResourceFromFile(crName string, statikFS http.FileSystem, config *rest.Config) (*metav1.ObjectMeta, error)

CreateCustomResourceFromFile Reads a File from statik and creates a CustomResource from it.

func CreateDeploymentIfNotExists

func CreateDeploymentIfNotExists(deploy *appsv1.Deployment, clientset kubernetes.Interface, namespace string) (*appsv1.Deployment, error)

CreateDeploymentIfNotExists Create a Service Account if it does not exists.

func CreateNamespaceIfNotExists

func CreateNamespaceIfNotExists(namespace string, istioInject bool, clientset kubernetes.Interface) (*v1.Namespace, error)

CreateNamespaceIfNotExists Create a Namespace in Kubernetes if it does not exists.

func CreateNetworkPolicyIfNotExists

func CreateNetworkPolicyIfNotExists(np *networkingv1.NetworkPolicy, clientset kubernetes.Interface, namespace string) (*networkingv1.NetworkPolicy, error)

CreateNetworkPolicyIfNotExists Create a CustomResourceDefinition if it does not exists.

func CreatePersistentVolumeClaimIfNotExists

func CreatePersistentVolumeClaimIfNotExists(pvc *v1.PersistentVolumeClaim, clientset kubernetes.Interface, namespace string) (*v1.PersistentVolumeClaim, error)

CreatePersistentVolumeClaimIfNotExists Create a Service Account if it does not exists.

func CreatePodDisruptionBudgetIfNotExists

func CreatePodDisruptionBudgetIfNotExists(rb *policyV1beta1.PodDisruptionBudget, clientset kubernetes.Interface, namespace string) (*policyV1beta1.PodDisruptionBudget, error)

CreatePodDisruptionBudgetIfNotExists Create a PodDisruptionBudget if it does not exists.

func CreatePodIfNotExists

func CreatePodIfNotExists(pod *v1.Pod, clientset kubernetes.Interface, namespace string) (*v1.Pod, error)

CreatePodIfNotExists Create a Service Account if it does not exists.

func CreateRoleBindingIfNotExists

func CreateRoleBindingIfNotExists(rb *rbacv1.RoleBinding, clientset kubernetes.Interface, namespace string) (*rbacv1.RoleBinding, error)

CreateRoleBindingIfNotExists Create a RoleBinding if it does not exists.

func CreateRoleIfNotExists

func CreateRoleIfNotExists(role *rbacv1.Role, clientset kubernetes.Interface, namespace string) (*rbacv1.Role, error)

CreateRoleIfNotExists Create a Role if it does not exists.

func CreateSecretIfNotExists

func CreateSecretIfNotExists(sec *v1.Secret, clientset kubernetes.Interface, namespace string) (*v1.Secret, error)

CreateSecretIfNotExists Create a Service Account if it does not exists.

func CreateServiceAccountIfNotExists

func CreateServiceAccountIfNotExists(sa *v1.ServiceAccount, clientset kubernetes.Interface, namespace string) (*v1.ServiceAccount, error)

CreateServiceAccountIfNotExists Create a Service Account if it does not exists.

func CreateServiceIfNotExists

func CreateServiceIfNotExists(svc *v1.Service, clientset kubernetes.Interface, namespace string) (*v1.Service, error)

CreateServiceIfNotExists Create a Service Account if it does not exists.

func CreateSiteWhereMicroserviceCR

func CreateSiteWhereMicroserviceCR(cr *unstructured.Unstructured, namespace string, dynamicClient dynamic.Interface) (*unstructured.Unstructured, error)

CreateSiteWhereMicroserviceCR Creates a Custom Resource for a SiteWhere Microservice

func CreateSiteWhereTenantCR added in v0.2.3

func CreateSiteWhereTenantCR(cr *unstructured.Unstructured, namespace string, dynamicClient dynamic.Interface) (*unstructured.Unstructured, error)

CreateSiteWhereTenantCR Creates a Custom Resource for a SiteWhere Tenant

func CreateStatefulSetIfNotExists

func CreateStatefulSetIfNotExists(ss *appsv1.StatefulSet, clientset kubernetes.Interface, namespace string) (*appsv1.StatefulSet, error)

CreateStatefulSetIfNotExists Create a Service Account if it does not exists.

func DeleteClusterRoleBindingIfExists

func DeleteClusterRoleBindingIfExists(crb *rbacv1.ClusterRoleBinding, clientset kubernetes.Interface) error

DeleteClusterRoleBindingIfExists Delete a ClusterRoleBinding if it exists.

func DeleteClusterRoleIfExists

func DeleteClusterRoleIfExists(cr *rbacv1.ClusterRole, clientset kubernetes.Interface) error

DeleteClusterRoleIfExists Delete a ClusterRole if it exists.

func DeleteConfigMapIfExists

func DeleteConfigMapIfExists(cm *v1.ConfigMap, clientset kubernetes.Interface, namespace string) error

DeleteConfigMapIfExists Delete a Service Account if it exists.

func DeleteCustomResourceDefinitionIfExists

func DeleteCustomResourceDefinitionIfExists(crd *apiextv1beta1.CustomResourceDefinition, apiextensionsclientset apiextensionsclientset.Interface) error

DeleteCustomResourceDefinitionIfExists Delete a CustomResourceDefinition if it exists

func DeleteCustomResourceFromFile

func DeleteCustomResourceFromFile(crName string, config *rest.Config, statikFS http.FileSystem) error

DeleteCustomResourceFromFile Reads a File from statik and deletes a CustomResource from it.

func DeleteDeploymentIfExists

func DeleteDeploymentIfExists(deploy *appsv1.Deployment, clientset kubernetes.Interface, namespace string) error

DeleteDeploymentIfExists Delete a Service Account if it does not exists.

func DeleteNamespaceIfExists

func DeleteNamespaceIfExists(namespace string, clientset kubernetes.Interface) error

DeleteNamespaceIfExists Delete a Namespace in Kubernetes if it does exists.

func DeleteNetworkPolicyIfExists

func DeleteNetworkPolicyIfExists(np *networkingv1.NetworkPolicy, clientset kubernetes.Interface, namespace string) error

DeleteNetworkPolicyIfExists Delete a NetworkPolicy if it exists

func DeletePersistentVolumeClaimIfExists

func DeletePersistentVolumeClaimIfExists(pvc *v1.PersistentVolumeClaim, clientset kubernetes.Interface, namespace string) error

DeletePersistentVolumeClaimIfExists Delete a Service Account if it exists.

func DeletePodDisruptionBudgetIfExists

func DeletePodDisruptionBudgetIfExists(rb *policyV1beta1.PodDisruptionBudget, clientset kubernetes.Interface, namespace string) error

DeletePodDisruptionBudgetIfExists Delete a PodDisruptionBudget if it exists.

func DeletePodIfExists

func DeletePodIfExists(pod *v1.Pod, clientset kubernetes.Interface, namespace string) error

DeletePodIfExists Delete a Service Account if it exists.

func DeleteRoleBindingIfExists

func DeleteRoleBindingIfExists(rb *rbacv1.RoleBinding, clientset kubernetes.Interface, namespace string) error

DeleteRoleBindingIfExists Delete a RoleBinding if it exists.

func DeleteRoleIfExists

func DeleteRoleIfExists(role *rbacv1.Role, clientset kubernetes.Interface, namespace string) error

DeleteRoleIfExists Delete a Role if it does not exists.

func DeleteSecretIfExists

func DeleteSecretIfExists(sec *v1.Secret, clientset kubernetes.Interface, namespace string) error

DeleteSecretIfExists Delete a Service Account if it exists.

func DeleteServiceAccountIfExists

func DeleteServiceAccountIfExists(sa *v1.ServiceAccount, clientset kubernetes.Interface, namespace string) error

DeleteServiceAccountIfExists Delete a Service Account if it exists.

func DeleteServiceIfExists

func DeleteServiceIfExists(svc *v1.Service, clientset kubernetes.Interface, namespace string) error

DeleteServiceIfExists Delete a Service Account if it exists.

func DeleteSiteWhereNamespaceIfExists

func DeleteSiteWhereNamespaceIfExists(clientset kubernetes.Interface) error

DeleteSiteWhereNamespaceIfExists Delete a Namespace in Kubernetes if it does exists.

func DeleteStatefulSetIfExists

func DeleteStatefulSetIfExists(ss *appsv1.StatefulSet, clientset kubernetes.Interface, namespace string) error

DeleteStatefulSetIfExists Delete a Service Account if it exists.

func ListSitewhereInstacesCR

func ListSitewhereInstacesCR(dynamicClient dynamic.Interface, clientset kubernetes.Interface) ([]*sitewhereiov1alpha4.SiteWhereInstance, error)

ListSitewhereInstacesCR List SiteWhere Instance CR installed

func SitewhereSystemNamespace

func SitewhereSystemNamespace() string

SitewhereSystemNamespace returns the namespace for SiteWhere

func WaitForCRDStablished added in v0.2.3

func WaitForCRDStablished(apiextensionsclientset apiextensionsclientset.Interface, name string) error

WaitForCRDStablished waits for a CRD to be stablished

func WaitForDeploymentAvailable added in v0.2.3

func WaitForDeploymentAvailable(clientset kubernetes.Interface, deploymentName string, namespace string) error

WaitForDeploymentAvailable waits for a Deployment to became available

func WaitForSecretExists added in v0.2.3

func WaitForSecretExists(clientset kubernetes.Interface, name string, namespace string) error

WaitForSecretExists waits for a Secret to exists

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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