Commit Graph

9 Commits

Author SHA1 Message Date
GitLab Bot 6f9edd1a4c Add latest changes from gitlab-org/gitlab@master 2019-09-23 15:06:32 +00:00
Tiger Watson 36a01a88ce Use separate Kubernetes namespaces per environment
Kubernetes deployments on new clusters will now have
a separate namespace per project environment, instead
of sharing a single namespace for the project.

Behaviour of existing clusters is unchanged.

All new functionality is controlled by the
:kubernetes_namespace_per_environment feature flag,
which is safe to enable/disable at any time.
2019-08-07 04:40:29 +00:00
Nick Thomas 013f7cd24c
Inherit from ApplicationRecord instead of ActiveRecord::Base 2019-03-28 16:18:23 +00:00
Matija Čupić 686ffdc2e9 Resolve "Mask the existing variables" 2019-03-07 17:08:17 +00:00
Dylan Griffith e7f2be49d8 Make KUBECONFIG nil if KUBE_TOKEN is nil
Having an invalid KUBECONFIG without a token in it is not helpful. This
only became possible recently now that we are creating a separate
namespace and service account (and hence token) to send to the runners.
This led to somewhat surprising results when troubleshooting
https://gitlab.com/gitlab-org/gitlab-ce/issues/53879 as I found that the
KUBECONFIG was still being passed but KUBE_TOKEN was not. These things
really should have been linked.

Furthermore now that we are also using the [presence of KUBECONFIG to
decide whether or not to run build steps in Auto
DevOps](294d15be3e/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml (L164))
I think it makes even more sense to ensure that KUBECONFIG is a complete
config if passed to a job.
2018-11-30 11:03:42 +01:00
Kamil Trzciński c3bd3bfc6e Improve variables support
This ensures that variables accept only string,
alongside also improves kubernetes_namespace,
improving validation and default value being set.
2018-11-19 14:09:39 +01:00
Thong Kuah 5d2fd2ea9e Fix deployment jobs using nil token 2018-11-13 10:27:21 +00:00
Thong Kuah 5ede567d71 Incorporates Kubernetes Namespace into Cluster's flow 2018-11-02 15:46:15 +00: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