Commit Graph

44 Commits

Author SHA1 Message Date
Thong Kuah 14b3033a0d Show HTTP response code for Kubernetes errors 2018-11-13 12:46:01 +00:00
Thong Kuah 5d2fd2ea9e Fix deployment jobs using nil token 2018-11-13 10:27:21 +00:00
Thong Kuah b054694e49 Still raise if there's no #actual_namespace
However, we only need to raise for project_type clusters to maintain
previous behaviour.

In all probablity this requirement to have actual_namespace came from
KubernetesService and will no longer be required soon.
2018-11-08 23:52:58 +13:00
Thong Kuah b4488cee97 Consolidate how we allow user defined namespace
Use model method as single source of truth instead of splitting between
presenter and Kubernetes model
2018-11-08 23:28:30 +13:00
Thong Kuah 5a042ef2fb Only project clusters has Project Namespace field
Group clusters should not allow Project Namespace so don't show that
field input too
2018-11-08 23:28:30 +13:00
Thong Kuah 2109cb996a Group clusters will have no actual_namespace
Remove the requirement to have actual_namespace before using kubeclient.
2018-11-08 23:14:06 +13:00
Chris Baumbauer aa44393e8f Merge branch 'master' into triggermesh-phase1-knative 2018-11-03 10:13:35 -07:00
Thong Kuah 5ede567d71 Incorporates Kubernetes Namespace into Cluster's flow 2018-11-02 15:46:15 +00:00
Chris Baumbauer dc078c2417 Merge branch 'master' into triggermesh-phase1-knative 2018-11-02 08:39:25 -07:00
Chris Baumbauer 661fd213de Update helm version 1.7.2 -> 2.11.0 2018-10-24 15:13:33 -07:00
Thong Kuah a5419138fd Store version within SUPPORTED_API_GROUPS hash
This removes the ability to pass in a different version. We can instead
create a new entry in the SUPPORTED_API_GROUPS hash for a different
version if need be.
2018-10-23 23:52:34 +13:00
Thong Kuah 8d81f2690c Update all usages of KubeClient
Find and replace everywhere we pass in `api_groups` to KubeClient, as no
longer needed
2018-10-23 23:36:43 +13:00
Mayra Cabrera e3ca493876 Add Clusters::KubernetesNamespace model
This model will be used to persist into database Kubernetes properties,
such as namespace, service account name and service account token.
2018-10-22 09:54:00 -05:00
Thong Kuah 6f2ad2b604 Enable Kubernetes RBAC for GitLab Managed Apps for existing clusters 2018-09-06 10:03:38 +00:00
gfyoung 388cb319d5 Enable frozen string for app/models/**/*.rb
Partially addresses #47424.
2018-08-03 01:44:16 -07:00
Stan Hu 61df812ac6 Fix attr_encryption key settings
attr_encrypted does different things with `key` depending on what mode you are using:

1. In `:per_attribute_iv_and_salt` mode, it generates a hash with the salt:
c3a62c4a9e/lib/encryptor.rb (L77).
There is no need to truncate the key to 32 bytes here.

2. In `:per_attribute_iv` mode, it sets the key directly to the password, so
truncation to 32 bytes is necessary.

Closes #47166
2018-06-02 05:24:59 -07:00
Stan Hu b5c706326a Upgrade to Ruby 2.4.4
Fixes that make this work:

* A change in Ruby (ce635262f5)
requires passing in the exact required length for OpenSSL keys and IVs.

* Ensure the secrets.yml is generated before any prepended modules are
loaded. This is done by renaming the `secret_token.rb` initializer to
`01_secret_token.rb`, which is a bit ugly but involves the least impact on
other files.
2018-05-29 15:19:33 -07:00
Grzegorz Bizon 83874edb77 Merge branch 'master' into 'update-kubeclient'
Conflicts:
   Gemfile.lock
2018-03-17 05:52:35 +00:00
Pirate Praveen 53e2987ba6 Replace KubeException with Kubeclient::HttpError (kubeclient 3.0) 2018-03-15 08:14:13 +01:00
Grzegorz Bizon 33d459aa8d DRY remaining instances of predefined variables 2018-03-14 11:22:16 +01:00
Winnie Hellmann 0ecd759d73 Replace "cluster" with "Kubernetes cluster" 2018-02-06 10:05:02 +01:00
Mario de la Ossa eaada9d706 use Gitlab::UserSettings directly as a singleton instead of including/extending it 2018-02-02 18:39:55 +00:00
Filipa Lacerda 4b66bdfa1a Second iteration of Move Kubernetes from service to Cluster page 2017-12-05 12:00:02 +00:00
Shinya Maeda 54c70a775a Fix static analysys 2017-11-28 20:47:59 +09:00
Shinya Maeda f6d9dcf838 Fix unit tests 2017-11-28 20:47:59 +09:00
Shinya Maeda a8e2094c65 Remove logic which glues with KubernetesService, from Platforms::Kubernetes 2017-11-28 20:47:59 +09:00
Shinya Maeda 0d95ce51be Check diff between KubernetesService and Platforms::Kubernetes. Synchronize again. 2017-11-28 20:47:59 +09:00
Shinya Maeda 8a55d2c552 Revert KubernetesService logic in Platforms::Kubernetes 2017-11-28 20:47:59 +09:00
Kamil Trzcinski 895b6e5d80 Add active? to Platforms::Kubernetes 2017-11-06 15:52:21 +01:00
Alessio Caiazza 1ca9aaf860 Merge branch 'refactor-clusters' into 38464-k8s-apps 2017-11-03 11:02:59 +01:00
Shinya Maeda 600d5f4fba Fix tests. Remove NOT NULL constraint from cluster.user. 2017-11-03 17:22:49 +09:00
Shinya Maeda 3602c0b987 Fix some tests 2017-11-03 03:37:32 +09:00
Alessio Caiazza a8d7e4bcb1
Fix rubocop offenses 2017-11-02 17:08:56 +01:00
Shinya Maeda b129f06733 Fix out of sync with KubernetesService. Remove namespace pramas from controller. Use time_with_zone in schema. Remove Gcp::Clusters from safe_model_attributes.ym 2017-11-02 23:19:11 +09:00
Kamil Trzcinski 64be8d70ae Improve backend structure of data 2017-11-02 15:10:46 +01:00
Kamil Trzcinski 1427bdcadf Revert back FetchKubernetesTokenService 2017-11-01 13:58:08 +01:00
Kamil Trzcinski ccf09824f6 Slim down Platforms::Kubernetes, and instead make it instrument KubernetesService 2017-11-01 13:57:32 +01:00
Shinya Maeda 6571efb6c3 Fix spec. Fix usage ping. Fix warnings by adding new models and attributes. 2017-11-01 16:12:44 +09:00
Shinya Maeda 253bf69dda specs for feature 2017-11-01 03:59:40 +09:00
Shinya Maeda 6a65e2f5f9 specs for controller. Improved validation 2017-10-31 17:47:48 +09:00
Shinya Maeda d6744d9838 specs for services. Improved details. 2017-10-30 21:55:18 +09:00
Shinya Maeda 478e59fe8d specs for models. Improved details. 2017-10-30 03:48:45 +09:00
Shinya Maeda d0cff7f585 This works 2017-10-23 11:36:35 +03:00
Kamil Trzcinski e1d12ba9b9 Refactor Clusters to be consisted from GcpProvider and KubernetesPlatform 2017-10-23 08:57:52 +03:00