Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Change YAML style of scheduler-kubeconfig from human to compact JSON #523

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions bindata/assets/kube-scheduler/kubeconfig-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,4 @@ metadata:
name: scheduler-kubeconfig
namespace: openshift-kube-scheduler
data:
kubeconfig: |
apiVersion: v1
clusters:
- cluster:
certificate-authority: /etc/kubernetes/static-pod-resources/configmaps/serviceaccount-ca/ca-bundle.crt
server: $LB_INT_URL
name: lb-int
contexts:
- context:
cluster: lb-int
user: kube-scheduler
name: kube-scheduler
current-context: kube-scheduler
kind: Config
preferences: {}
users:
- name: kube-scheduler
user:
client-certificate: /etc/kubernetes/static-pod-certs/secrets/kube-scheduler-client-cert-key/tls.crt
client-key: /etc/kubernetes/static-pod-certs/secrets/kube-scheduler-client-cert-key/tls.key
kubeconfig: '{"apiVersion":"v1","clusters":[{"cluster":{"certificate-authority":"/etc/kubernetes/static-pod-resources/configmaps/serviceaccount-ca/ca-bundle.crt","server":"$LB_INT_URL"},"name":"lb-int"}],"contexts":[{"context":{"cluster":"lb-int","user":"kube-scheduler"},"name":"kube-scheduler"}],"current-context":"kube-scheduler","kind":"Config","preferences":{},"users":[{"name":"kube-scheduler","user":{"client-certificate":"/etc/kubernetes/static-pod-certs/secrets/kube-scheduler-client-cert-key/tls.crt","client-key":"/etc/kubernetes/static-pod-certs/secrets/kube-scheduler-client-cert-key/tls.key"}}]}'
Original file line number Diff line number Diff line change
Expand Up @@ -192,26 +192,7 @@ func Test_manageKubeSchedulerConfigMap_v311_00_to_latest(t *testing.T) {
}
}

var defaultKubeconfigData = `apiVersion: v1
clusters:
- cluster:
certificate-authority: /etc/kubernetes/static-pod-resources/configmaps/serviceaccount-ca/ca-bundle.crt
server: https://127.0.0.1:443
name: lb-int
contexts:
- context:
cluster: lb-int
user: kube-scheduler
name: kube-scheduler
current-context: kube-scheduler
kind: Config
preferences: {}
users:
- name: kube-scheduler
user:
client-certificate: /etc/kubernetes/static-pod-certs/secrets/kube-scheduler-client-cert-key/tls.crt
client-key: /etc/kubernetes/static-pod-certs/secrets/kube-scheduler-client-cert-key/tls.key
`
var defaultKubeconfigData = `{"apiVersion":"v1","clusters":[{"cluster":{"certificate-authority":"/etc/kubernetes/static-pod-resources/configmaps/serviceaccount-ca/ca-bundle.crt","server":"https://127.0.0.1:443"},"name":"lb-int"}],"contexts":[{"context":{"cluster":"lb-int","user":"kube-scheduler"},"name":"kube-scheduler"}],"current-context":"kube-scheduler","kind":"Config","preferences":{},"users":[{"name":"kube-scheduler","user":{"client-certificate":"/etc/kubernetes/static-pod-certs/secrets/kube-scheduler-client-cert-key/tls.crt","client-key":"/etc/kubernetes/static-pod-certs/secrets/kube-scheduler-client-cert-key/tls.key"}}]}`

var configMapKubeConfigCMDefault = &corev1.ConfigMap{
TypeMeta: metav1.TypeMeta{APIVersion: "v1", Kind: "ConfigMap"},
Expand Down