Class: RubyKubernetesController::Client

Inherits:
Object
  • Object
show all
Includes:
ConfigMaps, CronJobs, Deployments, Endpoints, Generic, Ingresses, Jobs, Namespaces, Nodes, PersistentVolumeClaims, PersistentVolumes, Pods, ReplicaSets, Services, Utilities
Defined in:
lib/ruby-kubernetes-controller/client.rb

Overview

Client Class

Instance Method Summary collapse

Methods included from Utilities

#trigger_cronjob

Methods included from CronJobs

#create_new_cronjob, #delete_cronjob, #get_all_cronjobs, #get_all_namespaced_cronjobs, #get_single_namespaced_cronjob, #patch_cronjob, #update_namespaced_cronjob

Methods included from Generic

#check_valid_json, #prepareGenericRequest, #prepareGenericRequestOptions, #prepareURI, #prepareURIWithParams, #yaml_file_to_json

Methods included from Jobs

#create_new_job, #delete_job, #get_all_jobs, #get_all_namespaced_jobs, #get_single_namespaced_job, #patch_job, #update_namespaced_job

Methods included from PersistentVolumeClaims

#create_new_persistentvolumeclaim, #delete_persistentvolumeclaim, #get_all_namespaced_persistentvolumeclaims, #get_all_persistentvolumeclaims, #get_single_namespaced_persistentvolumeclaim, #patch_persistentvolumeclaim, #update_namespaced_persistentvolumeclaim

Methods included from PersistentVolumes

#create_new_persistentvolume, #delete_persistentvolume, #get_all_persistentvolumes, #get_single_persistentvolume, #patch_persistentvolume, #update_namespaced_persistentvolume

Methods included from ConfigMaps

#create_new_configmap, #delete_configmap, #get_all_configmaps, #get_all_namespaced_configmaps, #get_single_namespaced_configmap, #patch_configmap, #update_configmap

Methods included from ReplicaSets

#create_new_replicaset, #delete_replicaset, #get_all_namespaced_replicasets, #get_all_replicasets, #get_single_namespaced_replicaset, #patch_replicaset, #update_namespaced_replicaset

Methods included from Deployments

#create_new_deployment, #delete_deployment, #get_all_deployments, #get_all_namespaced_deployments, #get_single_namespaced_deployment, #patch_deployment, #update_namespaced_deployment

Methods included from Services

#create_new_service, #delete_service, #get_all_namespaced_services, #get_all_services, #get_single_namespaced_service, #patch_service, #update_namespaced_service

Methods included from Pods

#create_new_pod, #delete_pod, #get_all_namespaced_pods, #get_all_namespaced_pods_with_field_selector, #get_all_namespaced_pods_with_label_selector, #get_all_pods, #get_single_namespaced_pod, #patch_pod, #update_namespaced_pod

Methods included from Endpoints

#create_new_endpoint, #delete_endpoint, #get_all_endpoints, #get_all_namespaced_endpoints, #get_single_namespaced_endpoint, #patch_endpoint, #update_namespaced_endpoint

Methods included from Nodes

#get_nodes

Methods included from Ingresses

#create_new_ingress, #delete_ingress, #get_all_ingresses, #get_all_namespaced_ingresses, #get_single_namespaced_ingress, #patch_ingress, #update_namespaced_ingress

Methods included from Namespaces

#create_new_namespace, #delete_namespace, #get_all_namespaces, #patch_namespace, #update_namespace

Constructor Details

#initialize(endpoint, bearer_token, ssl = true, yaml = false) ⇒ Client

Constructor



45
46
47
48
49
50
51
52
# File 'lib/ruby-kubernetes-controller/client.rb', line 45

def initialize(endpoint, bearer_token, ssl = true, yaml = false)
  # Instantiating client variables
  @endpoint = endpoint
  @bearer_token = bearer_token
  @bearer_token = default_serviceaccount_token if bearer_token.empty?
  @ssl = ssl
  @yaml = yaml
end

Instance Method Details

#getBearerObject

Return Bearer Token



60
61
62
# File 'lib/ruby-kubernetes-controller/client.rb', line 60

def getBearer
  @bearer_token
end

#getEndpointObject

Return endpoint



55
56
57
# File 'lib/ruby-kubernetes-controller/client.rb', line 55

def getEndpoint
  @endpoint
end

#getSSLObject

Return SSL choice



65
66
67
# File 'lib/ruby-kubernetes-controller/client.rb', line 65

def getSSL
  @ssl
end