mirror of https://github.com/knative/serving.git
Remove certmanager related code from serving (#7824)
* remove certmanager related code * fix update-codegen * re-run update-codegen
This commit is contained in:
parent
d2b3e4f05a
commit
392aa1233e
|
@ -1 +0,0 @@
|
|||
../../../../.git/HEAD
|
|
@ -1 +0,0 @@
|
|||
../../../../LICENSE
|
|
@ -1 +0,0 @@
|
|||
../../../../third_party/VENDOR-LICENSE
|
|
@ -1 +0,0 @@
|
|||
../../../../.git/refs
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"knative.dev/serving/pkg/reconciler/certificate"
|
||||
|
||||
// This defines the shared main for injected controllers.
|
||||
"knative.dev/pkg/injection/sharedmain"
|
||||
)
|
||||
|
||||
func main() {
|
||||
sharedmain.Main("certcontroller",
|
||||
certificate.NewController)
|
||||
}
|
|
@ -52,7 +52,6 @@ import (
|
|||
"knative.dev/serving/pkg/deployment"
|
||||
"knative.dev/serving/pkg/gc"
|
||||
"knative.dev/serving/pkg/network"
|
||||
certconfig "knative.dev/serving/pkg/reconciler/certificate/config"
|
||||
domainconfig "knative.dev/serving/pkg/reconciler/route/config"
|
||||
)
|
||||
|
||||
|
@ -155,7 +154,6 @@ func NewConfigValidationController(ctx context.Context, cmw configmap.Watcher) *
|
|||
configmap.Constructors{
|
||||
tracingconfig.ConfigName: tracingconfig.NewTracingConfigFromConfigMap,
|
||||
autoscalerconfig.ConfigName: autoscalerconfig.NewConfigFromConfigMap,
|
||||
certconfig.CertManagerConfigName: certconfig.NewCertManagerConfigFromConfigMap,
|
||||
gc.ConfigName: gc.NewConfigFromConfigMapFunc(ctx),
|
||||
network.ConfigName: network.NewConfigFromConfigMap,
|
||||
deployment.ConfigName: deployment.NewConfigFromConfigMap,
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
# Copyright 2019 The Knative Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://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.
|
||||
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
# These are the permissions needed by the `cert-manager` `Certificate` implementation.
|
||||
name: knative-serving-certmanager
|
||||
labels:
|
||||
serving.knative.dev/release: devel
|
||||
serving.knative.dev/controller: "true"
|
||||
networking.knative.dev/certificate-provider: cert-manager
|
||||
rules:
|
||||
- apiGroups: ["cert-manager.io"]
|
||||
resources: ["certificates", "clusterissuers"]
|
||||
verbs: ["get", "list", "create", "update", "delete", "patch", "watch"]
|
||||
- apiGroups: ["acme.cert-manager.io"]
|
||||
resources: ["challenges"]
|
||||
verbs: ["get", "list", "create", "update", "delete", "patch", "watch"]
|
|
@ -1,46 +0,0 @@
|
|||
# Copyright 2019 The Knative Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://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.
|
||||
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: config-certmanager
|
||||
namespace: knative-serving
|
||||
labels:
|
||||
serving.knative.dev/release: devel
|
||||
networking.knative.dev/certificate-provider: cert-manager
|
||||
data:
|
||||
|
||||
_example: |
|
||||
################################
|
||||
# #
|
||||
# EXAMPLE CONFIGURATION #
|
||||
# #
|
||||
################################
|
||||
|
||||
# This block is not actually functional configuration,
|
||||
# but serves to illustrate the available configuration
|
||||
# options and document them in a way that is accessible
|
||||
# to users that `kubectl edit` this config map.
|
||||
#
|
||||
# These sample configuration options may be copied out of
|
||||
# this block and unindented to actually change the configuration.
|
||||
|
||||
# issuerRef is a reference to the issuer for this certificate.
|
||||
# IssuerRef should be either `ClusterIssuer` or `Issuer`.
|
||||
# Please refer `IssuerRef` in https://github.com/jetstack/cert-manager/blob/master/pkg/apis/certmanager/v1alpha1/types_certificate.go
|
||||
# for more details about IssuerRef configuration.
|
||||
issuerRef: |
|
||||
kind: ClusterIssuer
|
||||
name: letsencrypt-issuer
|
|
@ -1,93 +0,0 @@
|
|||
# Copyright 2019 The Knative Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://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.
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: networking-certmanager
|
||||
namespace: knative-serving
|
||||
labels:
|
||||
serving.knative.dev/release: devel
|
||||
networking.knative.dev/certificate-provider: cert-manager
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: networking-certmanager
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
|
||||
labels:
|
||||
app: networking-certmanager
|
||||
serving.knative.dev/release: devel
|
||||
spec:
|
||||
serviceAccountName: controller
|
||||
containers:
|
||||
- name: networking-certmanager
|
||||
# This is the Go import path for the binary that is containerized
|
||||
# and substituted here.
|
||||
image: ko://knative.dev/serving/cmd/networking/certmanager
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 30m
|
||||
memory: 40Mi
|
||||
limits:
|
||||
cpu: 300m
|
||||
memory: 400Mi
|
||||
|
||||
env:
|
||||
- name: SYSTEM_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: CONFIG_LOGGING_NAME
|
||||
value: config-logging
|
||||
- name: CONFIG_OBSERVABILITY_NAME
|
||||
value: config-observability
|
||||
|
||||
# TODO(https://github.com/knative/pkg/pull/953): Remove stackdriver specific config
|
||||
- name: METRICS_DOMAIN
|
||||
value: knative.dev/serving
|
||||
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 9090
|
||||
- name: profiling
|
||||
containerPort: 8008
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: networking-certmanager
|
||||
serving.knative.dev/release: devel
|
||||
networking.knative.dev/certificate-provider: cert-manager
|
||||
name: networking-certmanager
|
||||
namespace: knative-serving
|
||||
spec:
|
||||
ports:
|
||||
# Define metrics and profiling for them to be accessible within service meshes.
|
||||
- name: http-metrics
|
||||
port: 9090
|
||||
targetPort: 9090
|
||||
- name: http-profiling
|
||||
port: 8008
|
||||
targetPort: 8008
|
||||
selector:
|
||||
app: networking-certmanager
|
4
go.mod
4
go.mod
|
@ -3,6 +3,7 @@ module knative.dev/serving
|
|||
go 1.14
|
||||
|
||||
require (
|
||||
github.com/Azure/go-autorest/autorest/validation v0.2.0 // indirect
|
||||
github.com/NYTimes/gziphandler v1.1.1 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1
|
||||
github.com/docker/cli v0.0.0-20200210162036-a4bedce16568 // indirect
|
||||
|
@ -19,10 +20,11 @@ require (
|
|||
github.com/gorilla/websocket v1.4.0
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.12.2 // indirect
|
||||
github.com/hashicorp/golang-lru v0.5.3
|
||||
github.com/jetstack/cert-manager v0.12.0
|
||||
github.com/kelseyhightower/envconfig v1.4.0
|
||||
github.com/kubernetes-incubator/custom-metrics-apiserver v0.0.0-20190918110929-3d9be26a50eb
|
||||
github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a
|
||||
github.com/munnerz/goautoneg v0.0.0-20190414153302-2ae31c8b6b30 // indirect
|
||||
github.com/opencontainers/runc v0.1.1 // indirect
|
||||
github.com/prometheus/client_golang v1.0.0
|
||||
github.com/prometheus/client_model v0.2.0
|
||||
github.com/prometheus/common v0.9.1
|
||||
|
|
86
go.sum
86
go.sum
|
@ -2,7 +2,6 @@ cloud.google.com/go v0.25.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
|
|||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.30.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw=
|
||||
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
|
||||
cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
|
||||
cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
|
||||
|
@ -78,13 +77,10 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
|
|||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20190822182118-27a4ced34534/go.mod h1:iroGtC8B3tQiqtds1l+mgk/BBOrxbqjH+eUfFQYRc14=
|
||||
github.com/GoogleCloudPlatform/testgrid v0.0.1-alpha.3/go.mod h1:f96W2HYy3tiBNV5zbbRc+NczwYHgG1PHXMQfoEWv680=
|
||||
github.com/Jeffail/gabs v1.1.1/go.mod h1:6xMvQMK4k33lb7GUUpaAPh6nKMmemQeg5d4gn7/bOXc=
|
||||
github.com/Microsoft/go-winio v0.4.12/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
|
||||
github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
|
||||
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
|
||||
github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I=
|
||||
github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c=
|
||||
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk=
|
||||
github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||
github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||
github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
|
||||
|
@ -92,11 +88,8 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt
|
|||
github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
|
||||
github.com/SAP/go-hdb v0.14.1/go.mod h1:7fdQLVC2lER3urZLjZCm0AuMQfApof92n3aylBPEkMo=
|
||||
github.com/SermoDigital/jose v0.9.1/go.mod h1:ARgCUhI1MHQH+ONky/PAtmVHQrP5JlGY0F3poXOp/fA=
|
||||
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
|
||||
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
|
||||
github.com/Venafi/vcert v0.0.0-20190613103158-62139eb19b25/go.mod h1:3sXw16DKVded/kLVDma2veqEUQC7O37h98ims7cIvN4=
|
||||
github.com/alecthomas/jsonschema v0.0.0-20180308105923-f2c93856175a/go.mod h1:qpebaTNSsyUn5rPSJMsfqEtDw71TTggXM6stUDI16HA=
|
||||
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=
|
||||
|
@ -104,10 +97,7 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF
|
|||
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/andygrunwald/go-gerrit v0.0.0-20190120104749-174420ebee6c/go.mod h1:0iuRQp6WJ44ts+iihy5E/WlPqfg5RNeQxOmzRkxCdtk=
|
||||
github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q=
|
||||
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
|
||||
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
|
||||
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
|
||||
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
||||
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
|
||||
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
|
||||
github.com/aws/aws-k8s-tester v0.0.0-20190114231546-b411acf57dfe/go.mod h1:1ADF5tAtU1/mVtfMcHAYSm2fPw71DA7fFk0yed64/0I=
|
||||
|
@ -116,7 +106,6 @@ github.com/aws/aws-sdk-go v1.16.18/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpi
|
|||
github.com/aws/aws-sdk-go v1.16.26/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
||||
github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
||||
github.com/aws/aws-sdk-go v1.23.22/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
||||
github.com/aws/aws-sdk-go v1.24.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
||||
github.com/aws/aws-sdk-go v1.27.1 h1:MXnqY6SlWySaZAqNnXThOvjRFdiiOuKtC6i7baFdNdU=
|
||||
github.com/aws/aws-sdk-go v1.27.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
||||
github.com/aws/aws-sdk-go v1.29.34 h1:yrzwfDaZFe9oT4AmQeNNunSQA7c0m2chz0B43+bJ1ok=
|
||||
|
@ -127,19 +116,16 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24
|
|||
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/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
||||
github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k=
|
||||
github.com/blang/semver v3.5.0+incompatible h1:CGxCgetQ64DKk7rdZ++Vfnb1+ogGNnB17OJKJXD2Cfs=
|
||||
github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
|
||||
github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ=
|
||||
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
|
||||
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
|
||||
github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b h1:AP/Y7sqYicnjGDfD5VcY4CIfh1hRXBUavxrvELjTiOE=
|
||||
github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b/go.mod h1:ac9efd0D1fsDb3EJvhqgXRbFx7bs2wqZ10HQPeU8U/Q=
|
||||
github.com/bwmarrin/snowflake v0.0.0/go.mod h1:NdZxfVWX+oR6y2K0o6qAYv6gIOP9rjG0/E9WsDpxqwE=
|
||||
github.com/c2h5oh/datasize v0.0.0-20171227191756-4eba002a5eae/go.mod h1:S/7n9copUssQ56c7aAgHqftWO4LTf4xY6CGWt8Bc+3M=
|
||||
github.com/c2h5oh/datasize v0.0.0-20200112174442-28bbd4740fee h1:BnPxIde0gjtTnc9Er7cxvBk8DHLWhEux0SxayC8dP6I=
|
||||
github.com/c2h5oh/datasize v0.0.0-20200112174442-28bbd4740fee/go.mod h1:S/7n9copUssQ56c7aAgHqftWO4LTf4xY6CGWt8Bc+3M=
|
||||
github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
|
@ -147,10 +133,8 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P
|
|||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/clarketm/json v1.13.4/go.mod h1:ynr2LRfb0fQU34l07csRNBTcivjySLLiY1YzQqKVfdo=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cloudflare/cloudflare-go v0.8.5/go.mod h1:8KhU6K+zHUEWOSU++mEQYf7D9UZOcQcibUoSm6vCUz4=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
|
||||
github.com/containerd/continuity v0.0.0-20181203112020-004b46473808/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
|
||||
github.com/coreos/bbolt v1.3.3 h1:n6AiVyVRKQFNb6mJlwESEvvLoDyiTzXX7ORAUlkeBdY=
|
||||
github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
||||
github.com/coreos/etcd v3.3.13+incompatible h1:8F3hqu9fGYLBifCmRCJsicFqDx/D68Rt3q1JMazcgBQ=
|
||||
|
@ -165,14 +149,12 @@ github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7
|
|||
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea h1:n2Ltr3SrfQlf/9nOna1DoGKxLx3qTSI8Ttl6Xrqp6mw=
|
||||
github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/cpu/goacmedns v0.0.0-20180701200144-565ecf2a84df/go.mod h1:sesf/pNnCYwUevQEQfEwY0Y3DydlQWSGZbaMElOWxok=
|
||||
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
|
||||
github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/denisenkom/go-mssqldb v0.0.0-20190111225525-2fea367d496d/go.mod h1:xN/JuLBIz4bjkxNmByTiV1IbhfnYb6oo99phBn4Eqhc=
|
||||
github.com/denisenkom/go-mssqldb v0.0.0-20190412130859-3b1d194e553a/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dgryski/go-gk v0.0.0-20140819190930-201884a44051/go.mod h1:qm+vckxRlDt0aOla0RYJJVeqHZlWfOm2UIxHaqPB46E=
|
||||
|
@ -180,7 +162,6 @@ github.com/dgryski/go-gk v0.0.0-20200319235926-a69029f61654 h1:XOPLOMn/zT4jIgxfx
|
|||
github.com/dgryski/go-gk v0.0.0-20200319235926-a69029f61654/go.mod h1:qm+vckxRlDt0aOla0RYJJVeqHZlWfOm2UIxHaqPB46E=
|
||||
github.com/dgryski/go-lttb v0.0.0-20180810165845-318fcdf10a77 h1:iRnqZBF0a1hoOOjOdPKf+IxqlJZOas7A48j77RAc7Yg=
|
||||
github.com/dgryski/go-lttb v0.0.0-20180810165845-318fcdf10a77/go.mod h1:Va5MyIzkU0rAM92tn3hb3Anb7oz7KcnixF49+2wOMe4=
|
||||
github.com/digitalocean/godo v1.6.0/go.mod h1:h6faOIcZ8lWIwNQ+DN7b3CgX4Kwby5T+nbpNqkUIozU=
|
||||
github.com/djherbis/atime v1.0.0/go.mod h1:5W+KBIuTwVGcqjIfaTwt+KSYX1o6uep8dtevevQP/f8=
|
||||
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
|
||||
github.com/docker/cli v0.0.0-20190925022749-754388324470/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
||||
|
@ -201,7 +182,6 @@ github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD
|
|||
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
||||
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
|
||||
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
|
||||
github.com/duosecurity/duo_api_golang v0.0.0-20190308151101-6c680f768e74/go.mod h1:UqXY1lYT/ERa4OEAywUqdok1T4RCRdArkhic1Opuavo=
|
||||
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
|
||||
|
@ -223,7 +203,6 @@ github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi
|
|||
github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M=
|
||||
github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
|
||||
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsouza/fake-gcs-server v0.0.0-20180612165233-e85be23bdaa8/go.mod h1:1/HufuJ+eaDf4KTnYdS6HJMGvMRU8d4cYTuu/1QaBbI=
|
||||
|
@ -290,7 +269,6 @@ github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh
|
|||
github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4=
|
||||
github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA=
|
||||
github.com/go-sql-driver/mysql v0.0.0-20160411075031-7ebe0a500653/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
||||
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
||||
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/go-test/deep v1.0.4/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
|
||||
|
@ -299,8 +277,6 @@ github.com/gobuffalo/envy v1.6.5 h1:X3is06x7v0nW2xiy2yFbbIjwHz57CD6z6MkvqULTCm8=
|
|||
github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ=
|
||||
github.com/gobuffalo/envy v1.7.0 h1:GlXgaiBkmrYMHco6t4j7SacKO4XUjvh5pwXh0f4uxXU=
|
||||
github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI=
|
||||
github.com/gobuffalo/flect v0.1.5/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80=
|
||||
github.com/gocql/gocql v0.0.0-20190402132108-0e1d5de854df/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0=
|
||||
github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=
|
||||
github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
|
@ -333,7 +309,6 @@ github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y
|
|||
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/golang/protobuf v1.3.5 h1:F768QJ1E9tib+q5Sc8MkdJi1RxLTbRcTf8LJV56aRls=
|
||||
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
|
||||
github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/gomodule/redigo v1.7.0/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
|
||||
github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
|
@ -384,7 +359,6 @@ github.com/googleapis/gnostic v0.2.2/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTV
|
|||
github.com/googleapis/gnostic v0.3.1 h1:WeAefnSUHlBb0iJKwxFDZdbfGwkd7xRNuV+IpXMJhYk=
|
||||
github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU=
|
||||
github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
|
||||
github.com/gorilla/csrf v1.6.2/go.mod h1:7tSf8kmjNYr7IWDCYhd3U8Ck34iQ/Yw5CJu7bAkHEGI=
|
||||
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||
|
@ -411,30 +385,15 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.4/go.mod h1:vNeuVxBJEsws4ogUvrchl83t
|
|||
github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.12.2 h1:D0EVSTwQoQOyfY35QNSuPJA4jpZRtkoGYWQMB7XNg5o=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.12.2/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c=
|
||||
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4=
|
||||
github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
|
||||
github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI=
|
||||
github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
|
||||
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
github.com/hashicorp/go-memdb v1.0.0/go.mod h1:I6dKdmYhZqU0RJSheVEWgTNWdVQH5QvTgIUQ0t/t32M=
|
||||
github.com/hashicorp/go-multierror v0.0.0-20171204182908-b7773ae21874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I=
|
||||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
||||
github.com/hashicorp/go-plugin v1.0.0/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY=
|
||||
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
|
||||
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk=
|
||||
github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
|
||||
github.com/hashicorp/golang-math-big v0.0.0-20180316142257-561262b71329/go.mod h1:eBwVNKMPVQvPzsL2kU1sgH+Wf3xcmgFCvFSyGDEUSgc=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/hashicorp/vault v0.9.6/go.mod h1:KfSyffbKxoVyspOdlaGVjIuwLobi07qD1bAbosPMpP0=
|
||||
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
|
||||
github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs=
|
||||
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
|
@ -449,9 +408,6 @@ github.com/influxdata/tdigest v0.0.0-20180711151920-a7d76c6f093a/go.mod h1:9Gkys
|
|||
github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0=
|
||||
github.com/influxdata/tdigest v0.0.1 h1:XpFptwYmnEKUqmkcDjrzffswZ3nvNeevbUSLPP/ZzIY=
|
||||
github.com/influxdata/tdigest v0.0.1/go.mod h1:Z0kXnxzbTC2qrx4NaIzYkE1k66+6oEDQTvL95hQFh5Y=
|
||||
github.com/jefferai/jsonx v1.0.0/go.mod h1:OGmqmi2tTeI/PS+qQfBDToLHHJIy/RMp24fPo8vFvoQ=
|
||||
github.com/jetstack/cert-manager v0.12.0 h1:xiJ9EwzBSb9w5SV5dFO1Q/Eq7tgRUlJy+nzn5H5VlpI=
|
||||
github.com/jetstack/cert-manager v0.12.0/go.mod h1:jslhqEXKW8D9U/EYSX1Eb9Iy7yZ69O3wfhznNV7Gokg=
|
||||
github.com/jinzhu/gorm v0.0.0-20170316141641-572d0a0ab1eb/go.mod h1:Vla75njaFJ8clLU1W44h34PjIkijhjHIYnZxMqCdxqo=
|
||||
github.com/jinzhu/inflection v0.0.0-20190603042836-f5c5f50e6090/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
||||
github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
|
@ -476,12 +432,10 @@ github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u
|
|||
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 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o=
|
||||
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
|
||||
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
|
||||
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
|
||||
github.com/keybase/go-crypto v0.0.0-20190403132359-d65b6b94177f/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M=
|
||||
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
|
||||
|
@ -518,9 +472,7 @@ github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzfe
|
|||
github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a h1:+J2gw7Bw77w/fbK7wnNJJDKmw1IbWft2Ul5BzrG1Qm8=
|
||||
github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a/go.mod h1:M1qoD/MqPgTZIk0EWKB38wE28ACRfVcn+cU08jyArI0=
|
||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||
github.com/mattn/go-sqlite3 v0.0.0-20160514122348-38ee283dabf1/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
|
||||
github.com/mattn/go-zglob v0.0.1/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo=
|
||||
|
@ -528,20 +480,12 @@ github.com/matttproud/golang_protobuf_extensions v1.0.0/go.mod h1:D8He9yQNgCq6Z5
|
|||
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY=
|
||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
|
||||
github.com/mgutz/logxi v0.0.0-20161027140823-aebf8a7d67ab/go.mod h1:y1pL58r5z2VvAjeG1VLGc8zOQgSOzbKN7kMHPvFXJ+8=
|
||||
github.com/miekg/dns v0.0.0-20170721150254-0f3adef2e220/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
github.com/miekg/dns v1.1.17/go.mod h1:WgzbA6oji13JREwiNsRDNfl7jYdPnmz+VEuLrA+/48M=
|
||||
github.com/miekg/dns v1.1.29 h1:xHBEhR+t5RzcFJjBLJlax2daXOrTYtr9z4WdKEfWFzg=
|
||||
github.com/miekg/dns v1.1.29/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM=
|
||||
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
|
||||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
|
||||
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
|
||||
github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e/go.mod h1:waEya8ee1Ro/lgxpVhkJI4BVASzkm3UZqkx/cFJiYHM=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
|
||||
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=
|
||||
|
@ -550,13 +494,11 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN
|
|||
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
||||
github.com/munnerz/crd-schema-fuzz v0.0.0-20191114184610-fbd148d44a0a/go.mod h1:fVs1Mso4ZxhlygBEUDgOcyLtp5/DnLuCb8H5GI3CzS4=
|
||||
github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/munnerz/goautoneg v0.0.0-20190414153302-2ae31c8b6b30 h1:10VrZWOtDSvWhgViCi2J6VUp4p/B3pOA/efiMH3KjjI=
|
||||
github.com/munnerz/goautoneg v0.0.0-20190414153302-2ae31c8b6b30/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
|
||||
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
|
||||
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
|
||||
github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
|
@ -580,9 +522,6 @@ github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTm
|
|||
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
|
||||
github.com/openzipkin/zipkin-go v0.2.2 h1:nY8Hti+WKaP0cRsSeQ026wU03QsM762XBeCXBb9NAWI=
|
||||
github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
|
||||
github.com/ory/dockertest v3.3.4+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs=
|
||||
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
|
||||
github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g=
|
||||
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
|
||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
|
@ -635,13 +574,11 @@ github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhg
|
|||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto=
|
||||
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
|
||||
github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
|
||||
github.com/satori/go.uuid v0.0.0-20160713180306-0aa62d5ddceb/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U=
|
||||
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
|
||||
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
|
||||
github.com/sethgrid/pester v0.0.0-20190127155807-68a33a018ad0/go.mod h1:Ad7IjTpvzZO8Fl0vh9AzQ+j/jYZfyp2diGwI8m5q+ns=
|
||||
github.com/shurcooL/githubv4 v0.0.0-20180925043049-51d7b505e2e9/go.mod h1:hAF0iLZy4td2EX+/8Tw+4nodhlMrwN3HupfaXj3zkGo=
|
||||
github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=
|
||||
github.com/shurcooL/graphql v0.0.0-20180924043259-e4a3a37e6d42/go.mod h1:AuYgA5Kyo4c7HfUmvRGs/6rGlMMV/6B1bVnB9JxJEEg=
|
||||
|
@ -653,8 +590,6 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx
|
|||
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
|
||||
github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||
github.com/soheilhy/cmux v0.1.3 h1:09wy7WZk4AqO03yH85Ex1X+Uo3vDsil3Fa9AgF8Emss=
|
||||
github.com/soheilhy/cmux v0.1.3/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
|
||||
github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=
|
||||
|
@ -687,7 +622,6 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P
|
|||
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/tektoncd/pipeline v0.8.0/go.mod h1:IZzJdiX9EqEMuUcgdnElozdYYRh0/ZRC+NKMLj1K3Yw=
|
||||
github.com/tent/http-link-go v0.0.0-20130702225549-ac974c61c2f9/go.mod h1:RHkNRtSLfOK7qBTHaeSX1D6BNpI3qw7NTxsmNr4RvN8=
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8 h1:ndzgwNDnKIqyCvHTXaCqh9KlOWKvBry6nuXMJmonVsE=
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||
github.com/tsenart/go-tsz v0.0.0-20180814232043-cdeb9e1e981e/go.mod h1:SWZznP1z5Ki7hDT2ioqiFKEse8K9tU2OUvaRI0NeGQo=
|
||||
|
@ -711,7 +645,6 @@ go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk=
|
|||
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/etcd v0.0.0-20181031231232-83304cfc808c/go.mod h1:weASp41xM3dk0YHg1s/W8ecdGP5G4teSTMBPpYAaUgA=
|
||||
go.opencensus.io v0.17.0/go.mod h1:mp1VrMQxhlqqDpKvH4UcQUa4YwlzNmymAjPrDdfxNpI=
|
||||
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
|
||||
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.1 h1:8dP3SGL7MPB94crU3bEPplMPe83FI4EouesJUeFHv50=
|
||||
|
@ -739,8 +672,6 @@ golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnf
|
|||
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/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-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190424203555-c05e17bb3b2d/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
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=
|
||||
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
|
@ -847,15 +778,12 @@ golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5h
|
|||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190425045458-9f0b1ff7b46a/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=
|
||||
|
@ -909,7 +837,6 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3
|
|||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
|
@ -958,7 +885,6 @@ gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e h1:jRyg0XfpwWlhEV8mDfdNGB
|
|||
gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ=
|
||||
google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
|
||||
google.golang.org/api v0.0.0-20181021000519-a2651947f503/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
|
||||
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
|
||||
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
||||
google.golang.org/api v0.6.1-0.20190607001116-5213b8090861/go.mod h1:btoxGiFvQNVUZQ8W08zLtrVS08CNpINPEfxXxgJL1Q4=
|
||||
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
|
||||
|
@ -985,7 +911,6 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA
|
|||
google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20181016170114-94acd270e44e/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
|
@ -1042,12 +967,8 @@ gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKW
|
|||
gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/ini.v1 v1.38.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8=
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
|
||||
gopkg.in/ory-am/dockertest.v3 v3.3.4/go.mod h1:s9mmoLkaGeAh97qygnNj4xWkiN7e1SKekYC6CovU+ek=
|
||||
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
||||
gopkg.in/robfig/cron.v2 v2.0.0-20150107220207-be2e0b0deed5/go.mod h1:hiOFpYm0ZJbusNj2ywpbrXowU3G8U6GIQzqn2mw1UIE=
|
||||
gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
|
||||
|
@ -1063,7 +984,6 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|||
gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo=
|
||||
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20190709130402-674ba3eaed22/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
|
||||
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
|
||||
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
|
@ -1095,7 +1015,6 @@ k8s.io/client-go v0.16.4/go.mod h1:ZgxhFDxSnoKY0J0U2/Y1C8obKDdlhGPZwA7oHH863Ok=
|
|||
k8s.io/cloud-provider v0.17.4/go.mod h1:XEjKDzfD+b9MTLXQFlDGkk6Ho8SGMpaU8Uugx/KNK9U=
|
||||
k8s.io/code-generator v0.16.4 h1:DZt4QPm6uXM5crpRyDKlMRkiEDeOe1fQsEMHzL2Y4ts=
|
||||
k8s.io/code-generator v0.16.4/go.mod h1:mJUgkl06XV4kstAnLHAIzJPVCOzVR+ZcfPIv4fUsFCY=
|
||||
k8s.io/component-base v0.0.0-20191114102325-35a9586014f7/go.mod h1:9rNMvrwbqPF4MxI+VQYETrWqMKxi8yAd8YZLdSJ9EDw=
|
||||
k8s.io/component-base v0.16.4/go.mod h1:GYQ+4hlkEwdlpAp59Ztc4gYuFhdoZqiAJD1unYDJ3FM=
|
||||
k8s.io/component-base v0.17.4 h1:H9cdWZyiGVJfWmWIcHd66IsNBWTk1iEgU7D4kJksEnw=
|
||||
k8s.io/component-base v0.17.4/go.mod h1:5BRqHMbbQPm2kKu35v3G+CpVq4K0RJKC7TRioF0I9lE=
|
||||
|
@ -1112,7 +1031,6 @@ k8s.io/klog v0.3.3/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
|||
k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
|
||||
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
|
||||
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
|
||||
k8s.io/kube-aggregator v0.0.0-20191114103820-f023614fb9ea/go.mod h1:LlqyQuTxPHvUzmEgT71Cl/BB86o5+UcbN1LiGgSz94U=
|
||||
k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf h1:EYm5AW/UUDbnmnI+gK0TJDVK9qPLhM+sRHYanNKw0EQ=
|
||||
k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E=
|
||||
k8s.io/kubernetes v1.11.10/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
|
||||
|
@ -1140,7 +1058,6 @@ knative.dev/test-infra v0.0.0-20200429211942-f4c4853375cf h1:rNWg3NiXNLjZC9C1EJf
|
|||
knative.dev/test-infra v0.0.0-20200429211942-f4c4853375cf/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ=
|
||||
knative.dev/test-infra v0.0.0-20200430225942-f7c1fafc1cde h1:QSzxFsf21WXNhODvh0jRKbFR+c5UI7WFjiISy/sMOLg=
|
||||
knative.dev/test-infra v0.0.0-20200430225942-f7c1fafc1cde/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ=
|
||||
launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM=
|
||||
modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
|
||||
modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
|
||||
modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
|
||||
|
@ -1151,13 +1068,10 @@ 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/controller-runtime v0.3.0/go.mod h1:Cw6PkEg0Sa7dAYovGT4R0tRkGhHXpYijwNxYhAnAZZk=
|
||||
sigs.k8s.io/controller-runtime v0.3.1-0.20191022174215-ad57a976ffa1/go.mod h1:p2vzQ3RuSVv9YR4AcM0y8TKHQA+0oLXazKFt6Z0OdS8=
|
||||
sigs.k8s.io/controller-tools v0.2.2/go.mod h1:8SNGuj163x/sMwydREj7ld5mIMJu1cDanIfnx6xsU70=
|
||||
sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI=
|
||||
sigs.k8s.io/structured-merge-diff v1.0.1 h1:LOs1LZWMsz1xs77Phr/pkB4LFaavH7IVq/3+WTN9XTA=
|
||||
sigs.k8s.io/structured-merge-diff v1.0.1/go.mod h1:IIgPezJWb76P0hotTxzDbWsMYB8APh18qZnxkomBpxA=
|
||||
sigs.k8s.io/testing_frameworks v0.1.1/go.mod h1:VVBKrHmJ6Ekkfz284YKhQePcdycOzNH9qL6ht1zEr/U=
|
||||
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
software.sslmate.com/src/go-pkcs12 v0.0.0-20180114231543-2291e8f0f237/go.mod h1:/xvNRWUqm0+/ZMiF4EX00vrSCMsE4/NHb+Pt3freEeQ=
|
||||
vbom.ml/util v0.0.0-20180919145318-efcd4e0f9787/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI=
|
||||
|
|
|
@ -62,24 +62,11 @@ ${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh "injection" \
|
|||
"networking:v1alpha3" \
|
||||
--go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt
|
||||
|
||||
# Generate our own client for cert-manager (otherwise injection won't work)
|
||||
${CODEGEN_PKG}/generate-groups.sh "deepcopy,client,informer,lister" \
|
||||
knative.dev/serving/pkg/client/certmanager github.com/jetstack/cert-manager/pkg/apis \
|
||||
"certmanager:v1alpha2 acme:v1alpha2" \
|
||||
--go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt
|
||||
|
||||
# Knative Injection (for cert-manager)
|
||||
${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh "injection" \
|
||||
knative.dev/serving/pkg/client/certmanager github.com/jetstack/cert-manager/pkg/apis \
|
||||
"certmanager:v1alpha2 acme:v1alpha2" \
|
||||
--go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt
|
||||
|
||||
# Depends on generate-groups.sh to install bin/deepcopy-gen
|
||||
${GOPATH}/bin/deepcopy-gen \
|
||||
-O zz_generated.deepcopy \
|
||||
--go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt \
|
||||
-i knative.dev/serving/pkg/apis/config \
|
||||
-i knative.dev/serving/pkg/reconciler/certificate/config \
|
||||
-i knative.dev/serving/pkg/reconciler/gc/config \
|
||||
-i knative.dev/serving/pkg/reconciler/revision/config \
|
||||
-i knative.dev/serving/pkg/reconciler/route/config \
|
||||
|
|
|
@ -1,111 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package versioned
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
discovery "k8s.io/client-go/discovery"
|
||||
rest "k8s.io/client-go/rest"
|
||||
flowcontrol "k8s.io/client-go/util/flowcontrol"
|
||||
acmev1alpha2 "knative.dev/serving/pkg/client/certmanager/clientset/versioned/typed/acme/v1alpha2"
|
||||
certmanagerv1alpha2 "knative.dev/serving/pkg/client/certmanager/clientset/versioned/typed/certmanager/v1alpha2"
|
||||
)
|
||||
|
||||
type Interface interface {
|
||||
Discovery() discovery.DiscoveryInterface
|
||||
AcmeV1alpha2() acmev1alpha2.AcmeV1alpha2Interface
|
||||
CertmanagerV1alpha2() certmanagerv1alpha2.CertmanagerV1alpha2Interface
|
||||
}
|
||||
|
||||
// Clientset contains the clients for groups. Each group has exactly one
|
||||
// version included in a Clientset.
|
||||
type Clientset struct {
|
||||
*discovery.DiscoveryClient
|
||||
acmeV1alpha2 *acmev1alpha2.AcmeV1alpha2Client
|
||||
certmanagerV1alpha2 *certmanagerv1alpha2.CertmanagerV1alpha2Client
|
||||
}
|
||||
|
||||
// AcmeV1alpha2 retrieves the AcmeV1alpha2Client
|
||||
func (c *Clientset) AcmeV1alpha2() acmev1alpha2.AcmeV1alpha2Interface {
|
||||
return c.acmeV1alpha2
|
||||
}
|
||||
|
||||
// CertmanagerV1alpha2 retrieves the CertmanagerV1alpha2Client
|
||||
func (c *Clientset) CertmanagerV1alpha2() certmanagerv1alpha2.CertmanagerV1alpha2Interface {
|
||||
return c.certmanagerV1alpha2
|
||||
}
|
||||
|
||||
// Discovery retrieves the DiscoveryClient
|
||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.DiscoveryClient
|
||||
}
|
||||
|
||||
// NewForConfig creates a new Clientset for the given config.
|
||||
// If config's RateLimiter is not set and QPS and Burst are acceptable,
|
||||
// NewForConfig will generate a rate-limiter in configShallowCopy.
|
||||
func NewForConfig(c *rest.Config) (*Clientset, error) {
|
||||
configShallowCopy := *c
|
||||
if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
|
||||
if configShallowCopy.Burst <= 0 {
|
||||
return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0")
|
||||
}
|
||||
configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
|
||||
}
|
||||
var cs Clientset
|
||||
var err error
|
||||
cs.acmeV1alpha2, err = acmev1alpha2.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.certmanagerV1alpha2, err = certmanagerv1alpha2.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &cs, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new Clientset for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *Clientset {
|
||||
var cs Clientset
|
||||
cs.acmeV1alpha2 = acmev1alpha2.NewForConfigOrDie(c)
|
||||
cs.certmanagerV1alpha2 = certmanagerv1alpha2.NewForConfigOrDie(c)
|
||||
|
||||
cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
|
||||
return &cs
|
||||
}
|
||||
|
||||
// New creates a new Clientset for the given RESTClient.
|
||||
func New(c rest.Interface) *Clientset {
|
||||
var cs Clientset
|
||||
cs.acmeV1alpha2 = acmev1alpha2.New(c)
|
||||
cs.certmanagerV1alpha2 = certmanagerv1alpha2.New(c)
|
||||
|
||||
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
||||
return &cs
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated clientset.
|
||||
package versioned
|
|
@ -1,89 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
"k8s.io/client-go/discovery"
|
||||
fakediscovery "k8s.io/client-go/discovery/fake"
|
||||
"k8s.io/client-go/testing"
|
||||
clientset "knative.dev/serving/pkg/client/certmanager/clientset/versioned"
|
||||
acmev1alpha2 "knative.dev/serving/pkg/client/certmanager/clientset/versioned/typed/acme/v1alpha2"
|
||||
fakeacmev1alpha2 "knative.dev/serving/pkg/client/certmanager/clientset/versioned/typed/acme/v1alpha2/fake"
|
||||
certmanagerv1alpha2 "knative.dev/serving/pkg/client/certmanager/clientset/versioned/typed/certmanager/v1alpha2"
|
||||
fakecertmanagerv1alpha2 "knative.dev/serving/pkg/client/certmanager/clientset/versioned/typed/certmanager/v1alpha2/fake"
|
||||
)
|
||||
|
||||
// NewSimpleClientset returns a clientset that will respond with the provided objects.
|
||||
// It's backed by a very simple object tracker that processes creates, updates and deletions as-is,
|
||||
// without applying any validations and/or defaults. It shouldn't be considered a replacement
|
||||
// for a real clientset and is mostly useful in simple unit tests.
|
||||
func NewSimpleClientset(objects ...runtime.Object) *Clientset {
|
||||
o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder())
|
||||
for _, obj := range objects {
|
||||
if err := o.Add(obj); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
cs := &Clientset{tracker: o}
|
||||
cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake}
|
||||
cs.AddReactor("*", "*", testing.ObjectReaction(o))
|
||||
cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) {
|
||||
gvr := action.GetResource()
|
||||
ns := action.GetNamespace()
|
||||
watch, err := o.Watch(gvr, ns)
|
||||
if err != nil {
|
||||
return false, nil, err
|
||||
}
|
||||
return true, watch, nil
|
||||
})
|
||||
|
||||
return cs
|
||||
}
|
||||
|
||||
// Clientset implements clientset.Interface. Meant to be embedded into a
|
||||
// struct to get a default implementation. This makes faking out just the method
|
||||
// you want to test easier.
|
||||
type Clientset struct {
|
||||
testing.Fake
|
||||
discovery *fakediscovery.FakeDiscovery
|
||||
tracker testing.ObjectTracker
|
||||
}
|
||||
|
||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||
return c.discovery
|
||||
}
|
||||
|
||||
func (c *Clientset) Tracker() testing.ObjectTracker {
|
||||
return c.tracker
|
||||
}
|
||||
|
||||
var _ clientset.Interface = &Clientset{}
|
||||
|
||||
// AcmeV1alpha2 retrieves the AcmeV1alpha2Client
|
||||
func (c *Clientset) AcmeV1alpha2() acmev1alpha2.AcmeV1alpha2Interface {
|
||||
return &fakeacmev1alpha2.FakeAcmeV1alpha2{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// CertmanagerV1alpha2 retrieves the CertmanagerV1alpha2Client
|
||||
func (c *Clientset) CertmanagerV1alpha2() certmanagerv1alpha2.CertmanagerV1alpha2Interface {
|
||||
return &fakecertmanagerv1alpha2.FakeCertmanagerV1alpha2{Fake: &c.Fake}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated fake clientset.
|
||||
package fake
|
|
@ -1,58 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
acmev1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
|
||||
certmanagerv1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
)
|
||||
|
||||
var scheme = runtime.NewScheme()
|
||||
var codecs = serializer.NewCodecFactory(scheme)
|
||||
var parameterCodec = runtime.NewParameterCodec(scheme)
|
||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
acmev1alpha2.AddToScheme,
|
||||
certmanagerv1alpha2.AddToScheme,
|
||||
}
|
||||
|
||||
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
|
||||
// of clientsets, like in:
|
||||
//
|
||||
// import (
|
||||
// "k8s.io/client-go/kubernetes"
|
||||
// clientsetscheme "k8s.io/client-go/kubernetes/scheme"
|
||||
// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
|
||||
// )
|
||||
//
|
||||
// kclientset, _ := kubernetes.NewForConfig(c)
|
||||
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
|
||||
//
|
||||
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
|
||||
// correctly.
|
||||
var AddToScheme = localSchemeBuilder.AddToScheme
|
||||
|
||||
func init() {
|
||||
v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"})
|
||||
utilruntime.Must(AddToScheme(scheme))
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package contains the scheme of the automatically generated clientset.
|
||||
package scheme
|
|
@ -1,58 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package scheme
|
||||
|
||||
import (
|
||||
acmev1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
|
||||
certmanagerv1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
)
|
||||
|
||||
var Scheme = runtime.NewScheme()
|
||||
var Codecs = serializer.NewCodecFactory(Scheme)
|
||||
var ParameterCodec = runtime.NewParameterCodec(Scheme)
|
||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
acmev1alpha2.AddToScheme,
|
||||
certmanagerv1alpha2.AddToScheme,
|
||||
}
|
||||
|
||||
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
|
||||
// of clientsets, like in:
|
||||
//
|
||||
// import (
|
||||
// "k8s.io/client-go/kubernetes"
|
||||
// clientsetscheme "k8s.io/client-go/kubernetes/scheme"
|
||||
// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
|
||||
// )
|
||||
//
|
||||
// kclientset, _ := kubernetes.NewForConfig(c)
|
||||
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
|
||||
//
|
||||
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
|
||||
// correctly.
|
||||
var AddToScheme = localSchemeBuilder.AddToScheme
|
||||
|
||||
func init() {
|
||||
v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"})
|
||||
utilruntime.Must(AddToScheme(Scheme))
|
||||
}
|
|
@ -1,94 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
|
||||
rest "k8s.io/client-go/rest"
|
||||
"knative.dev/serving/pkg/client/certmanager/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
type AcmeV1alpha2Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
ChallengesGetter
|
||||
OrdersGetter
|
||||
}
|
||||
|
||||
// AcmeV1alpha2Client is used to interact with features provided by the acme.cert-manager.io group.
|
||||
type AcmeV1alpha2Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *AcmeV1alpha2Client) Challenges(namespace string) ChallengeInterface {
|
||||
return newChallenges(c, namespace)
|
||||
}
|
||||
|
||||
func (c *AcmeV1alpha2Client) Orders(namespace string) OrderInterface {
|
||||
return newOrders(c, namespace)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new AcmeV1alpha2Client for the given config.
|
||||
func NewForConfig(c *rest.Config) (*AcmeV1alpha2Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := rest.RESTClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &AcmeV1alpha2Client{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new AcmeV1alpha2Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *AcmeV1alpha2Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return client
|
||||
}
|
||||
|
||||
// New creates a new AcmeV1alpha2Client for the given RESTClient.
|
||||
func New(c rest.Interface) *AcmeV1alpha2Client {
|
||||
return &AcmeV1alpha2Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1alpha2.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *AcmeV1alpha2Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.restClient
|
||||
}
|
|
@ -1,191 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
scheme "knative.dev/serving/pkg/client/certmanager/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// ChallengesGetter has a method to return a ChallengeInterface.
|
||||
// A group's client should implement this interface.
|
||||
type ChallengesGetter interface {
|
||||
Challenges(namespace string) ChallengeInterface
|
||||
}
|
||||
|
||||
// ChallengeInterface has methods to work with Challenge resources.
|
||||
type ChallengeInterface interface {
|
||||
Create(*v1alpha2.Challenge) (*v1alpha2.Challenge, error)
|
||||
Update(*v1alpha2.Challenge) (*v1alpha2.Challenge, error)
|
||||
UpdateStatus(*v1alpha2.Challenge) (*v1alpha2.Challenge, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1alpha2.Challenge, error)
|
||||
List(opts v1.ListOptions) (*v1alpha2.ChallengeList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Challenge, err error)
|
||||
ChallengeExpansion
|
||||
}
|
||||
|
||||
// challenges implements ChallengeInterface
|
||||
type challenges struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newChallenges returns a Challenges
|
||||
func newChallenges(c *AcmeV1alpha2Client, namespace string) *challenges {
|
||||
return &challenges{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the challenge, and returns the corresponding challenge object, and an error if there is any.
|
||||
func (c *challenges) Get(name string, options v1.GetOptions) (result *v1alpha2.Challenge, err error) {
|
||||
result = &v1alpha2.Challenge{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("challenges").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Challenges that match those selectors.
|
||||
func (c *challenges) List(opts v1.ListOptions) (result *v1alpha2.ChallengeList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha2.ChallengeList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("challenges").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested challenges.
|
||||
func (c *challenges) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("challenges").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a challenge and creates it. Returns the server's representation of the challenge, and an error, if there is any.
|
||||
func (c *challenges) Create(challenge *v1alpha2.Challenge) (result *v1alpha2.Challenge, err error) {
|
||||
result = &v1alpha2.Challenge{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("challenges").
|
||||
Body(challenge).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a challenge and updates it. Returns the server's representation of the challenge, and an error, if there is any.
|
||||
func (c *challenges) Update(challenge *v1alpha2.Challenge) (result *v1alpha2.Challenge, err error) {
|
||||
result = &v1alpha2.Challenge{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("challenges").
|
||||
Name(challenge.Name).
|
||||
Body(challenge).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *challenges) UpdateStatus(challenge *v1alpha2.Challenge) (result *v1alpha2.Challenge, err error) {
|
||||
result = &v1alpha2.Challenge{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("challenges").
|
||||
Name(challenge.Name).
|
||||
SubResource("status").
|
||||
Body(challenge).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the challenge and deletes it. Returns an error if one occurs.
|
||||
func (c *challenges) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("challenges").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *challenges) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("challenges").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched challenge.
|
||||
func (c *challenges) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Challenge, err error) {
|
||||
result = &v1alpha2.Challenge{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("challenges").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1alpha2
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
|
@ -1,44 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
rest "k8s.io/client-go/rest"
|
||||
testing "k8s.io/client-go/testing"
|
||||
v1alpha2 "knative.dev/serving/pkg/client/certmanager/clientset/versioned/typed/acme/v1alpha2"
|
||||
)
|
||||
|
||||
type FakeAcmeV1alpha2 struct {
|
||||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeAcmeV1alpha2) Challenges(namespace string) v1alpha2.ChallengeInterface {
|
||||
return &FakeChallenges{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeAcmeV1alpha2) Orders(namespace string) v1alpha2.OrderInterface {
|
||||
return &FakeOrders{c, namespace}
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeAcmeV1alpha2) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
|
@ -1,140 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeChallenges implements ChallengeInterface
|
||||
type FakeChallenges struct {
|
||||
Fake *FakeAcmeV1alpha2
|
||||
ns string
|
||||
}
|
||||
|
||||
var challengesResource = schema.GroupVersionResource{Group: "acme.cert-manager.io", Version: "v1alpha2", Resource: "challenges"}
|
||||
|
||||
var challengesKind = schema.GroupVersionKind{Group: "acme.cert-manager.io", Version: "v1alpha2", Kind: "Challenge"}
|
||||
|
||||
// Get takes name of the challenge, and returns the corresponding challenge object, and an error if there is any.
|
||||
func (c *FakeChallenges) Get(name string, options v1.GetOptions) (result *v1alpha2.Challenge, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(challengesResource, c.ns, name), &v1alpha2.Challenge{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.Challenge), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Challenges that match those selectors.
|
||||
func (c *FakeChallenges) List(opts v1.ListOptions) (result *v1alpha2.ChallengeList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(challengesResource, challengesKind, c.ns, opts), &v1alpha2.ChallengeList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha2.ChallengeList{ListMeta: obj.(*v1alpha2.ChallengeList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha2.ChallengeList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested challenges.
|
||||
func (c *FakeChallenges) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(challengesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a challenge and creates it. Returns the server's representation of the challenge, and an error, if there is any.
|
||||
func (c *FakeChallenges) Create(challenge *v1alpha2.Challenge) (result *v1alpha2.Challenge, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(challengesResource, c.ns, challenge), &v1alpha2.Challenge{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.Challenge), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a challenge and updates it. Returns the server's representation of the challenge, and an error, if there is any.
|
||||
func (c *FakeChallenges) Update(challenge *v1alpha2.Challenge) (result *v1alpha2.Challenge, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(challengesResource, c.ns, challenge), &v1alpha2.Challenge{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.Challenge), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeChallenges) UpdateStatus(challenge *v1alpha2.Challenge) (*v1alpha2.Challenge, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(challengesResource, "status", c.ns, challenge), &v1alpha2.Challenge{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.Challenge), err
|
||||
}
|
||||
|
||||
// Delete takes name of the challenge and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeChallenges) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(challengesResource, c.ns, name), &v1alpha2.Challenge{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeChallenges) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(challengesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha2.ChallengeList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched challenge.
|
||||
func (c *FakeChallenges) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Challenge, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(challengesResource, c.ns, name, pt, data, subresources...), &v1alpha2.Challenge{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.Challenge), err
|
||||
}
|
|
@ -1,140 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeOrders implements OrderInterface
|
||||
type FakeOrders struct {
|
||||
Fake *FakeAcmeV1alpha2
|
||||
ns string
|
||||
}
|
||||
|
||||
var ordersResource = schema.GroupVersionResource{Group: "acme.cert-manager.io", Version: "v1alpha2", Resource: "orders"}
|
||||
|
||||
var ordersKind = schema.GroupVersionKind{Group: "acme.cert-manager.io", Version: "v1alpha2", Kind: "Order"}
|
||||
|
||||
// Get takes name of the order, and returns the corresponding order object, and an error if there is any.
|
||||
func (c *FakeOrders) Get(name string, options v1.GetOptions) (result *v1alpha2.Order, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(ordersResource, c.ns, name), &v1alpha2.Order{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.Order), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Orders that match those selectors.
|
||||
func (c *FakeOrders) List(opts v1.ListOptions) (result *v1alpha2.OrderList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(ordersResource, ordersKind, c.ns, opts), &v1alpha2.OrderList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha2.OrderList{ListMeta: obj.(*v1alpha2.OrderList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha2.OrderList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested orders.
|
||||
func (c *FakeOrders) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(ordersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a order and creates it. Returns the server's representation of the order, and an error, if there is any.
|
||||
func (c *FakeOrders) Create(order *v1alpha2.Order) (result *v1alpha2.Order, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(ordersResource, c.ns, order), &v1alpha2.Order{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.Order), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a order and updates it. Returns the server's representation of the order, and an error, if there is any.
|
||||
func (c *FakeOrders) Update(order *v1alpha2.Order) (result *v1alpha2.Order, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(ordersResource, c.ns, order), &v1alpha2.Order{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.Order), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeOrders) UpdateStatus(order *v1alpha2.Order) (*v1alpha2.Order, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(ordersResource, "status", c.ns, order), &v1alpha2.Order{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.Order), err
|
||||
}
|
||||
|
||||
// Delete takes name of the order and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeOrders) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(ordersResource, c.ns, name), &v1alpha2.Order{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeOrders) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(ordersResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha2.OrderList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched order.
|
||||
func (c *FakeOrders) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Order, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(ordersResource, c.ns, name, pt, data, subresources...), &v1alpha2.Order{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.Order), err
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
type ChallengeExpansion interface{}
|
||||
|
||||
type OrderExpansion interface{}
|
|
@ -1,191 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
scheme "knative.dev/serving/pkg/client/certmanager/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// OrdersGetter has a method to return a OrderInterface.
|
||||
// A group's client should implement this interface.
|
||||
type OrdersGetter interface {
|
||||
Orders(namespace string) OrderInterface
|
||||
}
|
||||
|
||||
// OrderInterface has methods to work with Order resources.
|
||||
type OrderInterface interface {
|
||||
Create(*v1alpha2.Order) (*v1alpha2.Order, error)
|
||||
Update(*v1alpha2.Order) (*v1alpha2.Order, error)
|
||||
UpdateStatus(*v1alpha2.Order) (*v1alpha2.Order, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1alpha2.Order, error)
|
||||
List(opts v1.ListOptions) (*v1alpha2.OrderList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Order, err error)
|
||||
OrderExpansion
|
||||
}
|
||||
|
||||
// orders implements OrderInterface
|
||||
type orders struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newOrders returns a Orders
|
||||
func newOrders(c *AcmeV1alpha2Client, namespace string) *orders {
|
||||
return &orders{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the order, and returns the corresponding order object, and an error if there is any.
|
||||
func (c *orders) Get(name string, options v1.GetOptions) (result *v1alpha2.Order, err error) {
|
||||
result = &v1alpha2.Order{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("orders").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Orders that match those selectors.
|
||||
func (c *orders) List(opts v1.ListOptions) (result *v1alpha2.OrderList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha2.OrderList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("orders").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested orders.
|
||||
func (c *orders) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("orders").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a order and creates it. Returns the server's representation of the order, and an error, if there is any.
|
||||
func (c *orders) Create(order *v1alpha2.Order) (result *v1alpha2.Order, err error) {
|
||||
result = &v1alpha2.Order{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("orders").
|
||||
Body(order).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a order and updates it. Returns the server's representation of the order, and an error, if there is any.
|
||||
func (c *orders) Update(order *v1alpha2.Order) (result *v1alpha2.Order, err error) {
|
||||
result = &v1alpha2.Order{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("orders").
|
||||
Name(order.Name).
|
||||
Body(order).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *orders) UpdateStatus(order *v1alpha2.Order) (result *v1alpha2.Order, err error) {
|
||||
result = &v1alpha2.Order{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("orders").
|
||||
Name(order.Name).
|
||||
SubResource("status").
|
||||
Body(order).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the order and deletes it. Returns an error if one occurs.
|
||||
func (c *orders) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("orders").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *orders) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("orders").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched order.
|
||||
func (c *orders) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Order, err error) {
|
||||
result = &v1alpha2.Order{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("orders").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
|
@ -1,191 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
scheme "knative.dev/serving/pkg/client/certmanager/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// CertificatesGetter has a method to return a CertificateInterface.
|
||||
// A group's client should implement this interface.
|
||||
type CertificatesGetter interface {
|
||||
Certificates(namespace string) CertificateInterface
|
||||
}
|
||||
|
||||
// CertificateInterface has methods to work with Certificate resources.
|
||||
type CertificateInterface interface {
|
||||
Create(*v1alpha2.Certificate) (*v1alpha2.Certificate, error)
|
||||
Update(*v1alpha2.Certificate) (*v1alpha2.Certificate, error)
|
||||
UpdateStatus(*v1alpha2.Certificate) (*v1alpha2.Certificate, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1alpha2.Certificate, error)
|
||||
List(opts v1.ListOptions) (*v1alpha2.CertificateList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Certificate, err error)
|
||||
CertificateExpansion
|
||||
}
|
||||
|
||||
// certificates implements CertificateInterface
|
||||
type certificates struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newCertificates returns a Certificates
|
||||
func newCertificates(c *CertmanagerV1alpha2Client, namespace string) *certificates {
|
||||
return &certificates{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the certificate, and returns the corresponding certificate object, and an error if there is any.
|
||||
func (c *certificates) Get(name string, options v1.GetOptions) (result *v1alpha2.Certificate, err error) {
|
||||
result = &v1alpha2.Certificate{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("certificates").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Certificates that match those selectors.
|
||||
func (c *certificates) List(opts v1.ListOptions) (result *v1alpha2.CertificateList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha2.CertificateList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("certificates").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested certificates.
|
||||
func (c *certificates) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("certificates").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a certificate and creates it. Returns the server's representation of the certificate, and an error, if there is any.
|
||||
func (c *certificates) Create(certificate *v1alpha2.Certificate) (result *v1alpha2.Certificate, err error) {
|
||||
result = &v1alpha2.Certificate{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("certificates").
|
||||
Body(certificate).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a certificate and updates it. Returns the server's representation of the certificate, and an error, if there is any.
|
||||
func (c *certificates) Update(certificate *v1alpha2.Certificate) (result *v1alpha2.Certificate, err error) {
|
||||
result = &v1alpha2.Certificate{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("certificates").
|
||||
Name(certificate.Name).
|
||||
Body(certificate).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *certificates) UpdateStatus(certificate *v1alpha2.Certificate) (result *v1alpha2.Certificate, err error) {
|
||||
result = &v1alpha2.Certificate{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("certificates").
|
||||
Name(certificate.Name).
|
||||
SubResource("status").
|
||||
Body(certificate).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the certificate and deletes it. Returns an error if one occurs.
|
||||
func (c *certificates) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("certificates").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *certificates) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("certificates").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched certificate.
|
||||
func (c *certificates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Certificate, err error) {
|
||||
result = &v1alpha2.Certificate{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("certificates").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
|
@ -1,191 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
scheme "knative.dev/serving/pkg/client/certmanager/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// CertificateRequestsGetter has a method to return a CertificateRequestInterface.
|
||||
// A group's client should implement this interface.
|
||||
type CertificateRequestsGetter interface {
|
||||
CertificateRequests(namespace string) CertificateRequestInterface
|
||||
}
|
||||
|
||||
// CertificateRequestInterface has methods to work with CertificateRequest resources.
|
||||
type CertificateRequestInterface interface {
|
||||
Create(*v1alpha2.CertificateRequest) (*v1alpha2.CertificateRequest, error)
|
||||
Update(*v1alpha2.CertificateRequest) (*v1alpha2.CertificateRequest, error)
|
||||
UpdateStatus(*v1alpha2.CertificateRequest) (*v1alpha2.CertificateRequest, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1alpha2.CertificateRequest, error)
|
||||
List(opts v1.ListOptions) (*v1alpha2.CertificateRequestList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.CertificateRequest, err error)
|
||||
CertificateRequestExpansion
|
||||
}
|
||||
|
||||
// certificateRequests implements CertificateRequestInterface
|
||||
type certificateRequests struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newCertificateRequests returns a CertificateRequests
|
||||
func newCertificateRequests(c *CertmanagerV1alpha2Client, namespace string) *certificateRequests {
|
||||
return &certificateRequests{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the certificateRequest, and returns the corresponding certificateRequest object, and an error if there is any.
|
||||
func (c *certificateRequests) Get(name string, options v1.GetOptions) (result *v1alpha2.CertificateRequest, err error) {
|
||||
result = &v1alpha2.CertificateRequest{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("certificaterequests").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of CertificateRequests that match those selectors.
|
||||
func (c *certificateRequests) List(opts v1.ListOptions) (result *v1alpha2.CertificateRequestList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha2.CertificateRequestList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("certificaterequests").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested certificateRequests.
|
||||
func (c *certificateRequests) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("certificaterequests").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a certificateRequest and creates it. Returns the server's representation of the certificateRequest, and an error, if there is any.
|
||||
func (c *certificateRequests) Create(certificateRequest *v1alpha2.CertificateRequest) (result *v1alpha2.CertificateRequest, err error) {
|
||||
result = &v1alpha2.CertificateRequest{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("certificaterequests").
|
||||
Body(certificateRequest).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a certificateRequest and updates it. Returns the server's representation of the certificateRequest, and an error, if there is any.
|
||||
func (c *certificateRequests) Update(certificateRequest *v1alpha2.CertificateRequest) (result *v1alpha2.CertificateRequest, err error) {
|
||||
result = &v1alpha2.CertificateRequest{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("certificaterequests").
|
||||
Name(certificateRequest.Name).
|
||||
Body(certificateRequest).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *certificateRequests) UpdateStatus(certificateRequest *v1alpha2.CertificateRequest) (result *v1alpha2.CertificateRequest, err error) {
|
||||
result = &v1alpha2.CertificateRequest{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("certificaterequests").
|
||||
Name(certificateRequest.Name).
|
||||
SubResource("status").
|
||||
Body(certificateRequest).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the certificateRequest and deletes it. Returns an error if one occurs.
|
||||
func (c *certificateRequests) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("certificaterequests").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *certificateRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("certificaterequests").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched certificateRequest.
|
||||
func (c *certificateRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.CertificateRequest, err error) {
|
||||
result = &v1alpha2.CertificateRequest{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("certificaterequests").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
|
@ -1,104 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
rest "k8s.io/client-go/rest"
|
||||
"knative.dev/serving/pkg/client/certmanager/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
type CertmanagerV1alpha2Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
CertificatesGetter
|
||||
CertificateRequestsGetter
|
||||
ClusterIssuersGetter
|
||||
IssuersGetter
|
||||
}
|
||||
|
||||
// CertmanagerV1alpha2Client is used to interact with features provided by the cert-manager.io group.
|
||||
type CertmanagerV1alpha2Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *CertmanagerV1alpha2Client) Certificates(namespace string) CertificateInterface {
|
||||
return newCertificates(c, namespace)
|
||||
}
|
||||
|
||||
func (c *CertmanagerV1alpha2Client) CertificateRequests(namespace string) CertificateRequestInterface {
|
||||
return newCertificateRequests(c, namespace)
|
||||
}
|
||||
|
||||
func (c *CertmanagerV1alpha2Client) ClusterIssuers() ClusterIssuerInterface {
|
||||
return newClusterIssuers(c)
|
||||
}
|
||||
|
||||
func (c *CertmanagerV1alpha2Client) Issuers(namespace string) IssuerInterface {
|
||||
return newIssuers(c, namespace)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new CertmanagerV1alpha2Client for the given config.
|
||||
func NewForConfig(c *rest.Config) (*CertmanagerV1alpha2Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := rest.RESTClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &CertmanagerV1alpha2Client{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new CertmanagerV1alpha2Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *CertmanagerV1alpha2Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return client
|
||||
}
|
||||
|
||||
// New creates a new CertmanagerV1alpha2Client for the given RESTClient.
|
||||
func New(c rest.Interface) *CertmanagerV1alpha2Client {
|
||||
return &CertmanagerV1alpha2Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1alpha2.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *CertmanagerV1alpha2Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.restClient
|
||||
}
|
|
@ -1,180 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
scheme "knative.dev/serving/pkg/client/certmanager/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// ClusterIssuersGetter has a method to return a ClusterIssuerInterface.
|
||||
// A group's client should implement this interface.
|
||||
type ClusterIssuersGetter interface {
|
||||
ClusterIssuers() ClusterIssuerInterface
|
||||
}
|
||||
|
||||
// ClusterIssuerInterface has methods to work with ClusterIssuer resources.
|
||||
type ClusterIssuerInterface interface {
|
||||
Create(*v1alpha2.ClusterIssuer) (*v1alpha2.ClusterIssuer, error)
|
||||
Update(*v1alpha2.ClusterIssuer) (*v1alpha2.ClusterIssuer, error)
|
||||
UpdateStatus(*v1alpha2.ClusterIssuer) (*v1alpha2.ClusterIssuer, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1alpha2.ClusterIssuer, error)
|
||||
List(opts v1.ListOptions) (*v1alpha2.ClusterIssuerList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.ClusterIssuer, err error)
|
||||
ClusterIssuerExpansion
|
||||
}
|
||||
|
||||
// clusterIssuers implements ClusterIssuerInterface
|
||||
type clusterIssuers struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newClusterIssuers returns a ClusterIssuers
|
||||
func newClusterIssuers(c *CertmanagerV1alpha2Client) *clusterIssuers {
|
||||
return &clusterIssuers{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the clusterIssuer, and returns the corresponding clusterIssuer object, and an error if there is any.
|
||||
func (c *clusterIssuers) Get(name string, options v1.GetOptions) (result *v1alpha2.ClusterIssuer, err error) {
|
||||
result = &v1alpha2.ClusterIssuer{}
|
||||
err = c.client.Get().
|
||||
Resource("clusterissuers").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ClusterIssuers that match those selectors.
|
||||
func (c *clusterIssuers) List(opts v1.ListOptions) (result *v1alpha2.ClusterIssuerList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha2.ClusterIssuerList{}
|
||||
err = c.client.Get().
|
||||
Resource("clusterissuers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested clusterIssuers.
|
||||
func (c *clusterIssuers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("clusterissuers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a clusterIssuer and creates it. Returns the server's representation of the clusterIssuer, and an error, if there is any.
|
||||
func (c *clusterIssuers) Create(clusterIssuer *v1alpha2.ClusterIssuer) (result *v1alpha2.ClusterIssuer, err error) {
|
||||
result = &v1alpha2.ClusterIssuer{}
|
||||
err = c.client.Post().
|
||||
Resource("clusterissuers").
|
||||
Body(clusterIssuer).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a clusterIssuer and updates it. Returns the server's representation of the clusterIssuer, and an error, if there is any.
|
||||
func (c *clusterIssuers) Update(clusterIssuer *v1alpha2.ClusterIssuer) (result *v1alpha2.ClusterIssuer, err error) {
|
||||
result = &v1alpha2.ClusterIssuer{}
|
||||
err = c.client.Put().
|
||||
Resource("clusterissuers").
|
||||
Name(clusterIssuer.Name).
|
||||
Body(clusterIssuer).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *clusterIssuers) UpdateStatus(clusterIssuer *v1alpha2.ClusterIssuer) (result *v1alpha2.ClusterIssuer, err error) {
|
||||
result = &v1alpha2.ClusterIssuer{}
|
||||
err = c.client.Put().
|
||||
Resource("clusterissuers").
|
||||
Name(clusterIssuer.Name).
|
||||
SubResource("status").
|
||||
Body(clusterIssuer).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the clusterIssuer and deletes it. Returns an error if one occurs.
|
||||
func (c *clusterIssuers) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("clusterissuers").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *clusterIssuers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("clusterissuers").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched clusterIssuer.
|
||||
func (c *clusterIssuers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.ClusterIssuer, err error) {
|
||||
result = &v1alpha2.ClusterIssuer{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("clusterissuers").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1alpha2
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
|
@ -1,140 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeCertificates implements CertificateInterface
|
||||
type FakeCertificates struct {
|
||||
Fake *FakeCertmanagerV1alpha2
|
||||
ns string
|
||||
}
|
||||
|
||||
var certificatesResource = schema.GroupVersionResource{Group: "cert-manager.io", Version: "v1alpha2", Resource: "certificates"}
|
||||
|
||||
var certificatesKind = schema.GroupVersionKind{Group: "cert-manager.io", Version: "v1alpha2", Kind: "Certificate"}
|
||||
|
||||
// Get takes name of the certificate, and returns the corresponding certificate object, and an error if there is any.
|
||||
func (c *FakeCertificates) Get(name string, options v1.GetOptions) (result *v1alpha2.Certificate, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(certificatesResource, c.ns, name), &v1alpha2.Certificate{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.Certificate), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Certificates that match those selectors.
|
||||
func (c *FakeCertificates) List(opts v1.ListOptions) (result *v1alpha2.CertificateList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(certificatesResource, certificatesKind, c.ns, opts), &v1alpha2.CertificateList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha2.CertificateList{ListMeta: obj.(*v1alpha2.CertificateList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha2.CertificateList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested certificates.
|
||||
func (c *FakeCertificates) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(certificatesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a certificate and creates it. Returns the server's representation of the certificate, and an error, if there is any.
|
||||
func (c *FakeCertificates) Create(certificate *v1alpha2.Certificate) (result *v1alpha2.Certificate, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(certificatesResource, c.ns, certificate), &v1alpha2.Certificate{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.Certificate), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a certificate and updates it. Returns the server's representation of the certificate, and an error, if there is any.
|
||||
func (c *FakeCertificates) Update(certificate *v1alpha2.Certificate) (result *v1alpha2.Certificate, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(certificatesResource, c.ns, certificate), &v1alpha2.Certificate{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.Certificate), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeCertificates) UpdateStatus(certificate *v1alpha2.Certificate) (*v1alpha2.Certificate, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(certificatesResource, "status", c.ns, certificate), &v1alpha2.Certificate{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.Certificate), err
|
||||
}
|
||||
|
||||
// Delete takes name of the certificate and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeCertificates) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(certificatesResource, c.ns, name), &v1alpha2.Certificate{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeCertificates) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(certificatesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha2.CertificateList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched certificate.
|
||||
func (c *FakeCertificates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Certificate, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(certificatesResource, c.ns, name, pt, data, subresources...), &v1alpha2.Certificate{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.Certificate), err
|
||||
}
|
|
@ -1,140 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeCertificateRequests implements CertificateRequestInterface
|
||||
type FakeCertificateRequests struct {
|
||||
Fake *FakeCertmanagerV1alpha2
|
||||
ns string
|
||||
}
|
||||
|
||||
var certificaterequestsResource = schema.GroupVersionResource{Group: "cert-manager.io", Version: "v1alpha2", Resource: "certificaterequests"}
|
||||
|
||||
var certificaterequestsKind = schema.GroupVersionKind{Group: "cert-manager.io", Version: "v1alpha2", Kind: "CertificateRequest"}
|
||||
|
||||
// Get takes name of the certificateRequest, and returns the corresponding certificateRequest object, and an error if there is any.
|
||||
func (c *FakeCertificateRequests) Get(name string, options v1.GetOptions) (result *v1alpha2.CertificateRequest, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(certificaterequestsResource, c.ns, name), &v1alpha2.CertificateRequest{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.CertificateRequest), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of CertificateRequests that match those selectors.
|
||||
func (c *FakeCertificateRequests) List(opts v1.ListOptions) (result *v1alpha2.CertificateRequestList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(certificaterequestsResource, certificaterequestsKind, c.ns, opts), &v1alpha2.CertificateRequestList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha2.CertificateRequestList{ListMeta: obj.(*v1alpha2.CertificateRequestList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha2.CertificateRequestList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested certificateRequests.
|
||||
func (c *FakeCertificateRequests) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(certificaterequestsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a certificateRequest and creates it. Returns the server's representation of the certificateRequest, and an error, if there is any.
|
||||
func (c *FakeCertificateRequests) Create(certificateRequest *v1alpha2.CertificateRequest) (result *v1alpha2.CertificateRequest, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(certificaterequestsResource, c.ns, certificateRequest), &v1alpha2.CertificateRequest{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.CertificateRequest), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a certificateRequest and updates it. Returns the server's representation of the certificateRequest, and an error, if there is any.
|
||||
func (c *FakeCertificateRequests) Update(certificateRequest *v1alpha2.CertificateRequest) (result *v1alpha2.CertificateRequest, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(certificaterequestsResource, c.ns, certificateRequest), &v1alpha2.CertificateRequest{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.CertificateRequest), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeCertificateRequests) UpdateStatus(certificateRequest *v1alpha2.CertificateRequest) (*v1alpha2.CertificateRequest, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(certificaterequestsResource, "status", c.ns, certificateRequest), &v1alpha2.CertificateRequest{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.CertificateRequest), err
|
||||
}
|
||||
|
||||
// Delete takes name of the certificateRequest and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeCertificateRequests) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(certificaterequestsResource, c.ns, name), &v1alpha2.CertificateRequest{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeCertificateRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(certificaterequestsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha2.CertificateRequestList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched certificateRequest.
|
||||
func (c *FakeCertificateRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.CertificateRequest, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(certificaterequestsResource, c.ns, name, pt, data, subresources...), &v1alpha2.CertificateRequest{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.CertificateRequest), err
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
rest "k8s.io/client-go/rest"
|
||||
testing "k8s.io/client-go/testing"
|
||||
v1alpha2 "knative.dev/serving/pkg/client/certmanager/clientset/versioned/typed/certmanager/v1alpha2"
|
||||
)
|
||||
|
||||
type FakeCertmanagerV1alpha2 struct {
|
||||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeCertmanagerV1alpha2) Certificates(namespace string) v1alpha2.CertificateInterface {
|
||||
return &FakeCertificates{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeCertmanagerV1alpha2) CertificateRequests(namespace string) v1alpha2.CertificateRequestInterface {
|
||||
return &FakeCertificateRequests{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeCertmanagerV1alpha2) ClusterIssuers() v1alpha2.ClusterIssuerInterface {
|
||||
return &FakeClusterIssuers{c}
|
||||
}
|
||||
|
||||
func (c *FakeCertmanagerV1alpha2) Issuers(namespace string) v1alpha2.IssuerInterface {
|
||||
return &FakeIssuers{c, namespace}
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeCertmanagerV1alpha2) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
|
@ -1,131 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeClusterIssuers implements ClusterIssuerInterface
|
||||
type FakeClusterIssuers struct {
|
||||
Fake *FakeCertmanagerV1alpha2
|
||||
}
|
||||
|
||||
var clusterissuersResource = schema.GroupVersionResource{Group: "cert-manager.io", Version: "v1alpha2", Resource: "clusterissuers"}
|
||||
|
||||
var clusterissuersKind = schema.GroupVersionKind{Group: "cert-manager.io", Version: "v1alpha2", Kind: "ClusterIssuer"}
|
||||
|
||||
// Get takes name of the clusterIssuer, and returns the corresponding clusterIssuer object, and an error if there is any.
|
||||
func (c *FakeClusterIssuers) Get(name string, options v1.GetOptions) (result *v1alpha2.ClusterIssuer, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(clusterissuersResource, name), &v1alpha2.ClusterIssuer{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.ClusterIssuer), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ClusterIssuers that match those selectors.
|
||||
func (c *FakeClusterIssuers) List(opts v1.ListOptions) (result *v1alpha2.ClusterIssuerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(clusterissuersResource, clusterissuersKind, opts), &v1alpha2.ClusterIssuerList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha2.ClusterIssuerList{ListMeta: obj.(*v1alpha2.ClusterIssuerList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha2.ClusterIssuerList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested clusterIssuers.
|
||||
func (c *FakeClusterIssuers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(clusterissuersResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a clusterIssuer and creates it. Returns the server's representation of the clusterIssuer, and an error, if there is any.
|
||||
func (c *FakeClusterIssuers) Create(clusterIssuer *v1alpha2.ClusterIssuer) (result *v1alpha2.ClusterIssuer, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(clusterissuersResource, clusterIssuer), &v1alpha2.ClusterIssuer{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.ClusterIssuer), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a clusterIssuer and updates it. Returns the server's representation of the clusterIssuer, and an error, if there is any.
|
||||
func (c *FakeClusterIssuers) Update(clusterIssuer *v1alpha2.ClusterIssuer) (result *v1alpha2.ClusterIssuer, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(clusterissuersResource, clusterIssuer), &v1alpha2.ClusterIssuer{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.ClusterIssuer), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeClusterIssuers) UpdateStatus(clusterIssuer *v1alpha2.ClusterIssuer) (*v1alpha2.ClusterIssuer, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(clusterissuersResource, "status", clusterIssuer), &v1alpha2.ClusterIssuer{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.ClusterIssuer), err
|
||||
}
|
||||
|
||||
// Delete takes name of the clusterIssuer and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeClusterIssuers) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(clusterissuersResource, name), &v1alpha2.ClusterIssuer{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeClusterIssuers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(clusterissuersResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha2.ClusterIssuerList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched clusterIssuer.
|
||||
func (c *FakeClusterIssuers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.ClusterIssuer, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(clusterissuersResource, name, pt, data, subresources...), &v1alpha2.ClusterIssuer{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.ClusterIssuer), err
|
||||
}
|
|
@ -1,140 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeIssuers implements IssuerInterface
|
||||
type FakeIssuers struct {
|
||||
Fake *FakeCertmanagerV1alpha2
|
||||
ns string
|
||||
}
|
||||
|
||||
var issuersResource = schema.GroupVersionResource{Group: "cert-manager.io", Version: "v1alpha2", Resource: "issuers"}
|
||||
|
||||
var issuersKind = schema.GroupVersionKind{Group: "cert-manager.io", Version: "v1alpha2", Kind: "Issuer"}
|
||||
|
||||
// Get takes name of the issuer, and returns the corresponding issuer object, and an error if there is any.
|
||||
func (c *FakeIssuers) Get(name string, options v1.GetOptions) (result *v1alpha2.Issuer, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(issuersResource, c.ns, name), &v1alpha2.Issuer{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.Issuer), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Issuers that match those selectors.
|
||||
func (c *FakeIssuers) List(opts v1.ListOptions) (result *v1alpha2.IssuerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(issuersResource, issuersKind, c.ns, opts), &v1alpha2.IssuerList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha2.IssuerList{ListMeta: obj.(*v1alpha2.IssuerList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha2.IssuerList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested issuers.
|
||||
func (c *FakeIssuers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(issuersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a issuer and creates it. Returns the server's representation of the issuer, and an error, if there is any.
|
||||
func (c *FakeIssuers) Create(issuer *v1alpha2.Issuer) (result *v1alpha2.Issuer, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(issuersResource, c.ns, issuer), &v1alpha2.Issuer{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.Issuer), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a issuer and updates it. Returns the server's representation of the issuer, and an error, if there is any.
|
||||
func (c *FakeIssuers) Update(issuer *v1alpha2.Issuer) (result *v1alpha2.Issuer, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(issuersResource, c.ns, issuer), &v1alpha2.Issuer{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.Issuer), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeIssuers) UpdateStatus(issuer *v1alpha2.Issuer) (*v1alpha2.Issuer, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(issuersResource, "status", c.ns, issuer), &v1alpha2.Issuer{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.Issuer), err
|
||||
}
|
||||
|
||||
// Delete takes name of the issuer and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeIssuers) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(issuersResource, c.ns, name), &v1alpha2.Issuer{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeIssuers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(issuersResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha2.IssuerList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched issuer.
|
||||
func (c *FakeIssuers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Issuer, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(issuersResource, c.ns, name, pt, data, subresources...), &v1alpha2.Issuer{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.Issuer), err
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
type CertificateExpansion interface{}
|
||||
|
||||
type CertificateRequestExpansion interface{}
|
||||
|
||||
type ClusterIssuerExpansion interface{}
|
||||
|
||||
type IssuerExpansion interface{}
|
|
@ -1,191 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
scheme "knative.dev/serving/pkg/client/certmanager/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// IssuersGetter has a method to return a IssuerInterface.
|
||||
// A group's client should implement this interface.
|
||||
type IssuersGetter interface {
|
||||
Issuers(namespace string) IssuerInterface
|
||||
}
|
||||
|
||||
// IssuerInterface has methods to work with Issuer resources.
|
||||
type IssuerInterface interface {
|
||||
Create(*v1alpha2.Issuer) (*v1alpha2.Issuer, error)
|
||||
Update(*v1alpha2.Issuer) (*v1alpha2.Issuer, error)
|
||||
UpdateStatus(*v1alpha2.Issuer) (*v1alpha2.Issuer, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1alpha2.Issuer, error)
|
||||
List(opts v1.ListOptions) (*v1alpha2.IssuerList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Issuer, err error)
|
||||
IssuerExpansion
|
||||
}
|
||||
|
||||
// issuers implements IssuerInterface
|
||||
type issuers struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newIssuers returns a Issuers
|
||||
func newIssuers(c *CertmanagerV1alpha2Client, namespace string) *issuers {
|
||||
return &issuers{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the issuer, and returns the corresponding issuer object, and an error if there is any.
|
||||
func (c *issuers) Get(name string, options v1.GetOptions) (result *v1alpha2.Issuer, err error) {
|
||||
result = &v1alpha2.Issuer{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("issuers").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Issuers that match those selectors.
|
||||
func (c *issuers) List(opts v1.ListOptions) (result *v1alpha2.IssuerList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha2.IssuerList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("issuers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested issuers.
|
||||
func (c *issuers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("issuers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a issuer and creates it. Returns the server's representation of the issuer, and an error, if there is any.
|
||||
func (c *issuers) Create(issuer *v1alpha2.Issuer) (result *v1alpha2.Issuer, err error) {
|
||||
result = &v1alpha2.Issuer{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("issuers").
|
||||
Body(issuer).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a issuer and updates it. Returns the server's representation of the issuer, and an error, if there is any.
|
||||
func (c *issuers) Update(issuer *v1alpha2.Issuer) (result *v1alpha2.Issuer, err error) {
|
||||
result = &v1alpha2.Issuer{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("issuers").
|
||||
Name(issuer.Name).
|
||||
Body(issuer).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *issuers) UpdateStatus(issuer *v1alpha2.Issuer) (result *v1alpha2.Issuer, err error) {
|
||||
result = &v1alpha2.Issuer{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("issuers").
|
||||
Name(issuer.Name).
|
||||
SubResource("status").
|
||||
Body(issuer).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the issuer and deletes it. Returns an error if one occurs.
|
||||
func (c *issuers) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("issuers").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *issuers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("issuers").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched issuer.
|
||||
func (c *issuers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Issuer, err error) {
|
||||
result = &v1alpha2.Issuer{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("issuers").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package acme
|
||||
|
||||
import (
|
||||
v1alpha2 "knative.dev/serving/pkg/client/certmanager/informers/externalversions/acme/v1alpha2"
|
||||
internalinterfaces "knative.dev/serving/pkg/client/certmanager/informers/externalversions/internalinterfaces"
|
||||
)
|
||||
|
||||
// Interface provides access to each of this group's versions.
|
||||
type Interface interface {
|
||||
// V1alpha2 provides access to shared informers for resources in V1alpha2.
|
||||
V1alpha2() v1alpha2.Interface
|
||||
}
|
||||
|
||||
type group struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
namespace string
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// New returns a new Interface.
|
||||
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// V1alpha2 returns a new v1alpha2.Interface.
|
||||
func (g *group) V1alpha2() v1alpha2.Interface {
|
||||
return v1alpha2.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
acmev1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
versioned "knative.dev/serving/pkg/client/certmanager/clientset/versioned"
|
||||
internalinterfaces "knative.dev/serving/pkg/client/certmanager/informers/externalversions/internalinterfaces"
|
||||
v1alpha2 "knative.dev/serving/pkg/client/certmanager/listers/acme/v1alpha2"
|
||||
)
|
||||
|
||||
// ChallengeInformer provides access to a shared informer and lister for
|
||||
// Challenges.
|
||||
type ChallengeInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha2.ChallengeLister
|
||||
}
|
||||
|
||||
type challengeInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewChallengeInformer constructs a new informer for Challenge type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewChallengeInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredChallengeInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredChallengeInformer constructs a new informer for Challenge type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredChallengeInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AcmeV1alpha2().Challenges(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AcmeV1alpha2().Challenges(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&acmev1alpha2.Challenge{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *challengeInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredChallengeInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *challengeInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&acmev1alpha2.Challenge{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *challengeInformer) Lister() v1alpha2.ChallengeLister {
|
||||
return v1alpha2.NewChallengeLister(f.Informer().GetIndexer())
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
internalinterfaces "knative.dev/serving/pkg/client/certmanager/informers/externalversions/internalinterfaces"
|
||||
)
|
||||
|
||||
// Interface provides access to all the informers in this group version.
|
||||
type Interface interface {
|
||||
// Challenges returns a ChallengeInformer.
|
||||
Challenges() ChallengeInformer
|
||||
// Orders returns a OrderInformer.
|
||||
Orders() OrderInformer
|
||||
}
|
||||
|
||||
type version struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
namespace string
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// New returns a new Interface.
|
||||
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// Challenges returns a ChallengeInformer.
|
||||
func (v *version) Challenges() ChallengeInformer {
|
||||
return &challengeInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// Orders returns a OrderInformer.
|
||||
func (v *version) Orders() OrderInformer {
|
||||
return &orderInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
acmev1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
versioned "knative.dev/serving/pkg/client/certmanager/clientset/versioned"
|
||||
internalinterfaces "knative.dev/serving/pkg/client/certmanager/informers/externalversions/internalinterfaces"
|
||||
v1alpha2 "knative.dev/serving/pkg/client/certmanager/listers/acme/v1alpha2"
|
||||
)
|
||||
|
||||
// OrderInformer provides access to a shared informer and lister for
|
||||
// Orders.
|
||||
type OrderInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha2.OrderLister
|
||||
}
|
||||
|
||||
type orderInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewOrderInformer constructs a new informer for Order type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewOrderInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredOrderInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredOrderInformer constructs a new informer for Order type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredOrderInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AcmeV1alpha2().Orders(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AcmeV1alpha2().Orders(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&acmev1alpha2.Order{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *orderInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredOrderInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *orderInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&acmev1alpha2.Order{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *orderInformer) Lister() v1alpha2.OrderLister {
|
||||
return v1alpha2.NewOrderLister(f.Informer().GetIndexer())
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package certmanager
|
||||
|
||||
import (
|
||||
v1alpha2 "knative.dev/serving/pkg/client/certmanager/informers/externalversions/certmanager/v1alpha2"
|
||||
internalinterfaces "knative.dev/serving/pkg/client/certmanager/informers/externalversions/internalinterfaces"
|
||||
)
|
||||
|
||||
// Interface provides access to each of this group's versions.
|
||||
type Interface interface {
|
||||
// V1alpha2 provides access to shared informers for resources in V1alpha2.
|
||||
V1alpha2() v1alpha2.Interface
|
||||
}
|
||||
|
||||
type group struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
namespace string
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// New returns a new Interface.
|
||||
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// V1alpha2 returns a new v1alpha2.Interface.
|
||||
func (g *group) V1alpha2() v1alpha2.Interface {
|
||||
return v1alpha2.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
certmanagerv1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
versioned "knative.dev/serving/pkg/client/certmanager/clientset/versioned"
|
||||
internalinterfaces "knative.dev/serving/pkg/client/certmanager/informers/externalversions/internalinterfaces"
|
||||
v1alpha2 "knative.dev/serving/pkg/client/certmanager/listers/certmanager/v1alpha2"
|
||||
)
|
||||
|
||||
// CertificateInformer provides access to a shared informer and lister for
|
||||
// Certificates.
|
||||
type CertificateInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha2.CertificateLister
|
||||
}
|
||||
|
||||
type certificateInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewCertificateInformer constructs a new informer for Certificate type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewCertificateInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredCertificateInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredCertificateInformer constructs a new informer for Certificate type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredCertificateInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CertmanagerV1alpha2().Certificates(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CertmanagerV1alpha2().Certificates(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&certmanagerv1alpha2.Certificate{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *certificateInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredCertificateInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *certificateInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&certmanagerv1alpha2.Certificate{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *certificateInformer) Lister() v1alpha2.CertificateLister {
|
||||
return v1alpha2.NewCertificateLister(f.Informer().GetIndexer())
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
certmanagerv1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
versioned "knative.dev/serving/pkg/client/certmanager/clientset/versioned"
|
||||
internalinterfaces "knative.dev/serving/pkg/client/certmanager/informers/externalversions/internalinterfaces"
|
||||
v1alpha2 "knative.dev/serving/pkg/client/certmanager/listers/certmanager/v1alpha2"
|
||||
)
|
||||
|
||||
// CertificateRequestInformer provides access to a shared informer and lister for
|
||||
// CertificateRequests.
|
||||
type CertificateRequestInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha2.CertificateRequestLister
|
||||
}
|
||||
|
||||
type certificateRequestInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewCertificateRequestInformer constructs a new informer for CertificateRequest type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewCertificateRequestInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredCertificateRequestInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredCertificateRequestInformer constructs a new informer for CertificateRequest type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredCertificateRequestInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CertmanagerV1alpha2().CertificateRequests(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CertmanagerV1alpha2().CertificateRequests(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&certmanagerv1alpha2.CertificateRequest{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *certificateRequestInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredCertificateRequestInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *certificateRequestInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&certmanagerv1alpha2.CertificateRequest{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *certificateRequestInformer) Lister() v1alpha2.CertificateRequestLister {
|
||||
return v1alpha2.NewCertificateRequestLister(f.Informer().GetIndexer())
|
||||
}
|
|
@ -1,88 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
certmanagerv1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
versioned "knative.dev/serving/pkg/client/certmanager/clientset/versioned"
|
||||
internalinterfaces "knative.dev/serving/pkg/client/certmanager/informers/externalversions/internalinterfaces"
|
||||
v1alpha2 "knative.dev/serving/pkg/client/certmanager/listers/certmanager/v1alpha2"
|
||||
)
|
||||
|
||||
// ClusterIssuerInformer provides access to a shared informer and lister for
|
||||
// ClusterIssuers.
|
||||
type ClusterIssuerInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha2.ClusterIssuerLister
|
||||
}
|
||||
|
||||
type clusterIssuerInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewClusterIssuerInformer constructs a new informer for ClusterIssuer type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewClusterIssuerInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredClusterIssuerInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredClusterIssuerInformer constructs a new informer for ClusterIssuer type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredClusterIssuerInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CertmanagerV1alpha2().ClusterIssuers().List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CertmanagerV1alpha2().ClusterIssuers().Watch(options)
|
||||
},
|
||||
},
|
||||
&certmanagerv1alpha2.ClusterIssuer{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *clusterIssuerInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredClusterIssuerInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *clusterIssuerInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&certmanagerv1alpha2.ClusterIssuer{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *clusterIssuerInformer) Lister() v1alpha2.ClusterIssuerLister {
|
||||
return v1alpha2.NewClusterIssuerLister(f.Informer().GetIndexer())
|
||||
}
|
|
@ -1,66 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
internalinterfaces "knative.dev/serving/pkg/client/certmanager/informers/externalversions/internalinterfaces"
|
||||
)
|
||||
|
||||
// Interface provides access to all the informers in this group version.
|
||||
type Interface interface {
|
||||
// Certificates returns a CertificateInformer.
|
||||
Certificates() CertificateInformer
|
||||
// CertificateRequests returns a CertificateRequestInformer.
|
||||
CertificateRequests() CertificateRequestInformer
|
||||
// ClusterIssuers returns a ClusterIssuerInformer.
|
||||
ClusterIssuers() ClusterIssuerInformer
|
||||
// Issuers returns a IssuerInformer.
|
||||
Issuers() IssuerInformer
|
||||
}
|
||||
|
||||
type version struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
namespace string
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// New returns a new Interface.
|
||||
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// Certificates returns a CertificateInformer.
|
||||
func (v *version) Certificates() CertificateInformer {
|
||||
return &certificateInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// CertificateRequests returns a CertificateRequestInformer.
|
||||
func (v *version) CertificateRequests() CertificateRequestInformer {
|
||||
return &certificateRequestInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// ClusterIssuers returns a ClusterIssuerInformer.
|
||||
func (v *version) ClusterIssuers() ClusterIssuerInformer {
|
||||
return &clusterIssuerInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// Issuers returns a IssuerInformer.
|
||||
func (v *version) Issuers() IssuerInformer {
|
||||
return &issuerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
certmanagerv1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
versioned "knative.dev/serving/pkg/client/certmanager/clientset/versioned"
|
||||
internalinterfaces "knative.dev/serving/pkg/client/certmanager/informers/externalversions/internalinterfaces"
|
||||
v1alpha2 "knative.dev/serving/pkg/client/certmanager/listers/certmanager/v1alpha2"
|
||||
)
|
||||
|
||||
// IssuerInformer provides access to a shared informer and lister for
|
||||
// Issuers.
|
||||
type IssuerInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha2.IssuerLister
|
||||
}
|
||||
|
||||
type issuerInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewIssuerInformer constructs a new informer for Issuer type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewIssuerInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredIssuerInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredIssuerInformer constructs a new informer for Issuer type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredIssuerInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CertmanagerV1alpha2().Issuers(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CertmanagerV1alpha2().Issuers(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&certmanagerv1alpha2.Issuer{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *issuerInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredIssuerInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *issuerInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&certmanagerv1alpha2.Issuer{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *issuerInformer) Lister() v1alpha2.IssuerLister {
|
||||
return v1alpha2.NewIssuerLister(f.Informer().GetIndexer())
|
||||
}
|
|
@ -1,186 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package externalversions
|
||||
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
time "time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
versioned "knative.dev/serving/pkg/client/certmanager/clientset/versioned"
|
||||
acme "knative.dev/serving/pkg/client/certmanager/informers/externalversions/acme"
|
||||
certmanager "knative.dev/serving/pkg/client/certmanager/informers/externalversions/certmanager"
|
||||
internalinterfaces "knative.dev/serving/pkg/client/certmanager/informers/externalversions/internalinterfaces"
|
||||
)
|
||||
|
||||
// SharedInformerOption defines the functional option type for SharedInformerFactory.
|
||||
type SharedInformerOption func(*sharedInformerFactory) *sharedInformerFactory
|
||||
|
||||
type sharedInformerFactory struct {
|
||||
client versioned.Interface
|
||||
namespace string
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
lock sync.Mutex
|
||||
defaultResync time.Duration
|
||||
customResync map[reflect.Type]time.Duration
|
||||
|
||||
informers map[reflect.Type]cache.SharedIndexInformer
|
||||
// startedInformers is used for tracking which informers have been started.
|
||||
// This allows Start() to be called multiple times safely.
|
||||
startedInformers map[reflect.Type]bool
|
||||
}
|
||||
|
||||
// WithCustomResyncConfig sets a custom resync period for the specified informer types.
|
||||
func WithCustomResyncConfig(resyncConfig map[v1.Object]time.Duration) SharedInformerOption {
|
||||
return func(factory *sharedInformerFactory) *sharedInformerFactory {
|
||||
for k, v := range resyncConfig {
|
||||
factory.customResync[reflect.TypeOf(k)] = v
|
||||
}
|
||||
return factory
|
||||
}
|
||||
}
|
||||
|
||||
// WithTweakListOptions sets a custom filter on all listers of the configured SharedInformerFactory.
|
||||
func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerOption {
|
||||
return func(factory *sharedInformerFactory) *sharedInformerFactory {
|
||||
factory.tweakListOptions = tweakListOptions
|
||||
return factory
|
||||
}
|
||||
}
|
||||
|
||||
// WithNamespace limits the SharedInformerFactory to the specified namespace.
|
||||
func WithNamespace(namespace string) SharedInformerOption {
|
||||
return func(factory *sharedInformerFactory) *sharedInformerFactory {
|
||||
factory.namespace = namespace
|
||||
return factory
|
||||
}
|
||||
}
|
||||
|
||||
// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces.
|
||||
func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory {
|
||||
return NewSharedInformerFactoryWithOptions(client, defaultResync)
|
||||
}
|
||||
|
||||
// NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory.
|
||||
// Listers obtained via this SharedInformerFactory will be subject to the same filters
|
||||
// as specified here.
|
||||
// Deprecated: Please use NewSharedInformerFactoryWithOptions instead
|
||||
func NewFilteredSharedInformerFactory(client versioned.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory {
|
||||
return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions))
|
||||
}
|
||||
|
||||
// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options.
|
||||
func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory {
|
||||
factory := &sharedInformerFactory{
|
||||
client: client,
|
||||
namespace: v1.NamespaceAll,
|
||||
defaultResync: defaultResync,
|
||||
informers: make(map[reflect.Type]cache.SharedIndexInformer),
|
||||
startedInformers: make(map[reflect.Type]bool),
|
||||
customResync: make(map[reflect.Type]time.Duration),
|
||||
}
|
||||
|
||||
// Apply all options
|
||||
for _, opt := range options {
|
||||
factory = opt(factory)
|
||||
}
|
||||
|
||||
return factory
|
||||
}
|
||||
|
||||
// Start initializes all requested informers.
|
||||
func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) {
|
||||
f.lock.Lock()
|
||||
defer f.lock.Unlock()
|
||||
|
||||
for informerType, informer := range f.informers {
|
||||
if !f.startedInformers[informerType] {
|
||||
go informer.Run(stopCh)
|
||||
f.startedInformers[informerType] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// WaitForCacheSync waits for all started informers' cache were synced.
|
||||
func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool {
|
||||
informers := func() map[reflect.Type]cache.SharedIndexInformer {
|
||||
f.lock.Lock()
|
||||
defer f.lock.Unlock()
|
||||
|
||||
informers := map[reflect.Type]cache.SharedIndexInformer{}
|
||||
for informerType, informer := range f.informers {
|
||||
if f.startedInformers[informerType] {
|
||||
informers[informerType] = informer
|
||||
}
|
||||
}
|
||||
return informers
|
||||
}()
|
||||
|
||||
res := map[reflect.Type]bool{}
|
||||
for informType, informer := range informers {
|
||||
res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
// InternalInformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// client.
|
||||
func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer {
|
||||
f.lock.Lock()
|
||||
defer f.lock.Unlock()
|
||||
|
||||
informerType := reflect.TypeOf(obj)
|
||||
informer, exists := f.informers[informerType]
|
||||
if exists {
|
||||
return informer
|
||||
}
|
||||
|
||||
resyncPeriod, exists := f.customResync[informerType]
|
||||
if !exists {
|
||||
resyncPeriod = f.defaultResync
|
||||
}
|
||||
|
||||
informer = newFunc(f.client, resyncPeriod)
|
||||
f.informers[informerType] = informer
|
||||
|
||||
return informer
|
||||
}
|
||||
|
||||
// SharedInformerFactory provides shared informers for resources in all known
|
||||
// API group versions.
|
||||
type SharedInformerFactory interface {
|
||||
internalinterfaces.SharedInformerFactory
|
||||
ForResource(resource schema.GroupVersionResource) (GenericInformer, error)
|
||||
WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool
|
||||
|
||||
Acme() acme.Interface
|
||||
Certmanager() certmanager.Interface
|
||||
}
|
||||
|
||||
func (f *sharedInformerFactory) Acme() acme.Interface {
|
||||
return acme.New(f, f.namespace, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *sharedInformerFactory) Certmanager() certmanager.Interface {
|
||||
return certmanager.New(f, f.namespace, f.tweakListOptions)
|
||||
}
|
|
@ -1,75 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package externalversions
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
|
||||
certmanagerv1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// GenericInformer is type of SharedIndexInformer which will locate and delegate to other
|
||||
// sharedInformers based on type
|
||||
type GenericInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() cache.GenericLister
|
||||
}
|
||||
|
||||
type genericInformer struct {
|
||||
informer cache.SharedIndexInformer
|
||||
resource schema.GroupResource
|
||||
}
|
||||
|
||||
// Informer returns the SharedIndexInformer.
|
||||
func (f *genericInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.informer
|
||||
}
|
||||
|
||||
// Lister returns the GenericLister.
|
||||
func (f *genericInformer) Lister() cache.GenericLister {
|
||||
return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource)
|
||||
}
|
||||
|
||||
// ForResource gives generic access to a shared informer of the matching type
|
||||
// TODO extend this to unknown resources with a client pool
|
||||
func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
|
||||
switch resource {
|
||||
// Group=acme.cert-manager.io, Version=v1alpha2
|
||||
case v1alpha2.SchemeGroupVersion.WithResource("challenges"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Acme().V1alpha2().Challenges().Informer()}, nil
|
||||
case v1alpha2.SchemeGroupVersion.WithResource("orders"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Acme().V1alpha2().Orders().Informer()}, nil
|
||||
|
||||
// Group=cert-manager.io, Version=v1alpha2
|
||||
case certmanagerv1alpha2.SchemeGroupVersion.WithResource("certificates"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Certmanager().V1alpha2().Certificates().Informer()}, nil
|
||||
case certmanagerv1alpha2.SchemeGroupVersion.WithResource("certificaterequests"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Certmanager().V1alpha2().CertificateRequests().Informer()}, nil
|
||||
case certmanagerv1alpha2.SchemeGroupVersion.WithResource("clusterissuers"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Certmanager().V1alpha2().ClusterIssuers().Informer()}, nil
|
||||
case certmanagerv1alpha2.SchemeGroupVersion.WithResource("issuers"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Certmanager().V1alpha2().Issuers().Informer()}, nil
|
||||
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("no informer found for %v", resource)
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package internalinterfaces
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
versioned "knative.dev/serving/pkg/client/certmanager/clientset/versioned"
|
||||
)
|
||||
|
||||
// NewInformerFunc takes versioned.Interface and time.Duration to return a SharedIndexInformer.
|
||||
type NewInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexInformer
|
||||
|
||||
// SharedInformerFactory a small interface to allow for adding an informer without an import cycle
|
||||
type SharedInformerFactory interface {
|
||||
Start(stopCh <-chan struct{})
|
||||
InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer
|
||||
}
|
||||
|
||||
// TweakListOptionsFunc is a function that transforms a v1.ListOptions.
|
||||
type TweakListOptionsFunc func(*v1.ListOptions)
|
|
@ -1,49 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
rest "k8s.io/client-go/rest"
|
||||
injection "knative.dev/pkg/injection"
|
||||
logging "knative.dev/pkg/logging"
|
||||
versioned "knative.dev/serving/pkg/client/certmanager/clientset/versioned"
|
||||
)
|
||||
|
||||
func init() {
|
||||
injection.Default.RegisterClient(withClient)
|
||||
}
|
||||
|
||||
// Key is used as the key for associating information with a context.Context.
|
||||
type Key struct{}
|
||||
|
||||
func withClient(ctx context.Context, cfg *rest.Config) context.Context {
|
||||
return context.WithValue(ctx, Key{}, versioned.NewForConfigOrDie(cfg))
|
||||
}
|
||||
|
||||
// Get extracts the versioned.Interface client from the context.
|
||||
func Get(ctx context.Context) versioned.Interface {
|
||||
untyped := ctx.Value(Key{})
|
||||
if untyped == nil {
|
||||
logging.FromContext(ctx).Panic(
|
||||
"Unable to fetch knative.dev/serving/pkg/client/certmanager/clientset/versioned.Interface from context.")
|
||||
}
|
||||
return untyped.(versioned.Interface)
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
rest "k8s.io/client-go/rest"
|
||||
injection "knative.dev/pkg/injection"
|
||||
logging "knative.dev/pkg/logging"
|
||||
fake "knative.dev/serving/pkg/client/certmanager/clientset/versioned/fake"
|
||||
client "knative.dev/serving/pkg/client/certmanager/injection/client"
|
||||
)
|
||||
|
||||
func init() {
|
||||
injection.Fake.RegisterClient(withClient)
|
||||
}
|
||||
|
||||
func withClient(ctx context.Context, cfg *rest.Config) context.Context {
|
||||
ctx, _ = With(ctx)
|
||||
return ctx
|
||||
}
|
||||
|
||||
func With(ctx context.Context, objects ...runtime.Object) (context.Context, *fake.Clientset) {
|
||||
cs := fake.NewSimpleClientset(objects...)
|
||||
return context.WithValue(ctx, client.Key{}, cs), cs
|
||||
}
|
||||
|
||||
// Get extracts the Kubernetes client from the context.
|
||||
func Get(ctx context.Context) *fake.Clientset {
|
||||
untyped := ctx.Value(client.Key{})
|
||||
if untyped == nil {
|
||||
logging.FromContext(ctx).Panic(
|
||||
"Unable to fetch knative.dev/serving/pkg/client/certmanager/clientset/versioned/fake.Clientset from context.")
|
||||
}
|
||||
return untyped.(*fake.Clientset)
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package challenge
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
logging "knative.dev/pkg/logging"
|
||||
v1alpha2 "knative.dev/serving/pkg/client/certmanager/informers/externalversions/acme/v1alpha2"
|
||||
factory "knative.dev/serving/pkg/client/certmanager/injection/informers/factory"
|
||||
)
|
||||
|
||||
func init() {
|
||||
injection.Default.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
// Key is used for associating the Informer inside the context.Context.
|
||||
type Key struct{}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := factory.Get(ctx)
|
||||
inf := f.Acme().V1alpha2().Challenges()
|
||||
return context.WithValue(ctx, Key{}, inf), inf.Informer()
|
||||
}
|
||||
|
||||
// Get extracts the typed informer from the context.
|
||||
func Get(ctx context.Context) v1alpha2.ChallengeInformer {
|
||||
untyped := ctx.Value(Key{})
|
||||
if untyped == nil {
|
||||
logging.FromContext(ctx).Panic(
|
||||
"Unable to fetch knative.dev/serving/pkg/client/certmanager/informers/externalversions/acme/v1alpha2.ChallengeInformer from context.")
|
||||
}
|
||||
return untyped.(v1alpha2.ChallengeInformer)
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
challenge "knative.dev/serving/pkg/client/certmanager/injection/informers/acme/v1alpha2/challenge"
|
||||
fake "knative.dev/serving/pkg/client/certmanager/injection/informers/factory/fake"
|
||||
)
|
||||
|
||||
var Get = challenge.Get
|
||||
|
||||
func init() {
|
||||
injection.Fake.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := fake.Get(ctx)
|
||||
inf := f.Acme().V1alpha2().Challenges()
|
||||
return context.WithValue(ctx, challenge.Key{}, inf), inf.Informer()
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
order "knative.dev/serving/pkg/client/certmanager/injection/informers/acme/v1alpha2/order"
|
||||
fake "knative.dev/serving/pkg/client/certmanager/injection/informers/factory/fake"
|
||||
)
|
||||
|
||||
var Get = order.Get
|
||||
|
||||
func init() {
|
||||
injection.Fake.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := fake.Get(ctx)
|
||||
inf := f.Acme().V1alpha2().Orders()
|
||||
return context.WithValue(ctx, order.Key{}, inf), inf.Informer()
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package order
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
logging "knative.dev/pkg/logging"
|
||||
v1alpha2 "knative.dev/serving/pkg/client/certmanager/informers/externalversions/acme/v1alpha2"
|
||||
factory "knative.dev/serving/pkg/client/certmanager/injection/informers/factory"
|
||||
)
|
||||
|
||||
func init() {
|
||||
injection.Default.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
// Key is used for associating the Informer inside the context.Context.
|
||||
type Key struct{}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := factory.Get(ctx)
|
||||
inf := f.Acme().V1alpha2().Orders()
|
||||
return context.WithValue(ctx, Key{}, inf), inf.Informer()
|
||||
}
|
||||
|
||||
// Get extracts the typed informer from the context.
|
||||
func Get(ctx context.Context) v1alpha2.OrderInformer {
|
||||
untyped := ctx.Value(Key{})
|
||||
if untyped == nil {
|
||||
logging.FromContext(ctx).Panic(
|
||||
"Unable to fetch knative.dev/serving/pkg/client/certmanager/informers/externalversions/acme/v1alpha2.OrderInformer from context.")
|
||||
}
|
||||
return untyped.(v1alpha2.OrderInformer)
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package certificate
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
logging "knative.dev/pkg/logging"
|
||||
v1alpha2 "knative.dev/serving/pkg/client/certmanager/informers/externalversions/certmanager/v1alpha2"
|
||||
factory "knative.dev/serving/pkg/client/certmanager/injection/informers/factory"
|
||||
)
|
||||
|
||||
func init() {
|
||||
injection.Default.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
// Key is used for associating the Informer inside the context.Context.
|
||||
type Key struct{}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := factory.Get(ctx)
|
||||
inf := f.Certmanager().V1alpha2().Certificates()
|
||||
return context.WithValue(ctx, Key{}, inf), inf.Informer()
|
||||
}
|
||||
|
||||
// Get extracts the typed informer from the context.
|
||||
func Get(ctx context.Context) v1alpha2.CertificateInformer {
|
||||
untyped := ctx.Value(Key{})
|
||||
if untyped == nil {
|
||||
logging.FromContext(ctx).Panic(
|
||||
"Unable to fetch knative.dev/serving/pkg/client/certmanager/informers/externalversions/certmanager/v1alpha2.CertificateInformer from context.")
|
||||
}
|
||||
return untyped.(v1alpha2.CertificateInformer)
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
certificate "knative.dev/serving/pkg/client/certmanager/injection/informers/certmanager/v1alpha2/certificate"
|
||||
fake "knative.dev/serving/pkg/client/certmanager/injection/informers/factory/fake"
|
||||
)
|
||||
|
||||
var Get = certificate.Get
|
||||
|
||||
func init() {
|
||||
injection.Fake.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := fake.Get(ctx)
|
||||
inf := f.Certmanager().V1alpha2().Certificates()
|
||||
return context.WithValue(ctx, certificate.Key{}, inf), inf.Informer()
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package certificaterequest
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
logging "knative.dev/pkg/logging"
|
||||
v1alpha2 "knative.dev/serving/pkg/client/certmanager/informers/externalversions/certmanager/v1alpha2"
|
||||
factory "knative.dev/serving/pkg/client/certmanager/injection/informers/factory"
|
||||
)
|
||||
|
||||
func init() {
|
||||
injection.Default.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
// Key is used for associating the Informer inside the context.Context.
|
||||
type Key struct{}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := factory.Get(ctx)
|
||||
inf := f.Certmanager().V1alpha2().CertificateRequests()
|
||||
return context.WithValue(ctx, Key{}, inf), inf.Informer()
|
||||
}
|
||||
|
||||
// Get extracts the typed informer from the context.
|
||||
func Get(ctx context.Context) v1alpha2.CertificateRequestInformer {
|
||||
untyped := ctx.Value(Key{})
|
||||
if untyped == nil {
|
||||
logging.FromContext(ctx).Panic(
|
||||
"Unable to fetch knative.dev/serving/pkg/client/certmanager/informers/externalversions/certmanager/v1alpha2.CertificateRequestInformer from context.")
|
||||
}
|
||||
return untyped.(v1alpha2.CertificateRequestInformer)
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
certificaterequest "knative.dev/serving/pkg/client/certmanager/injection/informers/certmanager/v1alpha2/certificaterequest"
|
||||
fake "knative.dev/serving/pkg/client/certmanager/injection/informers/factory/fake"
|
||||
)
|
||||
|
||||
var Get = certificaterequest.Get
|
||||
|
||||
func init() {
|
||||
injection.Fake.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := fake.Get(ctx)
|
||||
inf := f.Certmanager().V1alpha2().CertificateRequests()
|
||||
return context.WithValue(ctx, certificaterequest.Key{}, inf), inf.Informer()
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package clusterissuer
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
logging "knative.dev/pkg/logging"
|
||||
v1alpha2 "knative.dev/serving/pkg/client/certmanager/informers/externalversions/certmanager/v1alpha2"
|
||||
factory "knative.dev/serving/pkg/client/certmanager/injection/informers/factory"
|
||||
)
|
||||
|
||||
func init() {
|
||||
injection.Default.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
// Key is used for associating the Informer inside the context.Context.
|
||||
type Key struct{}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := factory.Get(ctx)
|
||||
inf := f.Certmanager().V1alpha2().ClusterIssuers()
|
||||
return context.WithValue(ctx, Key{}, inf), inf.Informer()
|
||||
}
|
||||
|
||||
// Get extracts the typed informer from the context.
|
||||
func Get(ctx context.Context) v1alpha2.ClusterIssuerInformer {
|
||||
untyped := ctx.Value(Key{})
|
||||
if untyped == nil {
|
||||
logging.FromContext(ctx).Panic(
|
||||
"Unable to fetch knative.dev/serving/pkg/client/certmanager/informers/externalversions/certmanager/v1alpha2.ClusterIssuerInformer from context.")
|
||||
}
|
||||
return untyped.(v1alpha2.ClusterIssuerInformer)
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
clusterissuer "knative.dev/serving/pkg/client/certmanager/injection/informers/certmanager/v1alpha2/clusterissuer"
|
||||
fake "knative.dev/serving/pkg/client/certmanager/injection/informers/factory/fake"
|
||||
)
|
||||
|
||||
var Get = clusterissuer.Get
|
||||
|
||||
func init() {
|
||||
injection.Fake.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := fake.Get(ctx)
|
||||
inf := f.Certmanager().V1alpha2().ClusterIssuers()
|
||||
return context.WithValue(ctx, clusterissuer.Key{}, inf), inf.Informer()
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
issuer "knative.dev/serving/pkg/client/certmanager/injection/informers/certmanager/v1alpha2/issuer"
|
||||
fake "knative.dev/serving/pkg/client/certmanager/injection/informers/factory/fake"
|
||||
)
|
||||
|
||||
var Get = issuer.Get
|
||||
|
||||
func init() {
|
||||
injection.Fake.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := fake.Get(ctx)
|
||||
inf := f.Certmanager().V1alpha2().Issuers()
|
||||
return context.WithValue(ctx, issuer.Key{}, inf), inf.Informer()
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package issuer
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
logging "knative.dev/pkg/logging"
|
||||
v1alpha2 "knative.dev/serving/pkg/client/certmanager/informers/externalversions/certmanager/v1alpha2"
|
||||
factory "knative.dev/serving/pkg/client/certmanager/injection/informers/factory"
|
||||
)
|
||||
|
||||
func init() {
|
||||
injection.Default.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
// Key is used for associating the Informer inside the context.Context.
|
||||
type Key struct{}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := factory.Get(ctx)
|
||||
inf := f.Certmanager().V1alpha2().Issuers()
|
||||
return context.WithValue(ctx, Key{}, inf), inf.Informer()
|
||||
}
|
||||
|
||||
// Get extracts the typed informer from the context.
|
||||
func Get(ctx context.Context) v1alpha2.IssuerInformer {
|
||||
untyped := ctx.Value(Key{})
|
||||
if untyped == nil {
|
||||
logging.FromContext(ctx).Panic(
|
||||
"Unable to fetch knative.dev/serving/pkg/client/certmanager/informers/externalversions/certmanager/v1alpha2.IssuerInformer from context.")
|
||||
}
|
||||
return untyped.(v1alpha2.IssuerInformer)
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package factory
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
logging "knative.dev/pkg/logging"
|
||||
externalversions "knative.dev/serving/pkg/client/certmanager/informers/externalversions"
|
||||
client "knative.dev/serving/pkg/client/certmanager/injection/client"
|
||||
)
|
||||
|
||||
func init() {
|
||||
injection.Default.RegisterInformerFactory(withInformerFactory)
|
||||
}
|
||||
|
||||
// Key is used as the key for associating information with a context.Context.
|
||||
type Key struct{}
|
||||
|
||||
func withInformerFactory(ctx context.Context) context.Context {
|
||||
c := client.Get(ctx)
|
||||
opts := make([]externalversions.SharedInformerOption, 0, 1)
|
||||
if injection.HasNamespaceScope(ctx) {
|
||||
opts = append(opts, externalversions.WithNamespace(injection.GetNamespaceScope(ctx)))
|
||||
}
|
||||
return context.WithValue(ctx, Key{},
|
||||
externalversions.NewSharedInformerFactoryWithOptions(c, controller.GetResyncPeriod(ctx), opts...))
|
||||
}
|
||||
|
||||
// Get extracts the InformerFactory from the context.
|
||||
func Get(ctx context.Context) externalversions.SharedInformerFactory {
|
||||
untyped := ctx.Value(Key{})
|
||||
if untyped == nil {
|
||||
logging.FromContext(ctx).Panic(
|
||||
"Unable to fetch knative.dev/serving/pkg/client/certmanager/informers/externalversions.SharedInformerFactory from context.")
|
||||
}
|
||||
return untyped.(externalversions.SharedInformerFactory)
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
externalversions "knative.dev/serving/pkg/client/certmanager/informers/externalversions"
|
||||
fake "knative.dev/serving/pkg/client/certmanager/injection/client/fake"
|
||||
factory "knative.dev/serving/pkg/client/certmanager/injection/informers/factory"
|
||||
)
|
||||
|
||||
var Get = factory.Get
|
||||
|
||||
func init() {
|
||||
injection.Fake.RegisterInformerFactory(withInformerFactory)
|
||||
}
|
||||
|
||||
func withInformerFactory(ctx context.Context) context.Context {
|
||||
c := fake.Get(ctx)
|
||||
opts := make([]externalversions.SharedInformerOption, 0, 1)
|
||||
if injection.HasNamespaceScope(ctx) {
|
||||
opts = append(opts, externalversions.WithNamespace(injection.GetNamespaceScope(ctx)))
|
||||
}
|
||||
return context.WithValue(ctx, factory.Key{},
|
||||
externalversions.NewSharedInformerFactoryWithOptions(c, controller.GetResyncPeriod(ctx), opts...))
|
||||
}
|
|
@ -1,94 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// ChallengeLister helps list Challenges.
|
||||
type ChallengeLister interface {
|
||||
// List lists all Challenges in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1alpha2.Challenge, err error)
|
||||
// Challenges returns an object that can list and get Challenges.
|
||||
Challenges(namespace string) ChallengeNamespaceLister
|
||||
ChallengeListerExpansion
|
||||
}
|
||||
|
||||
// challengeLister implements the ChallengeLister interface.
|
||||
type challengeLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewChallengeLister returns a new ChallengeLister.
|
||||
func NewChallengeLister(indexer cache.Indexer) ChallengeLister {
|
||||
return &challengeLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all Challenges in the indexer.
|
||||
func (s *challengeLister) List(selector labels.Selector) (ret []*v1alpha2.Challenge, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha2.Challenge))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Challenges returns an object that can list and get Challenges.
|
||||
func (s *challengeLister) Challenges(namespace string) ChallengeNamespaceLister {
|
||||
return challengeNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// ChallengeNamespaceLister helps list and get Challenges.
|
||||
type ChallengeNamespaceLister interface {
|
||||
// List lists all Challenges in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1alpha2.Challenge, err error)
|
||||
// Get retrieves the Challenge from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1alpha2.Challenge, error)
|
||||
ChallengeNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// challengeNamespaceLister implements the ChallengeNamespaceLister
|
||||
// interface.
|
||||
type challengeNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all Challenges in the indexer for a given namespace.
|
||||
func (s challengeNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.Challenge, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha2.Challenge))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the Challenge from the indexer for a given namespace and name.
|
||||
func (s challengeNamespaceLister) Get(name string) (*v1alpha2.Challenge, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha2.Resource("challenge"), name)
|
||||
}
|
||||
return obj.(*v1alpha2.Challenge), nil
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
// ChallengeListerExpansion allows custom methods to be added to
|
||||
// ChallengeLister.
|
||||
type ChallengeListerExpansion interface{}
|
||||
|
||||
// ChallengeNamespaceListerExpansion allows custom methods to be added to
|
||||
// ChallengeNamespaceLister.
|
||||
type ChallengeNamespaceListerExpansion interface{}
|
||||
|
||||
// OrderListerExpansion allows custom methods to be added to
|
||||
// OrderLister.
|
||||
type OrderListerExpansion interface{}
|
||||
|
||||
// OrderNamespaceListerExpansion allows custom methods to be added to
|
||||
// OrderNamespaceLister.
|
||||
type OrderNamespaceListerExpansion interface{}
|
|
@ -1,94 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// OrderLister helps list Orders.
|
||||
type OrderLister interface {
|
||||
// List lists all Orders in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1alpha2.Order, err error)
|
||||
// Orders returns an object that can list and get Orders.
|
||||
Orders(namespace string) OrderNamespaceLister
|
||||
OrderListerExpansion
|
||||
}
|
||||
|
||||
// orderLister implements the OrderLister interface.
|
||||
type orderLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewOrderLister returns a new OrderLister.
|
||||
func NewOrderLister(indexer cache.Indexer) OrderLister {
|
||||
return &orderLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all Orders in the indexer.
|
||||
func (s *orderLister) List(selector labels.Selector) (ret []*v1alpha2.Order, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha2.Order))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Orders returns an object that can list and get Orders.
|
||||
func (s *orderLister) Orders(namespace string) OrderNamespaceLister {
|
||||
return orderNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// OrderNamespaceLister helps list and get Orders.
|
||||
type OrderNamespaceLister interface {
|
||||
// List lists all Orders in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1alpha2.Order, err error)
|
||||
// Get retrieves the Order from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1alpha2.Order, error)
|
||||
OrderNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// orderNamespaceLister implements the OrderNamespaceLister
|
||||
// interface.
|
||||
type orderNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all Orders in the indexer for a given namespace.
|
||||
func (s orderNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.Order, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha2.Order))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the Order from the indexer for a given namespace and name.
|
||||
func (s orderNamespaceLister) Get(name string) (*v1alpha2.Order, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha2.Resource("order"), name)
|
||||
}
|
||||
return obj.(*v1alpha2.Order), nil
|
||||
}
|
|
@ -1,94 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// CertificateLister helps list Certificates.
|
||||
type CertificateLister interface {
|
||||
// List lists all Certificates in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1alpha2.Certificate, err error)
|
||||
// Certificates returns an object that can list and get Certificates.
|
||||
Certificates(namespace string) CertificateNamespaceLister
|
||||
CertificateListerExpansion
|
||||
}
|
||||
|
||||
// certificateLister implements the CertificateLister interface.
|
||||
type certificateLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewCertificateLister returns a new CertificateLister.
|
||||
func NewCertificateLister(indexer cache.Indexer) CertificateLister {
|
||||
return &certificateLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all Certificates in the indexer.
|
||||
func (s *certificateLister) List(selector labels.Selector) (ret []*v1alpha2.Certificate, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha2.Certificate))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Certificates returns an object that can list and get Certificates.
|
||||
func (s *certificateLister) Certificates(namespace string) CertificateNamespaceLister {
|
||||
return certificateNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// CertificateNamespaceLister helps list and get Certificates.
|
||||
type CertificateNamespaceLister interface {
|
||||
// List lists all Certificates in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1alpha2.Certificate, err error)
|
||||
// Get retrieves the Certificate from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1alpha2.Certificate, error)
|
||||
CertificateNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// certificateNamespaceLister implements the CertificateNamespaceLister
|
||||
// interface.
|
||||
type certificateNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all Certificates in the indexer for a given namespace.
|
||||
func (s certificateNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.Certificate, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha2.Certificate))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the Certificate from the indexer for a given namespace and name.
|
||||
func (s certificateNamespaceLister) Get(name string) (*v1alpha2.Certificate, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha2.Resource("certificate"), name)
|
||||
}
|
||||
return obj.(*v1alpha2.Certificate), nil
|
||||
}
|
|
@ -1,94 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// CertificateRequestLister helps list CertificateRequests.
|
||||
type CertificateRequestLister interface {
|
||||
// List lists all CertificateRequests in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1alpha2.CertificateRequest, err error)
|
||||
// CertificateRequests returns an object that can list and get CertificateRequests.
|
||||
CertificateRequests(namespace string) CertificateRequestNamespaceLister
|
||||
CertificateRequestListerExpansion
|
||||
}
|
||||
|
||||
// certificateRequestLister implements the CertificateRequestLister interface.
|
||||
type certificateRequestLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewCertificateRequestLister returns a new CertificateRequestLister.
|
||||
func NewCertificateRequestLister(indexer cache.Indexer) CertificateRequestLister {
|
||||
return &certificateRequestLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all CertificateRequests in the indexer.
|
||||
func (s *certificateRequestLister) List(selector labels.Selector) (ret []*v1alpha2.CertificateRequest, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha2.CertificateRequest))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// CertificateRequests returns an object that can list and get CertificateRequests.
|
||||
func (s *certificateRequestLister) CertificateRequests(namespace string) CertificateRequestNamespaceLister {
|
||||
return certificateRequestNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// CertificateRequestNamespaceLister helps list and get CertificateRequests.
|
||||
type CertificateRequestNamespaceLister interface {
|
||||
// List lists all CertificateRequests in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1alpha2.CertificateRequest, err error)
|
||||
// Get retrieves the CertificateRequest from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1alpha2.CertificateRequest, error)
|
||||
CertificateRequestNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// certificateRequestNamespaceLister implements the CertificateRequestNamespaceLister
|
||||
// interface.
|
||||
type certificateRequestNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all CertificateRequests in the indexer for a given namespace.
|
||||
func (s certificateRequestNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.CertificateRequest, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha2.CertificateRequest))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the CertificateRequest from the indexer for a given namespace and name.
|
||||
func (s certificateRequestNamespaceLister) Get(name string) (*v1alpha2.CertificateRequest, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha2.Resource("certificaterequest"), name)
|
||||
}
|
||||
return obj.(*v1alpha2.CertificateRequest), nil
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// ClusterIssuerLister helps list ClusterIssuers.
|
||||
type ClusterIssuerLister interface {
|
||||
// List lists all ClusterIssuers in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1alpha2.ClusterIssuer, err error)
|
||||
// Get retrieves the ClusterIssuer from the index for a given name.
|
||||
Get(name string) (*v1alpha2.ClusterIssuer, error)
|
||||
ClusterIssuerListerExpansion
|
||||
}
|
||||
|
||||
// clusterIssuerLister implements the ClusterIssuerLister interface.
|
||||
type clusterIssuerLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewClusterIssuerLister returns a new ClusterIssuerLister.
|
||||
func NewClusterIssuerLister(indexer cache.Indexer) ClusterIssuerLister {
|
||||
return &clusterIssuerLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all ClusterIssuers in the indexer.
|
||||
func (s *clusterIssuerLister) List(selector labels.Selector) (ret []*v1alpha2.ClusterIssuer, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha2.ClusterIssuer))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the ClusterIssuer from the index for a given name.
|
||||
func (s *clusterIssuerLister) Get(name string) (*v1alpha2.ClusterIssuer, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha2.Resource("clusterissuer"), name)
|
||||
}
|
||||
return obj.(*v1alpha2.ClusterIssuer), nil
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
// CertificateListerExpansion allows custom methods to be added to
|
||||
// CertificateLister.
|
||||
type CertificateListerExpansion interface{}
|
||||
|
||||
// CertificateNamespaceListerExpansion allows custom methods to be added to
|
||||
// CertificateNamespaceLister.
|
||||
type CertificateNamespaceListerExpansion interface{}
|
||||
|
||||
// CertificateRequestListerExpansion allows custom methods to be added to
|
||||
// CertificateRequestLister.
|
||||
type CertificateRequestListerExpansion interface{}
|
||||
|
||||
// CertificateRequestNamespaceListerExpansion allows custom methods to be added to
|
||||
// CertificateRequestNamespaceLister.
|
||||
type CertificateRequestNamespaceListerExpansion interface{}
|
||||
|
||||
// ClusterIssuerListerExpansion allows custom methods to be added to
|
||||
// ClusterIssuerLister.
|
||||
type ClusterIssuerListerExpansion interface{}
|
||||
|
||||
// IssuerListerExpansion allows custom methods to be added to
|
||||
// IssuerLister.
|
||||
type IssuerListerExpansion interface{}
|
||||
|
||||
// IssuerNamespaceListerExpansion allows custom methods to be added to
|
||||
// IssuerNamespaceLister.
|
||||
type IssuerNamespaceListerExpansion interface{}
|
|
@ -1,94 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// IssuerLister helps list Issuers.
|
||||
type IssuerLister interface {
|
||||
// List lists all Issuers in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1alpha2.Issuer, err error)
|
||||
// Issuers returns an object that can list and get Issuers.
|
||||
Issuers(namespace string) IssuerNamespaceLister
|
||||
IssuerListerExpansion
|
||||
}
|
||||
|
||||
// issuerLister implements the IssuerLister interface.
|
||||
type issuerLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewIssuerLister returns a new IssuerLister.
|
||||
func NewIssuerLister(indexer cache.Indexer) IssuerLister {
|
||||
return &issuerLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all Issuers in the indexer.
|
||||
func (s *issuerLister) List(selector labels.Selector) (ret []*v1alpha2.Issuer, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha2.Issuer))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Issuers returns an object that can list and get Issuers.
|
||||
func (s *issuerLister) Issuers(namespace string) IssuerNamespaceLister {
|
||||
return issuerNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// IssuerNamespaceLister helps list and get Issuers.
|
||||
type IssuerNamespaceLister interface {
|
||||
// List lists all Issuers in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1alpha2.Issuer, err error)
|
||||
// Get retrieves the Issuer from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1alpha2.Issuer, error)
|
||||
IssuerNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// issuerNamespaceLister implements the IssuerNamespaceLister
|
||||
// interface.
|
||||
type issuerNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all Issuers in the indexer for a given namespace.
|
||||
func (s issuerNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.Issuer, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha2.Issuer))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the Issuer from the indexer for a given namespace and name.
|
||||
func (s issuerNamespaceLister) Get(name string) (*v1alpha2.Issuer, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha2.Resource("issuer"), name)
|
||||
}
|
||||
return obj.(*v1alpha2.Issuer), nil
|
||||
}
|
|
@ -1,238 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package certificate
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"hash/adler32"
|
||||
"strconv"
|
||||
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
|
||||
cmv1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
cmmeta "github.com/jetstack/cert-manager/pkg/apis/meta/v1"
|
||||
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/equality"
|
||||
apierrs "k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/apimachinery/pkg/selection"
|
||||
kubelisters "k8s.io/client-go/listers/core/v1"
|
||||
certreconciler "knative.dev/serving/pkg/client/injection/reconciler/networking/v1alpha1/certificate"
|
||||
|
||||
"knative.dev/pkg/apis"
|
||||
"knative.dev/pkg/controller"
|
||||
"knative.dev/pkg/logging"
|
||||
pkgreconciler "knative.dev/pkg/reconciler"
|
||||
"knative.dev/pkg/tracker"
|
||||
"knative.dev/serving/pkg/apis/networking/v1alpha1"
|
||||
certmanagerclientset "knative.dev/serving/pkg/client/certmanager/clientset/versioned"
|
||||
acmelisters "knative.dev/serving/pkg/client/certmanager/listers/acme/v1alpha2"
|
||||
certmanagerlisters "knative.dev/serving/pkg/client/certmanager/listers/certmanager/v1alpha2"
|
||||
"knative.dev/serving/pkg/reconciler/certificate/config"
|
||||
"knative.dev/serving/pkg/reconciler/certificate/resources"
|
||||
)
|
||||
|
||||
const (
|
||||
noCMConditionReason = "NoCertManagerCertCondition"
|
||||
noCMConditionMessage = "The ready condition of Cert Manager Certifiate does not exist."
|
||||
notReconciledReason = "ReconcileFailed"
|
||||
notReconciledMessage = "Cert-Manager certificate has not yet been reconciled."
|
||||
httpDomainLabel = "acme.cert-manager.io/http-domain"
|
||||
httpChallengePath = "/.well-known/acme-challenge"
|
||||
)
|
||||
|
||||
// It comes from cert-manager status:
|
||||
// https://github.com/jetstack/cert-manager/blob/b7e83b53820e712e7cf6b8dce3e5a050f249da79/pkg/controller/certificates/sync.go#L130
|
||||
var notReadyReasons = sets.NewString("InProgress", "Pending", "TemporaryCertificate")
|
||||
|
||||
// Reconciler implements controller.Reconciler for Certificate resources.
|
||||
type Reconciler struct {
|
||||
// listers index properties about resources
|
||||
cmCertificateLister certmanagerlisters.CertificateLister
|
||||
cmChallengeLister acmelisters.ChallengeLister
|
||||
cmIssuerLister certmanagerlisters.ClusterIssuerLister
|
||||
svcLister kubelisters.ServiceLister
|
||||
certManagerClient certmanagerclientset.Interface
|
||||
tracker tracker.Interface
|
||||
}
|
||||
|
||||
// Check that our Reconciler implements certreconciler.Interface
|
||||
var _ certreconciler.Interface = (*Reconciler)(nil)
|
||||
|
||||
func (c *Reconciler) ReconcileKind(ctx context.Context, knCert *v1alpha1.Certificate) pkgreconciler.Event {
|
||||
// Reconcile this copy of the Certificate and then write back any status
|
||||
// updates regardless of whether the reconciliation errored out.
|
||||
err := c.reconcile(ctx, knCert)
|
||||
if err != nil {
|
||||
knCert.Status.MarkNotReady(notReconciledReason, notReconciledMessage)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *Reconciler) reconcile(ctx context.Context, knCert *v1alpha1.Certificate) error {
|
||||
logger := logging.FromContext(ctx)
|
||||
|
||||
knCert.SetDefaults(ctx)
|
||||
knCert.Status.InitializeConditions()
|
||||
|
||||
logger.Info("Reconciling Cert-Manager certificate for Knative cert.")
|
||||
knCert.Status.ObservedGeneration = knCert.Generation
|
||||
|
||||
cmConfig := config.FromContext(ctx).CertManager
|
||||
|
||||
cmCert := resources.MakeCertManagerCertificate(cmConfig, knCert)
|
||||
cmCert, err := c.reconcileCMCertificate(ctx, knCert, cmCert)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
knCert.Status.NotAfter = cmCert.Status.NotAfter
|
||||
// Propagate cert-manager Certificate status to Knative Certificate.
|
||||
cmCertReadyCondition := resources.GetReadyCondition(cmCert)
|
||||
logger.Infof("cm cert condition %v.", cmCertReadyCondition)
|
||||
|
||||
switch {
|
||||
case cmCertReadyCondition == nil:
|
||||
knCert.Status.MarkNotReady(noCMConditionReason, noCMConditionMessage)
|
||||
return c.setHTTP01Challenges(knCert, cmCert)
|
||||
case cmCertReadyCondition.Status == cmmeta.ConditionUnknown:
|
||||
knCert.Status.MarkNotReady(cmCertReadyCondition.Reason, cmCertReadyCondition.Message)
|
||||
return c.setHTTP01Challenges(knCert, cmCert)
|
||||
case cmCertReadyCondition.Status == cmmeta.ConditionTrue:
|
||||
knCert.Status.MarkReady()
|
||||
knCert.Status.HTTP01Challenges = []v1alpha1.HTTP01Challenge{}
|
||||
case cmCertReadyCondition.Status == cmmeta.ConditionFalse:
|
||||
if notReadyReasons.Has(cmCertReadyCondition.Reason) {
|
||||
knCert.Status.MarkNotReady(cmCertReadyCondition.Reason, cmCertReadyCondition.Message)
|
||||
} else {
|
||||
knCert.Status.MarkFailed(cmCertReadyCondition.Reason, cmCertReadyCondition.Message)
|
||||
}
|
||||
return c.setHTTP01Challenges(knCert, cmCert)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Reconciler) reconcileCMCertificate(ctx context.Context, knCert *v1alpha1.Certificate, desired *cmv1alpha2.Certificate) (*cmv1alpha2.Certificate, error) {
|
||||
recorder := controller.GetEventRecorder(ctx)
|
||||
|
||||
cmCert, err := c.cmCertificateLister.Certificates(desired.Namespace).Get(desired.Name)
|
||||
if apierrs.IsNotFound(err) {
|
||||
cmCert, err = c.certManagerClient.CertmanagerV1alpha2().Certificates(desired.Namespace).Create(desired)
|
||||
if err != nil {
|
||||
recorder.Eventf(knCert, corev1.EventTypeWarning, "CreationFailed",
|
||||
"Failed to create Cert-Manager Certificate %s/%s: %v", desired.Name, desired.Namespace, err)
|
||||
return nil, fmt.Errorf("failed to create Cert-Manager Certificate: %w", err)
|
||||
}
|
||||
recorder.Eventf(knCert, corev1.EventTypeNormal, "Created",
|
||||
"Created Cert-Manager Certificate %s/%s", desired.Namespace, desired.Name)
|
||||
} else if err != nil {
|
||||
return nil, fmt.Errorf("failed to get Cert-Manager Certificate: %w", err)
|
||||
} else if !metav1.IsControlledBy(desired, knCert) {
|
||||
knCert.Status.MarkResourceNotOwned("CertManagerCertificate", desired.Name)
|
||||
return nil, fmt.Errorf("knative Certificate %s in namespace %s does not own CertManager Certificate: %s", knCert.Name, knCert.Namespace, desired.Name)
|
||||
} else if !equality.Semantic.DeepEqual(cmCert.Spec, desired.Spec) {
|
||||
copy := cmCert.DeepCopy()
|
||||
copy.Spec = desired.Spec
|
||||
updated, err := c.certManagerClient.CertmanagerV1alpha2().Certificates(copy.Namespace).Update(copy)
|
||||
if err != nil {
|
||||
recorder.Eventf(knCert, corev1.EventTypeWarning, "UpdateFailed",
|
||||
"Failed to create Cert-Manager Certificate %s/%s: %v", desired.Namespace, desired.Name, err)
|
||||
return nil, fmt.Errorf("failed to update Cert-Manager Certificate: %w", err)
|
||||
}
|
||||
recorder.Eventf(knCert, corev1.EventTypeNormal, "Updated",
|
||||
"Updated Spec for Cert-Manager Certificate %s/%s", desired.Namespace, desired.Name)
|
||||
return updated, nil
|
||||
}
|
||||
return cmCert, nil
|
||||
}
|
||||
|
||||
func (c *Reconciler) setHTTP01Challenges(knCert *v1alpha1.Certificate, cmCert *cmv1alpha2.Certificate) error {
|
||||
if isHTTP, err := c.isHTTPChallenge(cmCert); err != nil {
|
||||
return err
|
||||
} else if !isHTTP {
|
||||
return nil
|
||||
}
|
||||
challenges := make([]v1alpha1.HTTP01Challenge, 0, len(cmCert.Spec.DNSNames))
|
||||
for _, dnsName := range cmCert.Spec.DNSNames {
|
||||
// This selector comes from:
|
||||
// https://github.com/jetstack/cert-manager/blob/1b9b83a4b80068207b0a8070dadb0e760f5095f6/pkg/issuer/acme/http/pod.go#L34
|
||||
selector := labels.NewSelector()
|
||||
value := strconv.FormatUint(uint64(adler32.Checksum([]byte(dnsName))), 10)
|
||||
req, err := labels.NewRequirement(httpDomainLabel, selection.Equals, []string{value})
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create requirement %s=%s: %w", httpDomainLabel, value, err)
|
||||
}
|
||||
selector = selector.Add(*req)
|
||||
|
||||
svcs, err := c.svcLister.Services(knCert.Namespace).List(selector)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to list services: %w", err)
|
||||
}
|
||||
if len(svcs) == 0 {
|
||||
return fmt.Errorf("no challenge solver service for domain %s; selector=%v", dnsName, selector)
|
||||
}
|
||||
|
||||
for _, svc := range svcs {
|
||||
if err := c.tracker.TrackReference(svcRef(svc.Namespace, svc.Name), knCert); err != nil {
|
||||
return err
|
||||
}
|
||||
owner := svc.GetOwnerReferences()[0]
|
||||
cmChallenge, err := c.cmChallengeLister.Challenges(knCert.Namespace).Get(owner.Name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
challenge := v1alpha1.HTTP01Challenge{
|
||||
ServiceName: svc.Name,
|
||||
ServicePort: svc.Spec.Ports[0].TargetPort,
|
||||
ServiceNamespace: svc.Namespace,
|
||||
URL: &apis.URL{
|
||||
Scheme: "http",
|
||||
Path: fmt.Sprintf("%s/%s", httpChallengePath, cmChallenge.Spec.Token),
|
||||
Host: cmChallenge.Spec.DNSName,
|
||||
},
|
||||
}
|
||||
challenges = append(challenges, challenge)
|
||||
}
|
||||
}
|
||||
knCert.Status.HTTP01Challenges = challenges
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Reconciler) isHTTPChallenge(cmCert *cmv1alpha2.Certificate) (bool, error) {
|
||||
if issuer, err := c.cmIssuerLister.Get(cmCert.Spec.IssuerRef.Name); err != nil {
|
||||
return false, err
|
||||
} else {
|
||||
return issuer.Spec.ACME != nil &&
|
||||
len(issuer.Spec.ACME.Solvers) > 0 &&
|
||||
issuer.Spec.ACME.Solvers[0].HTTP01 != nil, nil
|
||||
}
|
||||
}
|
||||
|
||||
func svcRef(namespace, name string) tracker.Reference {
|
||||
gvk := corev1.SchemeGroupVersion.WithKind("Service")
|
||||
apiVersion, kind := gvk.ToAPIVersionAndKind()
|
||||
return tracker.Reference{
|
||||
APIVersion: apiVersion,
|
||||
Kind: kind,
|
||||
Namespace: namespace,
|
||||
Name: name,
|
||||
}
|
||||
}
|
|
@ -1,610 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package certificate
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"hash/adler32"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
_ "knative.dev/pkg/client/injection/kube/informers/core/v1/service/fake"
|
||||
"knative.dev/pkg/logging"
|
||||
fakecertmanagerclient "knative.dev/serving/pkg/client/certmanager/injection/client/fake"
|
||||
_ "knative.dev/serving/pkg/client/certmanager/injection/informers/acme/v1alpha2/challenge/fake"
|
||||
_ "knative.dev/serving/pkg/client/certmanager/injection/informers/certmanager/v1alpha2/certificate/fake"
|
||||
_ "knative.dev/serving/pkg/client/certmanager/injection/informers/certmanager/v1alpha2/clusterissuer/fake"
|
||||
servingclient "knative.dev/serving/pkg/client/injection/client/fake"
|
||||
_ "knative.dev/serving/pkg/client/injection/informers/networking/v1alpha1/certificate/fake"
|
||||
"knative.dev/serving/pkg/network"
|
||||
|
||||
acmev1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
|
||||
cmv1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
cmmeta "github.com/jetstack/cert-manager/pkg/apis/meta/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
apierrs "k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
clientgotesting "k8s.io/client-go/testing"
|
||||
"knative.dev/pkg/apis"
|
||||
duckv1 "knative.dev/pkg/apis/duck/v1"
|
||||
"knative.dev/pkg/configmap"
|
||||
"knative.dev/pkg/controller"
|
||||
pkgreconciler "knative.dev/pkg/reconciler"
|
||||
"knative.dev/pkg/system"
|
||||
"knative.dev/serving/pkg/apis/networking"
|
||||
"knative.dev/serving/pkg/apis/networking/v1alpha1"
|
||||
certreconciler "knative.dev/serving/pkg/client/injection/reconciler/networking/v1alpha1/certificate"
|
||||
"knative.dev/serving/pkg/reconciler/certificate/config"
|
||||
"knative.dev/serving/pkg/reconciler/certificate/resources"
|
||||
|
||||
. "knative.dev/pkg/reconciler/testing"
|
||||
. "knative.dev/serving/pkg/reconciler/testing/v1"
|
||||
)
|
||||
|
||||
const generation = 23132
|
||||
|
||||
var (
|
||||
correctDNSNames = []string{"correct-dns1.example.com", "correct-dns2.example.com"}
|
||||
incorrectDNSNames = []string{"incorrect-dns.example.com"}
|
||||
notAfter = &metav1.Time{
|
||||
Time: time.Unix(123, 456),
|
||||
}
|
||||
nonHTTP01Issuer = &cmv1alpha2.ClusterIssuer{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "Letsencrypt-issuer",
|
||||
},
|
||||
Spec: cmv1alpha2.IssuerSpec{},
|
||||
}
|
||||
http01Issuer = &cmv1alpha2.ClusterIssuer{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "Letsencrypt-issuer",
|
||||
},
|
||||
Spec: cmv1alpha2.IssuerSpec{
|
||||
IssuerConfig: cmv1alpha2.IssuerConfig{
|
||||
ACME: &acmev1alpha2.ACMEIssuer{
|
||||
Solvers: []acmev1alpha2.ACMEChallengeSolver{{
|
||||
HTTP01: &acmev1alpha2.ACMEChallengeSolverHTTP01{},
|
||||
}},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
func TestNewController(t *testing.T) {
|
||||
ctx, _ := SetupFakeContext(t)
|
||||
|
||||
configMapWatcher := configmap.NewStaticWatcher(&corev1.ConfigMap{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: config.CertManagerConfigName,
|
||||
Namespace: system.Namespace(),
|
||||
},
|
||||
Data: map[string]string{
|
||||
"issuerRef": "kind: ClusterIssuer\nname: letsencrypt-issuer",
|
||||
},
|
||||
})
|
||||
|
||||
c := NewController(ctx, configMapWatcher)
|
||||
if c == nil {
|
||||
t.Fatal("Expected NewController to return a non-nil value")
|
||||
}
|
||||
}
|
||||
|
||||
// This is heavily based on the way the OpenShift Ingress controller tests its reconciliation method.
|
||||
func TestReconcile(t *testing.T) {
|
||||
retryAttempted := false
|
||||
table := TableTest{{
|
||||
Name: "bad workqueue key",
|
||||
Key: "too/many/parts",
|
||||
}, {
|
||||
Name: "key not found",
|
||||
Key: "foo/not-found",
|
||||
}, {
|
||||
Name: "create CM certificate matching Knative Certificate, with retry",
|
||||
Objects: []runtime.Object{
|
||||
knCert("knCert", "foo"),
|
||||
nonHTTP01Issuer,
|
||||
},
|
||||
WithReactors: []clientgotesting.ReactionFunc{
|
||||
func(action clientgotesting.Action) (handled bool, ret runtime.Object, err error) {
|
||||
if retryAttempted || !action.Matches("update", "certificates") || action.GetSubresource() != "status" {
|
||||
return false, nil, nil
|
||||
}
|
||||
retryAttempted = true
|
||||
return true, nil, apierrs.NewConflict(v1alpha1.Resource("foo"), "bar", errors.New("foo"))
|
||||
},
|
||||
},
|
||||
WantCreates: []runtime.Object{
|
||||
resources.MakeCertManagerCertificate(certmanagerConfig(), knCert("knCert", "foo")),
|
||||
},
|
||||
WantStatusUpdates: []clientgotesting.UpdateActionImpl{{
|
||||
Object: knCertWithStatus("knCert", "foo",
|
||||
&v1alpha1.CertificateStatus{
|
||||
Status: duckv1.Status{
|
||||
ObservedGeneration: generation,
|
||||
Conditions: duckv1.Conditions{{
|
||||
Type: v1alpha1.CertificateConditionReady,
|
||||
Status: corev1.ConditionUnknown,
|
||||
Severity: apis.ConditionSeverityError,
|
||||
Reason: noCMConditionReason,
|
||||
Message: noCMConditionMessage,
|
||||
}},
|
||||
},
|
||||
}),
|
||||
}, {
|
||||
Object: knCertWithStatus("knCert", "foo",
|
||||
&v1alpha1.CertificateStatus{
|
||||
Status: duckv1.Status{
|
||||
ObservedGeneration: generation,
|
||||
Conditions: duckv1.Conditions{{
|
||||
Type: v1alpha1.CertificateConditionReady,
|
||||
Status: corev1.ConditionUnknown,
|
||||
Severity: apis.ConditionSeverityError,
|
||||
Reason: noCMConditionReason,
|
||||
Message: noCMConditionMessage,
|
||||
}},
|
||||
},
|
||||
}),
|
||||
}},
|
||||
WantEvents: []string{
|
||||
Eventf(corev1.EventTypeNormal, "Created", "Created Cert-Manager Certificate %s/%s", "foo", "knCert"),
|
||||
},
|
||||
Key: "foo/knCert",
|
||||
}, {
|
||||
Name: "reconcile CM certificate to match desired one",
|
||||
Objects: []runtime.Object{
|
||||
knCert("knCert", "foo"),
|
||||
cmCert("knCert", "foo", incorrectDNSNames),
|
||||
nonHTTP01Issuer,
|
||||
},
|
||||
WantUpdates: []clientgotesting.UpdateActionImpl{{
|
||||
Object: cmCert("knCert", "foo", correctDNSNames),
|
||||
}},
|
||||
WantStatusUpdates: []clientgotesting.UpdateActionImpl{{
|
||||
Object: knCertWithStatus("knCert", "foo",
|
||||
&v1alpha1.CertificateStatus{
|
||||
Status: duckv1.Status{
|
||||
ObservedGeneration: generation,
|
||||
Conditions: duckv1.Conditions{{
|
||||
Type: v1alpha1.CertificateConditionReady,
|
||||
Status: corev1.ConditionUnknown,
|
||||
Severity: apis.ConditionSeverityError,
|
||||
Reason: noCMConditionReason,
|
||||
Message: noCMConditionMessage,
|
||||
}},
|
||||
},
|
||||
}),
|
||||
}},
|
||||
WantEvents: []string{
|
||||
Eventf(corev1.EventTypeNormal, "Updated", "Updated Spec for Cert-Manager Certificate %s/%s", "foo", "knCert"),
|
||||
},
|
||||
Key: "foo/knCert",
|
||||
}, {
|
||||
Name: "observed generation is still updated when error is encountered, and ready status is unknown",
|
||||
Objects: []runtime.Object{
|
||||
knCertWithStatusAndGeneration("knCert", "foo",
|
||||
&v1alpha1.CertificateStatus{
|
||||
Status: duckv1.Status{
|
||||
ObservedGeneration: generation + 1,
|
||||
Conditions: duckv1.Conditions{{
|
||||
Type: v1alpha1.CertificateConditionReady,
|
||||
Status: corev1.ConditionTrue,
|
||||
}},
|
||||
},
|
||||
}, generation+1),
|
||||
cmCert("knCert", "foo", incorrectDNSNames),
|
||||
nonHTTP01Issuer,
|
||||
},
|
||||
WantErr: true,
|
||||
WithReactors: []clientgotesting.ReactionFunc{
|
||||
InduceFailure("update", "certificates"),
|
||||
},
|
||||
WantUpdates: []clientgotesting.UpdateActionImpl{{
|
||||
Object: cmCert("knCert", "foo", correctDNSNames),
|
||||
}},
|
||||
WantStatusUpdates: []clientgotesting.UpdateActionImpl{{
|
||||
Object: knCertWithStatusAndGeneration("knCert", "foo",
|
||||
&v1alpha1.CertificateStatus{
|
||||
Status: duckv1.Status{
|
||||
ObservedGeneration: generation + 1,
|
||||
Conditions: duckv1.Conditions{{
|
||||
Type: v1alpha1.CertificateConditionReady,
|
||||
Status: corev1.ConditionUnknown,
|
||||
Severity: apis.ConditionSeverityError,
|
||||
Reason: notReconciledReason,
|
||||
Message: notReconciledMessage,
|
||||
}},
|
||||
},
|
||||
}, generation+1),
|
||||
}},
|
||||
WantEvents: []string{
|
||||
Eventf(corev1.EventTypeWarning, "UpdateFailed", "Failed to create Cert-Manager Certificate %s: %v",
|
||||
"foo/knCert", "inducing failure for update certificates"),
|
||||
Eventf(corev1.EventTypeWarning, "UpdateFailed", "Failed to update status for %q: %v",
|
||||
"knCert", "inducing failure for update certificates"),
|
||||
},
|
||||
Key: "foo/knCert",
|
||||
}, {
|
||||
Name: "set Knative Certificate ready status with CM Certificate ready status",
|
||||
Objects: []runtime.Object{
|
||||
knCert("knCert", "foo"),
|
||||
cmCertWithStatus("knCert", "foo", correctDNSNames, cmv1alpha2.CertificateCondition{
|
||||
Type: cmv1alpha2.CertificateConditionReady,
|
||||
Status: cmmeta.ConditionTrue}),
|
||||
nonHTTP01Issuer,
|
||||
},
|
||||
WantStatusUpdates: []clientgotesting.UpdateActionImpl{{
|
||||
Object: knCertWithStatus("knCert", "foo",
|
||||
&v1alpha1.CertificateStatus{
|
||||
NotAfter: notAfter,
|
||||
Status: duckv1.Status{
|
||||
ObservedGeneration: generation,
|
||||
Conditions: duckv1.Conditions{{
|
||||
Type: v1alpha1.CertificateConditionReady,
|
||||
Status: corev1.ConditionTrue,
|
||||
Severity: apis.ConditionSeverityError,
|
||||
}},
|
||||
},
|
||||
}),
|
||||
}},
|
||||
Key: "foo/knCert",
|
||||
}, {
|
||||
Name: "set Knative Certificate unknown status with CM Certificate unknown status",
|
||||
Objects: []runtime.Object{
|
||||
knCert("knCert", "foo"),
|
||||
cmCertWithStatus("knCert", "foo", correctDNSNames, cmv1alpha2.CertificateCondition{
|
||||
Type: cmv1alpha2.CertificateConditionReady,
|
||||
Status: cmmeta.ConditionUnknown}),
|
||||
nonHTTP01Issuer,
|
||||
},
|
||||
WantStatusUpdates: []clientgotesting.UpdateActionImpl{{
|
||||
Object: knCertWithStatus("knCert", "foo",
|
||||
&v1alpha1.CertificateStatus{
|
||||
NotAfter: notAfter,
|
||||
Status: duckv1.Status{
|
||||
ObservedGeneration: generation,
|
||||
Conditions: duckv1.Conditions{{
|
||||
Type: v1alpha1.CertificateConditionReady,
|
||||
Status: corev1.ConditionUnknown,
|
||||
Severity: apis.ConditionSeverityError,
|
||||
}},
|
||||
},
|
||||
}),
|
||||
}},
|
||||
Key: "foo/knCert",
|
||||
}, {
|
||||
Name: "set Knative Certificate not ready status with CM Certificate not ready status",
|
||||
Objects: []runtime.Object{
|
||||
knCert("knCert", "foo"),
|
||||
cmCertWithStatus("knCert", "foo", correctDNSNames, cmv1alpha2.CertificateCondition{
|
||||
Type: cmv1alpha2.CertificateConditionReady,
|
||||
Status: cmmeta.ConditionFalse}),
|
||||
nonHTTP01Issuer,
|
||||
},
|
||||
WantStatusUpdates: []clientgotesting.UpdateActionImpl{{
|
||||
Object: knCertWithStatus("knCert", "foo",
|
||||
&v1alpha1.CertificateStatus{
|
||||
NotAfter: notAfter,
|
||||
Status: duckv1.Status{
|
||||
ObservedGeneration: generation,
|
||||
Conditions: duckv1.Conditions{{
|
||||
Type: v1alpha1.CertificateConditionReady,
|
||||
Status: corev1.ConditionFalse,
|
||||
Severity: apis.ConditionSeverityError,
|
||||
}},
|
||||
},
|
||||
}),
|
||||
}},
|
||||
Key: "foo/knCert",
|
||||
}, {
|
||||
Name: "reconcile cm certificate fails",
|
||||
Key: "foo/knCert",
|
||||
Objects: []runtime.Object{
|
||||
knCert("knCert", "foo"),
|
||||
nonHTTP01Issuer,
|
||||
},
|
||||
WantErr: true,
|
||||
WithReactors: []clientgotesting.ReactionFunc{
|
||||
InduceFailure("create", "certificates"),
|
||||
},
|
||||
WantEvents: []string{
|
||||
Eventf(corev1.EventTypeWarning, "CreationFailed", "Failed to create Cert-Manager Certificate knCert/foo: inducing failure for create certificates"),
|
||||
Eventf(corev1.EventTypeWarning, "InternalError", "failed to create Cert-Manager Certificate: inducing failure for create certificates"),
|
||||
},
|
||||
WantCreates: []runtime.Object{
|
||||
resources.MakeCertManagerCertificate(certmanagerConfig(), knCert("knCert", "foo")),
|
||||
},
|
||||
WantStatusUpdates: []clientgotesting.UpdateActionImpl{{
|
||||
Object: knCertWithStatus("knCert", "foo",
|
||||
&v1alpha1.CertificateStatus{
|
||||
Status: duckv1.Status{
|
||||
ObservedGeneration: generation,
|
||||
Conditions: duckv1.Conditions{{
|
||||
Type: v1alpha1.CertificateConditionReady,
|
||||
Status: corev1.ConditionUnknown,
|
||||
Reason: notReconciledReason,
|
||||
Severity: apis.ConditionSeverityError,
|
||||
Message: notReconciledMessage,
|
||||
}},
|
||||
},
|
||||
}),
|
||||
}},
|
||||
}}
|
||||
|
||||
table.Test(t, MakeFactory(func(ctx context.Context, listers *Listers, cmw configmap.Watcher) controller.Reconciler {
|
||||
retryAttempted = false
|
||||
r := &Reconciler{
|
||||
cmCertificateLister: listers.GetCMCertificateLister(),
|
||||
cmChallengeLister: listers.GetCMChallengeLister(),
|
||||
cmIssuerLister: listers.GetCMClusterIssuerLister(),
|
||||
svcLister: listers.GetK8sServiceLister(),
|
||||
certManagerClient: fakecertmanagerclient.Get(ctx),
|
||||
tracker: &NullTracker{},
|
||||
}
|
||||
return certreconciler.NewReconciler(ctx, logging.FromContext(ctx), servingclient.Get(ctx),
|
||||
listers.GetCertificateLister(), controller.GetEventRecorder(ctx), r,
|
||||
network.CertManagerCertificateClassName, controller.Options{
|
||||
ConfigStore: &testConfigStore{
|
||||
config: &config.Config{
|
||||
CertManager: certmanagerConfig(),
|
||||
},
|
||||
},
|
||||
})
|
||||
}))
|
||||
}
|
||||
|
||||
func TestReconcile_HTTP01Challenges(t *testing.T) {
|
||||
table := TableTest{{
|
||||
Name: "fail to set status.HTTP01Challenges",
|
||||
Key: "foo/knCert",
|
||||
WantErr: true,
|
||||
Objects: []runtime.Object{
|
||||
knCert("knCert", "foo"),
|
||||
http01Issuer,
|
||||
},
|
||||
WantCreates: []runtime.Object{
|
||||
resources.MakeCertManagerCertificate(certmanagerConfig(), knCert("knCert", "foo")),
|
||||
},
|
||||
WantEvents: []string{
|
||||
Eventf(corev1.EventTypeNormal, "Created", "Created Cert-Manager Certificate %s/%s", "foo", "knCert"),
|
||||
Eventf(corev1.EventTypeWarning, "InternalError", "no challenge solver service for domain %s; selector=acme.cert-manager.io/http-domain=1930889501", correctDNSNames[0]),
|
||||
},
|
||||
WantStatusUpdates: []clientgotesting.UpdateActionImpl{{
|
||||
Object: knCertWithStatus("knCert", "foo",
|
||||
&v1alpha1.CertificateStatus{
|
||||
Status: duckv1.Status{
|
||||
ObservedGeneration: generation,
|
||||
Conditions: duckv1.Conditions{{
|
||||
Type: v1alpha1.CertificateConditionReady,
|
||||
Status: corev1.ConditionUnknown,
|
||||
Reason: notReconciledReason,
|
||||
Severity: apis.ConditionSeverityError,
|
||||
Message: notReconciledMessage,
|
||||
}},
|
||||
},
|
||||
}),
|
||||
}},
|
||||
}, {
|
||||
Name: "set Status.HTTP01Challenges on Knative certificate",
|
||||
Key: "foo/knCert",
|
||||
Objects: []runtime.Object{
|
||||
cmSolverService(correctDNSNames[0], "foo"),
|
||||
cmSolverService(correctDNSNames[1], "foo"),
|
||||
cmChallenge(correctDNSNames[0], "foo"),
|
||||
cmChallenge(correctDNSNames[1], "foo"),
|
||||
cmCert("knCert", "foo", correctDNSNames),
|
||||
knCert("knCert", "foo"),
|
||||
http01Issuer,
|
||||
},
|
||||
WantStatusUpdates: []clientgotesting.UpdateActionImpl{{
|
||||
Object: knCertWithStatus("knCert", "foo",
|
||||
&v1alpha1.CertificateStatus{
|
||||
HTTP01Challenges: []v1alpha1.HTTP01Challenge{{
|
||||
URL: &apis.URL{
|
||||
Scheme: "http",
|
||||
Host: correctDNSNames[0],
|
||||
Path: "/.well-known/acme-challenge/cm-challenge-token",
|
||||
},
|
||||
ServiceName: "cm-solver-" + correctDNSNames[0],
|
||||
ServiceNamespace: "foo",
|
||||
}, {
|
||||
URL: &apis.URL{
|
||||
Scheme: "http",
|
||||
Host: correctDNSNames[1],
|
||||
Path: "/.well-known/acme-challenge/cm-challenge-token",
|
||||
},
|
||||
ServiceName: "cm-solver-" + correctDNSNames[1],
|
||||
ServiceNamespace: "foo",
|
||||
}},
|
||||
Status: duckv1.Status{
|
||||
ObservedGeneration: generation,
|
||||
Conditions: duckv1.Conditions{{
|
||||
Type: v1alpha1.CertificateConditionReady,
|
||||
Status: corev1.ConditionUnknown,
|
||||
Severity: apis.ConditionSeverityError,
|
||||
Reason: noCMConditionReason,
|
||||
Message: noCMConditionMessage,
|
||||
}},
|
||||
},
|
||||
}),
|
||||
}},
|
||||
}, {
|
||||
Name: "set Status.HTTP01Challenges on Knative certificate when status failed with InProgress",
|
||||
Key: "foo/knCert",
|
||||
Objects: []runtime.Object{
|
||||
cmSolverService(correctDNSNames[0], "foo"),
|
||||
cmSolverService(correctDNSNames[1], "foo"),
|
||||
cmChallenge(correctDNSNames[0], "foo"),
|
||||
cmChallenge(correctDNSNames[1], "foo"),
|
||||
cmCertWithStatus("knCert", "foo", correctDNSNames, cmv1alpha2.CertificateCondition{
|
||||
Type: cmv1alpha2.CertificateConditionReady,
|
||||
Status: cmmeta.ConditionFalse,
|
||||
Reason: "InProgress"}),
|
||||
knCert("knCert", "foo"),
|
||||
http01Issuer,
|
||||
},
|
||||
WantStatusUpdates: []clientgotesting.UpdateActionImpl{{
|
||||
Object: knCertWithStatus("knCert", "foo",
|
||||
&v1alpha1.CertificateStatus{
|
||||
NotAfter: notAfter,
|
||||
HTTP01Challenges: []v1alpha1.HTTP01Challenge{{
|
||||
URL: &apis.URL{
|
||||
Scheme: "http",
|
||||
Host: correctDNSNames[0],
|
||||
Path: "/.well-known/acme-challenge/cm-challenge-token",
|
||||
},
|
||||
ServiceName: "cm-solver-" + correctDNSNames[0],
|
||||
ServiceNamespace: "foo",
|
||||
}, {
|
||||
URL: &apis.URL{
|
||||
Scheme: "http",
|
||||
Host: correctDNSNames[1],
|
||||
Path: "/.well-known/acme-challenge/cm-challenge-token",
|
||||
},
|
||||
ServiceName: "cm-solver-" + correctDNSNames[1],
|
||||
ServiceNamespace: "foo",
|
||||
}},
|
||||
Status: duckv1.Status{
|
||||
ObservedGeneration: generation,
|
||||
Conditions: duckv1.Conditions{{
|
||||
Type: v1alpha1.CertificateConditionReady,
|
||||
Status: corev1.ConditionUnknown,
|
||||
Severity: apis.ConditionSeverityError,
|
||||
Reason: "InProgress",
|
||||
}},
|
||||
},
|
||||
}),
|
||||
}},
|
||||
}}
|
||||
|
||||
table.Test(t, MakeFactory(func(ctx context.Context, listers *Listers, cmw configmap.Watcher) controller.Reconciler {
|
||||
r := &Reconciler{
|
||||
cmCertificateLister: listers.GetCMCertificateLister(),
|
||||
cmChallengeLister: listers.GetCMChallengeLister(),
|
||||
cmIssuerLister: listers.GetCMClusterIssuerLister(),
|
||||
svcLister: listers.GetK8sServiceLister(),
|
||||
certManagerClient: fakecertmanagerclient.Get(ctx),
|
||||
tracker: &NullTracker{},
|
||||
}
|
||||
return certreconciler.NewReconciler(ctx, logging.FromContext(ctx), servingclient.Get(ctx),
|
||||
listers.GetCertificateLister(), controller.GetEventRecorder(ctx), r,
|
||||
network.CertManagerCertificateClassName, controller.Options{
|
||||
ConfigStore: &testConfigStore{
|
||||
config: &config.Config{
|
||||
CertManager: certmanagerConfig(),
|
||||
},
|
||||
},
|
||||
})
|
||||
}))
|
||||
}
|
||||
|
||||
type testConfigStore struct {
|
||||
config *config.Config
|
||||
}
|
||||
|
||||
func (t *testConfigStore) ToContext(ctx context.Context) context.Context {
|
||||
return config.ToContext(ctx, t.config)
|
||||
}
|
||||
|
||||
var _ pkgreconciler.ConfigStore = (*testConfigStore)(nil)
|
||||
|
||||
func certmanagerConfig() *config.CertManagerConfig {
|
||||
return &config.CertManagerConfig{
|
||||
IssuerRef: &cmmeta.ObjectReference{
|
||||
Kind: "ClusterIssuer",
|
||||
Name: "Letsencrypt-issuer",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func knCert(name, namespace string) *v1alpha1.Certificate {
|
||||
return knCertWithStatus(name, namespace, &v1alpha1.CertificateStatus{})
|
||||
}
|
||||
|
||||
func knCertWithStatus(name, namespace string, status *v1alpha1.CertificateStatus) *v1alpha1.Certificate {
|
||||
return knCertWithStatusAndGeneration(name, namespace, status, generation)
|
||||
}
|
||||
|
||||
func knCertWithStatusAndGeneration(name, namespace string, status *v1alpha1.CertificateStatus, gen int) *v1alpha1.Certificate {
|
||||
return &v1alpha1.Certificate{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: name,
|
||||
Namespace: namespace,
|
||||
Generation: int64(gen),
|
||||
Annotations: map[string]string{
|
||||
networking.CertificateClassAnnotationKey: network.CertManagerCertificateClassName,
|
||||
},
|
||||
},
|
||||
Spec: v1alpha1.CertificateSpec{
|
||||
DNSNames: correctDNSNames,
|
||||
SecretName: "secret0",
|
||||
},
|
||||
Status: *status,
|
||||
}
|
||||
}
|
||||
|
||||
func cmCert(name, namespace string, dnsNames []string) *cmv1alpha2.Certificate {
|
||||
cert := resources.MakeCertManagerCertificate(certmanagerConfig(), knCert(name, namespace))
|
||||
cert.Spec.DNSNames = dnsNames
|
||||
return cert
|
||||
}
|
||||
|
||||
func cmCertWithStatus(name, namespace string, dnsNames []string, condition cmv1alpha2.CertificateCondition) *cmv1alpha2.Certificate {
|
||||
cert := cmCert(name, namespace, dnsNames)
|
||||
cert.Status.Conditions = []cmv1alpha2.CertificateCondition{condition}
|
||||
cert.Status.NotAfter = notAfter
|
||||
return cert
|
||||
}
|
||||
|
||||
func cmChallenge(hostname, namespace string) *acmev1alpha2.Challenge {
|
||||
return &acmev1alpha2.Challenge{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "challenge-" + hostname,
|
||||
Namespace: namespace,
|
||||
},
|
||||
Spec: acmev1alpha2.ChallengeSpec{
|
||||
Type: "http01",
|
||||
DNSName: hostname,
|
||||
Token: "cm-challenge-token",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func cmSolverService(hostname, namespace string) *corev1.Service {
|
||||
return &corev1.Service{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
OwnerReferences: []metav1.OwnerReference{{
|
||||
Name: "challenge-" + hostname,
|
||||
}},
|
||||
Name: "cm-solver-" + hostname,
|
||||
Namespace: namespace,
|
||||
Labels: map[string]string{
|
||||
httpDomainLabel: fmt.Sprintf("%d", adler32.Checksum([]byte(hostname))),
|
||||
},
|
||||
},
|
||||
Spec: corev1.ServiceSpec{
|
||||
Ports: []corev1.ServicePort{{
|
||||
Port: 8090,
|
||||
Protocol: "tcp",
|
||||
}},
|
||||
},
|
||||
}
|
||||
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://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 config
|
||||
|
||||
import (
|
||||
"github.com/ghodss/yaml"
|
||||
|
||||
cmeta "github.com/jetstack/cert-manager/pkg/apis/meta/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
const (
|
||||
issuerRefKey = "issuerRef"
|
||||
|
||||
// CertManagerConfigName is the name of the configmap containing all
|
||||
// configuration related to Cert-Manager.
|
||||
CertManagerConfigName = "config-certmanager"
|
||||
)
|
||||
|
||||
// CertManagerConfig contains Cert-Manager related configuration defined in the
|
||||
// `config-certmanager` config map.
|
||||
type CertManagerConfig struct {
|
||||
IssuerRef *cmeta.ObjectReference
|
||||
}
|
||||
|
||||
// NewCertManagerConfigFromConfigMap creates an CertManagerConfig from the supplied ConfigMap
|
||||
func NewCertManagerConfigFromConfigMap(configMap *corev1.ConfigMap) (*CertManagerConfig, error) {
|
||||
// TODO(zhiminx): do we need to provide the default values here?
|
||||
// TODO: validation check.
|
||||
|
||||
config := &CertManagerConfig{
|
||||
IssuerRef: &cmeta.ObjectReference{},
|
||||
}
|
||||
|
||||
if v, ok := configMap.Data[issuerRefKey]; ok {
|
||||
if err := yaml.Unmarshal([]byte(v), config.IssuerRef); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
return config, nil
|
||||
}
|
|
@ -1,92 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://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 config
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
cmmeta "github.com/jetstack/cert-manager/pkg/apis/meta/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
. "knative.dev/pkg/configmap/testing"
|
||||
"knative.dev/pkg/system"
|
||||
_ "knative.dev/pkg/system/testing"
|
||||
)
|
||||
|
||||
func TestCertManagerConfig(t *testing.T) {
|
||||
cm, example := ConfigMapsFromTestFile(t, CertManagerConfigName)
|
||||
|
||||
if _, err := NewCertManagerConfigFromConfigMap(cm); err != nil {
|
||||
t.Errorf("NewCertManagerConfigFromConfigMap(actual) = %v", err)
|
||||
}
|
||||
|
||||
if _, err := NewCertManagerConfigFromConfigMap(example); err != nil {
|
||||
t.Errorf("NewCertManagerConfigFromConfigMap(actual) = %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestIssuerRef(t *testing.T) {
|
||||
isserRefCases := []struct {
|
||||
name string
|
||||
wantErr bool
|
||||
wantConfig *CertManagerConfig
|
||||
config *corev1.ConfigMap
|
||||
}{{
|
||||
name: "invalid format",
|
||||
wantErr: true,
|
||||
wantConfig: (*CertManagerConfig)(nil),
|
||||
config: &corev1.ConfigMap{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Namespace: system.Namespace(),
|
||||
Name: CertManagerConfigName,
|
||||
},
|
||||
Data: map[string]string{
|
||||
issuerRefKey: "wrong format",
|
||||
},
|
||||
},
|
||||
}, {
|
||||
name: "valid IssuerRef",
|
||||
wantErr: false,
|
||||
wantConfig: &CertManagerConfig{
|
||||
IssuerRef: &cmmeta.ObjectReference{
|
||||
Name: "letsencrypt-issuer",
|
||||
Kind: "ClusterIssuer",
|
||||
},
|
||||
},
|
||||
config: &corev1.ConfigMap{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Namespace: system.Namespace(),
|
||||
Name: CertManagerConfigName,
|
||||
},
|
||||
Data: map[string]string{
|
||||
issuerRefKey: "kind: ClusterIssuer\nname: letsencrypt-issuer",
|
||||
},
|
||||
},
|
||||
}}
|
||||
|
||||
for _, tt := range isserRefCases {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
actualConfig, err := NewCertManagerConfigFromConfigMap(tt.config)
|
||||
if (err != nil) != tt.wantErr {
|
||||
t.Fatalf("Test: %q; NewCertManagerConfigFromConfigMap() error = %v, WantErr %v", tt.name, err, tt.wantErr)
|
||||
}
|
||||
if diff := cmp.Diff(actualConfig, tt.wantConfig); diff != "" {
|
||||
t.Fatalf("Want %v, but got %v", tt.wantConfig, actualConfig)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// Package config holds the typed objects that define the schemas for
|
||||
// assorted ConfigMap objects on which the Certificate controller depends.
|
||||
package config
|
|
@ -1,83 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package config
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"knative.dev/pkg/configmap"
|
||||
)
|
||||
|
||||
type cfgKey struct{}
|
||||
|
||||
// Config of CertManager.
|
||||
// +k8s:deepcopy-gen=false
|
||||
type Config struct {
|
||||
CertManager *CertManagerConfig
|
||||
}
|
||||
|
||||
// FromContext fetch config from context.
|
||||
func FromContext(ctx context.Context) *Config {
|
||||
return ctx.Value(cfgKey{}).(*Config)
|
||||
}
|
||||
|
||||
// ToContext adds config to given context.
|
||||
func ToContext(ctx context.Context, c *Config) context.Context {
|
||||
return context.WithValue(ctx, cfgKey{}, c)
|
||||
}
|
||||
|
||||
// Store is configmap.UntypedStore based config store.
|
||||
// +k8s:deepcopy-gen=false
|
||||
type Store struct {
|
||||
*configmap.UntypedStore
|
||||
}
|
||||
|
||||
// NewStore creates a configmap.UntypedStore based config store.
|
||||
//
|
||||
// logger must be non-nil implementation of configmap.Logger (commonly used
|
||||
// loggers conform)
|
||||
//
|
||||
// onAfterStore is a variadic list of callbacks to run
|
||||
// after the ConfigMap has been processed and stored.
|
||||
//
|
||||
// See also: configmap.NewUntypedStore().
|
||||
func NewStore(logger configmap.Logger, onAfterStore ...func(name string, value interface{})) *Store {
|
||||
store := &Store{
|
||||
UntypedStore: configmap.NewUntypedStore(
|
||||
"certificate",
|
||||
logger,
|
||||
configmap.Constructors{
|
||||
CertManagerConfigName: NewCertManagerConfigFromConfigMap,
|
||||
},
|
||||
onAfterStore...,
|
||||
),
|
||||
}
|
||||
|
||||
return store
|
||||
}
|
||||
|
||||
// ToContext adds Store contents to given context.
|
||||
func (s *Store) ToContext(ctx context.Context) context.Context {
|
||||
return ToContext(ctx, s.Load())
|
||||
}
|
||||
|
||||
// Load fetches config from Store.
|
||||
func (s *Store) Load() *Config {
|
||||
return &Config{
|
||||
CertManager: s.UntypedLoad(CertManagerConfigName).(*CertManagerConfig).DeepCopy(),
|
||||
}
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://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 config
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
. "knative.dev/pkg/configmap/testing"
|
||||
. "knative.dev/pkg/logging/testing"
|
||||
)
|
||||
|
||||
func TestStoreLoadWithContext(t *testing.T) {
|
||||
store := NewStore(TestLogger(t))
|
||||
|
||||
certManagerConfig := ConfigMapFromTestFile(t, CertManagerConfigName)
|
||||
store.OnConfigChanged(certManagerConfig)
|
||||
config := FromContext(store.ToContext(context.Background()))
|
||||
|
||||
expected, _ := NewCertManagerConfigFromConfigMap(certManagerConfig)
|
||||
if diff := cmp.Diff(expected, config.CertManager); diff != "" {
|
||||
t.Errorf("Unexpected CertManager config (-want, +got): %v", diff)
|
||||
}
|
||||
}
|
||||
|
||||
func TestStoreImmutableConfig(t *testing.T) {
|
||||
store := NewStore(TestLogger(t))
|
||||
store.OnConfigChanged(ConfigMapFromTestFile(t, CertManagerConfigName))
|
||||
config := store.Load()
|
||||
|
||||
config.CertManager.IssuerRef.Kind = "newKind"
|
||||
newConfig := store.Load()
|
||||
if newConfig.CertManager.IssuerRef.Kind == "newKind" {
|
||||
t.Error("CertManager config is not immutable")
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
../../../../../config/cert-manager/config.yaml
|
|
@ -1,46 +0,0 @@
|
|||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright 2020 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
||||
|
||||
package config
|
||||
|
||||
import (
|
||||
v1 "github.com/jetstack/cert-manager/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *CertManagerConfig) DeepCopyInto(out *CertManagerConfig) {
|
||||
*out = *in
|
||||
if in.IssuerRef != nil {
|
||||
in, out := &in.IssuerRef, &out.IssuerRef
|
||||
*out = new(v1.ObjectReference)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertManagerConfig.
|
||||
func (in *CertManagerConfig) DeepCopy() *CertManagerConfig {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CertManagerConfig)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
|
@ -1,103 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package certificate
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
|
||||
serviceinformer "knative.dev/pkg/client/injection/kube/informers/core/v1/service"
|
||||
"knative.dev/pkg/configmap"
|
||||
"knative.dev/pkg/controller"
|
||||
"knative.dev/pkg/logging"
|
||||
pkgreconciler "knative.dev/pkg/reconciler"
|
||||
"knative.dev/pkg/tracker"
|
||||
"knative.dev/serving/pkg/apis/networking"
|
||||
cmclient "knative.dev/serving/pkg/client/certmanager/injection/client"
|
||||
cmchallengeinformer "knative.dev/serving/pkg/client/certmanager/injection/informers/acme/v1alpha2/challenge"
|
||||
cmcertinformer "knative.dev/serving/pkg/client/certmanager/injection/informers/certmanager/v1alpha2/certificate"
|
||||
clusterinformer "knative.dev/serving/pkg/client/certmanager/injection/informers/certmanager/v1alpha2/clusterissuer"
|
||||
kcertinformer "knative.dev/serving/pkg/client/injection/informers/networking/v1alpha1/certificate"
|
||||
certreconciler "knative.dev/serving/pkg/client/injection/reconciler/networking/v1alpha1/certificate"
|
||||
"knative.dev/serving/pkg/network"
|
||||
servingreconciler "knative.dev/serving/pkg/reconciler"
|
||||
"knative.dev/serving/pkg/reconciler/certificate/config"
|
||||
)
|
||||
|
||||
const controllerAgentName = "certificate-controller"
|
||||
|
||||
// NewController initializes the controller and is called by the generated code
|
||||
// Registers eventhandlers to enqueue events.
|
||||
func NewController(
|
||||
ctx context.Context,
|
||||
cmw configmap.Watcher,
|
||||
) *controller.Impl {
|
||||
ctx = servingreconciler.AnnotateLoggerWithName(ctx, controllerAgentName)
|
||||
logger := logging.FromContext(ctx)
|
||||
knCertificateInformer := kcertinformer.Get(ctx)
|
||||
cmCertificateInformer := cmcertinformer.Get(ctx)
|
||||
cmChallengeInformer := cmchallengeinformer.Get(ctx)
|
||||
clusterIssuerInformer := clusterinformer.Get(ctx)
|
||||
svcInformer := serviceinformer.Get(ctx)
|
||||
|
||||
c := &Reconciler{
|
||||
cmCertificateLister: cmCertificateInformer.Lister(),
|
||||
cmChallengeLister: cmChallengeInformer.Lister(),
|
||||
cmIssuerLister: clusterIssuerInformer.Lister(),
|
||||
svcLister: svcInformer.Lister(),
|
||||
certManagerClient: cmclient.Get(ctx),
|
||||
}
|
||||
|
||||
impl := certreconciler.NewImpl(ctx, c, network.CertManagerCertificateClassName,
|
||||
func(impl *controller.Impl) controller.Options {
|
||||
logger.Info("Setting up ConfigMap receivers")
|
||||
resyncCertOnCertManagerconfigChange := configmap.TypeFilter(&config.CertManagerConfig{})(func(string, interface{}) {
|
||||
impl.GlobalResync(knCertificateInformer.Informer())
|
||||
})
|
||||
configStore := config.NewStore(logger.Named("config-store"), resyncCertOnCertManagerconfigChange)
|
||||
configStore.WatchConfigs(cmw)
|
||||
return controller.Options{ConfigStore: configStore}
|
||||
})
|
||||
|
||||
logger.Info("Setting up event handlers")
|
||||
classFilterFunc := pkgreconciler.AnnotationFilterFunc(networking.CertificateClassAnnotationKey, network.CertManagerCertificateClassName, true)
|
||||
certHandler := cache.FilteringResourceEventHandler{
|
||||
FilterFunc: classFilterFunc,
|
||||
Handler: controller.HandleAll(impl.Enqueue),
|
||||
}
|
||||
knCertificateInformer.Informer().AddEventHandler(certHandler)
|
||||
|
||||
cmCertificateInformer.Informer().AddEventHandler(controller.HandleAll(impl.EnqueueControllerOf))
|
||||
|
||||
c.tracker = tracker.New(impl.EnqueueKey, controller.GetTrackerLease(ctx))
|
||||
|
||||
// Make sure trackers are deleted once the observers are removed.
|
||||
knCertificateInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
|
||||
DeleteFunc: c.tracker.OnDeletedObserver,
|
||||
})
|
||||
|
||||
svcInformer.Informer().AddEventHandler(controller.HandleAll(
|
||||
controller.EnsureTypeMeta(
|
||||
c.tracker.OnChanged,
|
||||
corev1.SchemeGroupVersion.WithKind("Service"),
|
||||
),
|
||||
))
|
||||
|
||||
return impl
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package resources
|
||||
|
||||
import (
|
||||
cmv1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"knative.dev/pkg/kmeta"
|
||||
"knative.dev/serving/pkg/apis/networking/v1alpha1"
|
||||
"knative.dev/serving/pkg/reconciler/certificate/config"
|
||||
)
|
||||
|
||||
// MakeCertManagerCertificate creates a Cert-Manager `Certificate` for requesting a SSL certificate.
|
||||
func MakeCertManagerCertificate(cmConfig *config.CertManagerConfig, knCert *v1alpha1.Certificate) *cmv1alpha2.Certificate {
|
||||
cert := &cmv1alpha2.Certificate{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: knCert.Name,
|
||||
Namespace: knCert.Namespace,
|
||||
OwnerReferences: []metav1.OwnerReference{*kmeta.NewControllerRef(knCert)},
|
||||
Annotations: knCert.GetAnnotations(),
|
||||
Labels: knCert.GetLabels(),
|
||||
},
|
||||
Spec: cmv1alpha2.CertificateSpec{
|
||||
SecretName: knCert.Spec.SecretName,
|
||||
DNSNames: knCert.Spec.DNSNames,
|
||||
IssuerRef: *cmConfig.IssuerRef,
|
||||
},
|
||||
}
|
||||
return cert
|
||||
}
|
||||
|
||||
// GetReadyCondition gets the ready condition of a Cert-Manager `Certificate`.
|
||||
func GetReadyCondition(cmCert *cmv1alpha2.Certificate) *cmv1alpha2.CertificateCondition {
|
||||
for _, cond := range cmCert.Status.Conditions {
|
||||
if cond.Type == cmv1alpha2.CertificateConditionReady {
|
||||
return &cond
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,142 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package resources
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
cmv1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
cmmeta "github.com/jetstack/cert-manager/pkg/apis/meta/v1"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
"knative.dev/pkg/kmeta"
|
||||
"knative.dev/serving/pkg/apis/networking/v1alpha1"
|
||||
"knative.dev/serving/pkg/apis/serving"
|
||||
"knative.dev/serving/pkg/reconciler/certificate/config"
|
||||
)
|
||||
|
||||
var cert = &v1alpha1.Certificate{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "test-cert",
|
||||
Namespace: "test-ns",
|
||||
Labels: map[string]string{
|
||||
serving.RouteLabelKey: "test-route",
|
||||
},
|
||||
Annotations: map[string]string{
|
||||
serving.CreatorAnnotation: "someone",
|
||||
serving.UpdaterAnnotation: "someone",
|
||||
},
|
||||
},
|
||||
Spec: v1alpha1.CertificateSpec{
|
||||
DNSNames: []string{"host1.example.com", "host2.example.com"},
|
||||
SecretName: "secret0",
|
||||
},
|
||||
}
|
||||
|
||||
var cmConfig = &config.CertManagerConfig{
|
||||
IssuerRef: &cmmeta.ObjectReference{
|
||||
Kind: "ClusterIssuer",
|
||||
Name: "Letsencrypt-issuer",
|
||||
},
|
||||
}
|
||||
|
||||
func TestMakeCertManagerCertificate(t *testing.T) {
|
||||
want := &cmv1alpha2.Certificate{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "test-cert",
|
||||
Namespace: "test-ns",
|
||||
OwnerReferences: []metav1.OwnerReference{*kmeta.NewControllerRef(cert)},
|
||||
Labels: map[string]string{
|
||||
serving.RouteLabelKey: "test-route",
|
||||
},
|
||||
Annotations: map[string]string{
|
||||
serving.CreatorAnnotation: "someone",
|
||||
serving.UpdaterAnnotation: "someone",
|
||||
},
|
||||
},
|
||||
Spec: cmv1alpha2.CertificateSpec{
|
||||
SecretName: "secret0",
|
||||
DNSNames: []string{"host1.example.com", "host2.example.com"},
|
||||
IssuerRef: cmmeta.ObjectReference{
|
||||
Kind: "ClusterIssuer",
|
||||
Name: "Letsencrypt-issuer",
|
||||
},
|
||||
},
|
||||
}
|
||||
got := MakeCertManagerCertificate(cmConfig, cert)
|
||||
if diff := cmp.Diff(want, got); diff != "" {
|
||||
t.Errorf("MakeCertManagerCertificate (-want, +got) = %s", diff)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetReadyCondition(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
cmCertificate *cmv1alpha2.Certificate
|
||||
want *cmv1alpha2.CertificateCondition
|
||||
}{{
|
||||
name: "ready",
|
||||
cmCertificate: makeTestCertificate(cmmeta.ConditionTrue, "ready", "ready"),
|
||||
want: &cmv1alpha2.CertificateCondition{
|
||||
Type: cmv1alpha2.CertificateConditionReady,
|
||||
Status: cmmeta.ConditionTrue,
|
||||
Reason: "ready",
|
||||
Message: "ready",
|
||||
}}, {
|
||||
name: "not ready",
|
||||
cmCertificate: makeTestCertificate(cmmeta.ConditionFalse, "not ready", "not ready"),
|
||||
want: &cmv1alpha2.CertificateCondition{
|
||||
Type: cmv1alpha2.CertificateConditionReady,
|
||||
Status: cmmeta.ConditionFalse,
|
||||
Reason: "not ready",
|
||||
Message: "not ready",
|
||||
}}, {
|
||||
name: "unknow",
|
||||
cmCertificate: makeTestCertificate(cmmeta.ConditionUnknown, "unknown", "unknown"),
|
||||
want: &cmv1alpha2.CertificateCondition{
|
||||
Type: cmv1alpha2.CertificateConditionReady,
|
||||
Status: cmmeta.ConditionUnknown,
|
||||
Reason: "unknown",
|
||||
Message: "unknown",
|
||||
},
|
||||
}}
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
got := GetReadyCondition(test.cmCertificate)
|
||||
if diff := cmp.Diff(test.want, got); diff != "" {
|
||||
t.Errorf("GetReadyCondition (-want, +got) = %s", diff)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func makeTestCertificate(cond cmmeta.ConditionStatus, reason, message string) *cmv1alpha2.Certificate {
|
||||
cert := &cmv1alpha2.Certificate{
|
||||
Status: cmv1alpha2.CertificateStatus{
|
||||
Conditions: []cmv1alpha2.CertificateCondition{{
|
||||
Type: cmv1alpha2.CertificateConditionReady,
|
||||
Status: cond,
|
||||
Reason: reason,
|
||||
Message: message,
|
||||
}},
|
||||
},
|
||||
}
|
||||
return cert
|
||||
}
|
|
@ -25,7 +25,6 @@ import (
|
|||
fakekubeclient "knative.dev/pkg/client/injection/kube/client/fake"
|
||||
fakedynamicclient "knative.dev/pkg/injection/clients/dynamicclient/fake"
|
||||
v1 "knative.dev/serving/pkg/apis/serving/v1"
|
||||
fakecertmanagerclient "knative.dev/serving/pkg/client/certmanager/injection/client/fake"
|
||||
fakeservingclient "knative.dev/serving/pkg/client/injection/client/fake"
|
||||
fakeistioclient "knative.dev/serving/pkg/client/istio/injection/client/fake"
|
||||
|
||||
|
@ -72,7 +71,6 @@ func MakeFactory(ctor Ctor) rtesting.Factory {
|
|||
ctx, dynamicClient := fakedynamicclient.With(ctx,
|
||||
ls.NewScheme(), ToUnstructured(t, ls.NewScheme(), r.Objects)...)
|
||||
ctx, cachingClient := fakecachingclient.With(ctx, ls.GetCachingObjects()...)
|
||||
ctx, certManagerClient := fakecertmanagerclient.With(ctx, ls.GetCMCertificateObjects()...)
|
||||
ctx = context.WithValue(ctx, TrackerKey, &rtesting.FakeTracker{})
|
||||
|
||||
// The dynamic client's support for patching is BS. Implement it
|
||||
|
@ -110,7 +108,6 @@ func MakeFactory(ctor Ctor) rtesting.Factory {
|
|||
client.PrependReactor("*", "*", reactor)
|
||||
dynamicClient.PrependReactor("*", "*", reactor)
|
||||
cachingClient.PrependReactor("*", "*", reactor)
|
||||
certManagerClient.PrependReactor("*", "*", reactor)
|
||||
}
|
||||
|
||||
// Validate all Create operations through the serving client.
|
||||
|
@ -123,7 +120,7 @@ func MakeFactory(ctor Ctor) rtesting.Factory {
|
|||
return rtesting.ValidateUpdates(context.Background(), action)
|
||||
})
|
||||
|
||||
actionRecorderList := rtesting.ActionRecorderList{istioClient, dynamicClient, client, kubeClient, cachingClient, certManagerClient}
|
||||
actionRecorderList := rtesting.ActionRecorderList{istioClient, dynamicClient, client, kubeClient, cachingClient}
|
||||
eventList := rtesting.EventList{Recorder: eventRecorder}
|
||||
|
||||
return c, actionRecorderList, eventList
|
||||
|
|
|
@ -17,8 +17,6 @@ limitations under the License.
|
|||
package v1
|
||||
|
||||
import (
|
||||
acmev1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
|
||||
cmv1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
istiov1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
appsv1 "k8s.io/api/apps/v1"
|
||||
autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1"
|
||||
|
@ -36,8 +34,6 @@ import (
|
|||
av1alpha1 "knative.dev/serving/pkg/apis/autoscaling/v1alpha1"
|
||||
networking "knative.dev/serving/pkg/apis/networking/v1alpha1"
|
||||
v1 "knative.dev/serving/pkg/apis/serving/v1"
|
||||
acmelisters "knative.dev/serving/pkg/client/certmanager/listers/acme/v1alpha2"
|
||||
certmanagerlisters "knative.dev/serving/pkg/client/certmanager/listers/certmanager/v1alpha2"
|
||||
fakeservingclientset "knative.dev/serving/pkg/client/clientset/versioned/fake"
|
||||
fakeistioclientset "knative.dev/serving/pkg/client/istio/clientset/versioned/fake"
|
||||
istiolisters "knative.dev/serving/pkg/client/istio/listers/networking/v1alpha3"
|
||||
|
@ -51,8 +47,6 @@ var clientSetSchemes = []func(*runtime.Scheme) error{
|
|||
fakeistioclientset.AddToScheme,
|
||||
fakeservingclientset.AddToScheme,
|
||||
fakecachingclientset.AddToScheme,
|
||||
cmv1alpha2.AddToScheme,
|
||||
acmev1alpha2.AddToScheme,
|
||||
autoscalingv2beta1.AddToScheme,
|
||||
}
|
||||
|
||||
|
@ -106,11 +100,6 @@ func (l *Listers) GetIstioObjects() []runtime.Object {
|
|||
return l.sorter.ObjectsForSchemeFunc(fakeistioclientset.AddToScheme)
|
||||
}
|
||||
|
||||
// GetCMCertificateObjects gets a list of Cert-Manager Certificate objects.
|
||||
func (l *Listers) GetCMCertificateObjects() []runtime.Object {
|
||||
return l.sorter.ObjectsForSchemeFunc(cmv1alpha2.AddToScheme)
|
||||
}
|
||||
|
||||
func (l *Listers) GetServiceLister() servinglisters.ServiceLister {
|
||||
return servinglisters.NewServiceLister(l.IndexerFor(&v1.Service{}))
|
||||
}
|
||||
|
@ -170,21 +159,6 @@ func (l *Listers) GetKnCertificateLister() networkinglisters.CertificateLister {
|
|||
return networkinglisters.NewCertificateLister(l.IndexerFor(&networking.Certificate{}))
|
||||
}
|
||||
|
||||
// GetCMCertificateLister gets lister for Cert Manager Certificate resource.
|
||||
func (l *Listers) GetCMCertificateLister() certmanagerlisters.CertificateLister {
|
||||
return certmanagerlisters.NewCertificateLister(l.IndexerFor(&cmv1alpha2.Certificate{}))
|
||||
}
|
||||
|
||||
// GetCMClusterIssuerLister gets lister for Cert Manager ClusterIssuer resource.
|
||||
func (l *Listers) GetCMClusterIssuerLister() certmanagerlisters.ClusterIssuerLister {
|
||||
return certmanagerlisters.NewClusterIssuerLister(l.IndexerFor(&cmv1alpha2.ClusterIssuer{}))
|
||||
}
|
||||
|
||||
// GetCMChallengeLister gets lister for Cert Manager Challenge resource.
|
||||
func (l *Listers) GetCMChallengeLister() acmelisters.ChallengeLister {
|
||||
return acmelisters.NewChallengeLister(l.IndexerFor(&acmev1alpha2.Challenge{}))
|
||||
}
|
||||
|
||||
func (l *Listers) GetImageLister() cachinglisters.ImageLister {
|
||||
return cachinglisters.NewImageLister(l.IndexerFor(&cachingv1alpha1.Image{}))
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ import (
|
|||
fakekubeclient "knative.dev/pkg/client/injection/kube/client/fake"
|
||||
fakedynamicclient "knative.dev/pkg/injection/clients/dynamicclient/fake"
|
||||
"knative.dev/serving/pkg/apis/serving/v1alpha1"
|
||||
fakecertmanagerclient "knative.dev/serving/pkg/client/certmanager/injection/client/fake"
|
||||
fakeservingclient "knative.dev/serving/pkg/client/injection/client/fake"
|
||||
|
||||
"knative.dev/pkg/configmap"
|
||||
|
@ -70,7 +69,6 @@ func MakeFactory(ctor Ctor) rtesting.Factory {
|
|||
ctx, dynamicClient := fakedynamicclient.With(ctx,
|
||||
ls.NewScheme(), ToUnstructured(t, ls.NewScheme(), r.Objects)...)
|
||||
ctx, cachingClient := fakecachingclient.With(ctx, ls.GetCachingObjects()...)
|
||||
ctx, certManagerClient := fakecertmanagerclient.With(ctx, ls.GetCMCertificateObjects()...)
|
||||
ctx = context.WithValue(ctx, TrackerKey, &rtesting.FakeTracker{})
|
||||
|
||||
// The dynamic client's support for patching is BS. Implement it
|
||||
|
@ -107,7 +105,6 @@ func MakeFactory(ctor Ctor) rtesting.Factory {
|
|||
client.PrependReactor("*", "*", reactor)
|
||||
dynamicClient.PrependReactor("*", "*", reactor)
|
||||
cachingClient.PrependReactor("*", "*", reactor)
|
||||
certManagerClient.PrependReactor("*", "*", reactor)
|
||||
}
|
||||
|
||||
// Validate all Create operations through the serving client.
|
||||
|
@ -120,7 +117,7 @@ func MakeFactory(ctor Ctor) rtesting.Factory {
|
|||
return rtesting.ValidateUpdates(context.Background(), action)
|
||||
})
|
||||
|
||||
actionRecorderList := rtesting.ActionRecorderList{dynamicClient, client, kubeClient, cachingClient, certManagerClient}
|
||||
actionRecorderList := rtesting.ActionRecorderList{dynamicClient, client, kubeClient, cachingClient}
|
||||
eventList := rtesting.EventList{Recorder: eventRecorder}
|
||||
|
||||
return c, actionRecorderList, eventList
|
||||
|
|
|
@ -17,8 +17,6 @@ limitations under the License.
|
|||
package v1alpha1
|
||||
|
||||
import (
|
||||
acmev1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
|
||||
cmv1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
|
||||
appsv1 "k8s.io/api/apps/v1"
|
||||
autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
|
@ -35,8 +33,6 @@ import (
|
|||
av1alpha1 "knative.dev/serving/pkg/apis/autoscaling/v1alpha1"
|
||||
networking "knative.dev/serving/pkg/apis/networking/v1alpha1"
|
||||
"knative.dev/serving/pkg/apis/serving/v1alpha1"
|
||||
acmelisters "knative.dev/serving/pkg/client/certmanager/listers/acme/v1alpha2"
|
||||
certmanagerlisters "knative.dev/serving/pkg/client/certmanager/listers/certmanager/v1alpha2"
|
||||
fakeservingclientset "knative.dev/serving/pkg/client/clientset/versioned/fake"
|
||||
palisters "knative.dev/serving/pkg/client/listers/autoscaling/v1alpha1"
|
||||
networkinglisters "knative.dev/serving/pkg/client/listers/networking/v1alpha1"
|
||||
|
@ -47,8 +43,6 @@ var clientSetSchemes = []func(*runtime.Scheme) error{
|
|||
fakekubeclientset.AddToScheme,
|
||||
fakeservingclientset.AddToScheme,
|
||||
fakecachingclientset.AddToScheme,
|
||||
cmv1alpha2.AddToScheme,
|
||||
acmev1alpha2.AddToScheme,
|
||||
autoscalingv2beta1.AddToScheme,
|
||||
}
|
||||
|
||||
|
@ -98,11 +92,6 @@ func (l *Listers) GetServingObjects() []runtime.Object {
|
|||
return l.sorter.ObjectsForSchemeFunc(fakeservingclientset.AddToScheme)
|
||||
}
|
||||
|
||||
// GetCMCertificateObjects gets a list of Cert-Manager Certificate objects.
|
||||
func (l *Listers) GetCMCertificateObjects() []runtime.Object {
|
||||
return l.sorter.ObjectsForSchemeFunc(cmv1alpha2.AddToScheme)
|
||||
}
|
||||
|
||||
func (l *Listers) GetServiceLister() servinglisters.ServiceLister {
|
||||
return servinglisters.NewServiceLister(l.IndexerFor(&v1alpha1.Service{}))
|
||||
}
|
||||
|
@ -153,21 +142,6 @@ func (l *Listers) GetKnCertificateLister() networkinglisters.CertificateLister {
|
|||
return networkinglisters.NewCertificateLister(l.IndexerFor(&networking.Certificate{}))
|
||||
}
|
||||
|
||||
// GetCMCertificateLister gets lister for Cert Manager Certificate resource.
|
||||
func (l *Listers) GetCMCertificateLister() certmanagerlisters.CertificateLister {
|
||||
return certmanagerlisters.NewCertificateLister(l.IndexerFor(&cmv1alpha2.Certificate{}))
|
||||
}
|
||||
|
||||
// GetCMClusterIssuerLister gets lister for Cert Manager ClusterIssuer resource.
|
||||
func (l *Listers) GetCMClusterIssuerLister() certmanagerlisters.ClusterIssuerLister {
|
||||
return certmanagerlisters.NewClusterIssuerLister(l.IndexerFor(&cmv1alpha2.ClusterIssuer{}))
|
||||
}
|
||||
|
||||
// GetCMChallengeLister gets lister for Cert Manager Challenge resource.
|
||||
func (l *Listers) GetCMChallengeLister() acmelisters.ChallengeLister {
|
||||
return acmelisters.NewChallengeLister(l.IndexerFor(&acmev1alpha2.Challenge{}))
|
||||
}
|
||||
|
||||
func (l *Listers) GetImageLister() cachinglisters.ImageLister {
|
||||
return cachinglisters.NewImageLister(l.IndexerFor(&cachingv1alpha1.Image{}))
|
||||
}
|
||||
|
|
|
@ -1,202 +0,0 @@
|
|||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
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.
|
|
@ -1,202 +0,0 @@
|
|||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
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.
|
File diff suppressed because it is too large
Load Diff
|
@ -1,25 +0,0 @@
|
|||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["doc.go"],
|
||||
importpath = "github.com/jetstack/cert-manager/pkg/apis/acme",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "package-srcs",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all-srcs",
|
||||
srcs = [
|
||||
":package-srcs",
|
||||
"//pkg/apis/acme/v1alpha2:all-srcs",
|
||||
],
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
|
@ -1,22 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Jetstack cert-manager contributors.
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
// +groupName=acme.cert-manager.io
|
||||
|
||||
// Package acme contains types in the acme cert-manager API group
|
||||
package acme
|
||||
|
||||
const GroupName = "acme.cert-manager.io"
|
|
@ -1,40 +0,0 @@
|
|||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"const.go",
|
||||
"doc.go",
|
||||
"register.go",
|
||||
"types.go",
|
||||
"types_challenge.go",
|
||||
"types_issuer.go",
|
||||
"types_order.go",
|
||||
"zz_generated.deepcopy.go",
|
||||
],
|
||||
importpath = "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//pkg/apis/acme:go_default_library",
|
||||
"//pkg/apis/meta/v1:go_default_library",
|
||||
"@io_k8s_api//core/v1:go_default_library",
|
||||
"@io_k8s_apiextensions_apiserver//pkg/apis/apiextensions/v1beta1:go_default_library",
|
||||
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
|
||||
"@io_k8s_apimachinery//pkg/runtime:go_default_library",
|
||||
"@io_k8s_apimachinery//pkg/runtime/schema:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "package-srcs",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all-srcs",
|
||||
srcs = [":package-srcs"],
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue