diff --git a/config-gen/README.md b/config-gen/README.md new file mode 100644 index 00000000000..a3250cf1e2a --- /dev/null +++ b/config-gen/README.md @@ -0,0 +1,80 @@ +# Config-gen + +This is a prototype of using a kustomize function to generate configuration. + +To test it: + +```sh +go build -o ~/go/bin/config-gen ./config-gen +``` + +## Usage Options + +### With PROJECT file + +Add the config gen fields to your project file + +```yaml +# PROEJCT +metadata: + name: project-name # name used to generated resource names and namespaces +spec: + image: pwittrock/simple # controller-manager image to run +... +``` + +```sh +# from a kubebuilder project +config-gen +``` + +### With config file + +Create a config.yaml + +```yaml +# config.yaml +apiVersion: kubebuilder.sigs.k8s.io +kind: APIConfiguration +metadata: + name: project-name +spec: + image: example/simple:latest +``` + +```sh +# from a kubebuilder project +config-gen config.yaml +``` + +### With patch overrides + +```yaml +# config.yaml +apiVersion: kubebuilder.sigs.k8s.io +kind: APIConfiguration +metadata: + name: project-name +spec: + image: example/simple:latest +``` + +```yaml +# patch1.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: controller-manager + namespace: project-name-system +spec: +... +``` + +```sh +# from a kubebuilder project +config-gen config.yaml patch1.yaml +``` + +### From kustomize + +config-gen may be run as a Kustomize plugin using kustomize \ No newline at end of file diff --git a/config-gen/apis/v1alpha1/cert-generation-filter.go b/config-gen/apis/v1alpha1/cert-generation-filter.go new file mode 100644 index 00000000000..478d9add0e4 --- /dev/null +++ b/config-gen/apis/v1alpha1/cert-generation-filter.go @@ -0,0 +1,159 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + "encoding/base64" + "fmt" + + "github.com/cloudflare/cfssl/cli/genkey" + "github.com/cloudflare/cfssl/config" + "github.com/cloudflare/cfssl/csr" + "github.com/cloudflare/cfssl/helpers" + "github.com/cloudflare/cfssl/selfsign" + "sigs.k8s.io/kustomize/kyaml/fn/framework" + "sigs.k8s.io/kustomize/kyaml/kio" + "sigs.k8s.io/kustomize/kyaml/yaml" +) + +var _ kio.Filter = &CertFilter{} + +// CertFilter generates and injects certificates into webhook +type CertFilter struct { + *KubebuilderProject +} + +// Filter implements kio.Filter +func (c CertFilter) Filter(input []*yaml.RNode) ([]*yaml.RNode, error) { + if !c.Spec.Development.GenerateCert { + return input, nil + } + if err := c.generateCert(); err != nil { + return nil, err + } + + s := &framework.Selector{ + Kinds: []string{ + "ValidatingWebhookConfiguration", + "MutatingWebhookConfiguration", + }, + } + matches, err := s.GetMatches(&framework.ResourceList{Items: input}) + if err != nil { + return nil, err + } + for i := range matches { + wh := matches[i].Field("webhooks") + if wh.IsNilOrEmpty() { + continue + } + err := wh.Value.VisitElements(func(node *yaml.RNode) error { + err := node.PipeE(yaml.LookupCreate(yaml.ScalarNode, "clientConfig", "caBundle"), + yaml.FieldSetter{StringValue: c.Status.CertCA}) + if err != nil { + return err + } + err = node.PipeE(yaml.LookupCreate(yaml.ScalarNode, "clientConfig", "service", "namespace"), + yaml.FieldSetter{StringValue: c.Spec.Namespace}) + if err != nil { + return err + } + + return nil + }) + if err != nil { + return nil, err + } + } + + s = &framework.Selector{ + Filter: func(n *yaml.RNode) bool { + // Allow-list conversion webhooks + m, _ := n.GetMeta() + if m.Kind != "CustomResourceDefinition" { + return true + } + return c.Spec.ConversionWebhooks[m.Name] + }, + } + matches, err = s.GetMatches(&framework.ResourceList{Items: input}) + if err != nil { + return nil, err + } + for i := range matches { + err := matches[i].PipeE(yaml.LookupCreate(yaml.ScalarNode, "spec", "conversion", "strategy"), + yaml.FieldSetter{StringValue: "Webhook"}) + if err != nil { + return nil, err + } + err = matches[i].PipeE(yaml.LookupCreate(yaml.ScalarNode, "spec", "conversion", "webhookClientConfig", "caBundle"), + yaml.FieldSetter{StringValue: c.Status.CertCA}) + if err != nil { + return nil, err + } + err = matches[i].PipeE(yaml.LookupCreate(yaml.ScalarNode, "spec", "conversion", "webhookClientConfig", "service", "name"), + yaml.FieldSetter{StringValue: "webhook-service"}) + if err != nil { + return nil, err + } + err = matches[i].PipeE(yaml.LookupCreate(yaml.ScalarNode, "spec", "conversion", "webhookClientConfig", "service", "namespace"), + yaml.FieldSetter{StringValue: c.Spec.Namespace}) + if err != nil { + return nil, err + } + + err = matches[i].PipeE(yaml.LookupCreate(yaml.ScalarNode, "spec", "conversion", "webhookClientConfig", "service", "path"), + yaml.FieldSetter{StringValue: "/convert"}) + if err != nil { + return nil, err + } + } + + return input, nil +} + +func (c CertFilter) generateCert() error { + var err error + var req = csr.New() + req.Hosts = []string{ + fmt.Sprintf("webhook-service.%s.svc", c.Spec.Namespace), + fmt.Sprintf("webhook-service.%s.svc.cluster.local", c.Spec.Namespace), + } + req.CN = "kb-dev-controller-manager" + + var key, csrPEM []byte + g := &csr.Generator{Validator: genkey.Validator} + csrPEM, key, err = g.ProcessRequest(req) + if err != nil { + return err + } + priv, err := helpers.ParsePrivateKeyPEM(key) + if err != nil { + return err + } + + profile := config.DefaultConfig() + profile.Expiry = c.Spec.Development.CertDuration + cert, err := selfsign.Sign(priv, csrPEM, profile) + if err != nil { + return err + } + + c.Status.CertCA = base64.StdEncoding.EncodeToString(cert) + c.Status.CertKey = base64.StdEncoding.EncodeToString(key) + return nil +} diff --git a/config-gen/apis/v1alpha1/cert-manager-patches.go b/config-gen/apis/v1alpha1/cert-manager-patches.go new file mode 100644 index 00000000000..34d6dabc83f --- /dev/null +++ b/config-gen/apis/v1alpha1/cert-manager-patches.go @@ -0,0 +1,22 @@ +package v1alpha1 + +import ( + "github.com/markbates/pkger" + "sigs.k8s.io/kustomize/kyaml/fn/framework" +) + +// CertManagerPatchTemplate returns the PatchTemplate for cert-manager +func CertManagerPatchTemplate(kp *KubebuilderProject) framework.PT { + return framework.PT{ + Dir: pkger.Dir("/config-gen/templates/patches/cert-manager"), + Selector: func() *framework.Selector { + return &framework.Selector{ + Kinds: []string{ + "CustomResourceDefinition", + "ValidatingWebhookConfiguration", + "MutatingWebhookConfiguration", + }, + } + }, + } +} diff --git a/config-gen/apis/v1alpha1/cmd.go b/config-gen/apis/v1alpha1/cmd.go new file mode 100644 index 00000000000..6630f804628 --- /dev/null +++ b/config-gen/apis/v1alpha1/cmd.go @@ -0,0 +1,60 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + "github.com/markbates/pkger" + "github.com/spf13/cobra" + "sigs.k8s.io/kustomize/kyaml/fn/framework" + "sigs.k8s.io/kustomize/kyaml/kio" +) + +// NewCommand returns a new cobra command +func NewCommand() *cobra.Command { + kp := &KubebuilderProject{} + + return framework.TemplateCommand{ + API: kp, + + MergeResources: true, // apply additional inputs as patches + + // these are run before the templates + PreProcessFilters: []kio.Filter{ + // run controller-gen libraries to generate configuration from code + ControllerGenFilter{KubebuilderProject: kp}, + // inject generated certificates + CertFilter{KubebuilderProject: kp}, + }, + + // generate resources + TemplatesFn: framework.TemplatesFromDir(pkger.Dir("/config-gen/templates/resources")), + + // patch resources + PatchTemplatesFn: framework.PatchTemplatesFromDir( + CRDPatchTemplate(kp), + CertManagerPatchTemplate(kp), + ControllerManagerPatchTemplate(kp), + ), + + // perform final modifications + PostProcessFilters: []kio.Filter{ + // sort the resources + ComponentFilter{KubebuilderProject: kp}, + SortFilter{KubebuilderProject: kp}, + }, + }.GetCommand() +} diff --git a/config-gen/apis/v1alpha1/component-filter.go b/config-gen/apis/v1alpha1/component-filter.go new file mode 100644 index 00000000000..a2c7fe0de62 --- /dev/null +++ b/config-gen/apis/v1alpha1/component-filter.go @@ -0,0 +1,59 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + "sigs.k8s.io/kustomize/kyaml/fn/framework" + "sigs.k8s.io/kustomize/kyaml/kio" + "sigs.k8s.io/kustomize/kyaml/yaml" +) + +var _ kio.Filter = &ControllerGenFilter{} + +// ComponentFilter inserts the component config read from disk into the ConfigMap +type ComponentFilter struct { + *KubebuilderProject +} + +// Filter sets the component config in the configmap +func (cf ComponentFilter) Filter(input []*yaml.RNode) ([]*yaml.RNode, error) { + if !cf.Spec.ComponentConfigEnabled() { + return input, nil + } + s := &framework.Selector{ + APIVersions: []string{"v1"}, + Kinds: []string{"ConfigMap"}, + Names: []string{"manager-config"}, + Namespaces: []string{cf.Spec.Namespace}, + } + matches, err := s.GetMatches(&framework.ResourceList{Items: input}) + if err != nil { + return nil, err + } + for i := range matches { + m := matches[i] + value := yaml.NewStringRNode(cf.Status.ComponentConfigString) + value.YNode().Style = yaml.LiteralStyle + err := m.PipeE( + yaml.Lookup("data", "controller_manager_config.yaml"), + yaml.FieldSetter{OverrideStyle: true, Value: value}) + if err != nil { + return nil, err + } + } + return input, nil +} diff --git a/config-gen/apis/v1alpha1/controller-gen-filter.go b/config-gen/apis/v1alpha1/controller-gen-filter.go new file mode 100644 index 00000000000..9d757ff952e --- /dev/null +++ b/config-gen/apis/v1alpha1/controller-gen-filter.go @@ -0,0 +1,103 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + "bytes" + "fmt" + "io" + "os" + + "sigs.k8s.io/controller-tools/pkg/crd" + "sigs.k8s.io/controller-tools/pkg/genall" + "sigs.k8s.io/controller-tools/pkg/loader" + "sigs.k8s.io/controller-tools/pkg/rbac" + "sigs.k8s.io/controller-tools/pkg/webhook" + "sigs.k8s.io/kustomize/kyaml/errors" + "sigs.k8s.io/kustomize/kyaml/kio" + "sigs.k8s.io/kustomize/kyaml/yaml" +) + +var _ kio.Filter = &ControllerGenFilter{} + +// ControllerGenFilter generates resources from go code using the controller-gen libraries +type ControllerGenFilter struct { + *KubebuilderProject +} + +// Filter implements kio.Filter +func (cgr ControllerGenFilter) Filter(input []*yaml.RNode) ([]*yaml.RNode, error) { + gens := genall.Generators{} + + // generate CRD definitions + if cgr.Spec.Enabled(CRDsComponent) { + desclen := 40 + crdGen := genall.Generator(crd.Generator{ + TrivialVersions: true, + MaxDescLen: &desclen, + }) + gens = append(gens, &crdGen) + } + + // generate RBAC definitions + if cgr.Spec.Enabled(RBACComponent) { + rbacGen := genall.Generator(rbac.Generator{ + RoleName: cgr.Spec.Namespace + "-manager-role", + }) + gens = append(gens, &rbacGen) + } + + // generate Webhook definitions + if cgr.Spec.Enabled(WebhooksComponent) { + webhookGen := genall.Generator(webhook.Generator{}) + gens = append(gens, &webhookGen) + } + + // set the directory + b := bufferedGenerator{} + rt, _ := gens.ForRoots(cgr.Spec.Directory) // ignore the spurious error + rt.OutputRules = genall.OutputRules{Default: &b} + + // run the generators + if failed := rt.Run(); failed { + fmt.Fprintln(os.Stderr, "error running controller-gen") + } + + // Parse the emitted resources + n, err := (&kio.ByteReader{Reader: &b.Buffer}).Read() + if err != nil { + return nil, errors.WrapPrefixf(err, "failed to parse controller-gen output") + } + + // add inputs after generated resources + return append(n, input...), nil +} + +// bufferedGenerator implements a genall.Generator store the output in a bytes.Buffer +type bufferedGenerator struct { + bytes.Buffer +} + +// Open implements genall.Generator +func (o *bufferedGenerator) Open(_ *loader.Package, _ string) (io.WriteCloser, error) { + return o, nil +} + +// Close implements genall.Generator +func (bufferedGenerator) Close() error { + return nil +} diff --git a/config-gen/apis/v1alpha1/controller-manager-patches.go b/config-gen/apis/v1alpha1/controller-manager-patches.go new file mode 100644 index 00000000000..3c060ab8f77 --- /dev/null +++ b/config-gen/apis/v1alpha1/controller-manager-patches.go @@ -0,0 +1,22 @@ +package v1alpha1 + +import ( + "github.com/markbates/pkger" + "sigs.k8s.io/kustomize/kyaml/fn/framework" +) + +// ControllerManagerPatchTemplate returns the PatchTemplate for controller-manager +func ControllerManagerPatchTemplate(kp *KubebuilderProject) framework.PT { + return framework.PT{ + Dir: pkger.Dir("/config-gen/templates/patches/controller-manager"), + Selector: func() *framework.Selector { + return &framework.Selector{ + Kinds: []string{"Deployment"}, + Namespaces: []string{kp.Spec.Namespace}, + Names: []string{"controller-manager"}, + Labels: map[string]string{"control-plane": "controller-manager"}, + TemplatizeValues: true, + } + }, + } +} diff --git a/config-gen/apis/v1alpha1/crd-patches.go b/config-gen/apis/v1alpha1/crd-patches.go new file mode 100644 index 00000000000..b8906db84b9 --- /dev/null +++ b/config-gen/apis/v1alpha1/crd-patches.go @@ -0,0 +1,23 @@ +package v1alpha1 + +import ( + "github.com/markbates/pkger" + "sigs.k8s.io/kustomize/kyaml/fn/framework" + "sigs.k8s.io/kustomize/kyaml/yaml" +) + +// CRDPatchTemplate returns the PatchTemplate for crd +func CRDPatchTemplate(kp *KubebuilderProject) framework.PT { + return framework.PT{ + Dir: pkger.Dir("/config-gen/templates/patches/crd"), + Selector: func() *framework.Selector { + return &framework.Selector{ + Kinds: []string{"CustomResourceDefinition"}, + Filter: func(r *yaml.RNode) bool { + m, _ := r.GetMeta() + return kp.Spec.ConversionWebhooks[m.Name] + }, + } + }, + } +} diff --git a/config-gen/apis/v1alpha1/sort-filter.go b/config-gen/apis/v1alpha1/sort-filter.go new file mode 100644 index 00000000000..1fa6babcb61 --- /dev/null +++ b/config-gen/apis/v1alpha1/sort-filter.go @@ -0,0 +1,65 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + "math" + "sort" + "strings" + + "sigs.k8s.io/kustomize/kyaml/kio" + "sigs.k8s.io/kustomize/kyaml/yaml" +) + +var _ kio.Filter = &SortFilter{} + +// SortFilter sorts resources so they are installed in the right order +type SortFilter struct { + *KubebuilderProject +} + +var order = func() map[string]int { + m := map[string]int{} + for i, k := range []string{ + "Namespace", "CustomResourceDefinition", "Role", "ClusterRole", + "RoleBinding", "ClusterRoleBinding", "Service", "Secret", "Deployment", + } { + m[k] = i + 1 + } + return m +}() + +// Filter implements kio.Filter +func (cgr SortFilter) Filter(input []*yaml.RNode) ([]*yaml.RNode, error) { + sort.Slice(input, func(i, j int) bool { + mi, _ := input[i].GetMeta() + mj, _ := input[j].GetMeta() + oi := order[mi.Kind] + if oi == 0 { + oi = math.MaxInt32 + } + oj := order[mj.Kind] + if oj == 0 { + oj = math.MaxInt32 + } + if oi != oj { + return oi < oj + } + return strings.Compare(mi.Name, mj.Name) < 0 + }) + return input, nil +} diff --git a/config-gen/apis/v1alpha1/testdata/componentconfig/config.yaml b/config-gen/apis/v1alpha1/testdata/componentconfig/config.yaml new file mode 100644 index 00000000000..74b660cf716 --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/componentconfig/config.yaml @@ -0,0 +1,9 @@ +apiVersion: kubebuilder.sigs.k8s.io +kind: KubebuilderProject +metadata: + name: simple +spec: + projectDirectory: ../project/... + + image: example/simple:latest + componentConfigFilepath: ./controller_manager_config.yaml \ No newline at end of file diff --git a/config-gen/apis/v1alpha1/testdata/componentconfig/controller_manager_config.yaml b/config-gen/apis/v1alpha1/testdata/componentconfig/controller_manager_config.yaml new file mode 100644 index 00000000000..d1a5c33004d --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/componentconfig/controller_manager_config.yaml @@ -0,0 +1,9 @@ +apiVersion: controller-runtime.sigs.k8s.io/v1alpha1 +kind: ControllerManagerConfig +metrics: + bindAddress: 127.0.0.1:8080 +webhook: + port: 9443 +leaderElection: + leaderElect: true + resourceName: 6858fb70.testproject.org \ No newline at end of file diff --git a/config-gen/apis/v1alpha1/testdata/componentconfig/expected.yaml b/config-gen/apis/v1alpha1/testdata/componentconfig/expected.yaml new file mode 100644 index 00000000000..8b18121b577 --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/componentconfig/expected.yaml @@ -0,0 +1,323 @@ +apiVersion: v1 +kind: Namespace +metadata: + labels: + control-plane: controller-manager + name: simple-system +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: (unknown) + creationTimestamp: null + name: bars.example.my.domain +spec: + group: example.my.domain + names: + kind: Bar + listKind: BarList + plural: bars + singular: bar + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: Bar is the Schema for the bars API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema ' + type: string + kind: + description: 'Kind is a string value representing the ' + type: string + metadata: + type: object + spec: + description: BarSpec defines the desired state of Bar + properties: + foo: + description: Foo is an example field of Bar. + type: string + type: object + status: + description: 'BarStatus defines the observed state of ' + type: object + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: (unknown) + creationTimestamp: null + name: foos.example.my.domain +spec: + group: example.my.domain + names: + kind: Foo + listKind: FooList + plural: foos + singular: foo + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: Foo is the Schema for the foos API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema ' + type: string + kind: + description: 'Kind is a string value representing the ' + type: string + metadata: + type: object + spec: + description: FooSpec defines the desired state of Foo + properties: + foo: + description: Foo is an example field of Foo. + type: string + type: object + status: + description: 'FooStatus defines the observed state of ' + type: object + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: simple-system-leader-election-role + namespace: simple-system +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - configmaps/status + verbs: + - get + - update + - patch +- apiGroups: + - "" + resources: + - events + verbs: + - create +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: simple-proxy-role +rules: +- apiGroups: ["authentication.k8s.io"] + resources: + - tokenreviews + verbs: ["create"] +- apiGroups: ["authorization.k8s.io"] + resources: + - subjectaccessreviews + verbs: ["create"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + name: simple-system-manager-role +rules: +- apiGroups: + - example.my.domain + resources: + - bars + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - example.my.domain + resources: + - bars/status + verbs: + - get + - patch + - update +- apiGroups: + - example.my.domain + resources: + - foos + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - example.my.domain + resources: + - foos/status + verbs: + - get + - patch + - update +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: simple-system-leader-election-rolebinding + namespace: simple-system +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: simple-system-leader-election-role +subjects: +- kind: ServiceAccount + name: default + namespace: simple-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: simple-proxy-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: simple-proxy-role +subjects: +- kind: ServiceAccount + name: default + namespace: simple-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: simple-system-manager-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: simple-system-manager-role +subjects: +- kind: ServiceAccount + name: default + namespace: simple-system +--- +apiVersion: v1 +kind: Service +metadata: + namespace: simple-system + name: metrics-service + labels: + control-plane: controller-manager +spec: + ports: + - name: https + port: 8443 + targetPort: https + selector: + control-plane: controller-manager +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: controller-manager + namespace: simple-system + labels: + control-plane: controller-manager +spec: + selector: + matchLabels: + control-plane: controller-manager + replicas: 1 + template: + metadata: + labels: + control-plane: controller-manager + spec: + containers: + - command: + - /manager + args: + - "--config=controller_manager_config.yaml" + image: example/simple:latest + name: manager + resources: + limits: + cpu: 100m + memory: 30Mi + requests: + cpu: 100m + memory: 20Mi + volumeMounts: + - name: manager-config + mountPath: /controller_manager_config.yaml + subPath: controller_manager_config.yaml + - name: kube-rbac-proxy + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0 + args: + - "--secure-listen-address=0.0.0.0:8443" + - "--upstream=http://127.0.0.1:8080/" + - "--logtostderr=true" + - "--v=10" + ports: + - containerPort: 8443 + name: https + terminationGracePeriodSeconds: 10 + volumes: + - name: manager-config + configMap: + name: manager-config +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: manager-config + namespace: simple-system + labels: + control-plane: controller-manager +data: + controller_manager_config.yaml: |- + apiVersion: controller-runtime.sigs.k8s.io/v1alpha1 + kind: ControllerManagerConfig + metrics: + bindAddress: 127.0.0.1:8080 + webhook: + port: 9443 + leaderElection: + leaderElect: true + resourceName: 6858fb70.testproject.org diff --git a/config-gen/apis/v1alpha1/testdata/crdsonly/config.yaml b/config-gen/apis/v1alpha1/testdata/crdsonly/config.yaml new file mode 100644 index 00000000000..d0d38b099bb --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/crdsonly/config.yaml @@ -0,0 +1,14 @@ +apiVersion: kubebuilder.sigs.k8s.io/v1alpha1 +kind: KubebuilderProject +metadata: + name: simple +spec: + projectName: simple + projectDirectory: ../project/... + + image: example/simple:latest + + components: + namespace: false + controller-manager: false + rbac: false diff --git a/config-gen/apis/v1alpha1/testdata/crdsonly/expected.yaml b/config-gen/apis/v1alpha1/testdata/crdsonly/expected.yaml new file mode 100644 index 00000000000..c18a2d05a82 --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/crdsonly/expected.yaml @@ -0,0 +1,97 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: (unknown) + creationTimestamp: null + name: bars.example.my.domain +spec: + group: example.my.domain + names: + kind: Bar + listKind: BarList + plural: bars + singular: bar + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: Bar is the Schema for the bars API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema ' + type: string + kind: + description: 'Kind is a string value representing the ' + type: string + metadata: + type: object + spec: + description: BarSpec defines the desired state of Bar + properties: + foo: + description: Foo is an example field of Bar. + type: string + type: object + status: + description: 'BarStatus defines the observed state of ' + type: object + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: (unknown) + creationTimestamp: null + name: foos.example.my.domain +spec: + group: example.my.domain + names: + kind: Foo + listKind: FooList + plural: foos + singular: foo + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: Foo is the Schema for the foos API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema ' + type: string + kind: + description: 'Kind is a string value representing the ' + type: string + metadata: + type: object + spec: + description: FooSpec defines the desired state of Foo + properties: + foo: + description: Foo is an example field of Foo. + type: string + type: object + status: + description: 'FooStatus defines the observed state of ' + type: object + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/config-gen/apis/v1alpha1/testdata/default/config.yaml b/config-gen/apis/v1alpha1/testdata/default/config.yaml new file mode 100644 index 00000000000..6adc43dbed2 --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/default/config.yaml @@ -0,0 +1,8 @@ +apiVersion: kubebuilder.sigs.k8s.io +kind: KubebuilderProject +metadata: + name: simple +spec: + projectDirectory: ../project/... + + image: example/simple:latest diff --git a/config-gen/apis/v1alpha1/testdata/default/expected.yaml b/config-gen/apis/v1alpha1/testdata/default/expected.yaml new file mode 100644 index 00000000000..09a6bddaa62 --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/default/expected.yaml @@ -0,0 +1,297 @@ +apiVersion: v1 +kind: Namespace +metadata: + labels: + control-plane: controller-manager + name: simple-system +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: (unknown) + creationTimestamp: null + name: bars.example.my.domain +spec: + group: example.my.domain + names: + kind: Bar + listKind: BarList + plural: bars + singular: bar + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: Bar is the Schema for the bars API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema ' + type: string + kind: + description: 'Kind is a string value representing the ' + type: string + metadata: + type: object + spec: + description: BarSpec defines the desired state of Bar + properties: + foo: + description: Foo is an example field of Bar. + type: string + type: object + status: + description: 'BarStatus defines the observed state of ' + type: object + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: (unknown) + creationTimestamp: null + name: foos.example.my.domain +spec: + group: example.my.domain + names: + kind: Foo + listKind: FooList + plural: foos + singular: foo + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: Foo is the Schema for the foos API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema ' + type: string + kind: + description: 'Kind is a string value representing the ' + type: string + metadata: + type: object + spec: + description: FooSpec defines the desired state of Foo + properties: + foo: + description: Foo is an example field of Foo. + type: string + type: object + status: + description: 'FooStatus defines the observed state of ' + type: object + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: simple-system-leader-election-role + namespace: simple-system +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - configmaps/status + verbs: + - get + - update + - patch +- apiGroups: + - "" + resources: + - events + verbs: + - create +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: simple-proxy-role +rules: +- apiGroups: ["authentication.k8s.io"] + resources: + - tokenreviews + verbs: ["create"] +- apiGroups: ["authorization.k8s.io"] + resources: + - subjectaccessreviews + verbs: ["create"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + name: simple-system-manager-role +rules: +- apiGroups: + - example.my.domain + resources: + - bars + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - example.my.domain + resources: + - bars/status + verbs: + - get + - patch + - update +- apiGroups: + - example.my.domain + resources: + - foos + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - example.my.domain + resources: + - foos/status + verbs: + - get + - patch + - update +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: simple-system-leader-election-rolebinding + namespace: simple-system +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: simple-system-leader-election-role +subjects: +- kind: ServiceAccount + name: default + namespace: simple-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: simple-proxy-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: simple-proxy-role +subjects: +- kind: ServiceAccount + name: default + namespace: simple-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: simple-system-manager-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: simple-system-manager-role +subjects: +- kind: ServiceAccount + name: default + namespace: simple-system +--- +apiVersion: v1 +kind: Service +metadata: + namespace: simple-system + name: metrics-service + labels: + control-plane: controller-manager +spec: + ports: + - name: https + port: 8443 + targetPort: https + selector: + control-plane: controller-manager +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: controller-manager + namespace: simple-system + labels: + control-plane: controller-manager +spec: + selector: + matchLabels: + control-plane: controller-manager + replicas: 1 + template: + metadata: + labels: + control-plane: controller-manager + spec: + containers: + - command: + - /manager + args: + - "--metrics-addr=127.0.0.1:8080" + - "--enable-leader-election" + image: example/simple:latest + name: manager + resources: + limits: + cpu: 100m + memory: 30Mi + requests: + cpu: 100m + memory: 20Mi + - name: kube-rbac-proxy + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0 + args: + - "--secure-listen-address=0.0.0.0:8443" + - "--upstream=http://127.0.0.1:8080/" + - "--logtostderr=true" + - "--v=10" + ports: + - containerPort: 8443 + name: https + terminationGracePeriodSeconds: 10 diff --git a/config-gen/apis/v1alpha1/testdata/disableauthproxy/config.yaml b/config-gen/apis/v1alpha1/testdata/disableauthproxy/config.yaml new file mode 100644 index 00000000000..b77746721ef --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/disableauthproxy/config.yaml @@ -0,0 +1,10 @@ +apiVersion: kubebuilder.sigs.k8s.io +kind: APIConfiguration +metadata: + name: simple +spec: + projectDirectory: ../project/... + + image: example/simple:latest + + disableAuthProxy: true diff --git a/config-gen/apis/v1alpha1/testdata/disableauthproxy/expected.yaml b/config-gen/apis/v1alpha1/testdata/disableauthproxy/expected.yaml new file mode 100644 index 00000000000..880060df110 --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/disableauthproxy/expected.yaml @@ -0,0 +1,244 @@ +apiVersion: v1 +kind: Namespace +metadata: + labels: + control-plane: controller-manager + name: simple-system +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: (unknown) + creationTimestamp: null + name: bars.example.my.domain +spec: + group: example.my.domain + names: + kind: Bar + listKind: BarList + plural: bars + singular: bar + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: Bar is the Schema for the bars API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema ' + type: string + kind: + description: 'Kind is a string value representing the ' + type: string + metadata: + type: object + spec: + description: BarSpec defines the desired state of Bar + properties: + foo: + description: Foo is an example field of Bar. + type: string + type: object + status: + description: 'BarStatus defines the observed state of ' + type: object + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: (unknown) + creationTimestamp: null + name: foos.example.my.domain +spec: + group: example.my.domain + names: + kind: Foo + listKind: FooList + plural: foos + singular: foo + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: Foo is the Schema for the foos API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema ' + type: string + kind: + description: 'Kind is a string value representing the ' + type: string + metadata: + type: object + spec: + description: FooSpec defines the desired state of Foo + properties: + foo: + description: Foo is an example field of Foo. + type: string + type: object + status: + description: 'FooStatus defines the observed state of ' + type: object + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: simple-system-leader-election-role + namespace: simple-system +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - configmaps/status + verbs: + - get + - update + - patch +- apiGroups: + - "" + resources: + - events + verbs: + - create +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + name: simple-system-manager-role +rules: +- apiGroups: + - example.my.domain + resources: + - bars + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - example.my.domain + resources: + - bars/status + verbs: + - get + - patch + - update +- apiGroups: + - example.my.domain + resources: + - foos + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - example.my.domain + resources: + - foos/status + verbs: + - get + - patch + - update +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: simple-system-leader-election-rolebinding + namespace: simple-system +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: simple-system-leader-election-role +subjects: +- kind: ServiceAccount + name: default + namespace: simple-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: simple-system-manager-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: simple-system-manager-role +subjects: +- kind: ServiceAccount + name: default + namespace: simple-system +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: controller-manager + namespace: simple-system + labels: + control-plane: controller-manager +spec: + selector: + matchLabels: + control-plane: controller-manager + replicas: 1 + template: + metadata: + labels: + control-plane: controller-manager + spec: + containers: + - command: + - /manager + args: + - --enable-leader-election + image: example/simple:latest + name: manager + resources: + limits: + cpu: 100m + memory: 30Mi + requests: + cpu: 100m + memory: 20Mi + terminationGracePeriodSeconds: 10 diff --git a/config-gen/apis/v1alpha1/testdata/enablecertmanager/config.yaml b/config-gen/apis/v1alpha1/testdata/enablecertmanager/config.yaml new file mode 100644 index 00000000000..8383f27c03d --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/enablecertmanager/config.yaml @@ -0,0 +1,12 @@ +apiVersion: kubebuilder.sigs.k8s.io +kind: APIConfiguration +metadata: + name: simple +spec: + projectDirectory: ../project/... + + image: example/simple:latest + + components: + cert-manager: true + webhooks: true diff --git a/config-gen/apis/v1alpha1/testdata/enablecertmanager/expected.yaml b/config-gen/apis/v1alpha1/testdata/enablecertmanager/expected.yaml new file mode 100644 index 00000000000..20d627d4a2c --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/enablecertmanager/expected.yaml @@ -0,0 +1,350 @@ +apiVersion: v1 +kind: Namespace +metadata: + labels: + control-plane: controller-manager + name: simple-system +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: (unknown) + cert-manager.io/inject-ca-from: simple-system/simple-serving-cert + name: bars.example.my.domain +spec: + group: example.my.domain + names: + kind: Bar + listKind: BarList + plural: bars + singular: bar + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: Bar is the Schema for the bars API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema ' + type: string + kind: + description: 'Kind is a string value representing the ' + type: string + metadata: + type: object + spec: + description: BarSpec defines the desired state of Bar + properties: + foo: + description: Foo is an example field of Bar. + type: string + type: object + status: + description: 'BarStatus defines the observed state of ' + type: object + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: (unknown) + cert-manager.io/inject-ca-from: simple-system/simple-serving-cert + name: foos.example.my.domain +spec: + group: example.my.domain + names: + kind: Foo + listKind: FooList + plural: foos + singular: foo + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: Foo is the Schema for the foos API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema ' + type: string + kind: + description: 'Kind is a string value representing the ' + type: string + metadata: + type: object + spec: + description: FooSpec defines the desired state of Foo + properties: + foo: + description: Foo is an example field of Foo. + type: string + type: object + status: + description: 'FooStatus defines the observed state of ' + type: object + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: simple-system-leader-election-role + namespace: simple-system +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - configmaps/status + verbs: + - get + - update + - patch +- apiGroups: + - "" + resources: + - events + verbs: + - create +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: simple-proxy-role +rules: +- apiGroups: ["authentication.k8s.io"] + resources: + - tokenreviews + verbs: ["create"] +- apiGroups: ["authorization.k8s.io"] + resources: + - subjectaccessreviews + verbs: ["create"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + name: simple-system-manager-role +rules: +- apiGroups: + - example.my.domain + resources: + - bars + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - example.my.domain + resources: + - bars/status + verbs: + - get + - patch + - update +- apiGroups: + - example.my.domain + resources: + - foos + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - example.my.domain + resources: + - foos/status + verbs: + - get + - patch + - update +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: simple-system-leader-election-rolebinding + namespace: simple-system +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: simple-system-leader-election-role +subjects: +- kind: ServiceAccount + name: default + namespace: simple-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: simple-proxy-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: simple-proxy-role +subjects: +- kind: ServiceAccount + name: default + namespace: simple-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: simple-system-manager-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: simple-system-manager-role +subjects: +- kind: ServiceAccount + name: default + namespace: simple-system +--- +apiVersion: v1 +kind: Service +metadata: + namespace: simple-system + name: metrics-service + labels: + control-plane: controller-manager +spec: + ports: + - name: https + port: 8443 + targetPort: https + selector: + control-plane: controller-manager +--- +apiVersion: v1 +kind: Service +metadata: + namespace: simple-system + name: webhook-service + labels: + control-plane: webhook +spec: + ports: + - port: 443 + targetPort: webhook-server + selector: + control-plane: controller-manager +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: controller-manager + namespace: simple-system + labels: + control-plane: controller-manager +spec: + selector: + matchLabels: + control-plane: controller-manager + replicas: 1 + template: + metadata: + labels: + control-plane: controller-manager + spec: + containers: + - command: + - /manager + args: + - "--metrics-addr=127.0.0.1:8080" + - "--enable-leader-election" + image: example/simple:latest + name: manager + resources: + limits: + cpu: 100m + memory: 30Mi + requests: + cpu: 100m + memory: 20Mi + ports: + - containerPort: 9443 + name: webhook-server + protocol: TCP + volumeMounts: + - mountPath: /tmp/k8s-webhook-server/serving-certs + name: cert + readOnly: true + - name: kube-rbac-proxy + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0 + args: + - "--secure-listen-address=0.0.0.0:8443" + - "--upstream=http://127.0.0.1:8080/" + - "--logtostderr=true" + - "--v=10" + ports: + - containerPort: 8443 + name: https + terminationGracePeriodSeconds: 10 + volumes: + - name: cert + secret: + defaultMode: 420 + secretName: webhook-server-cert +--- +# The following manifests contain a self-signed issuer CR and a certificate CR. +# More document can be found at https://docs.cert-manager.io +# WARNING: Targets CertManager 0.11 check https://docs.cert-manager.io/en/latest/tasks/upgrading/index.html for +# breaking changes +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + name: simple-selfsigned-issuer + namespace: simple-system +spec: + selfSigned: {} +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: simple-serving-cert + namespace: simple-system +spec: + dnsNames: + - webhook-service.simple-system.svc + - webhook-service.simple-system.svc.cluster.local + issuerRef: + kind: Issuer + name: selfsigned-issuer + secretName: webhook-server-cert # this secret will not be prefixed, since it's not managed by kustomize diff --git a/config-gen/apis/v1alpha1/testdata/enableconversionwebhooks/config.yaml b/config-gen/apis/v1alpha1/testdata/enableconversionwebhooks/config.yaml new file mode 100644 index 00000000000..a5daf46f5fc --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/enableconversionwebhooks/config.yaml @@ -0,0 +1,13 @@ +apiVersion: kubebuilder.sigs.k8s.io +kind: APIConfiguration +metadata: + name: simple +spec: + projectDirectory: ../project/... + + image: example/simple:latest + + components: + webhooks: true + conversionWebhooks: + "bars.example.my.domain": true \ No newline at end of file diff --git a/config-gen/apis/v1alpha1/testdata/enableconversionwebhooks/expected.yaml b/config-gen/apis/v1alpha1/testdata/enableconversionwebhooks/expected.yaml new file mode 100644 index 00000000000..0f05fb940bb --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/enableconversionwebhooks/expected.yaml @@ -0,0 +1,333 @@ +apiVersion: v1 +kind: Namespace +metadata: + labels: + control-plane: controller-manager + name: simple-system +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: (unknown) + name: bars.example.my.domain +spec: + group: example.my.domain + names: + kind: Bar + listKind: BarList + plural: bars + singular: bar + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: Bar is the Schema for the bars API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema ' + type: string + kind: + description: 'Kind is a string value representing the ' + type: string + metadata: + type: object + spec: + description: BarSpec defines the desired state of Bar + properties: + foo: + description: Foo is an example field of Bar. + type: string + type: object + status: + description: 'BarStatus defines the observed state of ' + type: object + type: object + served: true + storage: true + conversion: + strategy: Webhook + webhookClientConfig: + # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank, + # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager) + caBundle: Cg== + service: + namespace: simple-system + name: webhook-service + path: /convert +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: (unknown) + creationTimestamp: null + name: foos.example.my.domain +spec: + group: example.my.domain + names: + kind: Foo + listKind: FooList + plural: foos + singular: foo + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: Foo is the Schema for the foos API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema ' + type: string + kind: + description: 'Kind is a string value representing the ' + type: string + metadata: + type: object + spec: + description: FooSpec defines the desired state of Foo + properties: + foo: + description: Foo is an example field of Foo. + type: string + type: object + status: + description: 'FooStatus defines the observed state of ' + type: object + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: simple-system-leader-election-role + namespace: simple-system +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - configmaps/status + verbs: + - get + - update + - patch +- apiGroups: + - "" + resources: + - events + verbs: + - create +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: simple-proxy-role +rules: +- apiGroups: ["authentication.k8s.io"] + resources: + - tokenreviews + verbs: ["create"] +- apiGroups: ["authorization.k8s.io"] + resources: + - subjectaccessreviews + verbs: ["create"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + name: simple-system-manager-role +rules: +- apiGroups: + - example.my.domain + resources: + - bars + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - example.my.domain + resources: + - bars/status + verbs: + - get + - patch + - update +- apiGroups: + - example.my.domain + resources: + - foos + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - example.my.domain + resources: + - foos/status + verbs: + - get + - patch + - update +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: simple-system-leader-election-rolebinding + namespace: simple-system +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: simple-system-leader-election-role +subjects: +- kind: ServiceAccount + name: default + namespace: simple-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: simple-proxy-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: simple-proxy-role +subjects: +- kind: ServiceAccount + name: default + namespace: simple-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: simple-system-manager-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: simple-system-manager-role +subjects: +- kind: ServiceAccount + name: default + namespace: simple-system +--- +apiVersion: v1 +kind: Service +metadata: + namespace: simple-system + name: metrics-service + labels: + control-plane: controller-manager +spec: + ports: + - name: https + port: 8443 + targetPort: https + selector: + control-plane: controller-manager +--- +apiVersion: v1 +kind: Service +metadata: + namespace: simple-system + name: webhook-service + labels: + control-plane: webhook +spec: + ports: + - port: 443 + targetPort: webhook-server + selector: + control-plane: controller-manager +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: controller-manager + namespace: simple-system + labels: + control-plane: controller-manager +spec: + selector: + matchLabels: + control-plane: controller-manager + replicas: 1 + template: + metadata: + labels: + control-plane: controller-manager + spec: + containers: + - command: + - /manager + args: + - "--metrics-addr=127.0.0.1:8080" + - "--enable-leader-election" + image: example/simple:latest + name: manager + resources: + limits: + cpu: 100m + memory: 30Mi + requests: + cpu: 100m + memory: 20Mi + ports: + - containerPort: 9443 + name: webhook-server + protocol: TCP + volumeMounts: + - mountPath: /tmp/k8s-webhook-server/serving-certs + name: cert + readOnly: true + - name: kube-rbac-proxy + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0 + args: + - "--secure-listen-address=0.0.0.0:8443" + - "--upstream=http://127.0.0.1:8080/" + - "--logtostderr=true" + - "--v=10" + ports: + - containerPort: 8443 + name: https + terminationGracePeriodSeconds: 10 + volumes: + - name: cert + secret: + defaultMode: 420 + secretName: webhook-server-cert diff --git a/config-gen/apis/v1alpha1/testdata/enableprometheus/config.yaml b/config-gen/apis/v1alpha1/testdata/enableprometheus/config.yaml new file mode 100644 index 00000000000..e93715d7e76 --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/enableprometheus/config.yaml @@ -0,0 +1,10 @@ +apiVersion: kubebuilder.sigs.k8s.io +kind: APIConfiguration +metadata: + name: simple +spec: + image: example/simple:latest + projectDirectory: ../project/... + + components: + prometheus: true diff --git a/config-gen/apis/v1alpha1/testdata/enableprometheus/expected.yaml b/config-gen/apis/v1alpha1/testdata/enableprometheus/expected.yaml new file mode 100644 index 00000000000..e6eb2b2cb75 --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/enableprometheus/expected.yaml @@ -0,0 +1,312 @@ +apiVersion: v1 +kind: Namespace +metadata: + labels: + control-plane: controller-manager + name: simple-system +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: (unknown) + creationTimestamp: null + name: bars.example.my.domain +spec: + group: example.my.domain + names: + kind: Bar + listKind: BarList + plural: bars + singular: bar + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: Bar is the Schema for the bars API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema ' + type: string + kind: + description: 'Kind is a string value representing the ' + type: string + metadata: + type: object + spec: + description: BarSpec defines the desired state of Bar + properties: + foo: + description: Foo is an example field of Bar. + type: string + type: object + status: + description: 'BarStatus defines the observed state of ' + type: object + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: (unknown) + creationTimestamp: null + name: foos.example.my.domain +spec: + group: example.my.domain + names: + kind: Foo + listKind: FooList + plural: foos + singular: foo + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: Foo is the Schema for the foos API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema ' + type: string + kind: + description: 'Kind is a string value representing the ' + type: string + metadata: + type: object + spec: + description: FooSpec defines the desired state of Foo + properties: + foo: + description: Foo is an example field of Foo. + type: string + type: object + status: + description: 'FooStatus defines the observed state of ' + type: object + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: simple-system-leader-election-role + namespace: simple-system +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - configmaps/status + verbs: + - get + - update + - patch +- apiGroups: + - "" + resources: + - events + verbs: + - create +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: simple-proxy-role +rules: +- apiGroups: ["authentication.k8s.io"] + resources: + - tokenreviews + verbs: ["create"] +- apiGroups: ["authorization.k8s.io"] + resources: + - subjectaccessreviews + verbs: ["create"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + name: simple-system-manager-role +rules: +- apiGroups: + - example.my.domain + resources: + - bars + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - example.my.domain + resources: + - bars/status + verbs: + - get + - patch + - update +- apiGroups: + - example.my.domain + resources: + - foos + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - example.my.domain + resources: + - foos/status + verbs: + - get + - patch + - update +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: simple-system-leader-election-rolebinding + namespace: simple-system +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: simple-system-leader-election-role +subjects: +- kind: ServiceAccount + name: default + namespace: simple-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: simple-proxy-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: simple-proxy-role +subjects: +- kind: ServiceAccount + name: default + namespace: simple-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: simple-system-manager-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: simple-system-manager-role +subjects: +- kind: ServiceAccount + name: default + namespace: simple-system +--- +apiVersion: v1 +kind: Service +metadata: + namespace: simple-system + name: metrics-service + labels: + control-plane: controller-manager +spec: + ports: + - name: https + port: 8443 + targetPort: https + selector: + control-plane: controller-manager +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: controller-manager + namespace: simple-system + labels: + control-plane: controller-manager +spec: + selector: + matchLabels: + control-plane: controller-manager + replicas: 1 + template: + metadata: + labels: + control-plane: controller-manager + spec: + containers: + - command: + - /manager + args: + - "--metrics-addr=127.0.0.1:8080" + - "--enable-leader-election" + image: example/simple:latest + name: manager + resources: + limits: + cpu: 100m + memory: 30Mi + requests: + cpu: 100m + memory: 20Mi + - name: kube-rbac-proxy + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0 + args: + - "--secure-listen-address=0.0.0.0:8443" + - "--upstream=http://127.0.0.1:8080/" + - "--logtostderr=true" + - "--v=10" + ports: + - containerPort: 8443 + name: https + terminationGracePeriodSeconds: 10 +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + namespace: simple-system + name: controller-manager-metrics-monitor + labels: + control-plane: controller-manager +spec: + endpoints: + - path: /metrics + port: https + selector: + matchLabels: + control-plane: controller-manager diff --git a/config-gen/apis/v1alpha1/testdata/enablewebhooks/config.yaml b/config-gen/apis/v1alpha1/testdata/enablewebhooks/config.yaml new file mode 100644 index 00000000000..b85e7a341c0 --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/enablewebhooks/config.yaml @@ -0,0 +1,11 @@ +apiVersion: kubebuilder.sigs.k8s.io +kind: APIConfiguration +metadata: + name: simple +spec: + projectDirectory: ../project/... + + image: example/simple:latest + + components: + webhooks: true diff --git a/config-gen/apis/v1alpha1/testdata/enablewebhooks/expected.yaml b/config-gen/apis/v1alpha1/testdata/enablewebhooks/expected.yaml new file mode 100644 index 00000000000..52edb480c9e --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/enablewebhooks/expected.yaml @@ -0,0 +1,324 @@ +apiVersion: v1 +kind: Namespace +metadata: + labels: + control-plane: controller-manager + name: simple-system +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: (unknown) + creationTimestamp: null + name: bars.example.my.domain +spec: + group: example.my.domain + names: + kind: Bar + listKind: BarList + plural: bars + singular: bar + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: Bar is the Schema for the bars API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema ' + type: string + kind: + description: 'Kind is a string value representing the ' + type: string + metadata: + type: object + spec: + description: BarSpec defines the desired state of Bar + properties: + foo: + description: Foo is an example field of Bar. + type: string + type: object + status: + description: 'BarStatus defines the observed state of ' + type: object + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: (unknown) + creationTimestamp: null + name: foos.example.my.domain +spec: + group: example.my.domain + names: + kind: Foo + listKind: FooList + plural: foos + singular: foo + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: Foo is the Schema for the foos API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema ' + type: string + kind: + description: 'Kind is a string value representing the ' + type: string + metadata: + type: object + spec: + description: FooSpec defines the desired state of Foo + properties: + foo: + description: Foo is an example field of Foo. + type: string + type: object + status: + description: 'FooStatus defines the observed state of ' + type: object + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: simple-system-leader-election-role + namespace: simple-system +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - configmaps/status + verbs: + - get + - update + - patch +- apiGroups: + - "" + resources: + - events + verbs: + - create +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: simple-proxy-role +rules: +- apiGroups: ["authentication.k8s.io"] + resources: + - tokenreviews + verbs: ["create"] +- apiGroups: ["authorization.k8s.io"] + resources: + - subjectaccessreviews + verbs: ["create"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + name: simple-system-manager-role +rules: +- apiGroups: + - example.my.domain + resources: + - bars + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - example.my.domain + resources: + - bars/status + verbs: + - get + - patch + - update +- apiGroups: + - example.my.domain + resources: + - foos + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - example.my.domain + resources: + - foos/status + verbs: + - get + - patch + - update +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: simple-system-leader-election-rolebinding + namespace: simple-system +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: simple-system-leader-election-role +subjects: +- kind: ServiceAccount + name: default + namespace: simple-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: simple-proxy-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: simple-proxy-role +subjects: +- kind: ServiceAccount + name: default + namespace: simple-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: simple-system-manager-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: simple-system-manager-role +subjects: +- kind: ServiceAccount + name: default + namespace: simple-system +--- +apiVersion: v1 +kind: Service +metadata: + namespace: simple-system + name: metrics-service + labels: + control-plane: controller-manager +spec: + ports: + - name: https + port: 8443 + targetPort: https + selector: + control-plane: controller-manager +--- +apiVersion: v1 +kind: Service +metadata: + namespace: simple-system + name: webhook-service + labels: + control-plane: webhook +spec: + ports: + - port: 443 + targetPort: webhook-server + selector: + control-plane: controller-manager +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: controller-manager + namespace: simple-system + labels: + control-plane: controller-manager +spec: + selector: + matchLabels: + control-plane: controller-manager + replicas: 1 + template: + metadata: + labels: + control-plane: controller-manager + spec: + containers: + - command: + - /manager + args: + - "--metrics-addr=127.0.0.1:8080" + - "--enable-leader-election" + image: example/simple:latest + name: manager + resources: + limits: + cpu: 100m + memory: 30Mi + requests: + cpu: 100m + memory: 20Mi + ports: + - containerPort: 9443 + name: webhook-server + protocol: TCP + volumeMounts: + - mountPath: /tmp/k8s-webhook-server/serving-certs + name: cert + readOnly: true + - name: kube-rbac-proxy + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0 + args: + - "--secure-listen-address=0.0.0.0:8443" + - "--upstream=http://127.0.0.1:8080/" + - "--logtostderr=true" + - "--v=10" + ports: + - containerPort: 8443 + name: https + terminationGracePeriodSeconds: 10 + volumes: + - name: cert + secret: + defaultMode: 420 + secretName: webhook-server-cert diff --git a/config-gen/apis/v1alpha1/testdata/project/api/v1alpha1/foo_types.go b/config-gen/apis/v1alpha1/testdata/project/api/v1alpha1/foo_types.go new file mode 100644 index 00000000000..0bf0e4803bd --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/project/api/v1alpha1/foo_types.go @@ -0,0 +1,63 @@ +/* + + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. + +// FooSpec defines the desired state of Foo +type FooSpec struct { + // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + // Important: Run "make" to regenerate code after modifying this file + + // Foo is an example field of Foo. Edit Foo_types.go to remove/update + Foo string `json:"foo,omitempty"` +} + +// FooStatus defines the observed state of Foo +type FooStatus struct { + // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster + // Important: Run "make" to regenerate code after modifying this file +} + +// +kubebuilder:object:root=true + +// Foo is the Schema for the foos API +type Foo struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec FooSpec `json:"spec,omitempty"` + Status FooStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// FooList contains a list of Foo +type FooList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Foo `json:"items"` +} + +func init() { + SchemeBuilder.Register(&Foo{}, &FooList{}) +} diff --git a/config-gen/apis/v1alpha1/testdata/project/api/v1alpha1/groupversion_info.go b/config-gen/apis/v1alpha1/testdata/project/api/v1alpha1/groupversion_info.go new file mode 100644 index 00000000000..f6b1f5cab03 --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/project/api/v1alpha1/groupversion_info.go @@ -0,0 +1,36 @@ +/* + + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package v1alpha1 contains API Schema definitions for the example v1alpha1 API group +// +kubebuilder:object:generate=true +// +groupName=example.my.domain +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "example.my.domain", Version: "v1alpha1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/config-gen/apis/v1alpha1/testdata/project/api/v1alpha1/zz_generated.deepcopy.go b/config-gen/apis/v1alpha1/testdata/project/api/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 00000000000..40f10b6917d --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/project/api/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,114 @@ +// +build !ignore_autogenerated + +/* + + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Foo) DeepCopyInto(out *Foo) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Foo. +func (in *Foo) DeepCopy() *Foo { + if in == nil { + return nil + } + out := new(Foo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Foo) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FooList) DeepCopyInto(out *FooList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Foo, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FooList. +func (in *FooList) DeepCopy() *FooList { + if in == nil { + return nil + } + out := new(FooList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *FooList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FooSpec) DeepCopyInto(out *FooSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FooSpec. +func (in *FooSpec) DeepCopy() *FooSpec { + if in == nil { + return nil + } + out := new(FooSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FooStatus) DeepCopyInto(out *FooStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FooStatus. +func (in *FooStatus) DeepCopy() *FooStatus { + if in == nil { + return nil + } + out := new(FooStatus) + in.DeepCopyInto(out) + return out +} diff --git a/config-gen/apis/v1alpha1/testdata/project/api/v1beta1/bar_types.go b/config-gen/apis/v1alpha1/testdata/project/api/v1beta1/bar_types.go new file mode 100644 index 00000000000..d931e88ab55 --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/project/api/v1beta1/bar_types.go @@ -0,0 +1,63 @@ +/* + + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. + +// BarSpec defines the desired state of Bar +type BarSpec struct { + // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + // Important: Run "make" to regenerate code after modifying this file + + // Foo is an example field of Bar. Edit Bar_types.go to remove/update + Foo string `json:"foo,omitempty"` +} + +// BarStatus defines the observed state of Bar +type BarStatus struct { + // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster + // Important: Run "make" to regenerate code after modifying this file +} + +// +kubebuilder:object:root=true + +// Bar is the Schema for the bars API +type Bar struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec BarSpec `json:"spec,omitempty"` + Status BarStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// BarList contains a list of Bar +type BarList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Bar `json:"items"` +} + +func init() { + SchemeBuilder.Register(&Bar{}, &BarList{}) +} diff --git a/config-gen/apis/v1alpha1/testdata/project/api/v1beta1/groupversion_info.go b/config-gen/apis/v1alpha1/testdata/project/api/v1beta1/groupversion_info.go new file mode 100644 index 00000000000..088b91cfc2e --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/project/api/v1beta1/groupversion_info.go @@ -0,0 +1,36 @@ +/* + + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package v1beta1 contains API Schema definitions for the example v1beta1 API group +// +kubebuilder:object:generate=true +// +groupName=example.my.domain +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "example.my.domain", Version: "v1beta1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/config-gen/apis/v1alpha1/testdata/project/api/v1beta1/zz_generated.deepcopy.go b/config-gen/apis/v1alpha1/testdata/project/api/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 00000000000..b05c785c1ef --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/project/api/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,114 @@ +// +build !ignore_autogenerated + +/* + + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1beta1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Bar) DeepCopyInto(out *Bar) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Bar. +func (in *Bar) DeepCopy() *Bar { + if in == nil { + return nil + } + out := new(Bar) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Bar) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BarList) DeepCopyInto(out *BarList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Bar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BarList. +func (in *BarList) DeepCopy() *BarList { + if in == nil { + return nil + } + out := new(BarList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BarList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BarSpec) DeepCopyInto(out *BarSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BarSpec. +func (in *BarSpec) DeepCopy() *BarSpec { + if in == nil { + return nil + } + out := new(BarSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BarStatus) DeepCopyInto(out *BarStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BarStatus. +func (in *BarStatus) DeepCopy() *BarStatus { + if in == nil { + return nil + } + out := new(BarStatus) + in.DeepCopyInto(out) + return out +} diff --git a/config-gen/apis/v1alpha1/testdata/project/controllers/bar_controller.go b/config-gen/apis/v1alpha1/testdata/project/controllers/bar_controller.go new file mode 100644 index 00000000000..03e8503ba21 --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/project/controllers/bar_controller.go @@ -0,0 +1,31 @@ +/* + + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package controllers + +import ( + ctrl "sigs.k8s.io/controller-runtime" +) + +// BarReconciler reconciles a Bar object +type BarReconciler struct{} + +// +kubebuilder:rbac:groups=example.my.domain,resources=bars,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=example.my.domain,resources=bars/status,verbs=get;update;patch + +func (r *BarReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { + return ctrl.Result{}, nil +} diff --git a/config-gen/apis/v1alpha1/testdata/project/controllers/foo_controller.go b/config-gen/apis/v1alpha1/testdata/project/controllers/foo_controller.go new file mode 100644 index 00000000000..b3ae530b38b --- /dev/null +++ b/config-gen/apis/v1alpha1/testdata/project/controllers/foo_controller.go @@ -0,0 +1,31 @@ +/* + + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package controllers + +import ( + ctrl "sigs.k8s.io/controller-runtime" +) + +// FooReconciler reconciles a Foo object +type FooReconciler struct{} + +// +kubebuilder:rbac:groups=example.my.domain,resources=foos,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=example.my.domain,resources=foos/status,verbs=get;update;patch + +func (r *FooReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { + return ctrl.Result{}, nil +} diff --git a/config-gen/apis/v1alpha1/types.go b/config-gen/apis/v1alpha1/types.go new file mode 100644 index 00000000000..904ed57eb6d --- /dev/null +++ b/config-gen/apis/v1alpha1/types.go @@ -0,0 +1,187 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + "io/ioutil" + "time" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "sigs.k8s.io/kustomize/kyaml/errors" +) + +// KubebuilderProject implements the API for generating configuration +type KubebuilderProject struct { + metav1.TypeMeta `json:",inline" yaml:",omitempty"` + metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"` + + // Spec is the configuration spec defining what configuration should be produced. + Spec KubebuilderProjectSpec `json:"spec,omitempty" yaml:"spec,omitempty"` + + // Status is the configuration status defined at runtime. + Status KubebuilderProjectStatus `json:"status,omitempty" yaml:"status,omitempty"` + + // Project is for the field name used by the PROJECT file (config), instead of spec. + // Use Spec unless in the PROJECT file. + Project *KubebuilderProjectSpec `json:"config,omitempty" yaml:"config,omitempty"` +} + +var ( + // NamespaceComponent will create the namespace for the controller-manager + NamespaceComponent = "namespace" + + // ControllerManagerComponent will create the controller-manager Deployment + ControllerManagerComponent = "controller-manager" + + // WebhooksComponent will create the webhook configurations + WebhooksComponent = "webhooks" + + // CRDsComponent will create the CRDs + CRDsComponent = "crds" + + // RBACComponent will create RBAC rules + RBACComponent = "rbac" + + // CertManagerComponent will create the Issuer and Certificate resources + // for CertManager to inject the certificates + CertManagerComponent = "cert-manager" + + // PrometheusComponent will create the ServiceMonitor resource + PrometheusComponent = "prometheus" +) + +// getDefaultComponents returns the set of components that are created by default +func getDefaultComponents() map[string]bool { + return map[string]bool{ + NamespaceComponent: true, + ControllerManagerComponent: true, + RBACComponent: true, + CRDsComponent: true, + } +} + +// Enabled returns true if the component is enabled +func (a *KubebuilderProjectSpec) Enabled(component string) bool { + return a.Components[component] +} + +// ComponentConfigEnabled returns true if component config is being used +func (a *KubebuilderProjectSpec) ComponentConfigEnabled() bool { + return a.ComponentConfigFilepath != "" +} + +// KubebuilderProjectSpec defines the desired configuration to be generated +type KubebuilderProjectSpec struct { + // Directory is the kubebuilder directory containing the code + Directory string `json:"projectDirectory" yaml:"projectDirectory"` + + // Name is the name of project and used to generate the component and role names + // Defaults to metadata.name + Name string `json:"projectName" yaml:"projectName"` + + // Namespace is the namespace to run the project in -- defaults to projectName-system + Namespace string `json:"namespace" yaml:"namespace"` + + // Image is the container image to run in the controller-manager + Image string `json:"image" yaml:"image"` + + // Components is a map of components to enable or disable + Components map[string]bool `json:"components" yaml:"components"` + + // DisableAuthProxy if set to true will disable the auth proxy + DisableAuthProxy bool `json:"disableAuthProxy,omitempty" yaml:"disableAuthProxy,omitempty"` + + // ConversionWebhooks is a map of kinds to enable conversion webhooks for + ConversionWebhooks map[string]bool `json:"conversionWebhooks,omitempty" yaml:"conversionWebhooks,omitempty"` + + // Development contains development options + Development DevelopmentOptions `json:"developmentOptions,omitempty" yaml:"developmentOptions,omitempty"` + + ComponentConfigFilepath string `json:"componentConfigFilepath,omitempty" yaml:"componentConfigFilepath,omitempty"` +} + +// KubebuilderProjectStatus is runtime status for the api configuration +type KubebuilderProjectStatus struct { + CertCA string + + CertKey string + + ComponentConfigString string +} + +// DevelopmentOptions defines options for development installation +type DevelopmentOptions struct { + // GenerateCert will cause a self signed certificate to be generated and injected + // into the Webhook caBundles. + GenerateCert bool `json:"generateCert,omitempty" yaml:"generateCert,omitempty"` + + // CertDuration sets the duration for the cert + CertDuration time.Duration `json:"certDuration,omitempty" yaml:"certDuration,omitempty"` +} + +// Default defaults the values +func (kp *KubebuilderProject) Default() error { + // merge project.yaml into fc + if kp.Project != nil { + // For compabitility with the PROJECT file format + kp.Spec = *kp.Project + } + + // Validate the input + if kp.Spec.Name == "" { + if kp.Name == "" { + return errors.Errorf("must specify Kubebuilder projectName field") + } + kp.Spec.Name = kp.Name + } + if kp.Spec.Namespace == "" { + if kp.Namespace != "" { + kp.Spec.Namespace = kp.Namespace + } + kp.Spec.Namespace = kp.Spec.Name + "-system" + } + if kp.Spec.Image == "" { + return errors.Errorf("must specify Kubebuilder image field") + } + if kp.Spec.Development.CertDuration == 0 { + d := time.Hour * 1 + kp.Spec.Development.CertDuration = d + } + + if kp.Spec.Directory == "" { + kp.Spec.Directory = "./..." + } + + if kp.Spec.Components == nil { + kp.Spec.Components = map[string]bool{} + } + for k, v := range getDefaultComponents() { + if _, found := kp.Spec.Components[k]; !found { + kp.Spec.Components[k] = v + } + } + + if kp.Spec.ComponentConfigFilepath != "" { + b, err := ioutil.ReadFile(kp.Spec.ComponentConfigFilepath) + if err != nil { + return err + } + kp.Status.ComponentConfigString = string(b) + } + + return nil +} diff --git a/config-gen/apis/v1alpha1/v1alpha1_test.go b/config-gen/apis/v1alpha1/v1alpha1_test.go new file mode 100644 index 00000000000..9e870b49592 --- /dev/null +++ b/config-gen/apis/v1alpha1/v1alpha1_test.go @@ -0,0 +1,29 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1_test + +import ( + "testing" + + "sigs.k8s.io/kubebuilder/v2/config-gen/apis/v1alpha1" + "sigs.k8s.io/kustomize/kyaml/fn/framework/frameworktestutil" +) + +func TestNewCommand(t *testing.T) { + test := frameworktestutil.ResultsChecker{Command: v1alpha1.NewCommand} + test.Assert(t) +} diff --git a/config-gen/main.go b/config-gen/main.go new file mode 100644 index 00000000000..decc06e3834 --- /dev/null +++ b/config-gen/main.go @@ -0,0 +1,46 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +//go:generate ./pkger.sh +package main + +import ( + "fmt" + "os" + + "github.com/spf13/cobra" + "sigs.k8s.io/kubebuilder/v2/config-gen/apis/v1alpha1" + + _ "sigs.k8s.io/kubebuilder/v2" // pkger saved files +) + +func main() { + // Default to using the project file if no file is specified and + // not being run as a function + if os.Getenv("KUSTOMIZE_FUNCTION") != "true" && len(os.Args) <= 1 { + if _, err := os.Stat("PROJECT"); err == nil { + os.Args = append(os.Args, "PROJECT") + } + } + + cmd := v1alpha1.NewCommand() + cmd.Use = "config-gen [CONFIG_FILE] [PATCHES...]" + cmd.Args = cobra.MinimumNArgs(0) + if err := cmd.Execute(); err != nil { + fmt.Fprintf(os.Stderr, "\n%v\n", err) + os.Exit(1) + } +} diff --git a/config-gen/pkged.go b/config-gen/pkged.go new file mode 100644 index 00000000000..2dbeff60206 --- /dev/null +++ b/config-gen/pkged.go @@ -0,0 +1,12 @@ +// Code generated by pkger; DO NOT EDIT. + +// +build !skippkger + +package config-gen + +import ( + "github.com/markbates/pkger" + "github.com/markbates/pkger/pkging/mem" +) + +var _ = pkger.Apply(mem.UnmarshalEmbed([]byte(`1f8b08000000000000ffec5d696fe2c8bafe2b477c4e77aaca0b38d2f9002418d3400613bc1d8d46deda36941761b39851fff72b97c11812d2763af4dc7b0f6a450db8f62adee779b7e2ef86177c0fe3c6c3df8decefd15b361e1af7b3d85ec6f7d1c64b9265682eee9df03e5e9af7b1e7c45f17adf8ab17de2f56866dac3c6cd9cbc65d43f0a37099fca1276ee3a1d1b86b8c75df6e3c344e0b3d8666fef4455f3a7692bf16c370ff6aa427a6db78085618df35a6898eedc6c3771dc7f6fe9d68eb7118e465f9b0e7613b3e94cebb2fde3eda51f1fac58e93b3d2d947673546a1b5cafafbbbb19fc385a9deaf1119a917341e92e5cabefbf08af1e128b4ead7bc77c2af7e689106247b197b6445e057c8347efcf871d7f89e4ff4ef7726f0706f86c177cff9e2d8c17d62fb11d6133bbe8fb2e5b7e37bd35e265f7c3dd01d7b9935949d8fec7fcb4e740f93b6837c774f4ade35626f67371e38f6aee18796dd7840906ed22d1ad2907cf257e2915a0820f005a22f807e81e801700f0cfa8a608b6d428a6d7e01ad07001a770d2ffecbca56365fe43825fd3edaebc603649bcd2642906c9a9dbd6f359b778d31f68245e381ba6b0841d878802d0a366193bb6bcc3cabf1c00078d7e0b35708dc35442b6b08dc35fed0adbf4c27fc0b341efe03eec8bf3fef1aed6ca471649b599fd3ec3fc8822684a84551778d714c3e612886e53844ffb86b8c2e95673874285fccf0c75da35bb37cc75b266eb53a4cab4921f4e3ae312d36a38343731193e976f022df241a644f7a5877f207bc1d90ff8771a42f6df272b27f99adcb9fe468b9f979f81411f1eed7aba2f0786b08d1c2b9b7f4e5c60bfed27d8ba52f8de7ab7e143d6fb4739446ff796fa87f16722a3fa6a7628a14fc97f0f82fdf8b7dd25a496efda7112d1cdbfaea84592b37f945e4d75d2322a3ffbbf1c7c2a9784a6a08b31f770d4b4ff4c39a65e73b488ebd1ddb2443f914017aaf074198e88917065f0f25bfa6ba8fdf97ac176b1da42c64d141ccd29944fbb97c6d3621e4b857f2750fb0ef09588a82ad562160e189806d814f14b088a2994298411a029685085417b0f914ab0bd8a27c0d01cbb23443ea4c8ffb7090b0adff4d12f646c2fe5f0ab1cb02a5906e0d9b8a1d5d569d211e6f3479b41265c655fd2dd6ba6d4f45526a7561a2ca8cab212915bc0ef77d12259a22ba1adf03ea4bf84de8765cc367d616df03baccadcc5df659db11f83136834962c8bd952a5bd8f498c848b9c8f023ac529344454f89160cd6c64be808fda4297499179397e6c305e31ab2b433f9de5c9b76b8ef53ae69a7edd58cea6035659e551962a10fb9a192b5af45866f26649ceda869a71d6cf813e7bb02be35ae28b3c320598618dbcb8ad4f775f9a368061f62c01c4dd3cde66b095d970133a7021a5e930137d926e02a0be8fd0c2b0be863f91a029aa32107514940831b05be51e0ff66f4782daa7e17117ed5f33d805ff455e27e8996e136adc388dfab7890bc0c02f5483107014383cf27c5e88aa418028e659ad5656e3ec5ea32b7285f5de672000180d842e6927db891e21b29febd62ed5de1f29a1d1b3e078e0c558c4cd4f30c5eea588a18cefa83b5dd5f10d669662c9530e00ed064b831f81ed05ef68cb84f1836dbf5dace9e21af8d40747599c16650fabc0b1cc3ef25da4be8e894e4695398aa7e6f3e543aa941b9ccb15cdbd165e86a68c60abc35df33eca5250fb01a4891c18bd8f4f2f74365e0a9f22831f3b1b2d6bcbd1a4fe94db92d551904057bcfff12a12b2419d3562929d5a630d69531d0643a51657161fad2cedc81cd70de5e8dbaf4e679ee80f1e3c82bb7399cb6bde11442b33f06a62fb9c60b0cadbeb879f65aebd18b40edeb6e9fe7cee6f9b1bd169cd039f60f1cc10389c17381c5733b2b9b4f2070567f00b5a9f0c638556ef4d23ee9dfe4b9d4ea97d7361b53676e2006a8325e69ca60625003f0ecb5e9f1e364572e27743bab4cdb78f63a64cce6263cf6c7675a4ab6eed035fc5ea029e5f1745cd3b776cf6fcd459680e9e3b9994257e3c5f48f97a7749cd2f91abe84f4e8d1d9bcb506da5e2b1bca5baccad9be426cf0d2dce2f1daf0846fd939d564669169465de7dffffeaddacf3d405f36b6e186e122ae05d317ab1d409a66b89a204d019686f4a78334754d90a6191a30d5413a9f6275902ecad700694443866b15204df6e106d23790fedd207d51425433605948f2749e5bebd4c813bac478b5cb209c88e6be880da513ab8a880fa2fa08df7b4844dccae27b91e14b69191a87d3021a0ae3d8076187790776284d1e8406e2967b6317364fa0a1ed64706ef1dcdc401b56e8898fb376e9795f5b1b7d29d166706dc90c7805ed7cfef98cef01fd3174869498985d6ef9dc1f25c5baa570a72903a429c2da44526af978a5a570ae2903508243f277a02cb931ee6c9cbee46a4fdccae82f58a12fa6963c2bc662f95c6cc9105f585fd2d7c9da22696efa12783e5b0b8d977c559162eb09ae357ec60a8f9374743e8e7ddd97fd58df98e73f6f4cbce7b82f66e847616007491d3c7da75e01a8145513501940a3d6e76bbdf43501b50528aebaaf7d3fc5ea805a94af01a834d56488263e3deec30d506f80fa9b01f51d117182a889c063ffa8f08ed786d2591bbeb4b29ec66bc3d7220d482b551ec49a3c7188d2111c955b8b971293dfba163fdb2360e788ba39c29591b0ac287d58b1ca905af371f0874c94ead440db585306df0bf713ce5092f175d95cd9722f31ba27ed22036da1214b638392566f20f72bb41fcafb75384741998346204e54450c9fbdf69a3088fe606df0db6c0c457d05edeba70ca3ca303e63003b4b1eecdbc8d7caf4b9d8e0b37a8775197c3fcc791860d790375511f5fd39f087fd85aef978c2189c37f6a658f76e9034055e5a6984655d57015d5a3ff1b72dad5f8d30e39a14605bd4274798b598abfad72806d65023f3195647bda27c0dd4631984207b8b30bbb9d76e887c105dbfcb9fb6b4b202eb7c5275d4888bb50ad7195b578968019603cca72b11ec1595088428006bb8cef2295617a745f91ae2b48928808e5639b20f3725e2a6445c59645d96231fb0c29de90a841ffb526a22bc36e685a30c987e0f68b2c53c7b1de56005dbeb1285556c82b691263360b2e7a0cf4ed4b453703a0e5e429abc5d9b3cc44630598948ca740ed7e2a5474d1900329ea343ce9d04d24ae3b7194fde879d89aed59776c3c5189b81f83899122b22e94793b73b12a23629f8f35ce88ba1ae8c9cec4fc0db95e075a089a485c0f77602ffe4647a918aa4d040db85a608b1c07340e7a5d442386b2bb2ba1d4a97b7b1c00fb0d01f60dd97e6169fd51f3059dbdab4e39a3c3e58ab1ccde7d2acac2e3381c00f62556696c37638c8c73372d4400242dfc2036a8005de5a93727d712df4c7d8ea92fe8805d424e3c42b2ded009d9f39af42ffbaeedaf43a1b8312b11188912a6f637bda71857ec7b5f87148f4459e595bdda21d62b91bca85ae105d58e7476d07b84c7f184e8f16b792c52eb57c3c2f9ca8250ba949755c15cdd877c30727e16bfda56f61d577d7068a93a2fd723932278715ba446744c40279a2df84d7d06f96761cae96669e9173199e8fc50e784ca10f051122c8722c43a15f5672203885e5e615b51c1ad2344d5585e5c314abc272a97c0d58e6d8162ce5d150e81645785373fe1b39c351345d59c9293aba3fc6f07c591aba592b6fe6ddaa07e1ca724c2d65070188208d5e9b8e7e55d9695d53d9694296a96c3b3a4cb1b2543d96af2c5511003440f4d17644f6e1a6ecdc949dab0aae9fc893f77c24257f484082ed88ae533d8010677a45c6ed654d19ec74995b3d7b9d3cf0cfef418b77d7a68f5955112303d12b7de7ee863e5e0f2975dbf593c8f027acf0348e2d650c34653035d016777d882dbeb75015d1253e9382ff9ef3e559c6b90fc18189e973b13689524bde121fc230d739faa6cf41b33f62855eeca98a94e92d2b8bc7f3f3310938e3ef9d5453c66b4b19cc3525d7f586d30e3050828d60802d1f638b1a65e5327eed99bbd091d3c1dcf425d7e2679e32091381ef6df499951a94b4d93f77b3f532a84164fb79bad1d08f69336522231d58591fa62fed0c4a4a5524edfd44c03129c9cbf5a8de3cfbdca4aaf53f9c826faad289a4a37eea98fec05553e69d717068348996bacc2c32ddc6e84b3b8b97d259b6a6b34164f86264f8e6374396802a8baec53f91b539444f64e7e5a0bb92280592020537a6cfd1f614a6d9beaa3e5e693c5e699b88bc9ff9929fefef71bdaa9c9dac5f3dd3d51e436782b6d0a4446ce2c1dae067df4a512817d2aff260d4a192972fd698f8ce40d1eeeca05fcdb2b5e7a0114cca6d2f3459732d790b8a3550c61b551ebfd9ef5edf23fae1700a92139d4cf97dfad9498e5d2dcbeae57a85bf0ad4a51b14cb50f4e7db563ff3328473ba41418aa66075ba914fb13add28cad7a01ba80599522a18d9871bddb8d18debd28d77244245aee19fa7d90ab9fd2cedcc747ee668246e80a372fb20740d1ffb9a3206667a8cc120764924c59a0777ba6cadb2767565bcb36429159ec65381ef6572d5cd537ac548f309e6e3ecd9d009e7c2135c9bfeccd1786e6ec9c4ceeaa8a8b722364c5e5b5b32b310f81e10781758fdceeed96badb3b266ca9cdb0857badccac6ae4ca4c1f374c6f49fbdce4c550681a6883be189f43f2e6c928fedd5e8e5c951918b55143b7a5f04193f19a6dcc240e3ddf0d5da107cc686c7e5364f6ab2b6f8de4ea7466b4be904a6df5b64eb34ccb08b97e8a1ef0243dee436d6763817f841aac9bd65be96e3509599405346af38c2b9edf4354fc33b9392b0e9bc4aa5fe09e68eb1c16b873d4a0e7b54173b4b492a3b4ddefa338403c39732bed2fc7e81f7fc7c4ea767a336f73c8b2efd85392d8c609c3fcfe35f9237edbd53e6bdf65626a5cdf79cf53c0a3752d16cf58aa7edc749f62918233565e607ee37f4b76b15f5488ccf61cf0aced63d72b069693f4b6781ec91b9dfa3a17c383ba123f4c758cdb8ecd325bb3689f1c9be038e40ecfa7857d429fc0cc466ef69d3cec6f4255f575cac75378e89f02a5b0b5d990466da5919d4c4397c8fb46ec7b3a79d65a66b180846b63f7bcdc7aecec13e1221fbb3f05844d7f36c23c002043e9f7d71d7bc298562000daa9bd0f753accebe8af235d817035b4deae8d926fb70635f37f67565f6759d5058bfb7d1250d9bc13853b759a17f0293c7f0caf645f87f3b44932fb936df3215942088c027dff334795b84cb16a1a85d9297baca93354ae1a9de11debbfed134513584f5d96b7b8293d387723ee29561e03cc6b966a8d3fbb58b7b5a28a6ae5ece4140814f7703709f7945cb2b6468b51057f90eadc314ab234351be0632b4500ba2d21d5a64236ed07083866b43c34f2443d51bb4de96affb9bb4cecdfdaed9efec4ed52a119bfc766de76af545b3f145395e538d12ba9d589507d82852208ee90743257bc6e0f3948492fa7eae5a629512d7e621ac8b872454e8e50c97eaf691bb163ab12e8f5d73173aa3c9dbc99ce76b958f61ebaabe149f2643d6edbfde5d0e2ae28809427b3cbf5b817b3379f4ed7b187e720740392586c749a6a69dedf5c0907bc1c590a8b7d36d5eb9704acf625d86d179aacc7e2d36d64be88c5eda1b63729a1e23743b8926c3b5192c58e171b4799117a72926fd013615099b94b83b4ff0ccf6c9eccf58e1f16933e2c169bd7cbf13831a30cf5e3b1d3dc163b8595fc4a60f2363efaa11a981ab2269a22983c840e28b463896b87bf6dadb51bbe02fefb8f70e6a76b213bc36f9de9c9b4bacf9d3b7572e90d39bf39c0f7c372f2506472a9a55fdee1675cb6198e584e5e1b4b3d9272783f1e3687fde45d7f42d6cf53a6b3398bc696a20ed2029d6e4313028e143f2e36046c84301c522d4b2ce1d2c1fd88b6fb5430a8fdf1b6cf507914a8d4e4309cfe50c7f484bdb90d438c3cfea9653d584a399d22927a967eb2d16aecce25e98dcd4b9df9bfd9e3c3a97f76b6f7afdcc3dfa475c6f96bdb67118f976901cae06f812dbe6d2ae6507aadc4a611842cd7af41f42c4c1d6a7b3ff6b5e16465300b035422bc90c41f5d0caa27c75f60f014d95d3a6c936dcc8ff8dfc5f97fc57160fef198a446cf9526c5019e161c0706161c397d28ca04e882fe54d05a01c3b92119354532e93fecbb757d43416958c3d16bfdd0dfd04dbc73a40554468a60cc997982289391898f2b2e3d47a7cbbec043cbd1dab716d90c8a47c1ce9a65d07132e553a5ed55bef2e2a0429d40214fbe91870cdbba8689602cdca97f41ea6581d038af23530003134dda24b97f4deeea2ba61c0d531e09238a866f729eb75176c3d65515fd6f55e8bfb5fb1e3bf175a78e22f00c9b0486bbbea3d82c7258e96a16f27aebdaa756be0c55a453a54b3decf5d20c8d0a8f9f996fa6b5e7144730c43578fa0cb675883ab17e56bc8693a5b19704c836ade7eede226a7af2ea72f8a83aab1fa9dd440105bbc8b2d659f9f7ceec0e5e1daf03130a84164f8e64a455caac95cc67dd7c6943be5ecca00e9f218bfc8dc4a57c4f5a518affa86a60bc6220f66eda7ba3cde0de5c33885cf34e463c3173706c2e57b9192528e6cd1ffd1e05ac9e894a88a38d79f5e1be4eb01dc01b8ae7a5bdff1bcd5cd327b27b50cc226ac89544d8665c1eb8cdd5f85aacfbc97e81caa18d4e2600da8caa7581daa8af235a08a6db12c75342be51b71c3aa1b565d17ab3e25a3ec75781179b6ca33b2b854572237bf169c593ef7472b5d6eadcb2e90d34c1fa99b21972e3341f588ddf28f33952282492690e415ed05e4fd5493d53c8c48e9442235585b4abbca9833e4793b8b6af2d1b1fd43594abfb85ff99cab478a97fa4f0c5e723582ec39fa924c35e534c3ab1a13b99c0d98bb0c49e857eebe451c34fdf131fafa70a320826eeeb22a32eef6cf2d9cdf170c1c83c7bbc36b0bf5808a9c431ba926f7407e4b07702ca5b32051e67b77256112fb7a1a2fc51a79064a67ae53b8d0044fb8949db8bf21d24a54a5b31b527b6be6269b97864d7f50b4a12109eceb4093cf54f5d9b7232b1a871fe81b5b3eb979f28df529e6fe19198924337472cc20fce47355fafed78de0cfceb934c0da3cff51b9e28c3d569823098fdc87ccf47e9ec158f53bf28fc80bafedd4fd39879c74d837d6f17f9d75fcf81f000000ffff010000ffff6cca35d7637d0000`))) diff --git a/config-gen/pkger.sh b/config-gen/pkger.sh new file mode 100755 index 00000000000..67308d00649 --- /dev/null +++ b/config-gen/pkger.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +# hack script to generated pkged file because it has the wrong package name by default +rm pkged.go +go run github.com/markbates/pkger/cmd/pkger +mv ../pkged.go . +sed -i '' 's/package kubebuilder/package config-gen/' ./pkged.go \ No newline at end of file diff --git a/config-gen/templates/patches/cert-manager/annotation.template.yaml b/config-gen/templates/patches/cert-manager/annotation.template.yaml new file mode 100644 index 00000000000..f42ed42d5bd --- /dev/null +++ b/config-gen/templates/patches/cert-manager/annotation.template.yaml @@ -0,0 +1,5 @@ +{{ if .Spec.Enabled "cert-manager" }} +metadata: + annotations: + cert-manager.io/inject-ca-from: {{ .Spec.Namespace }}/{{ .Spec.Name }}-serving-cert +{{ end }} diff --git a/config-gen/templates/patches/controller-manager/01-auth-proxy.template.yaml b/config-gen/templates/patches/controller-manager/01-auth-proxy.template.yaml new file mode 100644 index 00000000000..3963f902266 --- /dev/null +++ b/config-gen/templates/patches/controller-manager/01-auth-proxy.template.yaml @@ -0,0 +1,20 @@ +{{ if not .Spec.DisableAuthProxy }} +spec: + template: + spec: + containers: + - name: kube-rbac-proxy + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0 + args: + - "--secure-listen-address=0.0.0.0:8443" + - "--upstream=http://127.0.0.1:8080/" + - "--logtostderr=true" + - "--v=10" + ports: + - containerPort: 8443 + name: https + - name: manager + args: + - "--metrics-addr=127.0.0.1:8080" + - "--enable-leader-election" +{{ end }} diff --git a/config-gen/templates/patches/controller-manager/02-webhooks.template.yaml b/config-gen/templates/patches/controller-manager/02-webhooks.template.yaml new file mode 100644 index 00000000000..747355ba0a8 --- /dev/null +++ b/config-gen/templates/patches/controller-manager/02-webhooks.template.yaml @@ -0,0 +1,20 @@ +{{ if .Spec.Enabled "webhooks" }} +spec: + template: + spec: + containers: + - name: manager + ports: + - containerPort: 9443 + name: webhook-server + protocol: TCP + volumeMounts: + - mountPath: /tmp/k8s-webhook-server/serving-certs + name: cert + readOnly: true + volumes: + - name: cert + secret: + defaultMode: 420 + secretName: webhook-server-cert +{{ end }} diff --git a/config-gen/templates/patches/controller-manager/99-component.template.yaml b/config-gen/templates/patches/controller-manager/99-component.template.yaml new file mode 100644 index 00000000000..122ff1b94a4 --- /dev/null +++ b/config-gen/templates/patches/controller-manager/99-component.template.yaml @@ -0,0 +1,17 @@ +{{- if .Spec.ComponentConfigEnabled }} +spec: + template: + spec: + containers: + - name: manager + args: + - "--config=controller_manager_config.yaml" + volumeMounts: + - name: manager-config + mountPath: /controller_manager_config.yaml + subPath: controller_manager_config.yaml + volumes: + - name: manager-config + configMap: + name: manager-config +{{ end }} \ No newline at end of file diff --git a/config-gen/templates/patches/crd/conversion.template.yaml b/config-gen/templates/patches/crd/conversion.template.yaml new file mode 100644 index 00000000000..2b839cfd088 --- /dev/null +++ b/config-gen/templates/patches/crd/conversion.template.yaml @@ -0,0 +1,17 @@ +{{ if .Spec.Enabled "webhooks" }} +spec: + conversion: + strategy: Webhook + webhookClientConfig: +{{- if .Spec.Development.GenerateCert }} + caBundle: {{ .Status.CertCA }} +{{- else }} + # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank, + # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager) + caBundle: Cg== +{{- end }} + service: + namespace: {{ .Spec.Namespace }} + name: webhook-service + path: /convert +{{ end }} diff --git a/config-gen/templates/resources/auth-proxy-rbac.template.yaml b/config-gen/templates/resources/auth-proxy-rbac.template.yaml new file mode 100644 index 00000000000..56313d5eed3 --- /dev/null +++ b/config-gen/templates/resources/auth-proxy-rbac.template.yaml @@ -0,0 +1,29 @@ +{{- if .Spec.Enabled "rbac" }}{{ if not .Spec.DisableAuthProxy}} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ .Spec.Name }}-proxy-role +rules: +- apiGroups: ["authentication.k8s.io"] + resources: + - tokenreviews + verbs: ["create"] +- apiGroups: ["authorization.k8s.io"] + resources: + - subjectaccessreviews + verbs: ["create"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ .Spec.Name }}-proxy-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ .Spec.Name }}-proxy-role +subjects: +- kind: ServiceAccount + name: default + namespace: {{ .Spec.Namespace }} +--- +{{ end }}{{ end }} diff --git a/config-gen/templates/resources/cert-manager.template.yaml b/config-gen/templates/resources/cert-manager.template.yaml new file mode 100644 index 00000000000..dbe9ff0ad4c --- /dev/null +++ b/config-gen/templates/resources/cert-manager.template.yaml @@ -0,0 +1,28 @@ +{{- if .Spec.Enabled "cert-manager" }} +# The following manifests contain a self-signed issuer CR and a certificate CR. +# More document can be found at https://docs.cert-manager.io +# WARNING: Targets CertManager 0.11 check https://docs.cert-manager.io/en/latest/tasks/upgrading/index.html for +# breaking changes +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + name: {{ .Spec.Name }}-selfsigned-issuer + namespace: {{ .Spec.Namespace }} +spec: + selfSigned: {} +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: {{ .Spec.Name }}-serving-cert + namespace: {{ .Spec.Namespace }} +spec: + dnsNames: + - webhook-service.{{ .Spec.Namespace }}.svc + - webhook-service.{{ .Spec.Namespace }}.svc.cluster.local + issuerRef: + kind: Issuer + name: selfsigned-issuer + secretName: webhook-server-cert # this secret will not be prefixed, since it's not managed by kustomize +--- +{{ end }} diff --git a/config-gen/templates/resources/component.template.yaml b/config-gen/templates/resources/component.template.yaml new file mode 100644 index 00000000000..079e3c805d3 --- /dev/null +++ b/config-gen/templates/resources/component.template.yaml @@ -0,0 +1,12 @@ +{{- if .Spec.ComponentConfigEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: manager-config + namespace: {{ .Spec.Namespace }} + labels: + control-plane: controller-manager +data: + controller_manager_config.yaml: "" +--- +{{ end }} \ No newline at end of file diff --git a/config-gen/templates/resources/controller-manager.template.yaml b/config-gen/templates/resources/controller-manager.template.yaml new file mode 100644 index 00000000000..6aa82ec6155 --- /dev/null +++ b/config-gen/templates/resources/controller-manager.template.yaml @@ -0,0 +1,67 @@ +{{ if .Spec.Enabled "controller-manager" }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: controller-manager + namespace: {{ .Spec.Namespace }} + labels: + control-plane: controller-manager +spec: + selector: + matchLabels: + control-plane: controller-manager + replicas: 1 + template: + metadata: + labels: + control-plane: controller-manager + spec: + containers: + - command: + - /manager + args: + - --enable-leader-election + image: {{ .Spec.Image }} + name: manager + resources: + limits: + cpu: 100m + memory: 30Mi + requests: + cpu: 100m + memory: 20Mi + terminationGracePeriodSeconds: 10 +--- +{{- if .Spec.Enabled "webhooks" }} +apiVersion: v1 +kind: Service +metadata: + namespace: {{ .Spec.Namespace }} + name: webhook-service + labels: + control-plane: webhook +spec: + ports: + - port: 443 + targetPort: webhook-server + selector: + control-plane: controller-manager +--- +{{- end}} +{{- if not .Spec.DisableAuthProxy }} +apiVersion: v1 +kind: Service +metadata: + namespace: {{ .Spec.Namespace }} + name: metrics-service + labels: + control-plane: controller-manager +spec: + ports: + - name: https + port: 8443 + targetPort: https + selector: + control-plane: controller-manager +--- +{{ end }}{{ end }} diff --git a/config-gen/templates/resources/development-webhook-secret.template.yaml b/config-gen/templates/resources/development-webhook-secret.template.yaml new file mode 100644 index 00000000000..59dbe6b3f80 --- /dev/null +++ b/config-gen/templates/resources/development-webhook-secret.template.yaml @@ -0,0 +1,11 @@ +{{- if .Spec.Development.GenerateCert }} +apiVersion: v1 +kind: Secret +metadata: + name: webhook-server-cert + namespace: {{ .Spec.Namespace }} +data: + tls.key: {{ .Status.CertKey }} + tls.crt: {{ .Status.CertCA }} +--- +{{ end }} diff --git a/config-gen/templates/resources/namespace.template.yaml b/config-gen/templates/resources/namespace.template.yaml new file mode 100644 index 00000000000..f96d15219a2 --- /dev/null +++ b/config-gen/templates/resources/namespace.template.yaml @@ -0,0 +1,9 @@ +{{ if .Spec.Enabled "namespace" }} +apiVersion: v1 +kind: Namespace +metadata: + labels: + control-plane: controller-manager + name: {{ .Spec.Namespace }} +--- +{{- end }} diff --git a/config-gen/templates/resources/prometheus.template.yaml b/config-gen/templates/resources/prometheus.template.yaml new file mode 100644 index 00000000000..fcb83fb90cb --- /dev/null +++ b/config-gen/templates/resources/prometheus.template.yaml @@ -0,0 +1,17 @@ +{{- if .Spec.Enabled "prometheus" }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + namespace: {{ .Spec.Namespace }} + name: controller-manager-metrics-monitor + labels: + control-plane: controller-manager +spec: + endpoints: + - path: /metrics + port: https + selector: + matchLabels: + control-plane: controller-manager +--- +{{ end }} diff --git a/config-gen/templates/resources/rbac.template.yaml b/config-gen/templates/resources/rbac.template.yaml new file mode 100644 index 00000000000..bb41604bb33 --- /dev/null +++ b/config-gen/templates/resources/rbac.template.yaml @@ -0,0 +1,62 @@ +{{- if .Spec.Enabled "rbac" }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ .Spec.Namespace }}-manager-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ .Spec.Namespace }}-manager-role +subjects: +- kind: ServiceAccount + name: default + namespace: {{ .Spec.Namespace }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ .Spec.Namespace }}-leader-election-role + namespace: {{ .Spec.Namespace }} +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - configmaps/status + verbs: + - get + - update + - patch +- apiGroups: + - "" + resources: + - events + verbs: + - create +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ .Spec.Namespace }}-leader-election-rolebinding + namespace: {{ .Spec.Namespace }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ .Spec.Namespace }}-leader-election-role +subjects: +- kind: ServiceAccount + name: default + namespace: {{ .Spec.Namespace }} +--- + {{ end }} diff --git a/go.mod b/go.mod index 2007bc88153..7e8f8693c1d 100644 --- a/go.mod +++ b/go.mod @@ -3,12 +3,17 @@ module sigs.k8s.io/kubebuilder/v2 go 1.15 require ( + github.com/cloudflare/cfssl v1.5.0 github.com/gobuffalo/flect v0.2.2 + github.com/markbates/pkger v0.17.1 github.com/onsi/ginkgo v1.12.0 github.com/onsi/gomega v1.9.0 github.com/spf13/afero v1.2.2 - github.com/spf13/cobra v0.0.7 + github.com/spf13/cobra v1.0.0 github.com/spf13/pflag v1.0.5 - golang.org/x/tools v0.0.0-20200403190813-44a64ad78b9b + golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5 + k8s.io/apimachinery v0.19.4 + sigs.k8s.io/controller-tools v0.4.1 + sigs.k8s.io/kustomize/kyaml v0.10.2 sigs.k8s.io/yaml v1.2.0 ) diff --git a/go.sum b/go.sum index 50ca1db89b0..b019d385cad 100644 --- a/go.sum +++ b/go.sum @@ -1,183 +1,569 @@ +bitbucket.org/liamstask/goose v0.0.0-20150115234039-8488cc47d90c/go.mod h1:hSVuE3qU7grINVSwrmzHfpg9k87ALBk+XaualNyUzI4= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +github.com/360EntSecGroup-Skylar/excelize v1.4.1/go.mod h1:vnax29X2usfl7HHkBrX5EvSCJcmH3dT9luvxzu8iGAE= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0= +github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/goquery v1.5.0/go.mod h1:qD2PgZ9lccMbQlc7eEOjaeRlFQON7xY8kdmcsrnKqMg= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/andybalholm/cascadia v1.0.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/certifi/gocertifi v0.0.0-20180118203423-deb3ae2ef261/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/backoff v0.0.0-20161212185259-647f3cdfc87a/go.mod h1:rzgs2ZOiguV6/NpiDgADjRLPNyZlApIWxKpkT+X8SdY= +github.com/cloudflare/cfssl v1.5.0 h1:vFJDAvQgFSRbCn9zg8KpSrrEZrBAQ4KO5oNK7SXEyb0= +github.com/cloudflare/cfssl v1.5.0/go.mod h1:sPPkBS5L8l8sRc/IOO1jG51Xb34u+TYhL6P//JdODMQ= +github.com/cloudflare/go-metrics v0.0.0-20151117154305-6a9aea36fb41/go.mod h1:eaZPlJWD+G9wseg1BuRXlHnjntPMrywMsyxf+LTOdP4= +github.com/cloudflare/redoctober v0.0.0-20171127175943-746a508df14c/go.mod h1:6Se34jNoqrd8bTxrmJB2Bg2aoZ2CdSXonils9NsiNgo= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustmop/soup v1.1.2-0.20190516214245-38228baa104e/go.mod h1:CgNC6SGbT+Xb8wGGvzilttZL1mc5sQ/5KkcxsZttMIk= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/getsentry/raven-go v0.0.0-20180121060056-563b81fc02b7/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= +github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.5 h1:Xm0Ao53uqnk9QE/LlYV5DEU09UAgpliA85QoT9LzqPw= +github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= +github.com/go-openapi/validate v0.19.8/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= +github.com/go-sql-driver/mysql v1.4.0 h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx+opk= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobuffalo/flect v0.2.0/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= github.com/gobuffalo/flect v0.2.2 h1:PAVD7sp0KOdfswjAw9BpLCU9hXo7wFSzgpQ+zNeks/A= github.com/gobuffalo/flect v0.2.2/go.mod h1:vmkQwuZYhN5Pc4ljYQZzP+1sq+NEkK+lh20jmEmX3jc= +github.com/gobuffalo/here v0.6.0 h1:hYrd0a6gDmWxBM4TnrGw8mQg24iSVoIkHEk7FodQcBI= +github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PLa8Y5fM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/certificate-transparency-go v1.0.21 h1:Yf1aXowfZ2nuboBsg7iYGLmwsOARdV86pfH3g95wXmE= +github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jmhodges/clock v0.0.0-20160418191101-880ee4c33548/go.mod h1:hGT6jSUVzF6no3QaDSMLGLEHtHSBSefs+MgcDWnmhmo= +github.com/jmoiron/sqlx v1.2.0 h1:41Ip0zITnmWNR/vHV+S4m+VoUivnWY5E4OJfLZjCJMA= +github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kisielk/sqlstruct v0.0.0-20150923205031-648daed35d49 h1:o/c0aWEP/m6n61xlYW2QP4t9424qlJOsxugn5Zds2Rg= +github.com/kisielk/sqlstruct v0.0.0-20150923205031-648daed35d49/go.mod h1:yyMNCyc/Ib3bDTKd379tNMpB/7/H5TjM2Y9QJ5THLbE= +github.com/kisom/goutils v1.1.0/go.mod h1:+UBTfd78habUYWFbNWTJNG+jNG/i/lGURakr4A/yNRw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kylelemons/go-gypsy v0.0.0-20160905020020-08cad365cd28/go.mod h1:T/T7jsxVqf9k/zYOqbgNAsANsjxTd1Yq3htjDhQ1H0c= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.3.0 h1:/qkRGz8zljWiDcFvgpwUpwIAPu3r07TDvs3Rws+o/pU= +github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM= +github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/markbates/pkger v0.17.1 h1:/MKEtWqtc0mZvu9OinB9UzVN9iYCwLWuyUv4Bw+PCno= +github.com/markbates/pkger v0.17.1/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v1.10.0 h1:jbhqpg7tQe4SupckyijYiy0mJJ/pRyHvXf7JdWK860o= +github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= +github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= +github.com/mreiferson/go-httpclient v0.0.0-20160630210159-31f0106b4474/go.mod h1:OQA4XLvDbMgS8P0CevmM4m9Q3Jq4phKUzcocxuGJ5m8= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0 h1:Ix8l273rp3QzYgXSR+c8d1fTG7UPgYkOSELPhiY/YGw= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.0 h1:Iw5WCbBcaAAd0fpRb1c9r5YCylv4XDoCSigm1zLevwU= github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.9.0 h1:R1uwffexN6Pr340GtYRIdZmAiN4J+iw6WG4wog1DUXg= github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/paulmach/orb v0.1.3/go.mod h1:VFlX/8C+IQ1p6FTRRKzKoOPJnvEtA5G0Veuqwbu//Vk= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/qri-io/starlib v0.4.2-0.20200213133954-ff2e8cd5ef8d/go.mod h1:7DPO4domFU579Ga6E61sB9VFNaniPVwJP5C4bBCu3wA= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.7 h1:FfTH+vuMXOas8jmfb5/M7dzEYx7LpcLb7a0LPe34uOU= -github.com/spf13/cobra v0.0.7/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.3-0.20181224173747-660f15d67dbb/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= +github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= +github.com/weppos/publicsuffix-go v0.4.0/go.mod h1:z3LCPQ38eedDQSwmsSRW4Y7t2L8Ln16JPQ02lHAdn5k= +github.com/weppos/publicsuffix-go v0.13.0 h1:0Tu1uzLBd1jPn4k6OnMmOPZH/l/9bj9kUOMMkoRs6Gg= +github.com/weppos/publicsuffix-go v0.13.0/go.mod h1:z3LCPQ38eedDQSwmsSRW4Y7t2L8Ln16JPQ02lHAdn5k= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca h1:1CFlNzQhALwjS9mBAUkycX616GzgsuYUOCHA5+HSlXI= +github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= +github.com/zmap/rc2 v0.0.0-20131011165748-24b9757f5521/go.mod h1:3YZ9o3WnatTIZhuOtot4IcUfzoKVjUHqu6WALIyI0nE= +github.com/zmap/zcertificate v0.0.0-20180516150559-0e3d58b1bac4/go.mod h1:5iU54tB79AMBcySS0R2XIyZBAVmeHranShAFELYx7is= +github.com/zmap/zcrypto v0.0.0-20200513165325-16679db567ff/go.mod h1:TxpejqcVKQjQaVVmMGfzx5HnmFMdIU+vLtaCyPBfGI4= +github.com/zmap/zcrypto v0.0.0-20200911161511-43ff0ea04f21 h1:PIpcdSOg3pMdFJUBg5yR9xxcj5rm/SGAyaWT/wK6Kco= +github.com/zmap/zcrypto v0.0.0-20200911161511-43ff0ea04f21/go.mod h1:TxpejqcVKQjQaVVmMGfzx5HnmFMdIU+vLtaCyPBfGI4= +github.com/zmap/zlint/v2 v2.2.1 h1:b2kI/ToXX16h2wjV2c6Da65eT6aTMtkLHKetXuM9EtI= +github.com/zmap/zlint/v2 v2.2.1/go.mod h1:ixPWsdq8qLxYRpNUTbcKig3R7WgmspsHGLhCCs6rFAM= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.starlark.net v0.0.0-20190528202925-30ae18b8564f/go.mod h1:c1/X6cHgvdXj6pUlmWKMkuqRnW4K8x2vwt6JAaaircg= +go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200124225646-8b5121be2f68/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee h1:4yd7jl+vXjalO5ztz6Vc1VADv+S/80LGJmyl1ROJ2AI= +golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201010224723-4f7140c49acb h1:mUVeFHoDKis5nxCAzoAi7E8Ghb86EXh/RK6wtvJIqRY= +golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e h1:N7DeIrjYszNmSW409R3frPPwglRwMkXSBzwVbkOjLLA= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200403190813-44a64ad78b9b h1:AFZdJUT7jJYXQEC29hYH/WZkoV7+KhwxQGmdZ19yYoY= -golang.org/x/tools v0.0.0-20200403190813-44a64ad78b9b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5 h1:UaoXseXAWUJUcuJ2E2oczJdLxAJXL0lOmVaBl7kuk+I= +golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= @@ -186,8 +572,52 @@ gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200121175148-a6ecf24a6d71 h1:Xe2gvTZUJpsvOWUnvmL/tmhVBZUmHSvLbMjRj6NUUKo= +gopkg.in/yaml.v3 v3.0.0-20200121175148-a6ecf24a6d71/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +k8s.io/api v0.18.2 h1:wG5g5ZmSVgm5B+eHMIbI9EGATS2L8Z72rda19RIEgY8= +k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78= +k8s.io/apiextensions-apiserver v0.18.2 h1:I4v3/jAuQC+89L3Z7dDgAiN4EOjN6sbm6iBqQwHTah8= +k8s.io/apiextensions-apiserver v0.18.2/go.mod h1:q3faSnRGmYimiocj6cHQ1I3WpLqmDgJFlKL37fC4ZvY= +k8s.io/apimachinery v0.18.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= +k8s.io/apimachinery v0.19.4 h1:+ZoddM7nbzrDCp0T3SWnyxqf8cbWPT2fkZImoyvHUG0= +k8s.io/apimachinery v0.19.4/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= +k8s.io/apiserver v0.18.2/go.mod h1:Xbh066NqrZO8cbsoenCwyDJ1OSi8Ag8I2lezeHxzwzw= +k8s.io/client-go v0.18.2/go.mod h1:Xcm5wVGXX9HAA2JJ2sSBUn3tCJ+4SVlCbl2MNNv+CIU= +k8s.io/code-generator v0.18.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= +k8s.io/component-base v0.18.2/go.mod h1:kqLlMuhJNHQ9lz8Z7V5bxUUtjFZnrypArGl58gmDfUM= +k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= +k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= +k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 h1:d4vVOjXm687F1iLSP2q3lyPPuyvTUt3aVoBpi2DqRsU= +k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= +sigs.k8s.io/controller-tools v0.4.1 h1:VkuV0MxlRPmRu5iTgBZU4UxUX2LiR99n3sdQGRxZF4w= +sigs.k8s.io/controller-tools v0.4.1/go.mod h1:G9rHdZMVlBDocIxGkK3jHLWqcTMNvveypYJwrvYKjWU= +sigs.k8s.io/kustomize/kyaml v0.10.2 h1:q6FVFQuFE4kq4F5bH3oejfUD2JZUnPpxCdvYOSjSQCc= +sigs.k8s.io/kustomize/kyaml v0.10.2/go.mod h1:RA+iCHA2wPCOfv6uG6TfXXWhYsHpgErq/AljxWKuxtg= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=