Commit ba4a2c54 authored by Nick Thomas's avatar Nick Thomas

Add KUBE_CA_PEM_FILE, deprecate KUBE_CA_PEM

parent df63d9db
......@@ -94,7 +94,12 @@ class KubernetesService < DeploymentService
{ key: 'KUBE_TOKEN', value: token, public: false },
{ 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
end
......
---
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_TOKEN`
- `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
......
......@@ -163,6 +163,12 @@ describe KubernetesService, models: true, caching: true do
{ key: 'KUBE_CA_PEM', value: 'CA PEM DATA', public: true }
)
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
describe '#terminals' do
......
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