Merge branch 'set-kube-ca-pem-to-file' into 'master'
Add KUBE_CA_PEM_FILE, deprecate KUBE_CA_PEM Closes #25753 See merge request !9398
This commit is contained in:
commit
afd566347f
4 changed files with 18 additions and 2 deletions
|
@ -94,7 +94,12 @@ class KubernetesService < DeploymentService
|
||||||
{ key: 'KUBE_TOKEN', value: token, public: false },
|
{ key: 'KUBE_TOKEN', value: token, public: false },
|
||||||
{ key: 'KUBE_NAMESPACE', value: namespace, public: true }
|
{ key: 'KUBE_NAMESPACE', value: namespace, public: true }
|
||||||
]
|
]
|
||||||
variables << { key: 'KUBE_CA_PEM', value: ca_pem, public: true } if ca_pem.present?
|
|
||||||
|
if ca_pem.present?
|
||||||
|
variables << { key: 'KUBE_CA_PEM', value: ca_pem, public: true }
|
||||||
|
variables << { key: 'KUBE_CA_PEM_FILE', value: ca_pem, public: true, file: true }
|
||||||
|
end
|
||||||
|
|
||||||
variables
|
variables
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
title: Add KUBE_CA_PEM_FILE, deprecate KUBE_CA_PEM
|
||||||
|
merge_request: 9398
|
||||||
|
author:
|
|
@ -49,7 +49,8 @@ GitLab CI build environment:
|
||||||
- `KUBE_URL` - equal to the API URL
|
- `KUBE_URL` - equal to the API URL
|
||||||
- `KUBE_TOKEN`
|
- `KUBE_TOKEN`
|
||||||
- `KUBE_NAMESPACE`
|
- `KUBE_NAMESPACE`
|
||||||
- `KUBE_CA_PEM` - only if a custom CA bundle was specified
|
- `KUBE_CA_PEM_FILE` - only present if a custom CA bundle was specified. Path to a file containing PEM data.
|
||||||
|
- `KUBE_CA_PEM` (deprecated)- only if a custom CA bundle was specified. Raw PEM data.
|
||||||
|
|
||||||
## Web terminals
|
## Web terminals
|
||||||
|
|
||||||
|
|
|
@ -163,6 +163,12 @@ describe KubernetesService, models: true, caching: true do
|
||||||
{ key: 'KUBE_CA_PEM', value: 'CA PEM DATA', public: true }
|
{ key: 'KUBE_CA_PEM', value: 'CA PEM DATA', public: true }
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'sets KUBE_CA_PEM_FILE' do
|
||||||
|
expect(subject.predefined_variables).to include(
|
||||||
|
{ key: 'KUBE_CA_PEM_FILE', value: 'CA PEM DATA', public: true, file: true }
|
||||||
|
)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#terminals' do
|
describe '#terminals' do
|
||||||
|
|
Loading…
Reference in a new issue