BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
40c6128b
Unverified
Commit
40c6128b
authored
Oct 02, 2017
by
Alessio Caiazza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken certificate-authority-data with kubectl >= 1.8.0
parent
f1b8d79f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
3 deletions
+8
-3
fix-kubectl-180.yml
changelogs/unreleased/fix-kubectl-180.yml
+5
-0
kubernetes.rb
lib/gitlab/kubernetes.rb
+1
-1
kubeconfig.yml
spec/fixtures/config/kubeconfig.yml
+1
-1
kubernetes_service_spec.rb
spec/models/project_services/kubernetes_service_spec.rb
+1
-1
No files found.
changelogs/unreleased/fix-kubectl-180.yml
0 → 100644
View file @
40c6128b
---
title
:
'
Kubernetes
integration:
ensure
v1.8.0
compatibility'
merge_request
:
14635
author
:
type
:
fixed
lib/gitlab/kubernetes.rb
View file @
40c6128b
...
@@ -113,7 +113,7 @@ module Gitlab
...
@@ -113,7 +113,7 @@ module Gitlab
def
kubeconfig_embed_ca_pem
(
config
,
ca_pem
)
def
kubeconfig_embed_ca_pem
(
config
,
ca_pem
)
cluster
=
config
.
dig
(
:clusters
,
0
,
:cluster
)
cluster
=
config
.
dig
(
:clusters
,
0
,
:cluster
)
cluster
[
:'certificate-authority-data'
]
=
Base64
.
encode64
(
ca_pem
)
cluster
[
:'certificate-authority-data'
]
=
Base64
.
strict_
encode64
(
ca_pem
)
end
end
end
end
end
end
spec/fixtures/config/kubeconfig.yml
View file @
40c6128b
...
@@ -4,7 +4,7 @@ clusters:
...
@@ -4,7 +4,7 @@ clusters:
-
name
:
gitlab-deploy
-
name
:
gitlab-deploy
cluster
:
cluster
:
server
:
https://kube.domain.com
server
:
https://kube.domain.com
certificate-authority-data
:
"
UEVN
\n
"
certificate-authority-data
:
"
UEVN"
contexts
:
contexts
:
-
name
:
gitlab-deploy
-
name
:
gitlab-deploy
context
:
context
:
...
...
spec/models/project_services/kubernetes_service_spec.rb
View file @
40c6128b
...
@@ -208,7 +208,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
...
@@ -208,7 +208,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
config
.
dig
(
'users'
,
0
,
'user'
)[
'token'
]
=
'token'
config
.
dig
(
'users'
,
0
,
'user'
)[
'token'
]
=
'token'
config
.
dig
(
'contexts'
,
0
,
'context'
)[
'namespace'
]
=
namespace
config
.
dig
(
'contexts'
,
0
,
'context'
)[
'namespace'
]
=
namespace
config
.
dig
(
'clusters'
,
0
,
'cluster'
)[
'certificate-authority-data'
]
=
config
.
dig
(
'clusters'
,
0
,
'cluster'
)[
'certificate-authority-data'
]
=
Base64
.
encode64
(
'CA PEM DATA'
)
Base64
.
strict_
encode64
(
'CA PEM DATA'
)
YAML
.
dump
(
config
)
YAML
.
dump
(
config
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment