Skip to content

Commit

Permalink
Allow the consul namespace to be a destination. (#1163)
Browse files Browse the repository at this point in the history
* Allow the consul namespace to be a destination.

With upcoming consul-enterprise this ns will be valid.
  • Loading branch information
lkysow committed Apr 13, 2022
1 parent ca35f7b commit a00f938
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -15,6 +15,7 @@ BUG FIXES:
IMPROVEMENTS:
* Helm
* API Gateway: Allow controller to read ReferencePolicy in order to determine if route is allowed for backend in different namespace. [[GH-1148](https://github.com/hashicorp/consul-k8s/pull/1148)]
* Allow `consul` to be a destination namespace. [[GH-1163](https://github.com/hashicorp/consul-k8s/pull/1163)]

## 0.42.0 (April 04, 2022)

Expand Down
2 changes: 1 addition & 1 deletion charts/consul/templates/_helpers.tpl
Expand Up @@ -215,7 +215,7 @@ Usage: {{ template "consul.reservedNamesFailer" (list .Values.key "key") }}
{{- define "consul.reservedNamesFailer" -}}
{{- $name := index . 0 -}}
{{- $key := index . 1 -}}
{{- if or (eq "system" $name) (eq "universal" $name) (eq "consul" $name) (eq "operator" $name) (eq "root" $name) }}
{{- if or (eq "system" $name) (eq "universal" $name) (eq "operator" $name) (eq "root" $name) }}
{{- fail (cat "The name" $name "set for key" $key "is reserved by Consul for future use." ) }}
{{- end }}
{{- end -}}
4 changes: 0 additions & 4 deletions charts/consul/test/unit/connect-inject-deployment.bats
Expand Up @@ -1926,10 +1926,6 @@ EOF
reservedNameTest "universal"
}

@test "connectInject/Deployment: fails when consulDestinationNamespace=consul" {
reservedNameTest "consul"
}

@test "connectInject/Deployment: fails when consulDestinationNamespace=operator" {
reservedNameTest "operator"
}
Expand Down
4 changes: 0 additions & 4 deletions charts/consul/test/unit/partition-init-job.bats
Expand Up @@ -174,10 +174,6 @@ load _helpers
reservedNameTest "universal"
}

@test "partitionInit/Job: fails when adminPartitions.name=consul" {
reservedNameTest "consul"
}

@test "partitionInit/Job: fails when adminPartitions.name=operator" {
reservedNameTest "operator"
}
Expand Down
4 changes: 0 additions & 4 deletions charts/consul/test/unit/sync-catalog-deployment.bats
Expand Up @@ -1358,10 +1358,6 @@ load _helpers
reservedNameTest "universal"
}
@test "syncCatalog/Deployment: fails when consulDestinationNamespace=consul" {
reservedNameTest "consul"
}
@test "syncCatalog/Deployment: fails when consulDestinationNamespace=operator" {
reservedNameTest "operator"
}
Expand Down

0 comments on commit a00f938

Please sign in to comment.