Skip to content

Commit 7bb1afb

Browse files
author
Sean Sundberg
authored
Adds field for registry namespace (#100)
* Adds support for 'skip ci' label * Adds registry_namespace variable hooked into container-provider inputs cloud-native-toolkit/planning#333
1 parent f2a5081 commit 7bb1afb

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

.github/workflows/verify.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
jobs:
1313
verify:
1414
# The type of runner that the job will run on
15-
if: "!contains(github.event.commits[0].message, '[skip ci]')"
15+
if: !(contains(github.event.commits[0].message, '[skip ci]') || contains(github.event.pull_request.labels.*.name, 'skip ci'))
1616
runs-on: ubuntu-latest
1717
container: ibmgaragecloud/cli-tools:0.4.0-lite
1818

terraform/settings/environment.tfvars

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ vpc_cluster="false"
2020
# - "${resource_group_name}-cluster"
2121
cluster_name="<cluster name>"
2222

23+
# The namespace that will be created and used within the IBM Container Registry to store container
24+
# images. This value is optional and will default to the resource_group_name if not provided.
25+
# Note: Namespaces within the IBM Container Registry are scoped to the region (e.g. us-south) and not
26+
# to the particular account. If a registry namespace is already owned by a different account, the
27+
# terraform process will fail while trying to provision a new namespace. At that point, the
28+
# registry_namespace value should be updated to a unique value.
29+
#registry_namespace="<registry namespace>"
30+
2331
resource_group_name="<resource group>"
2432
region="us-east"
2533

terraform/stages/stage1-cluster.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ module "dev_cluster" {
1515
ibmcloud_api_key = var.ibmcloud_api_key
1616
name_prefix = var.name_prefix
1717
is_vpc = var.vpc_cluster == "true"
18+
registry_namespace = var.registry_namespace
1819
}

terraform/stages/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ variable "resource_group_name" {
1111
description = "Existing resource group where the IKS cluster will be provisioned."
1212
}
1313

14+
variable "registry_namespace" {
15+
type = string
16+
description = "The namespace that should be used in the IBM Container Registry. If not provided the value will default to the resource group name."
17+
default = ""
18+
}
19+
1420
variable "ibmcloud_api_key" {
1521
type = string
1622
description = "The api key for IBM Cloud access"

0 commit comments

Comments
 (0)