diff --git a/README.md b/README.md index 0baa9889..b04a87f8 100644 --- a/README.md +++ b/README.md @@ -174,13 +174,13 @@ Apply the version change to the cluster CR: $ kubectl apply -f config/samples/apps_v1alpha1_nebulacluster.yaml ``` -Wait few minutes. The container image version should be updated to v3.5.x: +Wait few minutes. The container image version should be updated to v3.6.x: ```bash $ kubectl get pods -l app.kubernetes.io/cluster=nebula -o jsonpath="{.items[*].spec.containers[*].image}" |tr -s '[[:space:]]' '\n' |sort |uniq -c - 1 vesoft/nebula-graphd:v3.5.x - 1 vesoft/nebula-metad:v3.5.x - 3 vesoft/nebula-storaged:v3.5.x + 1 vesoft/nebula-graphd:v3.6.x + 1 vesoft/nebula-metad:v3.6.x + 3 vesoft/nebula-storaged:v3.6.x ``` **Warning:** diff --git a/apis/go.mod b/apis/go.mod index 6046bfeb..69eb163e 100644 --- a/apis/go.mod +++ b/apis/go.mod @@ -1,14 +1,14 @@ module github.com/vesoft-inc/nebula-operator/apis -go 1.19 +go 1.20 require ( github.com/openkruise/kruise-api v1.3.0 github.com/vesoft-inc/nebula-go/v3 v3.6.0 - k8s.io/api v0.26.5 - k8s.io/apimachinery v0.26.5 + k8s.io/api v0.27.4 + k8s.io/apimachinery v0.27.4 k8s.io/utils v0.0.0-20230209194617-a36077c30491 - sigs.k8s.io/controller-runtime v0.14.6 + sigs.k8s.io/controller-runtime v0.15.2 ) require ( diff --git a/apis/go.sum b/apis/go.sum index ae68d8cb..6a708f4e 100644 --- a/apis/go.sum +++ b/apis/go.sum @@ -4,34 +4,37 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= 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/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= 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 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= -github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= -github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= +github.com/onsi/ginkgo/v2 v2.9.5 h1:+6Hr4uxzP4XIUyAkg61dWBw8lb/gc4/X5luuxN/EC+Q= +github.com/onsi/gomega v1.27.7 h1:fVih9JD6ogIiHUN6ePK7HJidyEDpWGVB5mzM7cWNXoU= github.com/openkruise/kruise-api v1.3.0 h1:yfEy64uXgSuX/5RwePLbwUK/uX8RRM8fHJkccel5ZIQ= github.com/openkruise/kruise-api v1.3.0/go.mod h1:9ZX+ycdHKNzcA5ezAf35xOa2Mwfa2BYagWr0lKgi5dU= 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/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/vesoft-inc/fbthrift v0.0.0-20230214024353-fa2f34755b28 h1:gpoPCGeOEuk/TnoY9nLVK1FoBM5ie7zY3BPVG8q43ME= github.com/vesoft-inc/fbthrift v0.0.0-20230214024353-fa2f34755b28/go.mod h1:xu7e9za8StcJhBZmCDwK1Hyv4/Y0xFsjS+uqp10ECJg= github.com/vesoft-inc/nebula-go/v3 v3.6.0 h1:ahwkfkHl9O8G07mhGi0vmnXBCcTTgZjAdPYyjQkysWI= @@ -82,12 +85,13 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -95,16 +99,16 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -k8s.io/api v0.26.5 h1:Npao/+sMSng6nkEcNydgH3BNo4s5YoBg7iw35HM7Hcw= -k8s.io/api v0.26.5/go.mod h1:O7ICW7lj6+ZQQQ3cxekgCoW+fnGo5kWT0nTHkLZ5grc= -k8s.io/apimachinery v0.26.5 h1:hTQVhJao2piX7vSgCn4Lwd6E0o/+TJIH4NqRf+q4EmE= -k8s.io/apimachinery v0.26.5/go.mod h1:HUvk6wrOP4v22AIYqeCGSQ6xWCHo41J9d6psb3temAg= +k8s.io/api v0.27.4 h1:0pCo/AN9hONazBKlNUdhQymmnfLRbSZjd5H5H3f0bSs= +k8s.io/api v0.27.4/go.mod h1:O3smaaX15NfxjzILfiln1D8Z3+gEYpjEpiNA/1EVK1Y= +k8s.io/apimachinery v0.27.4 h1:CdxflD4AF61yewuid0fLl6bM4a3q04jWel0IlP+aYjs= +k8s.io/apimachinery v0.27.4/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/utils v0.0.0-20230209194617-a36077c30491 h1:r0BAOLElQnnFhE/ApUsg3iHdVYYPBjNSSOMowRZxxsY= k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.14.6 h1:oxstGVvXGNnMvY7TAESYk+lzr6S3V5VFxQ6d92KcwQA= -sigs.k8s.io/controller-runtime v0.14.6/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= +sigs.k8s.io/controller-runtime v0.15.2 h1:9V7b7SDQSJ08IIsJ6CY1CE85Okhp87dyTMNDG0FS7f4= +sigs.k8s.io/controller-runtime v0.15.2/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= diff --git a/charts/nebula-cluster/Chart.yaml b/charts/nebula-cluster/Chart.yaml index 3770cd63..65334ce2 100644 --- a/charts/nebula-cluster/Chart.yaml +++ b/charts/nebula-cluster/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 name: nebula-cluster description: Nebula Cluster Helm chart for Kubernetes -version: 1.5.0 -appVersion: 1.5.0 +version: 1.6.0 +appVersion: 1.6.0 home: https://nebula-graph.io sources: - https://github.com/vesoft-inc/nebula diff --git a/charts/nebula-operator/Chart.yaml b/charts/nebula-operator/Chart.yaml index dfcf04bc..53b32739 100644 --- a/charts/nebula-operator/Chart.yaml +++ b/charts/nebula-operator/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 name: nebula-operator description: Nebula Operator Helm chart for Kubernetes -version: 1.5.0 -appVersion: 1.5.0 +version: 1.6.0 +appVersion: 1.6.0 home: https://nebula-graph.io sources: - https://github.com/vesoft-inc/nebula-operator diff --git a/charts/nebula-operator/templates/admission-webhook-certificate.yaml b/charts/nebula-operator/templates/admission-webhook-certificate.yaml index 152f0cf9..1151b603 100644 --- a/charts/nebula-operator/templates/admission-webhook-certificate.yaml +++ b/charts/nebula-operator/templates/admission-webhook-certificate.yaml @@ -1,4 +1,3 @@ -{{- if .Values.controllerManager.create }} {{- if .Values.admissionWebhook.create }} --- apiVersion: cert-manager.io/v1 @@ -27,4 +26,4 @@ metadata: spec: selfSigned: {} {{- end }} -{{- end }} + diff --git a/charts/nebula-operator/templates/admission-webhook-registration.yaml b/charts/nebula-operator/templates/admission-webhook-registration.yaml index 70f3944c..96794887 100644 --- a/charts/nebula-operator/templates/admission-webhook-registration.yaml +++ b/charts/nebula-operator/templates/admission-webhook-registration.yaml @@ -1,37 +1,4 @@ -{{- if .Values.controllerManager.create }} {{- if .Values.admissionWebhook.create }} -{{- if false }} ---- -apiVersion: admissionregistration.k8s.io/v1 -kind: MutatingWebhookConfiguration -metadata: - annotations: - cert-manager.io/inject-ca-from: {{ template "nebula-operator.namespace" . }}/{{ template "admission-webhook.name" . }}-cert - name: {{ template "admission-webhook.name" . }}-mutating - labels: - {{- include "admission-webhook.labels" . | nindent 4 }} -webhooks: - - admissionReviewVersions: - - v1 - clientConfig: - service: - name: {{ template "admission-webhook.name" . }}-service - namespace: {{ template "nebula-operator.namespace" . }} - path: /apis/admission.nebula-graph.io/v1alpha1/statefulsetmutating - failurePolicy: Fail - name: statefulsetmutating.nebula-graph.io - rules: - - apiGroups: - - apps - apiVersions: - - v1 - operations: - - CREATE - - UPDATE - resources: - - statefulsets - sideEffects: None -{{- end }} --- apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration @@ -49,7 +16,7 @@ webhooks: service: name: {{ template "admission-webhook.name" . }}-service namespace: {{ template "nebula-operator.namespace" . }} - path: /apis/admission.nebula-graph.io/v1alpha1/nebulaclustervalidating + path: /validate-nebulacluster failurePolicy: Fail rules: - apiGroups: @@ -61,50 +28,8 @@ webhooks: - UPDATE resources: - nebulaclusters + scope: "*" sideEffects: None - - name: statefulsetvalidating.nebula-graph.io - {{- include "admission-webhook.objectSelector" . | nindent 4 }} - admissionReviewVersions: - - v1 - clientConfig: - service: - name: {{ template "admission-webhook.name" .}}-service - namespace: {{ template "nebula-operator.namespace" . }} - path: /apis/admission.nebula-graph.io/v1alpha1/statefulsetvalidating - failurePolicy: Fail - rules: - - apiGroups: - - apps - apiVersions: - - v1 - operations: - - CREATE - - UPDATE - resources: - - statefulsets - - statefulsets/scale - sideEffects: None - - name: kruisestatefulsetvalidating.nebula-graph.io - {{- include "admission-webhook.objectSelector" . | nindent 4 }} - admissionReviewVersions: - - v1 - clientConfig: - service: - name: {{ template "admission-webhook.name" . }}-service - namespace: {{ template "nebula-operator.namespace" . }} - path: /apis/admission.nebula-graph.io/v1alpha1/statefulsetvalidating - failurePolicy: Fail - rules: - - apiGroups: - - apps.kruise.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - statefulsets - - statefulsets/scale - sideEffects: None -{{- end }} + timeoutSeconds: 3 {{- end }} + diff --git a/charts/nebula-operator/templates/admission-webhook-service.yaml b/charts/nebula-operator/templates/admission-webhook-service.yaml index b3de37e9..861c3bbb 100644 --- a/charts/nebula-operator/templates/admission-webhook-service.yaml +++ b/charts/nebula-operator/templates/admission-webhook-service.yaml @@ -1,4 +1,3 @@ -{{- if .Values.controllerManager.create }} {{- if .Values.admissionWebhook.create }} --- apiVersion: v1 @@ -15,4 +14,4 @@ spec: selector: {{- include "admission-webhook.matchLabels" . | nindent 4 }} {{- end }} -{{- end }} + diff --git a/charts/nebula-operator/templates/controller-manager-deployment.yaml b/charts/nebula-operator/templates/controller-manager-deployment.yaml index 4ff0bfbd..742beefb 100644 --- a/charts/nebula-operator/templates/controller-manager-deployment.yaml +++ b/charts/nebula-operator/templates/controller-manager-deployment.yaml @@ -26,25 +26,18 @@ spec: command: - /usr/local/bin/controller-manager args: - {{- if .Values.healthProbeBindAddr }} - - --health-probe-bind-address={{ .Values.healthProbeBindAddr }} - {{- end }} - {{- if .Values.metricsBindAddr }} - - --metrics-bind-address={{ .Values.metricsBindAddr }} - {{- end }} - {{- if .Values.watchNamespace }} - - --watch-namespace={{ .Values.watchNamespace }} - {{- end }} - - --enable-kruise={{ .Values.enableKruise | default false }} {{- if .Values.syncPeriod }} - --sync-period={{ .Values.syncPeriod }} {{- end }} - {{- if .Values.maxConcurrentReconciles }} - - --max-concurrent-reconciles={{ .Values.maxConcurrentReconciles }} + {{- if .Values.concurrentNebulaClusterSyncs }} + - --concurrent-nebulacluster-syncs={{ .Values.concurrentNebulaClusterSyncs }} + {{- end }} + {{- if .Values.concurrentNebulaRestoreSyncs }} + - --concurrent-nebularestore-syncs={{ .Values.concurrentNebulaRestoreSyncs }} {{- end }} - - --enable-leader-election - - --leader-election-namespace={{ template "nebula-operator.namespace" . }} - - --admission-webhook={{ .Values.admissionWebhook.create | default false }} + - --leader-elect + - --leader-elect-resource-namespace={{ template "nebula-operator.namespace" . }} + - --enable-admission-webhook={{ .Values.admissionWebhook.create | default false }} {{- if or .Values.kubernetesClusterDomain .Values.controllerManager.env }} env: {{- if .Values.kubernetesClusterDomain }} @@ -55,7 +48,7 @@ spec: {{- end }} {{- if .Values.admissionWebhook.create }} ports: - - containerPort: {{ .Values.webhookBindPort | default 9443 }} + - containerPort: {{ .Values.admissionWebhook.webhookBindPort | default 9443 }} name: webhook-server protocol: TCP {{- end }} @@ -64,13 +57,13 @@ spec: livenessProbe: httpGet: path: /healthz - port: {{ (split ":" .Values.healthProbeBindAddr)._1 | default 8081 }} + port: 8081 initialDelaySeconds: 15 periodSeconds: 20 readinessProbe: httpGet: path: /readyz - port: {{ (split ":" .Values.healthProbeBindAddr)._1 | default 8081 }} + port: 8081 initialDelaySeconds: 5 periodSeconds: 10 securityContext: diff --git a/charts/nebula-operator/values.yaml b/charts/nebula-operator/values.yaml index 27e4364a..139e7a1c 100644 --- a/charts/nebula-operator/values.yaml +++ b/charts/nebula-operator/values.yaml @@ -1,6 +1,6 @@ image: nebulaOperator: - image: vesoft/nebula-operator:v1.6.0 + image: vesoft/nebula-operator:latest imagePullPolicy: Always kubeRBACProxy: image: bitnami/kube-rbac-proxy:0.14.2 @@ -23,6 +23,8 @@ controllerManager: admissionWebhook: create: false + # The TCP port the Webhook server binds to. (default 9443) + webhookBindPort: 9443 scheduler: create: true @@ -42,7 +44,7 @@ scheduler: disabled: [] # only in-tree plugins need to be defined here # Enable openkruise scheme for controller manager. (default false) -enableKruise: false +enableKruiseScheme: false # Period at which the controller forces the repopulation of its local object stores. (default 0h30m0s) syncPeriod: 0h30m0s @@ -50,17 +52,11 @@ syncPeriod: 0h30m0s # Namespace the controller watches for updates to Kubernetes objects, If empty, all namespaces are watched. watchNamespace: -# The address the metric endpoint binds to. (default ":8080") -metricsBindAddr: ":8080" +# The number of NebulaCluster objects that are allowed to sync concurrently. (default 5) +concurrentNebulaClusterSyncs: 5 -# The address the probe endpoint binds to. (default: ":8081") -healthProbeBindAddr: ":8081" - -# The TCP port the Webhook server binds to. (default 9443) -webhookBindPort: 9443 - -# Maximum number of concurrently running reconcile loops for nebula cluster (default 3) -maxConcurrentReconciles: 3 +# The number of NebulaRestore objects that are allowed to sync concurrently. (default 5) +concurrentNebulaRestoreSyncs: 5 nodeSelector: { } diff --git a/cmd/controller-manager/app/controller-manager.go b/cmd/controller-manager/app/controller-manager.go new file mode 100644 index 00000000..28ff239a --- /dev/null +++ b/cmd/controller-manager/app/controller-manager.go @@ -0,0 +1,186 @@ +/* +Copyright 2023 Vesoft Inc. + +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 app + +import ( + "context" + "flag" + "net/http" + + kruiseapi "github.com/openkruise/kruise-api/apps/v1alpha1" + "github.com/spf13/cobra" + "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + clientgoscheme "k8s.io/client-go/kubernetes/scheme" + cliflag "k8s.io/component-base/cli/flag" + "k8s.io/klog/v2" + "k8s.io/utils/pointer" + ctrlruntime "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/cache" + "sigs.k8s.io/controller-runtime/pkg/config" + "sigs.k8s.io/controller-runtime/pkg/healthz" + "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" + + "github.com/vesoft-inc/nebula-operator/apis/apps/v1alpha1" + "github.com/vesoft-inc/nebula-operator/cmd/controller-manager/app/options" + "github.com/vesoft-inc/nebula-operator/pkg/controller/nebulacluster" + "github.com/vesoft-inc/nebula-operator/pkg/controller/nebularestore" + klogflag "github.com/vesoft-inc/nebula-operator/pkg/flag/klog" + profileflag "github.com/vesoft-inc/nebula-operator/pkg/flag/profile" + "github.com/vesoft-inc/nebula-operator/pkg/version" + ncwebhook "github.com/vesoft-inc/nebula-operator/pkg/webhook/nebulacluster" +) + +var ( + scheme = runtime.NewScheme() +) + +func init() { + utilruntime.Must(clientgoscheme.AddToScheme(scheme)) + utilruntime.Must(v1alpha1.AddToScheme(clientgoscheme.Scheme)) + utilruntime.Must(v1alpha1.AddToScheme(scheme)) + //+kubebuilder:scaffold:scheme +} + +// NewControllerManagerCommand creates a *cobra.Command object with default parameters +func NewControllerManagerCommand(ctx context.Context) *cobra.Command { + opts := options.NewOptions() + + cmd := &cobra.Command{ + Use: "nebula-controller-manager", + RunE: func(cmd *cobra.Command, args []string) error { + return Run(ctx, opts) + }, + } + + nfs := cliflag.NamedFlagSets{} + fs := nfs.FlagSet("generic") + fs.AddGoFlagSet(flag.CommandLine) + opts.AddFlags(fs) + + logsFlagSet := nfs.FlagSet("logs") + klogflag.Add(logsFlagSet) + + cmd.Flags().AddFlagSet(fs) + cmd.Flags().AddFlagSet(logsFlagSet) + + return cmd +} + +// Run runs the controller-manager with options. This should never exit. +func Run(ctx context.Context, opts *options.Options) error { + klog.Infof("nebula-controller-manager version: %s", version.Version()) + + profileflag.ListenAndServe(opts.ProfileOpts) + + if opts.EnableKruiseScheme { + utilruntime.Must(kruiseapi.AddToScheme(scheme)) + klog.Info("register openkruise scheme") + } + + cfg, err := ctrlruntime.GetConfig() + if err != nil { + panic(err) + } + + ctrlOptions := ctrlruntime.Options{ + Scheme: scheme, + Logger: klog.Background(), + LeaderElection: opts.LeaderElection.LeaderElect, + LeaderElectionID: opts.LeaderElection.ResourceName, + LeaderElectionNamespace: opts.LeaderElection.ResourceNamespace, + LeaseDuration: &opts.LeaderElection.LeaseDuration.Duration, + RenewDeadline: &opts.LeaderElection.RenewDeadline.Duration, + RetryPeriod: &opts.LeaderElection.RetryPeriod.Duration, + LeaderElectionResourceLock: opts.LeaderElection.ResourceLock, + HealthProbeBindAddress: opts.HealthProbeBindAddress, + MetricsBindAddress: opts.MetricsBindAddress, + Cache: cache.Options{ + SyncPeriod: &opts.SyncPeriod.Duration, + //Namespaces: opts.Namespaces, + }, + Controller: config.Controller{ + GroupKindConcurrency: map[string]int{ + v1alpha1.SchemeGroupVersion.WithKind("NebulaCluster").GroupKind().String(): opts.ConcurrentNebulaClusterSyncs, + v1alpha1.SchemeGroupVersion.WithKind("NebulaRestore").GroupKind().String(): opts.ConcurrentNebulaRestoreSyncs, + }, + RecoverPanic: pointer.Bool(true), + }, + } + if opts.EnableAdmissionWebhook { + ctrlOptions.WebhookServer = webhook.NewServer(webhook.Options{ + Host: opts.WebhookOpts.BindAddress, + Port: opts.WebhookOpts.SecurePort, + CertDir: opts.WebhookOpts.CertDir, + CertName: opts.WebhookOpts.CertName, + KeyName: opts.WebhookOpts.KeyName, + TLSMinVersion: opts.WebhookOpts.TLSMinVersion, + }) + } + mgr, err := ctrlruntime.NewManager(cfg, ctrlOptions) + if err != nil { + klog.Errorf("Failed to build controller manager: %v", err) + return err + } + + clusterReconciler, err := nebulacluster.NewClusterReconciler(mgr, opts.EnableKruiseScheme) + if err != nil { + return err + } + + if err := clusterReconciler.SetupWithManager(mgr); err != nil { + klog.Errorf("failed to set up NebulaCluster controller: %v", err) + return err + } + + restoreReconciler, err := nebularestore.NewRestoreReconciler(mgr) + if err != nil { + return err + } + + if err := restoreReconciler.SetupWithManager(mgr); err != nil { + klog.Errorf("failed to set up NebulaRestore controller: %v", err) + return err + } + + if opts.EnableAdmissionWebhook { + decoder := admission.NewDecoder(mgr.GetScheme()) + klog.Info("Registering webhooks to nebula-controller-manager") + hookServer := mgr.GetWebhookServer() + hookServer.Register("/validate-nebulacluster", + &webhook.Admission{Handler: &ncwebhook.ValidatingAdmission{Decoder: decoder}}) + hookServer.WebhookMux().Handle("/readyz/", http.StripPrefix("/readyz/", &healthz.Handler{})) + } + + if err := mgr.AddHealthzCheck("ping", healthz.Ping); err != nil { + klog.Errorf("failed to add health check endpoint: %v", err) + return err + } + + if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil { + klog.Errorf("failed to add ready check endpoint: %v", err) + return err + } + + if err := mgr.Start(ctx); err != nil { + klog.Errorf("controller manager exits unexpectedly: %v", err) + return err + } + + return nil +} diff --git a/cmd/controller-manager/app/options/options.go b/cmd/controller-manager/app/options/options.go new file mode 100644 index 00000000..b3630257 --- /dev/null +++ b/cmd/controller-manager/app/options/options.go @@ -0,0 +1,122 @@ +/* +Copyright 2023 Vesoft Inc. + +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 options + +import ( + "time" + + "github.com/spf13/pflag" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/tools/leaderelection/resourcelock" + cbc "k8s.io/component-base/config" + + "github.com/vesoft-inc/nebula-operator/pkg/flag/profile" + "github.com/vesoft-inc/nebula-operator/pkg/flag/webhook" +) + +const ( + NamespaceNebulaSystem = "nebula-system" +) + +var ( + defaultElectionLeaseDuration = metav1.Duration{Duration: 15 * time.Second} + defaultElectionRenewDeadline = metav1.Duration{Duration: 10 * time.Second} + defaultElectionRetryPeriod = metav1.Duration{Duration: 2 * time.Second} +) + +// Options contains everything necessary to create and run controller-manager. +type Options struct { + // LeaderElection defines the configuration of leader election client. + LeaderElection cbc.LeaderElectionConfiguration + + // Period at which the controller forces the repopulation of its local object stores. + // Defaults to 0, which means the created informer will never do resyncs. + SyncPeriod metav1.Duration + + // Namespaces restricts the cache's ListWatch to the desired namespaces + // Default watches all namespaces + Namespaces string + + // MetricsBindAddress is the TCP address that the controller should bind to + // for serving prometheus metrics. + // It can be set to "0" to disable the metrics serving. + // Defaults to ":8080". + MetricsBindAddress string + + // HealthProbeBindAddress is the TCP address that the controller should bind to + // for serving health probes. + // // It can be set to "0" to disable serving the health probe. + // Defaults to ":8081". + HealthProbeBindAddress string + + // ConcurrentNebulaClusterSyncs is the number of NebulaCluster objects that are + // allowed to sync concurrently. + ConcurrentNebulaClusterSyncs int + + // ConcurrentNebulaRestoreSyncs is the number of NebulaRestore objects that are + // allowed to sync concurrently. + ConcurrentNebulaRestoreSyncs int + + // EnableAdmissionWebhook enable admission webhook for controller manager. + EnableAdmissionWebhook bool + + // EnableKruiseScheme enable openkruise scheme for controller manager managing AdvancedStatefulSet. + EnableKruiseScheme bool + + ProfileOpts profile.Options + WebhookOpts webhook.Options +} + +func NewOptions() *Options { + return &Options{ + LeaderElection: cbc.LeaderElectionConfiguration{ + LeaderElect: true, + ResourceLock: resourcelock.LeasesResourceLock, + ResourceNamespace: NamespaceNebulaSystem, + ResourceName: "nebula-controller-manager", + }, + } +} + +func (o *Options) AddFlags(flags *pflag.FlagSet) { + flags.BoolVar(&o.LeaderElection.LeaderElect, "leader-elect", true, "Start a leader election client and gain leadership before executing the main loop. Enable this when running replicated components for high availability.") + flags.StringVar(&o.LeaderElection.ResourceNamespace, "leader-elect-resource-namespace", NamespaceNebulaSystem, "The namespace of resource object that is used for locking during leader election.") + flags.DurationVar(&o.LeaderElection.LeaseDuration.Duration, "leader-elect-lease-duration", defaultElectionLeaseDuration.Duration, ""+ + "The duration that non-leader candidates will wait after observing a leadership "+ + "renewal until attempting to acquire leadership of a led but unrenewed leader "+ + "slot. This is effectively the maximum duration that a leader can be stopped "+ + "before it is replaced by another candidate. This is only applicable if leader "+ + "election is enabled.") + flags.DurationVar(&o.LeaderElection.RenewDeadline.Duration, "leader-elect-renew-deadline", defaultElectionRenewDeadline.Duration, ""+ + "The interval between attempts by the acting master to renew a leadership slot "+ + "before it stops leading. This must be less than or equal to the lease duration. "+ + "This is only applicable if leader election is enabled.") + flags.DurationVar(&o.LeaderElection.RetryPeriod.Duration, "leader-elect-retry-period", defaultElectionRetryPeriod.Duration, ""+ + "The duration the clients should wait between attempting acquisition and renewal "+ + "of a leadership. This is only applicable if leader election is enabled.") + + flags.DurationVar(&o.SyncPeriod.Duration, "sync-period", 0, " Period at which the controller forces the repopulation of its local object stores.") + flags.StringVar(&o.MetricsBindAddress, "metrics-bind-address", ":8080", "The TCP address that the controller should bind to for serving prometheus metrics(e.g. 127.0.0.1:8080, :8080). It can be set to \"0\" to disable the metrics serving.") + flags.StringVar(&o.HealthProbeBindAddress, "health-probe-bind-address", ":8081", "The TCP address that the controller should bind to for serving health probes.(e.g. 127.0.0.1:8081, :8081). It can be set to \"0\" to disable the health probe serving.") + flags.IntVar(&o.ConcurrentNebulaClusterSyncs, "concurrent-nebulacluster-syncs", 5, "The number of NebulaCluster objects that are allowed to sync concurrently.") + flags.IntVar(&o.ConcurrentNebulaRestoreSyncs, "concurrent-nebularestore-syncs", 5, "The number of NebulaRestore objects that are allowed to sync concurrently.") + flags.BoolVar(&o.EnableAdmissionWebhook, "enable-admission-webhook", false, "If set to ture enable admission webhook for controller manager.") + flags.BoolVar(&o.EnableKruiseScheme, "enable-kruise-scheme", false, "If set to ture enable openkruise scheme for controller manager.") + + o.ProfileOpts.AddFlags(flags) + o.WebhookOpts.AddFlags(flags) +} diff --git a/cmd/controller-manager/main.go b/cmd/controller-manager/main.go index 5c7782c2..8e59a38d 100644 --- a/cmd/controller-manager/main.go +++ b/cmd/controller-manager/main.go @@ -17,174 +17,18 @@ limitations under the License. package main import ( - "flag" "os" - "time" - kruise "github.com/openkruise/kruise-api/apps/v1alpha1" - "github.com/spf13/pflag" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - clientgoscheme "k8s.io/client-go/kubernetes/scheme" _ "k8s.io/client-go/plugin/pkg/client/auth" - "k8s.io/client-go/tools/leaderelection/resourcelock" - "k8s.io/klog/v2/klogr" + "k8s.io/component-base/cli" ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/controller" - "sigs.k8s.io/controller-runtime/pkg/healthz" - "github.com/vesoft-inc/nebula-operator/apis/apps/v1alpha1" - "github.com/vesoft-inc/nebula-operator/pkg/controller/nebulacluster" - "github.com/vesoft-inc/nebula-operator/pkg/controller/nebularestore" - "github.com/vesoft-inc/nebula-operator/pkg/version" - "github.com/vesoft-inc/nebula-operator/pkg/webhook" + "github.com/vesoft-inc/nebula-operator/cmd/controller-manager/app" ) -const ( - defaultWatchNamespace = corev1.NamespaceAll - defaultLeaderElectionNamespace = "" - defaultLeaderElectionID = "nebula-controller-manager-leader" - defaultMetricsBindAddr = ":8080" - defaultHealthProbeBindAddr = ":8081" - defaultSyncPeriod = 30 * time.Minute - defaultWebhookBindPort = 9443 - defaultMaxConcurrentReconciles = 3 - defaultPrintVersion = false - defaultEnableLeaderElection = false - defaultEnableAdmissionWebhook = false - defaultEnableKruise = false -) - -var ( - scheme = runtime.NewScheme() - log = ctrl.Log.WithName("setup") -) - -func init() { - utilruntime.Must(clientgoscheme.AddToScheme(scheme)) - utilruntime.Must(v1alpha1.AddToScheme(clientgoscheme.Scheme)) - utilruntime.Must(v1alpha1.AddToScheme(scheme)) - //+kubebuilder:scaffold:scheme -} - func main() { - pflag.CommandLine.AddGoFlagSet(flag.CommandLine) - - var ( - printVersion bool - metricsAddr string - leaderElectionID string - leaderElectionNamespace string - enableKruise bool - enableLeaderElection bool - enableAdmissionWebhook bool - probeAddr string - maxConcurrentReconciles int - watchNamespace string - webhookBindPort int - syncPeriod time.Duration - ) - - pflag.BoolVar(&printVersion, "version", defaultPrintVersion, "Show version and quit") - pflag.StringVar(&metricsAddr, "metrics-bind-address", defaultMetricsBindAddr, "The address the metric endpoint binds to.") - pflag.StringVar(&probeAddr, "health-probe-bind-address", defaultHealthProbeBindAddr, "The address the probe endpoint binds to.") - pflag.StringVar(&leaderElectionID, "leader-election-id", defaultLeaderElectionID, - "Name of the leader election ID to use for this controller") - pflag.StringVar(&leaderElectionNamespace, "leader-election-namespace", defaultLeaderElectionNamespace, - "Namespace in which the leader election resource will be created.") - pflag.BoolVar(&enableLeaderElection, "enable-leader-election", defaultEnableLeaderElection, - "Enable leader election for controller manager. "+ - "Enabling this will ensure there is only one active controller manager.") - pflag.BoolVar(&enableAdmissionWebhook, "admission-webhook", defaultEnableAdmissionWebhook, "Enable admission webhook for controller manager. ") // nolint: revive - pflag.IntVar(&webhookBindPort, "webhook-bind-port", defaultWebhookBindPort, - "The TCP port the Webhook server binds to.") - pflag.IntVar(&maxConcurrentReconciles, "max-concurrent-reconciles", defaultMaxConcurrentReconciles, "The max concurrent reconciles.") // nolint: revive - pflag.StringVar(&watchNamespace, "watch-namespace", defaultWatchNamespace, - "Namespace the controller watches for updates to Kubernetes objects, If empty, all namespaces are watched.") - pflag.DurationVar(&syncPeriod, "sync-period", defaultSyncPeriod, - "Period at which the controller forces the repopulation of its local object stores.") - pflag.BoolVar(&enableKruise, "enable-kruise", defaultEnableKruise, "Enable openkruise scheme for controller manager.") - - pflag.Parse() - - ctrl.SetLogger(klogr.New()) - - if printVersion { - log.Info("Nebula Operator Version", "version", version.Version()) - os.Exit(0) - } - - if enableKruise { - utilruntime.Must(kruise.AddToScheme(scheme)) - log.Info("register openkruise scheme") - } - - log.Info("Welcome to Nebula Operator.") - log.Info("Nebula Operator Version", "version", version.Version()) - - mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{ - Scheme: scheme, - MetricsBindAddress: metricsAddr, - Port: webhookBindPort, - HealthProbeBindAddress: probeAddr, - LeaderElection: enableLeaderElection, - LeaderElectionResourceLock: resourcelock.ConfigMapsLeasesResourceLock, - LeaderElectionNamespace: leaderElectionNamespace, - LeaderElectionID: leaderElectionID, - Namespace: watchNamespace, - SyncPeriod: &syncPeriod, - }) - if err != nil { - log.Error(err, "unable to start controller-manager") - os.Exit(1) - } - - nebulaClusterReconciler, err := nebulacluster.NewClusterReconciler(mgr, enableKruise) - if err != nil { - log.Error(err, "unable to create nebula cluster reconciler", "controller", "NebulaCluster") - os.Exit(1) - } - - if err := nebulaClusterReconciler.SetupWithManager(mgr, - controller.Options{MaxConcurrentReconciles: maxConcurrentReconciles}); err != nil { - log.Error(err, "unable to create controller", "controller", "NebulaCluster") - os.Exit(1) - } - - nebulaRestoreReconciler, err := nebularestore.NewRestoreReconciler(mgr) - if err != nil { - log.Error(err, "unable to create nebula restore reconciler", "controller", "NebulaRestore") - os.Exit(1) - } - - if err := nebulaRestoreReconciler.SetupWithManager(mgr, - controller.Options{MaxConcurrentReconciles: maxConcurrentReconciles}); err != nil { - log.Error(err, "unable to create controller", "controller", "NebulaRestore") - os.Exit(1) - } - - if enableAdmissionWebhook { - log.Info("setup webhook") - if err = webhook.SetupWithManager(mgr); err != nil { - log.Error(err, "unable to setup webhook") - os.Exit(1) - } - } - //+kubebuilder:scaffold:builder - - if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil { - log.Error(err, "unable to set up health check") - os.Exit(1) - } - if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil { - log.Error(err, "unable to set up ready check") - os.Exit(1) - } - - log.Info("starting manager") - if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil { - log.Error(err, "problem running manager") - os.Exit(1) - } + ctx := ctrl.SetupSignalHandler() + cmd := app.NewControllerManagerCommand(ctx) + code := cli.Run(cmd) + os.Exit(code) } diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index f17d95dd..89fef926 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -1,35 +1,7 @@ --- apiVersion: admissionregistration.k8s.io/v1 -kind: MutatingWebhookConfiguration -metadata: - creationTimestamp: null - name: mutating-webhook-configuration -webhooks: -- admissionReviewVersions: - - v1 - clientConfig: - service: - name: webhook-service - namespace: system - path: /apis/admission.nebula-graph.io/v1alpha1/statefulsetmutating - failurePolicy: Fail - name: statefulsetmutating.nebula-graph.io - rules: - - apiGroups: - - apps - apiVersions: - - v1 - operations: - - CREATE - - UPDATE - resources: - - statefulsets - sideEffects: None ---- -apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration metadata: - creationTimestamp: null name: validating-webhook-configuration webhooks: - admissionReviewVersions: @@ -38,7 +10,7 @@ webhooks: service: name: webhook-service namespace: system - path: /apis/admission.nebula-graph.io/v1alpha1/nebulaclustervalidating + path: /validate-nebulacluster failurePolicy: Fail name: nebulaclustervalidating.nebula-graph.io rules: @@ -52,45 +24,3 @@ webhooks: resources: - nebulaclusters sideEffects: None -- admissionReviewVersions: - - v1 - clientConfig: - service: - name: webhook-service - namespace: system - path: /apis/admission.nebula-graph.io/v1alpha1/statefulsetvalidating - failurePolicy: Fail - name: statefulsetvalidating.nebula-graph.io - rules: - - apiGroups: - - apps - apiVersions: - - v1 - operations: - - CREATE - - UPDATE - resources: - - statefulsets - - statefulsets/scale - sideEffects: None -- admissionReviewVersions: - - v1 - clientConfig: - service: - name: webhook-service - namespace: system - path: /apis/admission.nebula-graph.io/v1alpha1/statefulsetvalidating - failurePolicy: Fail - name: kruisestatefulsetvalidating.nebula-graph.io - rules: - - apiGroups: - - apps.kruise.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - statefulsets - - statefulsets/scale - sideEffects: None diff --git a/go.mod b/go.mod index 8c1bb340..b97d7dc4 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,12 @@ module github.com/vesoft-inc/nebula-operator -go 1.19 +go 1.20 require ( github.com/go-logr/logr v1.2.4 github.com/google/go-cmp v0.5.9 github.com/onsi/ginkgo v1.16.5 - github.com/onsi/gomega v1.27.4 + github.com/onsi/gomega v1.27.7 github.com/openkruise/kruise-api v1.3.0 github.com/pkg/errors v0.9.1 github.com/spf13/cobra v1.6.0 @@ -16,17 +16,17 @@ require ( github.com/vesoft-inc/nebula-agent/v3 v3.6.0 github.com/vesoft-inc/nebula-go/v3 v3.6.0 github.com/vesoft-inc/nebula-operator/apis v0.0.0-00010101000000-000000000000 - k8s.io/api v0.26.5 - k8s.io/apimachinery v0.26.5 - k8s.io/cli-runtime v0.26.5 - k8s.io/client-go v0.26.5 - k8s.io/code-generator v0.26.5 - k8s.io/component-base v0.26.5 + k8s.io/api v0.27.4 + k8s.io/apimachinery v0.27.4 + k8s.io/cli-runtime v0.27.4 + k8s.io/client-go v0.27.4 + k8s.io/code-generator v0.27.4 + k8s.io/component-base v0.27.4 k8s.io/klog/v2 v2.90.1 - k8s.io/kubectl v0.26.5 - k8s.io/kubernetes v1.26.5 + k8s.io/kubectl v0.27.4 + k8s.io/kubernetes v1.27.4 k8s.io/utils v0.0.0-20230209194617-a36077c30491 - sigs.k8s.io/controller-runtime v0.14.6 + sigs.k8s.io/controller-runtime v0.15.2 sigs.k8s.io/yaml v1.3.0 ) @@ -35,14 +35,15 @@ require ( github.com/MakeNowJust/heredoc v1.0.0 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 // indirect + github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect github.com/aws/aws-sdk-go v1.44.116 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect github.com/coreos/go-semver v0.3.0 // indirect - github.com/coreos/go-systemd/v22 v22.3.2 // indirect + github.com/coreos/go-systemd/v22 v22.4.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.8.1+incompatible // indirect github.com/emicklei/go-restful/v3 v3.9.0 // indirect @@ -58,7 +59,7 @@ require ( github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.1 // indirect github.com/go-openapi/swag v0.22.3 // indirect - github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect + github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect @@ -80,8 +81,9 @@ require ( github.com/juju/ratelimit v1.0.1 // indirect github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mitchellh/go-wordwrap v1.0.0 // indirect + github.com/mitchellh/mapstructure v1.4.1 // indirect github.com/moby/spdystream v0.2.0 // indirect github.com/moby/sys/mountinfo v0.6.2 // indirect github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect @@ -90,25 +92,24 @@ require ( github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/nxadm/tail v1.4.8 // indirect - github.com/onsi/ginkgo/v2 v2.9.1 // indirect + github.com/onsi/ginkgo/v2 v2.9.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/selinux v1.10.0 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.14.0 // indirect - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect - github.com/rogpeppe/go-internal v1.8.0 // indirect + github.com/prometheus/client_golang v1.15.1 // indirect + github.com/prometheus/client_model v0.4.0 // indirect + github.com/prometheus/common v0.42.0 // indirect + github.com/prometheus/procfs v0.9.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect github.com/stoewer/go-strcase v1.2.0 // indirect github.com/xlab/treeprint v1.1.0 // indirect - go.etcd.io/etcd/api/v3 v3.5.5 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.5 // indirect - go.etcd.io/etcd/client/v3 v3.5.5 // indirect + go.etcd.io/etcd/api/v3 v3.5.7 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.7 // indirect + go.etcd.io/etcd/client/v3 v3.5.7 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.1 // indirect go.opentelemetry.io/otel v1.10.0 // indirect go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0 // indirect @@ -122,16 +123,16 @@ require ( go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.24.0 // indirect golang.org/x/crypto v0.5.0 // indirect - golang.org/x/mod v0.9.0 // indirect + golang.org/x/mod v0.10.0 // indirect golang.org/x/net v0.10.0 // indirect golang.org/x/oauth2 v0.5.0 // indirect - golang.org/x/sync v0.1.0 // indirect + golang.org/x/sync v0.2.0 // indirect golang.org/x/sys v0.8.0 // indirect golang.org/x/term v0.8.0 // indirect golang.org/x/text v0.9.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.7.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + golang.org/x/tools v0.9.1 // indirect + gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd // indirect google.golang.org/grpc v1.51.0 // indirect @@ -141,53 +142,55 @@ require ( gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.26.1 // indirect - k8s.io/apiserver v0.26.5 // indirect + k8s.io/apiextensions-apiserver v0.27.2 // indirect + k8s.io/apiserver v0.27.4 // indirect k8s.io/cloud-provider v0.0.0 // indirect - k8s.io/component-helpers v0.26.5 // indirect + k8s.io/component-helpers v0.27.4 // indirect + k8s.io/controller-manager v0.27.4 // indirect k8s.io/csi-translation-lib v0.0.0 // indirect k8s.io/dynamic-resource-allocation v0.0.0 // indirect k8s.io/gengo v0.0.0-20220902162205-c0856e24416d // indirect - k8s.io/kms v0.26.5 // indirect - k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect - k8s.io/kube-scheduler v0.26.5 // indirect + k8s.io/kms v0.27.4 // indirect + k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect + k8s.io/kube-scheduler v0.27.4 // indirect + k8s.io/kubelet v0.27.4 // indirect k8s.io/mount-utils v0.0.0 // indirect k8s.io/pod-security-admission v0.0.0 // indirect - sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.37 // indirect + sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/kustomize/api v0.12.1 // indirect - sigs.k8s.io/kustomize/kyaml v0.13.9 // indirect + sigs.k8s.io/kustomize/api v0.13.2 // indirect + sigs.k8s.io/kustomize/kyaml v0.14.1 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect ) replace ( - k8s.io/api => k8s.io/api v0.26.5 - k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.26.5 - k8s.io/apimachinery => k8s.io/apimachinery v0.26.5 - k8s.io/apiserver => k8s.io/apiserver v0.26.5 - k8s.io/cli-runtime => k8s.io/cli-runtime v0.26.5 - k8s.io/client-go => k8s.io/client-go v0.26.5 - k8s.io/cloud-provider => k8s.io/cloud-provider v0.26.5 - k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.26.5 - k8s.io/code-generator => k8s.io/code-generator v0.26.5 - k8s.io/component-base => k8s.io/component-base v0.26.5 - k8s.io/component-helpers => k8s.io/component-helpers v0.26.5 - k8s.io/controller-manager => k8s.io/controller-manager v0.26.5 - k8s.io/cri-api => k8s.io/cri-api v0.26.5 - k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.26.5 - k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.26.5 - k8s.io/kms => k8s.io/kms v0.26.5 - k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.26.5 - k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.26.5 - k8s.io/kube-proxy => k8s.io/kube-proxy v0.26.5 - k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.26.5 - k8s.io/kubectl => k8s.io/kubectl v0.26.5 - k8s.io/kubelet => k8s.io/kubelet v0.26.5 - k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.26.5 - k8s.io/metrics => k8s.io/metrics v0.26.5 - k8s.io/mount-utils => k8s.io/mount-utils v0.26.5 - k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.26.5 - k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.26.5 + k8s.io/api => k8s.io/api v0.27.4 + k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.27.4 + k8s.io/apimachinery => k8s.io/apimachinery v0.27.4 + k8s.io/apiserver => k8s.io/apiserver v0.27.4 + k8s.io/cli-runtime => k8s.io/cli-runtime v0.27.4 + k8s.io/client-go => k8s.io/client-go v0.27.4 + k8s.io/cloud-provider => k8s.io/cloud-provider v0.27.4 + k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.27.4 + k8s.io/code-generator => k8s.io/code-generator v0.27.4 + k8s.io/component-base => k8s.io/component-base v0.27.4 + k8s.io/component-helpers => k8s.io/component-helpers v0.27.4 + k8s.io/controller-manager => k8s.io/controller-manager v0.27.4 + k8s.io/cri-api => k8s.io/cri-api v0.27.4 + k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.27.4 + k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.27.4 + k8s.io/kms => k8s.io/kms v0.27.4 + k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.27.4 + k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.27.4 + k8s.io/kube-proxy => k8s.io/kube-proxy v0.27.4 + k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.27.4 + k8s.io/kubectl => k8s.io/kubectl v0.27.4 + k8s.io/kubelet => k8s.io/kubelet v0.27.4 + k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.27.4 + k8s.io/metrics => k8s.io/metrics v0.27.4 + k8s.io/mount-utils => k8s.io/mount-utils v0.27.4 + k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.27.4 + k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.27.4 ) replace github.com/vesoft-inc/nebula-operator/apis => ./apis diff --git a/go.sum b/go.sum index 72d629df..94de69d0 100644 --- a/go.sum +++ b/go.sum @@ -44,21 +44,16 @@ github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6 github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 h1:yL7+Jz0jTC6yykIK/Wh74gnTJnrGr5AyrNMXuA0gves= github.com/antlr/antlr4/runtime/Go/antlr v1.4.10/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.42.22/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WNHY= github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= -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/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= @@ -68,8 +63,8 @@ github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInq github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v1.0.2 h1:1Lwwip6Q2QGsAdl/ZKPCwTe9fe0CjlUbqj5bFNSjIRk= github.com/chai2010/gettext-go v1.0.2/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -85,8 +80,8 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.4.0 h1:y9YHcjnjynCd/DVbg5j9L/33jQM3MxJlbj/zWskzfGU= +github.com/coreos/go-systemd/v22 v22.4.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= @@ -97,19 +92,15 @@ github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6 github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= @@ -121,7 +112,6 @@ github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8 github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= @@ -134,14 +124,6 @@ github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3Bop github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -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-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -149,20 +131,20 @@ github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= +github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= @@ -211,7 +193,6 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= @@ -266,28 +247,19 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfC github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/juju/ratelimit v1.0.1 h1:+7AIFJVQ0EQgq/K9+0Krm7m530Du7tIz0METWzN0RgY= github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/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/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -296,11 +268,12 @@ github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhn github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2 h1:hAHbPm5IJGijwng3PWk09JkG9WeqChjprR5s9bBZ+OM= -github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= @@ -310,16 +283,12 @@ github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbD 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/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= 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/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -327,12 +296,12 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.9.1 h1:zie5Ly042PD3bsCvsSOPvRnFwyo3rKe64TJlD6nu0mk= -github.com/onsi/ginkgo/v2 v2.9.1/go.mod h1:FEcmzVcCHl+4o9bQZVab+4dC9+j+91t2FHSzmGAPfuo= +github.com/onsi/ginkgo/v2 v2.9.5 h1:+6Hr4uxzP4XIUyAkg61dWBw8lb/gc4/X5luuxN/EC+Q= +github.com/onsi/ginkgo/v2 v2.9.5/go.mod h1:tvAoo1QUJwNEU2ITftXTpR7R1RbCzoZUOs3RonqW57k= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E= -github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ= +github.com/onsi/gomega v1.27.7 h1:fVih9JD6ogIiHUN6ePK7HJidyEDpWGVB5mzM7cWNXoU= +github.com/onsi/gomega v1.27.7/go.mod h1:1p8OOlwo2iUUDsHnOrjE5UKYJ+e3W8eQ3qSlRahPmr4= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/selinux v1.10.0 h1:rAiKF8hTcgLI3w0DHm6i0ylVVcOrlgR1kK99DRLDhyU= @@ -341,51 +310,27 @@ github.com/openkruise/kruise-api v1.3.0 h1:yfEy64uXgSuX/5RwePLbwUK/uX8RRM8fHJkcc github.com/openkruise/kruise-api v1.3.0/go.mod h1:9ZX+ycdHKNzcA5ezAf35xOa2Mwfa2BYagWr0lKgi5dU= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -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 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= 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/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= -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_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= +github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= 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/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= +github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= +github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= -github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= @@ -398,7 +343,6 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= 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.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= @@ -406,12 +350,13 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 h1:uruHq4dN7GR16kFc5fp3d1RIYzJW5onx8Ybykw2YQFA= +github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE= github.com/vesoft-inc/fbthrift v0.0.0-20230214024353-fa2f34755b28 h1:gpoPCGeOEuk/TnoY9nLVK1FoBM5ie7zY3BPVG8q43ME= github.com/vesoft-inc/fbthrift v0.0.0-20230214024353-fa2f34755b28/go.mod h1:xu7e9za8StcJhBZmCDwK1Hyv4/Y0xFsjS+uqp10ECJg= github.com/vesoft-inc/nebula-agent/v3 v3.6.0 h1:Un81HyISo9fBQFb9S2qOdKzney1jBDdHCJbdiJFWPXo= @@ -426,19 +371,18 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= -go.etcd.io/etcd/api/v3 v3.5.5 h1:BX4JIbQ7hl7+jL+g+2j5UAr0o1bctCm6/Ct+ArBGkf0= -go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= -go.etcd.io/etcd/client/pkg/v3 v3.5.5 h1:9S0JUVvmrVl7wCF39iTQthdaaNIiAaQbmK75ogO6GU8= -go.etcd.io/etcd/client/pkg/v3 v3.5.5/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ= -go.etcd.io/etcd/client/v2 v2.305.5 h1:DktRP60//JJpnPC0VBymAN/7V71GHMdjDCBt4ZPXDjI= -go.etcd.io/etcd/client/v3 v3.5.5 h1:q++2WTJbUgpQu4B6hCuT7VkdwaTP7Qz6Daak3WzbrlI= -go.etcd.io/etcd/client/v3 v3.5.5/go.mod h1:aApjR4WGlSumpnJ2kloS75h6aHUmAyaPLjHMxpc7E7c= -go.etcd.io/etcd/pkg/v3 v3.5.5 h1:Ablg7T7OkR+AeeeU32kdVhw/AGDsitkKPl7aW73ssjU= -go.etcd.io/etcd/raft/v3 v3.5.5 h1:Ibz6XyZ60OYyRopu73lLM/P+qco3YtlZMOhnXNS051I= -go.etcd.io/etcd/server/v3 v3.5.5 h1:jNjYm/9s+f9A9r6+SC4RvNaz6AqixpOvhrFdT0PvIj0= +go.etcd.io/etcd/api/v3 v3.5.7 h1:sbcmosSVesNrWOJ58ZQFitHMdncusIifYcrBfwrlJSY= +go.etcd.io/etcd/api/v3 v3.5.7/go.mod h1:9qew1gCdDDLu+VwmeG+iFpL+QlpHTo7iubavdVDgCAA= +go.etcd.io/etcd/client/pkg/v3 v3.5.7 h1:y3kf5Gbp4e4q7egZdn5T7W9TSHUvkClN6u+Rq9mEOmg= +go.etcd.io/etcd/client/pkg/v3 v3.5.7/go.mod h1:o0Abi1MK86iad3YrWhgUsbGx1pmTS+hrORWc2CamuhY= +go.etcd.io/etcd/client/v2 v2.305.7 h1:AELPkjNR3/igjbO7CjyF1fPuVPjrblliiKj+Y6xSGOU= +go.etcd.io/etcd/client/v3 v3.5.7 h1:u/OhpiuCgYY8awOHlhIhmGIGpxfBU/GZBUP3m/3/Iz4= +go.etcd.io/etcd/client/v3 v3.5.7/go.mod h1:sOWmj9DZUMyAngS7QQwCyAXXAL6WhgTOPLNS/NabQgw= +go.etcd.io/etcd/pkg/v3 v3.5.7 h1:obOzeVwerFwZ9trMWapU/VjDcYUJb5OfgC1zqEGWO/0= +go.etcd.io/etcd/raft/v3 v3.5.7 h1:aN79qxLmV3SvIq84aNTliYGmjwsW6NqJSnqmI1HLJKc= +go.etcd.io/etcd/server/v3 v3.5.7 h1:BTBD8IJUV7YFgsczZMHhMTS67XuA4KpRquL0MFOJGRk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -446,8 +390,8 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 h1:xFSRQBbXF6VvYRf2lqMJXxoB72XI1K/azav8TekHHSw= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0/go.mod h1:h8TWwRAhQpOd0aM5nYsRD8+flnkj+526GEIVlarH7eY= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.0 h1:Ajldaqhxqw/gNzQA45IKFWLdG7jZuXX/wBW1d5qvbUI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.0/go.mod h1:9NiG9I2aHTKkcxqCILhjtyNA1QEiCjdBACv4IvrFQ+c= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.1 h1:sxoY9kG1s1WpSYNyzm24rlwH4lnRYFXUVVBmKMBfRgw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.1/go.mod h1:9NiG9I2aHTKkcxqCILhjtyNA1QEiCjdBACv4IvrFQ+c= go.opentelemetry.io/otel v1.10.0 h1:Y7DTJMR6zs1xkS/upamJYk0SxxN4C9AqRd77jmZnyY4= go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0 h1:TaB+1rQhddO1sF71MpZOZAuSPW1klK2M8XxfrBMfK7Y= @@ -469,13 +413,11 @@ go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 h1:+FNtrFTmVw0YZGpBGX56XDee33 go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -506,7 +448,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -515,14 +456,12 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= -golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= +golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 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-20181114220301-adae6a3d119a/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= @@ -530,7 +469,6 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 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/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -552,11 +490,9 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= @@ -566,9 +502,7 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -580,19 +514,14 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= +golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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-20181116152217-5ac8a444bdc5/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-20190312061237-fead79001313/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-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -607,7 +536,6 @@ golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -620,23 +548,17 @@ golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -709,16 +631,15 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= -golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= +golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= +golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= -gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +gomodules.xyz/jsonpatch/v2 v2.3.0 h1:8NFhfS6gzxNqjLIYnZxg319wZ5Qjnx4m/CcX+Klzazc= +gomodules.xyz/jsonpatch/v2 v2.3.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -774,7 +695,6 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd h1:OjndDrsik+Gt+e6fs45z9AxiewiKyLKYpA45W5Kpkks= google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614GARnxrLsqKREzmNYJACSWWpAWdNMwnD7c2BE= @@ -792,7 +712,6 @@ google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= @@ -813,7 +732,6 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -827,11 +745,9 @@ gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXL gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= 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.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -848,64 +764,68 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.26.5 h1:Npao/+sMSng6nkEcNydgH3BNo4s5YoBg7iw35HM7Hcw= -k8s.io/api v0.26.5/go.mod h1:O7ICW7lj6+ZQQQ3cxekgCoW+fnGo5kWT0nTHkLZ5grc= -k8s.io/apiextensions-apiserver v0.26.5 h1:VJ946z9RjyCPn3qiz4Kus/UYjCRrdn1xUvEsJFvN5Yo= -k8s.io/apiextensions-apiserver v0.26.5/go.mod h1:Olsde7ZNWnyz9rsL13iXYXmL1h7kWujtKeC3yWVCDPo= -k8s.io/apimachinery v0.26.5 h1:hTQVhJao2piX7vSgCn4Lwd6E0o/+TJIH4NqRf+q4EmE= -k8s.io/apimachinery v0.26.5/go.mod h1:HUvk6wrOP4v22AIYqeCGSQ6xWCHo41J9d6psb3temAg= -k8s.io/apiserver v0.26.5 h1:SBzyDpIXXPR4v+mpSU44p9fQerBMkpOH6lmSPCD1wmo= -k8s.io/apiserver v0.26.5/go.mod h1:OSbw98Y1bDSbA2izYIKqhi10vb4KWP9b4siiCRFkBVE= -k8s.io/cli-runtime v0.26.5 h1:1YTQt6cWaiyA+6NptNMVqkGkh+BFN9cG+PESgz24//U= -k8s.io/cli-runtime v0.26.5/go.mod h1:iZMA8+AVNSownXlJ1h64s59C5/oHSA6hGBarfHjRDl8= -k8s.io/client-go v0.26.5 h1:e8Z44pafL/c6ayF/6qYEypbJoDSakaFxhJ9lqULEJEo= -k8s.io/client-go v0.26.5/go.mod h1:/CYyNt+ZLMvWqMF8h1SvkUXz2ujFWQLwdDrdiQlZ5X0= -k8s.io/cloud-provider v0.26.5 h1:dDiCey75cPQhRy96AmE1Vqo1DJakuHHfnn5DJiwdkTQ= -k8s.io/cloud-provider v0.26.5/go.mod h1:tZZTVChlO3isBV/Y6xO4/j0MI+I9/vRkplc8cY8kVvo= -k8s.io/code-generator v0.26.5 h1:0p350mqxkbs29h8/yF4AMilApLVUhnRx3EAfhTWR5fY= -k8s.io/code-generator v0.26.5/go.mod h1:iWTVFxfBX+RYe0bXjKqSM83KJF8eimor/izQInvq/60= -k8s.io/component-base v0.26.5 h1:nHAzDvXQ4whYpOqrQGWrDIYI/GIeXkuxzqC/iVICfZo= -k8s.io/component-base v0.26.5/go.mod h1:wvfNAS05EtKdPeUxFceo8WNh8bGPcFY8QfPhv5MYjA4= -k8s.io/component-helpers v0.26.5 h1:JwpcrVqrxU7eLlO+p1TLjdf01O+d3G7eOJgQCm1bMm0= -k8s.io/component-helpers v0.26.5/go.mod h1:08oMmyYzepG6KoZzPnx4R7lcrqyBESWx2EKq7mWvx/g= -k8s.io/csi-translation-lib v0.26.5 h1:9nuy6rFh7LAqhuVGOY6KnPLZkzWJ0SqM6+6p4YiASKQ= -k8s.io/csi-translation-lib v0.26.5/go.mod h1:BaS2V6Dw+qrj9wM59csELaBzfE5iaUMgiRnienfoAsE= -k8s.io/dynamic-resource-allocation v0.26.5 h1:GKT0mjTPcp6SqkcPF+t7DVCwfw2ogf1lM5zuxYXqM0E= -k8s.io/dynamic-resource-allocation v0.26.5/go.mod h1:v27WrIpB/ulANYqXY30HPks+9J22ISPLfSkILcdRbjc= +k8s.io/api v0.27.4 h1:0pCo/AN9hONazBKlNUdhQymmnfLRbSZjd5H5H3f0bSs= +k8s.io/api v0.27.4/go.mod h1:O3smaaX15NfxjzILfiln1D8Z3+gEYpjEpiNA/1EVK1Y= +k8s.io/apiextensions-apiserver v0.27.4 h1:ie1yZG4nY/wvFMIR2hXBeSVq+HfNzib60FjnBYtPGSs= +k8s.io/apiextensions-apiserver v0.27.4/go.mod h1:KHZaDr5H9IbGEnSskEUp/DsdXe1hMQ7uzpQcYUFt2bM= +k8s.io/apimachinery v0.27.4 h1:CdxflD4AF61yewuid0fLl6bM4a3q04jWel0IlP+aYjs= +k8s.io/apimachinery v0.27.4/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= +k8s.io/apiserver v0.27.4 h1:ncZ0MBR9yQ/Gf34rtu1EK+HqT8In1YpfAUINu/Akvho= +k8s.io/apiserver v0.27.4/go.mod h1:GDEFRfFZ4/l+pAvwYRnoSfz0K4j3TWiN4WsG2KnRteE= +k8s.io/cli-runtime v0.27.4 h1:Zb0eci+58eHZNnoHhjRFc7W88s8dlG12VtIl3Nv2Hto= +k8s.io/cli-runtime v0.27.4/go.mod h1:k9Z1xiZq2xNplQmehpDquLgc+rE+pubpO1cK4al4Mlw= +k8s.io/client-go v0.27.4 h1:vj2YTtSJ6J4KxaC88P4pMPEQECWMY8gqPqsTgUKzvjk= +k8s.io/client-go v0.27.4/go.mod h1:ragcly7lUlN0SRPk5/ZkGnDjPknzb37TICq07WhI6Xc= +k8s.io/cloud-provider v0.27.4 h1:FkZ1z40+YPm+nEqkojgPbjNQ3QLvU98gsFW3ZbZnrwo= +k8s.io/cloud-provider v0.27.4/go.mod h1:LpqG1hrNPQQySPWrMrNNNGl79dK0fk/yTkYUlRMoaWU= +k8s.io/code-generator v0.27.4 h1:bw2xFEBnthhCSC7Bt6FFHhPTfWX21IJ30GXxOzywsFE= +k8s.io/code-generator v0.27.4/go.mod h1:DPung1sI5vBgn4AGKtlPRQAyagj/ir/4jI55ipZHVww= +k8s.io/component-base v0.27.4 h1:Wqc0jMKEDGjKXdae8hBXeskRP//vu1m6ypC+gwErj4c= +k8s.io/component-base v0.27.4/go.mod h1:hoiEETnLc0ioLv6WPeDt8vD34DDeB35MfQnxCARq3kY= +k8s.io/component-helpers v0.27.4 h1:l1hn/Zx9mWXflo5xz1mo5RRW2g8b6rptWCG7My6rYoE= +k8s.io/component-helpers v0.27.4/go.mod h1:ayW5btpTdJkVv+CcxhzNRfWT+oPrV6T6qZ1Ay6NEJNI= +k8s.io/controller-manager v0.27.4 h1:iisi3D1AKknVAGgU1dk/HG/UusmBqeS2fCFiRAS0DnE= +k8s.io/controller-manager v0.27.4/go.mod h1:5+Fo0k+t3MDyuNLjmXzU/dJcD2c34ii8Wef+OmqhkVg= +k8s.io/csi-translation-lib v0.27.4 h1:yk/0MNZAOyTEGk/OBNMwPTe63nZYlO/FWFv+J3z5pEM= +k8s.io/csi-translation-lib v0.27.4/go.mod h1:yDQc83ATsJshOCKhvRuPSoGVJOduWvou4u7YRON4U98= +k8s.io/dynamic-resource-allocation v0.27.4 h1:1Aw6WZZvViVsxQc77gzqNbzthR92mVZB0db9u+58htg= +k8s.io/dynamic-resource-allocation v0.27.4/go.mod h1:plkvKEAgUQbEFmiGGd6FvmqMQ+oIZwKkl70Gcy5eM14= k8s.io/gengo v0.0.0-20220902162205-c0856e24416d h1:U9tB195lKdzwqicbJvyJeOXV7Klv+wNAWENRnXEGi08= k8s.io/gengo v0.0.0-20220902162205-c0856e24416d/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kms v0.26.5 h1:Yjgvlxc3KBTAUWuxOIkMUB6YEmqR+rKBkRquBioP8YY= -k8s.io/kms v0.26.5/go.mod h1:AYuV9ZebRhr6cb1eT9L6kZVxvgIUxmE1Fe6kPhqYvuc= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= -k8s.io/kube-scheduler v0.26.5 h1:EeAfK31f9rW46wSTGcc29Qj3Okyuqy5ikVqU5gmen6Q= -k8s.io/kube-scheduler v0.26.5/go.mod h1:/49cw70efcgczBHSkOrdIfuR+t3J0xCQVcwOxfGEpZM= -k8s.io/kubectl v0.26.5 h1:xBqkZIycZIIG6X2ly4OkX2VL15xxnEpZAU9lfoTb0QE= -k8s.io/kubectl v0.26.5/go.mod h1:04QUnpBp9xe0wc84IdRcrFMkuUWQwsg9+ZMHtM4lbNM= -k8s.io/kubernetes v1.26.5 h1:hc/lcQCK7J2Q3fOqtU3cD8qJOKpi6oySEHPP39q/R7o= -k8s.io/kubernetes v1.26.5/go.mod h1:nARWq2FQXUzRa+DQfF6hEp0dgZXu61MnjX+aiQaC8lk= -k8s.io/mount-utils v0.26.5 h1:OYqtkQgtu3hCOYEv09rLdJu/YowXvrM0H6JiPGX6PWI= -k8s.io/mount-utils v0.26.5/go.mod h1:S+09/ujdtdKRo3bzSQXonHpIEKc+svPe8SNgBUJBj8E= -k8s.io/pod-security-admission v0.26.5 h1:Q9kQx1oS8RvHVwQmind+SmsQ3244Ha7Wmm9v7DlZQu0= -k8s.io/pod-security-admission v0.26.5/go.mod h1:IXv1XIvTDOv6U6hyJ+jCCzrDl6jEo1Rhwm7kQtoaY/8= +k8s.io/kms v0.27.4 h1:FeT17HfqxZMP7dTq3Gpa9dG05iP3J3wgGtqGh1SUoN0= +k8s.io/kms v0.27.4/go.mod h1:0BY6tkfa+zOP85u8yE7iNNf1Yx7rEZnRQSWLEbsSk+w= +k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= +k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= +k8s.io/kube-scheduler v0.27.4 h1:aCN06gDyCjHT4tVlpkUikR8IuSpTRIjYGIKGRjrN3no= +k8s.io/kube-scheduler v0.27.4/go.mod h1:3rbitDiZ6cNQwO7QEpt7Sk+IAyzq8uV6N5LYQkXKFUg= +k8s.io/kubectl v0.27.4 h1:RV1TQLIbtL34+vIM+W7HaS3KfAbqvy9lWn6pWB9els4= +k8s.io/kubectl v0.27.4/go.mod h1:qtc1s3BouB9KixJkriZMQqTsXMc+OAni6FeKAhq7q14= +k8s.io/kubelet v0.27.4 h1:P8+MoRx4ikcAc5eEa3k2A6kd8AXtoDRaoC8KX2HFZe4= +k8s.io/kubelet v0.27.4/go.mod h1:2y4peCA57vKEhBcDL6Q5EkPuGP7FFxj9U41NV9hk1ac= +k8s.io/kubernetes v1.27.4 h1:js5bonPoe7jgVPduNcWo6IjPTUdLzlnfhRgGmC7isM0= +k8s.io/kubernetes v1.27.4/go.mod h1:MbYZxAacYS6HjZ6VJuvKaKTilbzp0B0atzW3J8TFBEo= +k8s.io/mount-utils v0.27.4 h1:Se7Cskbrg/t6g4tXvwohuTzXdmTO0feTG0BwQvSE6I4= +k8s.io/mount-utils v0.27.4/go.mod h1:vmcjYdi2Vg1VTWY7KkhvwJVY6WDHxb/QQhiQKkR8iNs= +k8s.io/pod-security-admission v0.27.4 h1:AA32ID+ECNJoUU8yuzLt4WzKPDZg7zMmP2cZ9rVsFyE= +k8s.io/pod-security-admission v0.27.4/go.mod h1:GOcnrXk8TT5cPhtCxdlkOAvBnX3QmZiMHqPw9PbZhPs= k8s.io/utils v0.0.0-20230209194617-a36077c30491 h1:r0BAOLElQnnFhE/ApUsg3iHdVYYPBjNSSOMowRZxxsY= k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.37 h1:fAPTNEpzQMOLMGwOHNbUkR2xXTQwMJOZYNx+/mLlOh0= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.37/go.mod h1:vfnxT4FXNT8eGvO+xi/DsyC/qHmdujqwrUa1WSspCsk= -sigs.k8s.io/controller-runtime v0.14.6 h1:oxstGVvXGNnMvY7TAESYk+lzr6S3V5VFxQ6d92KcwQA= -sigs.k8s.io/controller-runtime v0.14.6/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 h1:trsWhjU5jZrx6UvFu4WzQDrN7Pga4a7Qg+zcfcj64PA= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2/go.mod h1:+qG7ISXqCDVVcyO8hLn12AKVYYUjM7ftlqsqmrhMZE0= +sigs.k8s.io/controller-runtime v0.15.2 h1:9V7b7SDQSJ08IIsJ6CY1CE85Okhp87dyTMNDG0FS7f4= +sigs.k8s.io/controller-runtime v0.15.2/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/kustomize/api v0.12.1 h1:7YM7gW3kYBwtKvoY216ZzY+8hM+lV53LUayghNRJ0vM= -sigs.k8s.io/kustomize/api v0.12.1/go.mod h1:y3JUhimkZkR6sbLNwfJHxvo1TCLwuwm14sCYnkH6S1s= -sigs.k8s.io/kustomize/kyaml v0.13.9 h1:Qz53EAaFFANyNgyOEJbT/yoIHygK40/ZcvU3rgry2Tk= -sigs.k8s.io/kustomize/kyaml v0.13.9/go.mod h1:QsRbD0/KcU+wdk0/L0fIp2KLnohkVzs6fQ85/nOXac4= +sigs.k8s.io/kustomize/api v0.13.2 h1:kejWfLeJhUsTGioDoFNJET5LQe/ajzXhJGYoU+pJsiA= +sigs.k8s.io/kustomize/api v0.13.2/go.mod h1:DUp325VVMFVcQSq+ZxyDisA8wtldwHxLZbr1g94UHsw= +sigs.k8s.io/kustomize/kyaml v0.14.1 h1:c8iibius7l24G2wVAGZn/Va2wNys03GXLjYVIcFVxKA= +sigs.k8s.io/kustomize/kyaml v0.14.1/go.mod h1:AN1/IpawKilWD7V+YvQwRGUvuUOOWpjsHu6uHwonSF4= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/pkg/controller/nebulacluster/nebula_cluster_controller.go b/pkg/controller/nebulacluster/nebula_cluster_controller.go index c330d3f4..736f1773 100644 --- a/pkg/controller/nebulacluster/nebula_cluster_controller.go +++ b/pkg/controller/nebulacluster/nebula_cluster_controller.go @@ -31,7 +31,6 @@ import ( "k8s.io/klog/v2" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/reconcile" "github.com/vesoft-inc/nebula-operator/apis/apps/v1alpha1" @@ -193,7 +192,7 @@ func (r *ClusterReconciler) syncNebulaCluster(nc *v1alpha1.NebulaCluster) error } // SetupWithManager sets up the controller with the Manager. -func (r *ClusterReconciler) SetupWithManager(mgr ctrl.Manager, opts controller.Options) error { +func (r *ClusterReconciler) SetupWithManager(mgr ctrl.Manager) error { if r.EnableKruise { return ctrl.NewControllerManagedBy(mgr). For(&v1alpha1.NebulaCluster{}). @@ -202,7 +201,6 @@ func (r *ClusterReconciler) SetupWithManager(mgr ctrl.Manager, opts controller.O Owns(&appsv1.StatefulSet{}). Owns(&kruisev1alpha1.StatefulSet{}). Owns(&appsv1.Deployment{}). - WithOptions(opts). Complete(r) } @@ -212,6 +210,5 @@ func (r *ClusterReconciler) SetupWithManager(mgr ctrl.Manager, opts controller.O Owns(&corev1.Service{}). Owns(&appsv1.StatefulSet{}). Owns(&appsv1.Deployment{}). - WithOptions(opts). Complete(r) } diff --git a/pkg/controller/nebularestore/nebula_restore_controller.go b/pkg/controller/nebularestore/nebula_restore_controller.go index 8a641242..e2653e99 100644 --- a/pkg/controller/nebularestore/nebula_restore_controller.go +++ b/pkg/controller/nebularestore/nebula_restore_controller.go @@ -114,7 +114,7 @@ func (r *Reconciler) syncNebulaRestore(restore *v1alpha1.NebulaRestore) error { } // SetupWithManager sets up the controller with the Manager. -func (r *Reconciler) SetupWithManager(mgr ctrl.Manager, opts controller.Options) error { +func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). For(&v1alpha1.NebulaRestore{}). WithOptions(controller.Options{MaxConcurrentReconciles: 5}). diff --git a/pkg/webhook/register_nebulacluster.go b/pkg/flag/klog/klog.go similarity index 69% rename from pkg/webhook/register_nebulacluster.go rename to pkg/flag/klog/klog.go index 022d5399..d364d488 100644 --- a/pkg/webhook/register_nebulacluster.go +++ b/pkg/flag/klog/klog.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Vesoft Inc. +Copyright 2023 Vesoft Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,13 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ -package webhook +package klogflag import ( - "github.com/vesoft-inc/nebula-operator/pkg/webhook/nebulacluster/validating" + "flag" + "os" + + "github.com/spf13/pflag" + "k8s.io/klog/v2" ) -// nolint: gochecknoinits -func init() { - registerHandlers(validating.HandlerMap) +func Add(fs *pflag.FlagSet) { + flagSet := flag.NewFlagSet(os.Args[0], flag.ExitOnError) + klog.InitFlags(flagSet) + fs.AddGoFlagSet(flagSet) } diff --git a/pkg/flag/profile/profile.go b/pkg/flag/profile/profile.go new file mode 100644 index 00000000..c18a3210 --- /dev/null +++ b/pkg/flag/profile/profile.go @@ -0,0 +1,65 @@ +/* +Copyright 2023 Vesoft Inc. + +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 profile + +import ( + "net/http" + "net/http/pprof" + "os" + + "github.com/spf13/pflag" + "k8s.io/klog/v2" +) + +type Options struct { + // EnableProfile is the flag about whether to enable pprof profiling. + EnableProfile bool + // ProfilingBindAddress is the TCP address for pprof profiling. + // Defaults to :6060 if unspecified. + ProfilingBindAddress string +} + +func (o *Options) AddFlags(fs *pflag.FlagSet) { + fs.BoolVar(&o.EnableProfile, "enable-pprof", false, "Enable profiling via web interface host:port/debug/pprof/.") + fs.StringVar(&o.ProfilingBindAddress, "profiling-bind-address", ":6060", "The TCP address for serving profiling(e.g. 127.0.0.1:6060, :6060).") +} + +func installProfiling(mux *http.ServeMux) { + mux.HandleFunc("/debug/pprof/", pprof.Index) + mux.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline) + mux.HandleFunc("/debug/pprof/profile", pprof.Profile) + mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol) + mux.HandleFunc("/debug/pprof/trace", pprof.Trace) +} + +func ListenAndServe(opts Options) { + if opts.EnableProfile { + mux := http.NewServeMux() + installProfiling(mux) + klog.Infof("Starting profiling on port %s", opts.ProfilingBindAddress) + go func() { + httpServer := http.Server{ + Addr: opts.ProfilingBindAddress, + Handler: mux, + } + if err := httpServer.ListenAndServe(); err != nil { + klog.Errorf("failed to enable profiling: %v", err) + os.Exit(1) + } + }() + } +} diff --git a/pkg/flag/webhook/webhook.go b/pkg/flag/webhook/webhook.go new file mode 100644 index 00000000..eaf078c9 --- /dev/null +++ b/pkg/flag/webhook/webhook.go @@ -0,0 +1,87 @@ +/* +Copyright 2023 Vesoft Inc. + +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 webhook + +import ( + "net" + + "github.com/spf13/pflag" + + "k8s.io/apimachinery/pkg/util/validation/field" +) + +const ( + defaultBindAddress = "0.0.0.0" + defaultPort = 9443 + defaultCertDir = "/tmp/k8s-webhook-server/serving-certs" + defaultTLSMinVersion = "1.3" +) + +// Options contains everything necessary to create and run webhook server. +type Options struct { + // BindAddress is the IP address on which to listen for the --secure-port port. + // Default is "0.0.0.0". + BindAddress string + + // SecurePort is the port that the webhook server serves at. + // Default is 8443. + SecurePort int + + // CertDir is the directory that contains the server key and certificate. + // if not set, webhook server would look up the server key and certificate in /tmp/k8s-webhook-server/serving-certs. + CertDir string + + // CertName is the server certificate name. Defaults to tls.crt. + CertName string + + // KeyName is the server key name. Defaults to tls.key. + KeyName string + + // TLSMinVersion is the minimum version of TLS supported. Possible values: 1.0, 1.1, 1.2, 1.3. + // Some environments have automated security scans that trigger on TLS versions or insecure cipher suites, and + // setting TLS to 1.3 would solve both problems. + // Defaults to 1.3. + TLSMinVersion string +} + +func (o *Options) AddFlags(flags *pflag.FlagSet) { + flags.StringVar(&o.BindAddress, "webhook-bind-address", defaultBindAddress, + "The IP address on which to listen for the --secure-port port.") + flags.IntVar(&o.SecurePort, "webhook-secure-port", defaultPort, + "The secure port on which to serve HTTPS.") + flags.StringVar(&o.CertDir, "webhook-cert-dir", defaultCertDir, + "The directory that contains the server key and certificate.") + flags.StringVar(&o.CertName, "webhook-tls-cert-file-name", "tls.crt", "The name of server certificate.") + flags.StringVar(&o.KeyName, "webhook-tls-private-key-file-name", "tls.key", "The name of server key.") + flags.StringVar(&o.TLSMinVersion, "webhook-tls-min-version", defaultTLSMinVersion, + "Minimum TLS version supported. Possible values: 1.0, 1.1, 1.2, 1.3.") +} + +func (o *Options) Validate() field.ErrorList { + errs := field.ErrorList{} + + newPath := field.NewPath("Options") + if net.ParseIP(o.BindAddress) == nil { + errs = append(errs, field.Invalid(newPath.Child("BindAddress"), o.BindAddress, "not a valid textual representation of an IP address")) + } + + if o.SecurePort < 0 || o.SecurePort > 65535 { + errs = append(errs, field.Invalid(newPath.Child("SecurePort"), o.SecurePort, "must be a valid port between 0 and 65535 inclusive")) + } + + return errs +} diff --git a/pkg/webhook/nebulacluster/validating/nebulagraph_validation.go b/pkg/webhook/nebulacluster/helper.go similarity index 99% rename from pkg/webhook/nebulacluster/validating/nebulagraph_validation.go rename to pkg/webhook/nebulacluster/helper.go index 7e8515f5..da188e0e 100644 --- a/pkg/webhook/nebulacluster/validating/nebulagraph_validation.go +++ b/pkg/webhook/nebulacluster/helper.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package validating +package nebulacluster import ( "fmt" diff --git a/pkg/webhook/nebulacluster/validating/nebulagraph_create_update_handler.go b/pkg/webhook/nebulacluster/validating.go similarity index 64% rename from pkg/webhook/nebulacluster/validating/nebulagraph_create_update_handler.go rename to pkg/webhook/nebulacluster/validating.go index 6d2f6b6a..b6132bd4 100644 --- a/pkg/webhook/nebulacluster/validating/nebulagraph_create_update_handler.go +++ b/pkg/webhook/nebulacluster/validating.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package validating +package nebulacluster import ( "context" @@ -22,33 +22,25 @@ import ( admissionv1 "k8s.io/api/admission/v1" "k8s.io/klog/v2" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/runtime/inject" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" "github.com/vesoft-inc/nebula-operator/apis/apps/v1alpha1" ) -// NebulaClusterCreateUpdateHandler handles StatefulSet -type NebulaClusterCreateUpdateHandler struct { - // To use the client, you need to do the following: - // - uncomment it - // - import sigs.k8s.io/controller-runtime/pkg/client - // - uncomment the InjectClient method at the bottom of this file. - Client client.Client - +// ValidatingAdmission handles StatefulSet +type ValidatingAdmission struct { // Decoder decodes objects Decoder *admission.Decoder } -var _ admission.Handler = &NebulaClusterCreateUpdateHandler{} +var _ admission.Handler = &ValidatingAdmission{} // Handle handles admission requests. -func (h *NebulaClusterCreateUpdateHandler) Handle(_ context.Context, req admission.Request) (resp admission.Response) { +func (h *ValidatingAdmission) Handle(_ context.Context, req admission.Request) (resp admission.Response) { klog.Infof("start validating resource %v [%s/%s] operation %s", req.Resource, req.Namespace, req.Name, req.Operation) defer func() { - klog.Infof("end validating, allowed %v, reason %v, message %s", "allowed", resp.Allowed, + klog.Infof("end validating, allowed %v, reason %v, message %s", resp.Allowed, resp.Result.Reason, resp.Result.Message) }() @@ -84,19 +76,3 @@ func (h *NebulaClusterCreateUpdateHandler) Handle(_ context.Context, req admissi return admission.ValidationResponse(true, "") } - -var _ inject.Client = &NebulaClusterCreateUpdateHandler{} - -// InjectClient injects the client into the NebulaClusterCreateUpdateHandler -func (h *NebulaClusterCreateUpdateHandler) InjectClient(c client.Client) error { - h.Client = c - return nil -} - -var _ admission.DecoderInjector = &NebulaClusterCreateUpdateHandler{} - -// InjectDecoder injects the decoder into the NebulaClusterCreateUpdateHandler -func (h *NebulaClusterCreateUpdateHandler) InjectDecoder(d *admission.Decoder) error { - h.Decoder = d - return nil -} diff --git a/pkg/webhook/nebulacluster/validating/webhooks.go b/pkg/webhook/nebulacluster/validating/webhooks.go deleted file mode 100644 index 340b2400..00000000 --- a/pkg/webhook/nebulacluster/validating/webhooks.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2021 Vesoft Inc. - -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 validating - -import ( - "sigs.k8s.io/controller-runtime/pkg/webhook/admission" -) - -// +kubebuilder:webhook:path=/apis/admission.nebula-graph.io/v1alpha1/nebulaclustervalidating,mutating=false,failurePolicy=fail,sideEffects=None,groups=apps.nebula-graph.io,resources=nebulaclusters,verbs=create;update,versions=v1alpha1,name=nebulaclustervalidating.nebula-graph.io,admissionReviewVersions=v1 - -// HandlerMap contains admission webhook handlers -var HandlerMap = map[string]admission.Handler{ - "/apis/admission.nebula-graph.io/v1alpha1/nebulaclustervalidating": &NebulaClusterCreateUpdateHandler{}, -} diff --git a/pkg/webhook/register_statefulset.go b/pkg/webhook/register_statefulset.go deleted file mode 100644 index d53f5b1d..00000000 --- a/pkg/webhook/register_statefulset.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2021 Vesoft Inc. - -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 webhook - -import ( - "github.com/vesoft-inc/nebula-operator/pkg/webhook/statefulset/mutating" - "github.com/vesoft-inc/nebula-operator/pkg/webhook/statefulset/validating" -) - -// nolint: gochecknoinits -func init() { - registerHandlers(validating.HandlerMap) - registerHandlers(mutating.HandlerMap) -} diff --git a/pkg/webhook/server.go b/pkg/webhook/server.go deleted file mode 100644 index 5434b1fc..00000000 --- a/pkg/webhook/server.go +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 2021 Vesoft Inc. - -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 webhook - -import ( - "k8s.io/klog/v2" - "sigs.k8s.io/controller-runtime/pkg/manager" - "sigs.k8s.io/controller-runtime/pkg/webhook" - "sigs.k8s.io/controller-runtime/pkg/webhook/admission" -) - -// HandlerMap contains all admission webhook handlers. -var HandlerMap = map[string]admission.Handler{} - -func registerHandlers(m map[string]admission.Handler) { - for path, handler := range m { - if path == "" { - klog.Info("Skip handler with empty path.") - continue - } - if path[0] != '/' { - path = "/" + path - } - _, found := HandlerMap[path] - if found { - klog.V(1).Infof("conflicting webhook path %s in handler map", path) - } - HandlerMap[path] = handler - } -} - -func SetupWithManager(mgr manager.Manager) error { - server := mgr.GetWebhookServer() - - // register admission handlers - for path, handler := range HandlerMap { - server.Register(path, &webhook.Admission{Handler: handler}) - klog.V(3).Infof("Registered webhook handler with path %s", path) - } - - return nil -} diff --git a/pkg/webhook/server_test.go b/pkg/webhook/server_test.go deleted file mode 100644 index 9232c889..00000000 --- a/pkg/webhook/server_test.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2021 Vesoft Inc. - -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 webhook - -import ( - "context" - "reflect" - "testing" - - "sigs.k8s.io/controller-runtime/pkg/webhook/admission" -) - -var _ admission.Handler = &testHandler{} - -type testHandler struct{ string } - -func (h *testHandler) Handle(context.Context, admission.Request) admission.Response { - return admission.Response{} -} - -func Test_RegisterHandlers(t *testing.T) { - a := &testHandler{"a"} - a1 := &testHandler{"a1"} - b := &testHandler{"b"} - b1 := &testHandler{"b1"} - c := &testHandler{"c"} - d := &testHandler{"d"} - e := &testHandler{"e"} - testCases := []struct { - name string - HandlerMap map[string]admission.Handler - m map[string]admission.Handler - expectHandlerMap map[string]admission.Handler - }{ - { - name: "all", - HandlerMap: map[string]admission.Handler{ - "/a": a, - "/b": b, - "/c": c, - "/e": e, - }, - m: map[string]admission.Handler{ - "/a": a1, - "b": b1, - "/c": c, - "/d": d, - }, - expectHandlerMap: map[string]admission.Handler{ - "/a": a1, - "/b": b1, - "/c": c, - "/d": d, - "/e": e, - }, - }, - } - hm := HandlerMap - defer func() { - HandlerMap = hm - }() - for i, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - HandlerMap = tc.HandlerMap - registerHandlers(tc.m) - - if !reflect.DeepEqual(tc.expectHandlerMap, HandlerMap) { - t.Errorf("%d: Expected: \n%#v\n but actual: \n%#v\n", - i, tc.expectHandlerMap, HandlerMap) - } - }) - } -} diff --git a/pkg/webhook/statefulset/mutating/statefulset_create_update_handler.go b/pkg/webhook/statefulset/mutating/statefulset_create_update_handler.go deleted file mode 100644 index 2ac3b38d..00000000 --- a/pkg/webhook/statefulset/mutating/statefulset_create_update_handler.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright 2021 Vesoft Inc. - -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 mutating - -import ( - "context" - - "sigs.k8s.io/controller-runtime/pkg/webhook/admission" -) - -// StatefulSetCreateUpdateHandler handles StatefulSet -type StatefulSetCreateUpdateHandler struct { - // To use the client, you need to do the following: - // - uncomment it - // - import sigs.k8s.io/controller-runtime/pkg/client - // - uncomment the InjectClient method at the bottom of this file. - // Client client.Client - - // Decoder decodes objects - Decoder *admission.Decoder -} - -var _ admission.Handler = &StatefulSetCreateUpdateHandler{} - -// Handle handles admission requests. -func (h *StatefulSetCreateUpdateHandler) Handle(_ context.Context, req admission.Request) admission.Response { - return admission.Patched("") -} - -// var _ inject.Client = &StatefulSetCreateUpdateHandler{} -// -// // InjectClient injects the client into the StatefulSetCreateUpdateHandler -// func (h *StatefulSetCreateUpdateHandler) InjectClient(c client.Client) error { -// h.Client = c -// return nil -// } - -var _ admission.DecoderInjector = &StatefulSetCreateUpdateHandler{} - -// InjectDecoder injects the decoder into the StatefulSetCreateUpdateHandler -func (h *StatefulSetCreateUpdateHandler) InjectDecoder(d *admission.Decoder) error { - h.Decoder = d - return nil -} diff --git a/pkg/webhook/statefulset/mutating/webhooks.go b/pkg/webhook/statefulset/mutating/webhooks.go deleted file mode 100644 index 3bad7462..00000000 --- a/pkg/webhook/statefulset/mutating/webhooks.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2021 Vesoft Inc. - -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 mutating - -import ( - "sigs.k8s.io/controller-runtime/pkg/webhook/admission" -) - -// +kubebuilder:webhook:path=/apis/admission.nebula-graph.io/v1alpha1/statefulsetmutating,mutating=true,failurePolicy=fail,sideEffects=None,groups=apps,resources=statefulsets,verbs=create;update,versions=v1,name=statefulsetmutating.nebula-graph.io,admissionReviewVersions=v1 - -// HandlerMap contains admission webhook handlers -var HandlerMap = map[string]admission.Handler{ - "/apis/admission.nebula-graph.io/v1alpha1/statefulsetmutating": &StatefulSetCreateUpdateHandler{}, -} diff --git a/pkg/webhook/statefulset/validating/statefulset_create_update_handler.go b/pkg/webhook/statefulset/validating/statefulset_create_update_handler.go deleted file mode 100644 index 1b1cce45..00000000 --- a/pkg/webhook/statefulset/validating/statefulset_create_update_handler.go +++ /dev/null @@ -1,177 +0,0 @@ -/* -Copyright 2021 Vesoft Inc. - -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 validating - -import ( - "context" - "fmt" - "net/http" - - kruisev1alpha1 "github.com/openkruise/kruise-api/apps/v1alpha1" - admissionv1 "k8s.io/api/admission/v1" - appsv1 "k8s.io/api/apps/v1" - autoscalingv1 "k8s.io/api/autoscaling/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/klog/v2" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/runtime/inject" - "sigs.k8s.io/controller-runtime/pkg/webhook/admission" -) - -// StatefulSetCreateUpdateHandler handles StatefulSet -type StatefulSetCreateUpdateHandler struct { - // To use the client, you need to do the following: - // - uncomment it - // - import sigs.k8s.io/controller-runtime/pkg/client - // - uncomment the InjectClient method at the bottom of this file. - Client client.Client - - // Decoder decodes objects - Decoder *admission.Decoder -} - -var _ admission.Handler = &StatefulSetCreateUpdateHandler{} - -// Handle handles admission requests. -func (h *StatefulSetCreateUpdateHandler) Handle(ctx context.Context, req admission.Request) (resp admission.Response) { - klog.Infof("start validating resource %v [%s/%s] operation %s", req.Resource, req.Namespace, req.Name, req.Operation) - - defer func() { - klog.Infof("finish validating, allowed %v, reason %v, message %s", "allowed", resp.Allowed, - resp.Result.Reason, resp.Result.Message) - }() - - var obj client.Object = &appsv1.StatefulSet{} - if req.Resource.Group == kruisev1alpha1.GroupVersion.Group { - obj = &kruisev1alpha1.StatefulSet{} - } - - bNotScale := true - if req.SubResource != "" { - if req.SubResource != "scale" { - return admission.ValidationResponse(true, "") - } - bNotScale = false - } else { - err := h.Decoder.Decode(req, obj) - if err != nil { - return admission.Errored(http.StatusBadRequest, err) - } - } - - operation := req.AdmissionRequest.Operation - - // If not Create or Update, return earlier. - if !(operation == admissionv1.Create || operation == admissionv1.Update) { - return admission.ValidationResponse(true, "") - } - - if operation == admissionv1.Create { - sts, err := convToSts(obj) - if err != nil { - return admission.Errored(http.StatusBadRequest, err) - } - if allErrs := validateStatefulSetCreate(sts); len(allErrs) > 0 { - return admission.Errored(http.StatusUnprocessableEntity, allErrs.ToAggregate()) - } - } else if operation == admissionv1.Update { - oldObj := obj.DeepCopyObject().(client.Object) - if bNotScale { - if err := h.Decoder.DecodeRaw(req.AdmissionRequest.OldObject, oldObj); err != nil { - return admission.Errored(http.StatusBadRequest, err) - } - } else { - scale := autoscalingv1.Scale{} - err := h.Decoder.Decode(req, &scale) - if err != nil { - return admission.Errored(http.StatusBadRequest, err) - } - - if err := h.Client.Get(ctx, client.ObjectKey{Namespace: req.Namespace, Name: req.Name}, oldObj); err != nil { - if errors.IsNotFound(err) { - return admission.Errored(http.StatusNotFound, err) - } - return admission.Errored(http.StatusBadRequest, err) - } - obj = oldObj.DeepCopyObject().(client.Object) - replicas := scale.Spec.Replicas - if err := setReplicas(obj, replicas); err != nil { - return admission.Errored(http.StatusBadRequest, err) - } - } - - sts, err := convToSts(obj) - if err != nil { - return admission.Errored(http.StatusBadRequest, err) - } - oldSts, err := convToSts(oldObj) - if err != nil { - return admission.Errored(http.StatusBadRequest, err) - } - if allErrs := validateStatefulSetUpdate(sts, oldSts); len(allErrs) > 0 { - return admission.Errored(http.StatusUnprocessableEntity, allErrs.ToAggregate()) - } - } - - return admission.ValidationResponse(true, "") -} - -func convToSts(obj client.Object) (*appsv1.StatefulSet, error) { - if sts, ok := obj.(*appsv1.StatefulSet); ok { - return sts, nil - } - - u, err := runtime.DefaultUnstructuredConverter.ToUnstructured(obj) - if err != nil { - return nil, err - } - sts := &appsv1.StatefulSet{} - if err := runtime.DefaultUnstructuredConverter.FromUnstructured(u, sts); err != nil { - return nil, err - } - - return sts, nil -} - -func setReplicas(obj client.Object, replicas int32) error { - if sts, ok := obj.(*appsv1.StatefulSet); ok { - sts.Spec.Replicas = &replicas - return nil - } - if asts, ok := obj.(*kruisev1alpha1.StatefulSet); ok { - asts.Spec.Replicas = &replicas - return nil - } - return fmt.Errorf("unkonw type %v", obj) -} - -var _ inject.Client = &StatefulSetCreateUpdateHandler{} - -// InjectClient injects the client into the StatefulSetCreateUpdateHandler -func (h *StatefulSetCreateUpdateHandler) InjectClient(c client.Client) error { - h.Client = c - return nil -} - -var _ admission.DecoderInjector = &StatefulSetCreateUpdateHandler{} - -// InjectDecoder injects the decoder into the StatefulSetCreateUpdateHandler -func (h *StatefulSetCreateUpdateHandler) InjectDecoder(d *admission.Decoder) error { - h.Decoder = d - return nil -} diff --git a/pkg/webhook/statefulset/validating/statefulset_validation.go b/pkg/webhook/statefulset/validating/statefulset_validation.go deleted file mode 100644 index 5d780705..00000000 --- a/pkg/webhook/statefulset/validating/statefulset_validation.go +++ /dev/null @@ -1,232 +0,0 @@ -/* -Copyright 2021 Vesoft Inc. - -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 validating - -import ( - "fmt" - - admissionv1 "k8s.io/api/admission/v1" - appsv1 "k8s.io/api/apps/v1" - apiequality "k8s.io/apimachinery/pkg/api/equality" - "k8s.io/apimachinery/pkg/util/validation/field" - "k8s.io/klog/v2" - appsvalidation "k8s.io/kubernetes/pkg/apis/apps/validation" - apivalidation "k8s.io/kubernetes/pkg/apis/core/validation" - - "github.com/vesoft-inc/nebula-operator/apis/pkg/annotation" - "github.com/vesoft-inc/nebula-operator/apis/pkg/label" - "github.com/vesoft-inc/nebula-operator/pkg/webhook/util/validation" -) - -// validateStatefulSetGraphd validates a StatefulSet for Graphd. -func validateStatefulSetGraphd(statefulSet *appsv1.StatefulSet) (allErrs field.ErrorList) { - replicas := *statefulSet.Spec.Replicas - bHaMode := annotation.IsInHaMode(statefulSet.Annotations) - - allErrs = append(allErrs, validateUpdateStrategy(statefulSet.Spec.UpdateStrategy)...) - allErrs = append(allErrs, validation.ValidateMinReplicasGraphd(field.NewPath("spec").Child("replicas"), int(replicas), bHaMode)...) - - return allErrs -} - -// validateStatefulSetMetad validates a StatefulSet for Metad. -func validateStatefulSetMetad(statefulSet *appsv1.StatefulSet) (allErrs field.ErrorList) { - replicas := *statefulSet.Spec.Replicas - bHaMode := annotation.IsInHaMode(statefulSet.Annotations) - - allErrs = append(allErrs, validateUpdateStrategy(statefulSet.Spec.UpdateStrategy)...) - allErrs = append(allErrs, validation.ValidateMinReplicasMetad(field.NewPath("spec").Child("replicas"), int(replicas), bHaMode)...) - - return allErrs -} - -// validateStatefulSetStoraged validates a StatefulSet for Storaged. -func validateStatefulSetStoraged(statefulSet *appsv1.StatefulSet) (allErrs field.ErrorList) { - replicas := *statefulSet.Spec.Replicas - bHaMode := annotation.IsInHaMode(statefulSet.Annotations) - - allErrs = append(allErrs, validateUpdateStrategy(statefulSet.Spec.UpdateStrategy)...) - allErrs = append(allErrs, validation.ValidateMinReplicasStoraged(field.NewPath("spec").Child("replicas"), int(replicas), bHaMode)...) - - return allErrs -} - -// validateStatefulSetGraphd validates a StatefulSet for Graphd on create. -func validateStatefulSetCreateGraphd(statefulSet *appsv1.StatefulSet) (allErrs field.ErrorList) { - allErrs = append(allErrs, validateStatefulSetGraphd(statefulSet)...) - - return allErrs -} - -// validateStatefulSetMetad validates a StatefulSet for Metad on create. -func validateStatefulSetCreateMetad(statefulSet *appsv1.StatefulSet) (allErrs field.ErrorList) { - allErrs = append(allErrs, validateStatefulSetMetad(statefulSet)...) - - return allErrs -} - -// validateStatefulSetStoraged validates a StatefulSet for Storaged on create. -func validateStatefulSetCreateStoraged(statefulSet *appsv1.StatefulSet) (allErrs field.ErrorList) { - allErrs = append(allErrs, validateStatefulSetStoraged(statefulSet)...) - - return allErrs -} - -// ValidateStatefulSet validates a StatefulSet on create. -func validateStatefulSetCreate(statefulSet *appsv1.StatefulSet) (allErrs field.ErrorList) { - if !isManaged(statefulSet) { - return nil - } - - name := statefulSet.Name - namespace := statefulSet.Namespace - l := label.Label(statefulSet.Labels) - - klog.Infof("receive admission with resource [%s/%s], GVK %s, operation %s", namespace, name, - statefulSet.GroupVersionKind().String(), admissionv1.Create) - - allErrs = append(allErrs, apivalidation.ValidateObjectMeta( - &statefulSet.ObjectMeta, - true, - appsvalidation.ValidateStatefulSetName, - field.NewPath("metadata"), - )...) - - if l.IsGraphd() { - return append(allErrs, validateStatefulSetCreateGraphd(statefulSet)...) - } else if l.IsMetad() { - return append(allErrs, validateStatefulSetCreateMetad(statefulSet)...) - } else if l.IsStoraged() { - return append(allErrs, validateStatefulSetCreateStoraged(statefulSet)...) - } - - return allErrs -} - -// validateStatefulSetGraphd validates a StatefulSet for Graphd on update. -func validateStatefulSetUpdateGraphd(statefulSet, oldStatefulSet *appsv1.StatefulSet) (allErrs field.ErrorList) { - _ = oldStatefulSet // unused - allErrs = append(allErrs, validateStatefulSetGraphd(statefulSet)...) - - return allErrs -} - -// validateStatefulSetMetad validates a StatefulSet for Metad on Update. -func validateStatefulSetUpdateMetad(statefulSet, oldStatefulSet *appsv1.StatefulSet) (allErrs field.ErrorList) { - allErrs = append(allErrs, apivalidation.ValidateImmutableField( - statefulSet.Spec.Replicas, - oldStatefulSet.Spec.Replicas, - field.NewPath("spec").Child("replicas"), - )...) - allErrs = append(allErrs, validateStatefulSetMetad(statefulSet)...) - - return allErrs -} - -// validateStatefulSetStoraged validates a StatefulSet for Storaged on Update. -func validateStatefulSetUpdateStoraged(statefulSet, oldStatefulSet *appsv1.StatefulSet) (allErrs field.ErrorList) { - _ = oldStatefulSet // unused - allErrs = append(allErrs, validateStatefulSetStoraged(statefulSet)...) - - return allErrs -} - -// ValidateStatefulSet validates a StatefulSet on Update. -func validateStatefulSetUpdate(statefulSet, oldStatefulSet *appsv1.StatefulSet) (allErrs field.ErrorList) { - if !(isManaged(statefulSet) || isManaged(oldStatefulSet)) { - return nil - } - - name := statefulSet.Name - namespace := statefulSet.Namespace - l := label.Label(statefulSet.Labels) - - klog.Infof("receive admission with resource [%s/%s], GVK %s, operation %s", namespace, name, - statefulSet.GroupVersionKind().String(), admissionv1.Create) - - allErrs = append(allErrs, apivalidation.ValidateObjectMetaUpdate( - &statefulSet.ObjectMeta, - &oldStatefulSet.ObjectMeta, - field.NewPath("metadata"), - )...) - - allErrs = append(allErrs, apivalidation.ValidateImmutableAnnotation( - statefulSet.Annotations[annotation.AnnHaModeKey], - oldStatefulSet.Annotations[annotation.AnnHaModeKey], - annotation.AnnHaModeKey, - field.NewPath("metadata"), - )...) - - restoreReplicas := statefulSet.Spec.Replicas - statefulSet.Spec.Replicas = oldStatefulSet.Spec.Replicas - - restoreTemplate := statefulSet.Spec.Template - statefulSet.Spec.Template = oldStatefulSet.Spec.Template - - restoreStrategy := statefulSet.Spec.UpdateStrategy - statefulSet.Spec.UpdateStrategy = oldStatefulSet.Spec.UpdateStrategy - - if !apiequality.Semantic.DeepEqual(statefulSet.Spec, oldStatefulSet.Spec) { - allErrs = append(allErrs, field.Forbidden( - field.NewPath("spec"), - "updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden", - )) - } - - statefulSet.Spec.Replicas = restoreReplicas - statefulSet.Spec.Template = restoreTemplate - statefulSet.Spec.UpdateStrategy = restoreStrategy - - if l.IsGraphd() { - return append(allErrs, validateStatefulSetUpdateGraphd(statefulSet, oldStatefulSet)...) - } else if l.IsMetad() { - return append(allErrs, validateStatefulSetUpdateMetad(statefulSet, oldStatefulSet)...) - } else if l.IsStoraged() { - return append(allErrs, validateStatefulSetUpdateStoraged(statefulSet, oldStatefulSet)...) - } - - return allErrs -} - -func validateUpdateStrategy(updateStrategy appsv1.StatefulSetUpdateStrategy) (allErrs field.ErrorList) { - if updateStrategy.Type == appsv1.OnDeleteStatefulSetStrategyType { - allErrs = append(allErrs, field.Invalid( - field.NewPath("spec", "updateStrategy", "type"), - updateStrategy.Type, - fmt.Sprintf("can not use %s updateStrategy type", appsv1.OnDeleteStatefulSetStrategyType))) - } - return allErrs -} - -// isManaged returns whether StatefulSet is a Managerd -func isManaged(statefulSet *appsv1.StatefulSet) bool { - name := statefulSet.Name - namespace := statefulSet.Namespace - l := label.Label(statefulSet.Labels) - - if !l.IsManagedByNebulaOperator() { - klog.Infof("resource [%s/%s] not managed by Nebula Operator, admit", namespace, name) - return false - } - - if !(l.IsGraphd() || l.IsMetad() || l.IsStoraged()) { - klog.Infof("resource [%s/%s] not Nebula component, admit", namespace, name) - return false - } - - return true -} diff --git a/pkg/webhook/statefulset/validating/webhooks.go b/pkg/webhook/statefulset/validating/webhooks.go deleted file mode 100644 index 87338d7e..00000000 --- a/pkg/webhook/statefulset/validating/webhooks.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright 2021 Vesoft Inc. - -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 validating - -import ( - "sigs.k8s.io/controller-runtime/pkg/webhook/admission" -) - -// +kubebuilder:webhook:path=/apis/admission.nebula-graph.io/v1alpha1/statefulsetvalidating,mutating=false,failurePolicy=fail,sideEffects=None,groups=apps,resources=statefulsets;statefulsets/scale,verbs=create;update,versions=v1,name=statefulsetvalidating.nebula-graph.io,admissionReviewVersions=v1 - -// +kubebuilder:webhook:path=/apis/admission.nebula-graph.io/v1alpha1/statefulsetvalidating,mutating=false,failurePolicy=fail,sideEffects=None,groups=apps.kruise.io,resources=statefulsets;statefulsets/scale,verbs=create;update,versions=v1alpha1,name=kruisestatefulsetvalidating.nebula-graph.io,admissionReviewVersions=v1 - -// HandlerMap contains admission webhook handlers -var HandlerMap = map[string]admission.Handler{ - "/apis/admission.nebula-graph.io/v1alpha1/statefulsetvalidating": &StatefulSetCreateUpdateHandler{}, -}