Commit 36510b89 authored by João Cunha's avatar João Cunha Committed by Kamil Trzciński

Reduce the allocated IP for Cluster and Services

parent 266b02ac
---
title: Reduce the allocated IP for Cluster and Services
merge_request: 18341
author:
type: changed
...@@ -175,6 +175,9 @@ NOTE: **Note:** ...@@ -175,6 +175,9 @@ NOTE: **Note:**
Starting from [GitLab 12.1](https://gitlab.com/gitlab-org/gitlab-foss/issues/55902), all GKE clusters Starting from [GitLab 12.1](https://gitlab.com/gitlab-org/gitlab-foss/issues/55902), all GKE clusters
created by GitLab are RBAC-enabled. Take a look at the [RBAC section](#rbac-cluster-resources) for more information. created by GitLab are RBAC-enabled. Take a look at the [RBAC section](#rbac-cluster-resources) for more information.
NOTE: **Note:**
Starting from [GitLab 12.5](https://gitlab.com/gitlab-org/gitlab/merge_requests/18341), the cluster's pod address IP range will be set to /16 instead of the regular /14. (/16 is a CIDR notation)
### Cloud Run on GKE ### Cloud Run on GKE
> [Introduced](https://gitlab.com/gitlab-org/gitlab/merge_requests/16566) in GitLab 12.4. > [Introduced](https://gitlab.com/gitlab-org/gitlab/merge_requests/16566) in GitLab 12.4.
......
...@@ -12,6 +12,7 @@ module GoogleApi ...@@ -12,6 +12,7 @@ module GoogleApi
SCOPE = 'https://www.googleapis.com/auth/cloud-platform' SCOPE = 'https://www.googleapis.com/auth/cloud-platform'
LEAST_TOKEN_LIFE_TIME = 10.minutes LEAST_TOKEN_LIFE_TIME = 10.minutes
CLUSTER_MASTER_AUTH_USERNAME = 'admin' CLUSTER_MASTER_AUTH_USERNAME = 'admin'
CLUSTER_IPV4_CIDR_BLOCK = '/16'
class << self class << self
def session_key_for_token def session_key_for_token
...@@ -97,7 +98,8 @@ module GoogleApi ...@@ -97,7 +98,8 @@ module GoogleApi
enabled: legacy_abac enabled: legacy_abac
}, },
ip_allocation_policy: { ip_allocation_policy: {
use_ip_aliases: true use_ip_aliases: true,
cluster_ipv4_cidr_block: CLUSTER_IPV4_CIDR_BLOCK
}, },
addons_config: enable_addons.each_with_object({}) do |addon, hash| addons_config: enable_addons.each_with_object({}) do |addon, hash|
hash[addon] = { disabled: false } hash[addon] = { disabled: false }
......
...@@ -104,7 +104,8 @@ describe GoogleApi::CloudPlatform::Client do ...@@ -104,7 +104,8 @@ describe GoogleApi::CloudPlatform::Client do
enabled: legacy_abac enabled: legacy_abac
}, },
ip_allocation_policy: { ip_allocation_policy: {
use_ip_aliases: true use_ip_aliases: true,
cluster_ipv4_cidr_block: '/16'
}, },
addons_config: addons_config addons_config: addons_config
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment