Module: Porkadot::Configs::Kubernetes::Component
- Included in:
- Apiserver, ControllerManager, Proxy, Scheduler
- Defined in:
- lib/porkadot/configs/kubernetes.rb
Constant Summary collapse
- RECOMMENDED_LABEL_PREFIX =
'app.kubernetes.io'
Instance Method Summary collapse
Instance Method Details
#args(bootstrap: false) ⇒ Object
67 68 69 70 71 72 73 74 75 76 |
# File 'lib/porkadot/configs/kubernetes.rb', line 67 def args bootstrap: false extra = {} if self.extra_args extra = self.extra_args.map{|i| i.split('=', 2)}.to_h end if bootstrap extra = self.bootstrap_args.merge(extra) end return self.default_args.merge(extra) end |
#instance_labels ⇒ Object
58 59 60 61 62 63 64 65 |
# File 'lib/porkadot/configs/kubernetes.rb', line 58 def instance_labels { "#{RECOMMENDED_LABEL_PREFIX}/component": self.component_name, "#{RECOMMENDED_LABEL_PREFIX}/instance": "#{self.component_name}-porkadot", "#{RECOMMENDED_LABEL_PREFIX}/managed-by": 'porkadot', } end |
#labels ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/porkadot/configs/kubernetes.rb', line 46 def labels self.instance_labels.merge({ "#{RECOMMENDED_LABEL_PREFIX}/name": self.component_name, "#{RECOMMENDED_LABEL_PREFIX}/component": self.component_name, "#{RECOMMENDED_LABEL_PREFIX}/instance": "#{self.component_name}-porkadot", "#{RECOMMENDED_LABEL_PREFIX}/version": self.config.k8s.kubernetes_version, "#{RECOMMENDED_LABEL_PREFIX}/part-of": 'kubernetes', "#{RECOMMENDED_LABEL_PREFIX}/managed-by": 'porkadot', "k8s-app": self.component_name, }) end |
#log_level ⇒ Object
78 79 80 |
# File 'lib/porkadot/configs/kubernetes.rb', line 78 def log_level config.kubernetes.log_level || raw.log_level || 2 end |