mirror of https://github.com/kubernetes/kops.git
Replace gopkg yaml with k8s-sigs yaml
This commit is contained in:
parent
e9abf8d800
commit
91a6777e60
1
go.mod
1
go.mod
|
|
@ -97,7 +97,6 @@ require (
|
|||
google.golang.org/api v0.22.0
|
||||
gopkg.in/gcfg.v1 v1.2.3
|
||||
gopkg.in/inf.v0 v0.9.1
|
||||
gopkg.in/yaml.v2 v2.3.0
|
||||
helm.sh/helm/v3 v3.4.2
|
||||
honnef.co/go/tools v0.0.1-2020.1.6 // indirect
|
||||
k8s.io/api v0.20.0
|
||||
|
|
|
|||
|
|
@ -40,16 +40,16 @@ import (
|
|||
|
||||
// ClientConnectionConfig is used by kube-scheduler to talk to the api server
|
||||
type ClientConnectionConfig struct {
|
||||
Burst int32 `yaml:"burst,omitempty"`
|
||||
Kubeconfig string `yaml:"kubeconfig"`
|
||||
QPS *float64 `yaml:"qps,omitempty"`
|
||||
Burst int32 `json:"burst,omitempty"`
|
||||
Kubeconfig string `json:"kubeconfig"`
|
||||
QPS *float64 `json:"qps,omitempty"`
|
||||
}
|
||||
|
||||
// SchedulerConfig is used to generate the config file
|
||||
type SchedulerConfig struct {
|
||||
APIVersion string `yaml:"apiVersion"`
|
||||
Kind string `yaml:"kind"`
|
||||
ClientConnection ClientConnectionConfig `yaml:"clientConnection,omitempty"`
|
||||
APIVersion string `json:"apiVersion"`
|
||||
Kind string `json:"kind"`
|
||||
ClientConnection ClientConnectionConfig `json:"clientConnection,omitempty"`
|
||||
}
|
||||
|
||||
// KubeSchedulerBuilder install kube-scheduler
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@ import (
|
|||
func TestParseDefault(t *testing.T) {
|
||||
expect := []byte(
|
||||
`apiVersion: kubescheduler.config.k8s.io/v1alpha2
|
||||
kind: KubeSchedulerConfiguration
|
||||
clientConnection:
|
||||
kubeconfig: /var/lib/kube-scheduler/kubeconfig
|
||||
kind: KubeSchedulerConfiguration
|
||||
`)
|
||||
|
||||
s := &kops.KubeSchedulerConfig{}
|
||||
|
|
@ -50,11 +50,11 @@ clientConnection:
|
|||
func TestParse(t *testing.T) {
|
||||
expect := []byte(
|
||||
`apiVersion: kubescheduler.config.k8s.io/v1alpha2
|
||||
kind: KubeSchedulerConfiguration
|
||||
clientConnection:
|
||||
burst: 100
|
||||
kubeconfig: /var/lib/kube-scheduler/kubeconfig
|
||||
qps: 3.1
|
||||
kind: KubeSchedulerConfiguration
|
||||
`)
|
||||
qps, _ := resource.ParseQuantity("3.1")
|
||||
|
||||
|
|
|
|||
|
|
@ -56,9 +56,9 @@ type: file
|
|||
---
|
||||
contents: |
|
||||
apiVersion: kubescheduler.config.k8s.io/v1alpha2
|
||||
kind: KubeSchedulerConfiguration
|
||||
clientConnection:
|
||||
kubeconfig: /var/lib/kube-scheduler/kubeconfig
|
||||
kind: KubeSchedulerConfiguration
|
||||
mode: "0400"
|
||||
path: /var/lib/kube-scheduler/config.yaml
|
||||
type: file
|
||||
|
|
|
|||
|
|
@ -56,9 +56,9 @@ type: file
|
|||
---
|
||||
contents: |
|
||||
apiVersion: kubescheduler.config.k8s.io/v1alpha2
|
||||
kind: KubeSchedulerConfiguration
|
||||
clientConnection:
|
||||
kubeconfig: /var/lib/kube-scheduler/kubeconfig
|
||||
kind: KubeSchedulerConfiguration
|
||||
mode: "0400"
|
||||
path: /var/lib/kube-scheduler/config.yaml
|
||||
type: file
|
||||
|
|
|
|||
|
|
@ -56,9 +56,9 @@ type: file
|
|||
---
|
||||
contents: |
|
||||
apiVersion: kubescheduler.config.k8s.io/v1alpha2
|
||||
kind: KubeSchedulerConfiguration
|
||||
clientConnection:
|
||||
kubeconfig: /var/lib/kube-scheduler/kubeconfig
|
||||
kind: KubeSchedulerConfiguration
|
||||
mode: "0400"
|
||||
path: /var/lib/kube-scheduler/config.yaml
|
||||
type: file
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ go_library(
|
|||
deps = [
|
||||
"//pkg/apis/kops:go_default_library",
|
||||
"//util/pkg/reflectutils:go_default_library",
|
||||
"//vendor/gopkg.in/yaml.v2:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//vendor/k8s.io/klog/v2:go_default_library",
|
||||
"//vendor/sigs.k8s.io/yaml:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -23,11 +23,11 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"gopkg.in/yaml.v2"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
"k8s.io/klog/v2"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/util/pkg/reflectutils"
|
||||
"sigs.k8s.io/yaml"
|
||||
)
|
||||
|
||||
// BuildConfigYaml reflects the options interface and extracts the parameters for the config file
|
||||
|
|
|
|||
|
|
@ -24,6 +24,6 @@ go_test(
|
|||
deps = [
|
||||
"//pkg/diff:go_default_library",
|
||||
"//tests/integration/channel/simple:go_default_library",
|
||||
"//vendor/gopkg.in/yaml.v2:go_default_library",
|
||||
"//vendor/sigs.k8s.io/yaml:go_default_library",
|
||||
],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import (
|
|||
"k8s.io/kops/pkg/diff"
|
||||
"k8s.io/kops/tests/integration/channel/simple"
|
||||
|
||||
yaml "gopkg.in/yaml.v2"
|
||||
"sigs.k8s.io/yaml"
|
||||
)
|
||||
|
||||
func TestRenderGeneralOK(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -783,7 +783,6 @@ gopkg.in/square/go-jose.v2/jwt
|
|||
# gopkg.in/warnings.v0 v0.1.2
|
||||
gopkg.in/warnings.v0
|
||||
# gopkg.in/yaml.v2 v2.3.0
|
||||
## explicit
|
||||
gopkg.in/yaml.v2
|
||||
# gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c
|
||||
gopkg.in/yaml.v3
|
||||
|
|
|
|||
Loading…
Reference in New Issue