Class: Clusters::KubernetesNamespace
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Clusters::KubernetesNamespace
- Includes:
- Gitlab::EncryptedAttribute, Gitlab::Kubernetes
- Defined in:
- app/models/clusters/kubernetes_namespace.rb
Constant Summary
Constants included from Gitlab::Kubernetes
Gitlab::Kubernetes::EXEC_COMMAND
Constants inherited from ApplicationRecord
Constants included from HasCheckConstraints
HasCheckConstraints::NOT_NULL_CHECK_PATTERN
Constants included from ResetOnColumnErrors
ResetOnColumnErrors::MAX_RESET_PERIOD
Instance Method Summary collapse
Methods included from Gitlab::Kubernetes
#add_terminal_auth, build_header_hash, #container_exec_url, #filter_by_annotation, #filter_by_label, #filter_by_legacy_label, #filter_by_project_environment, #terminals_for_pod, #to_kubeconfig
Methods inherited from ApplicationRecord
===, cached_column_list, #create_or_load_association, current_transaction, declarative_enum, default_select_columns, delete_all_returning, #deleted_from_database?, id_in, id_not_in, iid_in, nullable_column?, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order
Methods included from Organizations::Sharding
Methods included from ResetOnColumnErrors
#reset_on_union_error, #reset_on_unknown_attribute_error
Methods included from Gitlab::SensitiveSerializableHash
Instance Method Details
#predefined_variables ⇒ Object
37 38 39 40 41 42 43 44 45 |
# File 'app/models/clusters/kubernetes_namespace.rb', line 37 def predefined_variables Gitlab::Ci::Variables::Collection.new.tap do |variables| variables .append(key: 'KUBE_SERVICE_ACCOUNT', value: service_account_name.to_s) .append(key: 'KUBE_NAMESPACE', value: namespace.to_s) .append(key: 'KUBE_TOKEN', value: service_account_token.to_s, public: false, masked: true) .append(key: 'KUBECONFIG', value: kubeconfig, public: false, file: true) end end |
#token_name ⇒ Object
33 34 35 |
# File 'app/models/clusters/kubernetes_namespace.rb', line 33 def token_name "#{namespace}-token" end |