diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index fd5d3caefb6..173a95d0fea 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -18,9 +18,14 @@ Thanks for opening a pull request! Here are some tips to get everything merged s ### Kind + +/kind diff --git a/deploy/charts/cert-manager/templates/_helpers.tpl b/deploy/charts/cert-manager/templates/_helpers.tpl index 9902c089f79..e15fa1910ad 100644 --- a/deploy/charts/cert-manager/templates/_helpers.tpl +++ b/deploy/charts/cert-manager/templates/_helpers.tpl @@ -152,7 +152,7 @@ Labels that should be added on each resource */}} {{- define "labels" -}} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- if eq (default "helm" .Values.creator) "helm" }} +{{- if eq .Values.creator "helm" }} app.kubernetes.io/managed-by: {{ .Release.Service }} helm.sh/chart: {{ include "chartName" . }} {{- end -}} @@ -175,7 +175,7 @@ https://github.com/helm/helm/issues/5358 {{/* Util function for generating the image URL based on the provided options. -IMPORTANT: This function is standarized across all charts in the cert-manager GH organization. +IMPORTANT: This function is standardized across all charts in the cert-manager GH organization. Any changes to this function should also be made in cert-manager, trust-manager, approver-policy, ... See https://github.com/cert-manager/cert-manager/issues/6329 for a list of linked PRs. */}} diff --git a/deploy/charts/cert-manager/templates/cainjector-config.yaml b/deploy/charts/cert-manager/templates/cainjector-config.yaml index 82399cc1a9d..994cfa347fe 100644 --- a/deploy/charts/cert-manager/templates/cainjector-config.yaml +++ b/deploy/charts/cert-manager/templates/cainjector-config.yaml @@ -1,6 +1,7 @@ {{- if .Values.cainjector.config -}} -{{- $_ := .Values.cainjector.config.apiVersion | required ".Values.cainjector.config.apiVersion must be set !" -}} -{{- $_ := .Values.cainjector.config.kind | required ".Values.cainjector.config.kind must be set !" -}} +{{- $config := .Values.cainjector.config -}} +{{- $_ := set $config "apiVersion" (default "cainjector.config.cert-manager.io/v1alpha1" $config.apiVersion) -}} +{{- $_ := set $config "kind" (default "CAInjectorConfiguration" $config.kind) -}} apiVersion: v1 kind: ConfigMap metadata: @@ -14,5 +15,5 @@ metadata: {{- include "labels" . | nindent 4 }} data: config.yaml: | - {{- .Values.cainjector.config | toYaml | nindent 4 }} + {{- $config | toYaml | nindent 4 }} {{- end -}} \ No newline at end of file diff --git a/deploy/charts/cert-manager/templates/cainjector-deployment.yaml b/deploy/charts/cert-manager/templates/cainjector-deployment.yaml index 8f9f7f3315f..65e658940e7 100644 --- a/deploy/charts/cert-manager/templates/cainjector-deployment.yaml +++ b/deploy/charts/cert-manager/templates/cainjector-deployment.yaml @@ -44,6 +44,14 @@ spec: annotations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if and .Values.prometheus.enabled (not (or .Values.prometheus.servicemonitor.enabled .Values.prometheus.podmonitor.enabled)) }} + {{- if not .Values.cainjector.podAnnotations }} + annotations: + {{- end }} + prometheus.io/path: "/metrics" + prometheus.io/scrape: 'true' + prometheus.io/port: '9402' + {{- end }} spec: serviceAccountName: {{ template "cainjector.serviceAccountName" . }} {{- if hasKey .Values.cainjector "automountServiceAccountToken" }} @@ -87,11 +95,23 @@ spec: {{- with .Values.cainjector.extraArgs }} {{- toYaml . | nindent 10 }} {{- end }} + {{- if not .Values.prometheus.enabled }} + - --metrics-listen-address=0 + {{- end }} + {{- if .Values.prometheus.enabled }} + ports: + - containerPort: 9402 + name: http-metrics + protocol: TCP + {{- end }} env: - name: POD_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace + {{- with .Values.cainjector.extraEnv }} + {{- toYaml . | nindent 10 }} + {{- end }} {{- with .Values.cainjector.containerSecurityContext }} securityContext: {{- toYaml . | nindent 12 }} @@ -103,7 +123,7 @@ spec: {{- if or .Values.cainjector.config .Values.cainjector.volumeMounts }} volumeMounts: {{- if .Values.cainjector.config }} - - name: config + - name: config mountPath: /var/cert-manager/config {{- end }} {{- with .Values.cainjector.volumeMounts }} @@ -129,8 +149,8 @@ spec: {{- if or .Values.cainjector.volumes .Values.cainjector.config }} volumes: {{- if .Values.cainjector.config }} - - name: config - configMap: + - name: config + configMap: name: {{ include "cainjector.fullname" . }} {{- end }} {{ with .Values.cainjector.volumes }} diff --git a/deploy/charts/cert-manager/templates/cainjector-rbac.yaml b/deploy/charts/cert-manager/templates/cainjector-rbac.yaml index 2aa59eee9dd..511073c6de1 100644 --- a/deploy/charts/cert-manager/templates/cainjector-rbac.yaml +++ b/deploy/charts/cert-manager/templates/cainjector-rbac.yaml @@ -101,3 +101,56 @@ subjects: namespace: {{ include "cert-manager.namespace" . }} {{- end }} {{- end }} +{{- $certmanagerNamespace := include "cert-manager.namespace" . }} +{{- if (.Values.cainjector.config.metricsTLSConfig).dynamic }} +{{- if $certmanagerNamespace | eq .Values.cainjector.config.metricsTLSConfig.dynamic.secretNamespace }} + +--- + +# Metrics server dynamic TLS serving certificate rules +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ template "cainjector.fullname" . }}:dynamic-serving + namespace: {{ include "cert-manager.namespace" . }} + labels: + app: {{ include "cainjector.name" . }} + app.kubernetes.io/name: {{ include "cainjector.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "cainjector" + {{- include "labels" . | nindent 4 }} +rules: + - apiGroups: [""] + resources: ["secrets"] + resourceNames: + # Allow cainjector to read and update the metrics CA Secret when dynamic TLS is + # enabled for the metrics server and if the Secret is configured to be in the + # same namespace as cert-manager. + - {{ .Values.cainjector.config.metricsTLSConfig.dynamic.secretName | quote }} + verbs: ["get", "list", "watch", "update"] + # It's not possible to grant CREATE permission on a single resourceName. + - apiGroups: [""] + resources: ["secrets"] + verbs: ["create"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "cainjector.fullname" . }}:dynamic-serving + namespace: {{ include "cert-manager.namespace" . }} + labels: + app: {{ include "cainjector.name" . }} + app.kubernetes.io/name: {{ include "cainjector.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "cainjector" + {{- include "labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "cainjector.fullname" . }}:dynamic-serving +subjects: + - kind: ServiceAccount + name: {{ template "cainjector.serviceAccountName" . }} + namespace: {{ include "cert-manager.namespace" . }} +{{- end }} +{{- end }} diff --git a/deploy/charts/cert-manager/templates/cainjector-service.yaml b/deploy/charts/cert-manager/templates/cainjector-service.yaml new file mode 100644 index 00000000000..2ed9178f312 --- /dev/null +++ b/deploy/charts/cert-manager/templates/cainjector-service.yaml @@ -0,0 +1,30 @@ +{{- if and .Values.prometheus.enabled (not .Values.prometheus.podmonitor.enabled) }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "cainjector.fullname" . }} + namespace: {{ include "cert-manager.namespace" . }} +{{- with .Values.cainjector.serviceAnnotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} + labels: + app: {{ include "cainjector.name" . }} + app.kubernetes.io/name: {{ include "cainjector.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "cainjector" + {{- include "labels" . | nindent 4 }} + {{- with .Values.cainjector.serviceLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + type: ClusterIP + ports: + - protocol: TCP + port: 9402 + name: http-metrics + selector: + app.kubernetes.io/name: {{ include "cainjector.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "cainjector" +{{- end }} diff --git a/deploy/charts/cert-manager/templates/controller-config.yaml b/deploy/charts/cert-manager/templates/controller-config.yaml index 25f62ef1d27..46d2cc2476b 100644 --- a/deploy/charts/cert-manager/templates/controller-config.yaml +++ b/deploy/charts/cert-manager/templates/controller-config.yaml @@ -1,6 +1,7 @@ {{- if .Values.config -}} -{{- $_ := .Values.config.apiVersion | required ".Values.config.apiVersion must be set !" -}} -{{- $_ := .Values.config.kind | required ".Values.config.kind must be set !" -}} +{{- $config := .Values.config -}} +{{- $_ := set $config "apiVersion" (default "controller.config.cert-manager.io/v1alpha1" $config.apiVersion) -}} +{{- $_ := set $config "kind" (default "ControllerConfiguration" $config.kind) -}} apiVersion: v1 kind: ConfigMap metadata: @@ -14,5 +15,5 @@ metadata: {{- include "labels" . | nindent 4 }} data: config.yaml: | - {{- .Values.config | toYaml | nindent 4 }} + {{- $config | toYaml | nindent 4 }} {{- end -}} \ No newline at end of file diff --git a/deploy/charts/cert-manager/templates/podmonitor.yaml b/deploy/charts/cert-manager/templates/podmonitor.yaml index 175460ebec3..83f7e1eae81 100644 --- a/deploy/charts/cert-manager/templates/podmonitor.yaml +++ b/deploy/charts/cert-manager/templates/podmonitor.yaml @@ -29,10 +29,23 @@ metadata: spec: jobLabel: {{ template "cert-manager.fullname" . }} selector: - matchLabels: - app.kubernetes.io/name: {{ template "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" + matchExpressions: + - key: app.kubernetes.io/name + operator: In + values: + - {{ include "cainjector.name" . }} + - {{ template "cert-manager.name" . }} + - {{ include "webhook.name" . }} + - key: app.kubernetes.io/instance + operator: In + values: + - {{ .Release.Name }} + - key: app.kubernetes.io/component + operator: In + values: + - cainjector + - controller + - webhook {{- if .Values.prometheus.podmonitor.namespace }} namespaceSelector: matchNames: diff --git a/deploy/charts/cert-manager/templates/rbac.yaml b/deploy/charts/cert-manager/templates/rbac.yaml index 7a27d4f7af1..baae425f054 100644 --- a/deploy/charts/cert-manager/templates/rbac.yaml +++ b/deploy/charts/cert-manager/templates/rbac.yaml @@ -39,13 +39,56 @@ roleRef: kind: Role name: {{ template "cert-manager.fullname" . }}:leaderelection subjects: - - apiGroup: "" - kind: ServiceAccount + - kind: ServiceAccount name: {{ template "cert-manager.serviceAccountName" . }} namespace: {{ include "cert-manager.namespace" . }} --- +{{- if .Values.serviceAccount.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ template "cert-manager.serviceAccountName" . }}-tokenrequest + namespace: {{ include "cert-manager.namespace" . }} + labels: + app: {{ include "cert-manager.name" . }} + app.kubernetes.io/name: {{ include "cert-manager.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "controller" + {{- include "labels" . | nindent 4 }} +rules: + - apiGroups: [""] + resources: ["serviceaccounts/token"] + resourceNames: ["{{ template "cert-manager.serviceAccountName" . }}"] + verbs: ["create"] + +--- + +# grant cert-manager permission to create tokens for the serviceaccount +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "cert-manager.fullname" . }}-{{ template "cert-manager.serviceAccountName" . }}-tokenrequest + namespace: {{ include "cert-manager.namespace" . }} + labels: + app: {{ include "cert-manager.name" . }} + app.kubernetes.io/name: {{ include "cert-manager.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "controller" + {{- include "labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "cert-manager.serviceAccountName" . }}-tokenrequest +subjects: + - kind: ServiceAccount + name: {{ template "cert-manager.serviceAccountName" . }} + namespace: {{ include "cert-manager.namespace" . }} +{{- end }} + +--- + # Issuer controller role apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole @@ -524,7 +567,7 @@ subjects: {{- end -}} # Permission to: -# - Update and sign CertificatSigningeRequests referencing cert-manager.io Issuers and ClusterIssuers +# - Update and sign CertificateSigningRequests referencing cert-manager.io Issuers and ClusterIssuers # - Perform SubjectAccessReviews to test whether users are able to reference Namespaced Issuers apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole diff --git a/deploy/charts/cert-manager/templates/servicemonitor.yaml b/deploy/charts/cert-manager/templates/servicemonitor.yaml index b6388607728..dd1beec8a54 100644 --- a/deploy/charts/cert-manager/templates/servicemonitor.yaml +++ b/deploy/charts/cert-manager/templates/servicemonitor.yaml @@ -29,10 +29,23 @@ metadata: spec: jobLabel: {{ template "cert-manager.fullname" . }} selector: - matchLabels: - app.kubernetes.io/name: {{ template "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" + matchExpressions: + - key: app.kubernetes.io/name + operator: In + values: + - {{ include "cainjector.name" . }} + - {{ template "cert-manager.name" . }} + - {{ include "webhook.name" . }} + - key: app.kubernetes.io/instance + operator: In + values: + - {{ .Release.Name }} + - key: app.kubernetes.io/component + operator: In + values: + - cainjector + - controller + - webhook {{- if .Values.prometheus.servicemonitor.namespace }} namespaceSelector: matchNames: diff --git a/deploy/charts/cert-manager/templates/startupapicheck-job.yaml b/deploy/charts/cert-manager/templates/startupapicheck-job.yaml index 311b4c48e4a..183cff4e361 100644 --- a/deploy/charts/cert-manager/templates/startupapicheck-job.yaml +++ b/deploy/charts/cert-manager/templates/startupapicheck-job.yaml @@ -60,6 +60,14 @@ spec: securityContext: {{- toYaml . | nindent 12 }} {{- end }} + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + {{- with .Values.startupapicheck.extraEnv }} + {{- toYaml . | nindent 10 }} + {{- end }} {{- with .Values.startupapicheck.resources }} resources: {{- toYaml . | nindent 12 }} diff --git a/deploy/charts/cert-manager/templates/startupapicheck-rbac.yaml b/deploy/charts/cert-manager/templates/startupapicheck-rbac.yaml index 606e725641e..ab8c30fbfe0 100644 --- a/deploy/charts/cert-manager/templates/startupapicheck-rbac.yaml +++ b/deploy/charts/cert-manager/templates/startupapicheck-rbac.yaml @@ -18,7 +18,7 @@ metadata: {{- end }} rules: - apiGroups: ["cert-manager.io"] - resources: ["certificates"] + resources: ["certificaterequests"] verbs: ["create"] --- apiVersion: rbac.authorization.k8s.io/v1 diff --git a/deploy/charts/cert-manager/templates/webhook-config.yaml b/deploy/charts/cert-manager/templates/webhook-config.yaml index 8f3ce20c3b8..cd8b67f5529 100644 --- a/deploy/charts/cert-manager/templates/webhook-config.yaml +++ b/deploy/charts/cert-manager/templates/webhook-config.yaml @@ -1,6 +1,7 @@ {{- if .Values.webhook.config -}} -{{- $_ := .Values.webhook.config.apiVersion | required ".Values.webhook.config.apiVersion must be set !" -}} -{{- $_ := .Values.webhook.config.kind | required ".Values.webhook.config.kind must be set !" -}} +{{- $config := .Values.webhook.config -}} +{{- $_ := set $config "apiVersion" (default "webhook.config.cert-manager.io/v1alpha1" $config.apiVersion) -}} +{{- $_ := set $config "kind" (default "WebhookConfiguration" $config.kind) -}} apiVersion: v1 kind: ConfigMap metadata: @@ -14,5 +15,5 @@ metadata: {{- include "labels" . | nindent 4 }} data: config.yaml: | - {{- .Values.webhook.config | toYaml | nindent 4 }} + {{- $config | toYaml | nindent 4 }} {{- end -}} \ No newline at end of file diff --git a/deploy/charts/cert-manager/templates/webhook-deployment.yaml b/deploy/charts/cert-manager/templates/webhook-deployment.yaml index ae5399e90ce..1535589ff62 100644 --- a/deploy/charts/cert-manager/templates/webhook-deployment.yaml +++ b/deploy/charts/cert-manager/templates/webhook-deployment.yaml @@ -43,6 +43,14 @@ spec: annotations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if and .Values.prometheus.enabled (not (or .Values.prometheus.servicemonitor.enabled .Values.prometheus.podmonitor.enabled)) }} + {{- if not .Values.webhook.podAnnotations }} + annotations: + {{- end }} + prometheus.io/path: "/metrics" + prometheus.io/scrape: 'true' + prometheus.io/port: '9402' + {{- end }} spec: serviceAccountName: {{ template "webhook.serviceAccountName" . }} {{- if hasKey .Values.webhook "automountServiceAccountToken" }} @@ -95,6 +103,9 @@ spec: {{- with .Values.webhook.extraArgs }} {{- toYaml . | nindent 10 }} {{- end }} + {{- if not .Values.prometheus.enabled }} + - --metrics-listen-address=0 + {{- end }} ports: - name: https protocol: TCP @@ -112,6 +123,11 @@ spec: {{- else }} containerPort: 6080 {{- end }} + {{- if .Values.prometheus.enabled }} + - containerPort: 9402 + name: http-metrics + protocol: TCP + {{- end }} livenessProbe: httpGet: path: /livez @@ -149,6 +165,9 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + {{- with .Values.webhook.extraEnv }} + {{- toYaml . | nindent 10 }} + {{- end }} {{- with .Values.webhook.resources }} resources: {{- toYaml . | nindent 12 }} diff --git a/deploy/charts/cert-manager/templates/webhook-rbac.yaml b/deploy/charts/cert-manager/templates/webhook-rbac.yaml index b075ffd460e..b99325e03b3 100644 --- a/deploy/charts/cert-manager/templates/webhook-rbac.yaml +++ b/deploy/charts/cert-manager/templates/webhook-rbac.yaml @@ -15,6 +15,15 @@ rules: resources: ["secrets"] resourceNames: - '{{ template "webhook.fullname" . }}-ca' + {{- $certmanagerNamespace := include "cert-manager.namespace" . }} + {{- with (.Values.webhook.config.metricsTLSConfig).dynamic }} + {{- if $certmanagerNamespace | eq .secretNamespace }} + # Allow webhook to read and update the metrics CA Secret when dynamic TLS is + # enabled for the metrics server and if the Secret is configured to be in the + # same namespace as cert-manager. + - {{ .secretName | quote }} + {{- end }} + {{- end }} verbs: ["get", "list", "watch", "update"] # It's not possible to grant CREATE permission on a single resourceName. - apiGroups: [""] @@ -38,8 +47,7 @@ roleRef: kind: Role name: {{ template "webhook.fullname" . }}:dynamic-serving subjects: -- apiGroup: "" - kind: ServiceAccount +- kind: ServiceAccount name: {{ template "webhook.serviceAccountName" . }} namespace: {{ include "cert-manager.namespace" . }} @@ -76,8 +84,7 @@ roleRef: kind: ClusterRole name: {{ template "webhook.fullname" . }}:subjectaccessreviews subjects: -- apiGroup: "" - kind: ServiceAccount +- kind: ServiceAccount name: {{ template "webhook.serviceAccountName" . }} namespace: {{ include "cert-manager.namespace" . }} {{- end }} diff --git a/deploy/charts/cert-manager/templates/webhook-service.yaml b/deploy/charts/cert-manager/templates/webhook-service.yaml index 86d47f1646d..cd5010f203d 100644 --- a/deploy/charts/cert-manager/templates/webhook-service.yaml +++ b/deploy/charts/cert-manager/templates/webhook-service.yaml @@ -32,6 +32,12 @@ spec: port: 443 protocol: TCP targetPort: "https" +{{- if and .Values.prometheus.enabled (not .Values.prometheus.podmonitor.enabled) }} + - name: metrics + port: 9402 + protocol: TCP + targetPort: "http-metrics" +{{- end }} selector: app.kubernetes.io/name: {{ include "webhook.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/deploy/charts/cert-manager/values.linter.exceptions b/deploy/charts/cert-manager/values.linter.exceptions new file mode 100644 index 00000000000..6636fec753d --- /dev/null +++ b/deploy/charts/cert-manager/values.linter.exceptions @@ -0,0 +1,4 @@ +value missing from templates: crds.enabled +value missing from templates: crds.keep +value missing from templates: acmesolver.image.pullPolicy +value missing from templates: enabled \ No newline at end of file diff --git a/deploy/charts/cert-manager/values.schema.json b/deploy/charts/cert-manager/values.schema.json new file mode 100644 index 00000000000..d04da90c277 --- /dev/null +++ b/deploy/charts/cert-manager/values.schema.json @@ -0,0 +1,2135 @@ +{ + "$defs": { + "helm-values": { + "additionalProperties": false, + "properties": { + "acmesolver": { + "$ref": "#/$defs/helm-values.acmesolver" + }, + "affinity": { + "$ref": "#/$defs/helm-values.affinity" + }, + "approveSignerNames": { + "$ref": "#/$defs/helm-values.approveSignerNames" + }, + "automountServiceAccountToken": { + "$ref": "#/$defs/helm-values.automountServiceAccountToken" + }, + "cainjector": { + "$ref": "#/$defs/helm-values.cainjector" + }, + "clusterResourceNamespace": { + "$ref": "#/$defs/helm-values.clusterResourceNamespace" + }, + "config": { + "$ref": "#/$defs/helm-values.config" + }, + "containerSecurityContext": { + "$ref": "#/$defs/helm-values.containerSecurityContext" + }, + "crds": { + "$ref": "#/$defs/helm-values.crds" + }, + "creator": { + "$ref": "#/$defs/helm-values.creator" + }, + "deploymentAnnotations": { + "$ref": "#/$defs/helm-values.deploymentAnnotations" + }, + "disableAutoApproval": { + "$ref": "#/$defs/helm-values.disableAutoApproval" + }, + "dns01RecursiveNameservers": { + "$ref": "#/$defs/helm-values.dns01RecursiveNameservers" + }, + "dns01RecursiveNameserversOnly": { + "$ref": "#/$defs/helm-values.dns01RecursiveNameserversOnly" + }, + "enableCertificateOwnerRef": { + "$ref": "#/$defs/helm-values.enableCertificateOwnerRef" + }, + "enableServiceLinks": { + "$ref": "#/$defs/helm-values.enableServiceLinks" + }, + "enabled": { + "$ref": "#/$defs/helm-values.enabled" + }, + "extraArgs": { + "$ref": "#/$defs/helm-values.extraArgs" + }, + "extraEnv": { + "$ref": "#/$defs/helm-values.extraEnv" + }, + "extraObjects": { + "$ref": "#/$defs/helm-values.extraObjects" + }, + "featureGates": { + "$ref": "#/$defs/helm-values.featureGates" + }, + "fullnameOverride": { + "$ref": "#/$defs/helm-values.fullnameOverride" + }, + "global": { + "$ref": "#/$defs/helm-values.global" + }, + "hostAliases": { + "$ref": "#/$defs/helm-values.hostAliases" + }, + "http_proxy": { + "$ref": "#/$defs/helm-values.http_proxy" + }, + "https_proxy": { + "$ref": "#/$defs/helm-values.https_proxy" + }, + "image": { + "$ref": "#/$defs/helm-values.image" + }, + "ingressShim": { + "$ref": "#/$defs/helm-values.ingressShim" + }, + "installCRDs": { + "$ref": "#/$defs/helm-values.installCRDs" + }, + "livenessProbe": { + "$ref": "#/$defs/helm-values.livenessProbe" + }, + "maxConcurrentChallenges": { + "$ref": "#/$defs/helm-values.maxConcurrentChallenges" + }, + "nameOverride": { + "$ref": "#/$defs/helm-values.nameOverride" + }, + "namespace": { + "$ref": "#/$defs/helm-values.namespace" + }, + "no_proxy": { + "$ref": "#/$defs/helm-values.no_proxy" + }, + "nodeSelector": { + "$ref": "#/$defs/helm-values.nodeSelector" + }, + "podAnnotations": { + "$ref": "#/$defs/helm-values.podAnnotations" + }, + "podDisruptionBudget": { + "$ref": "#/$defs/helm-values.podDisruptionBudget" + }, + "podDnsConfig": { + "$ref": "#/$defs/helm-values.podDnsConfig" + }, + "podDnsPolicy": { + "$ref": "#/$defs/helm-values.podDnsPolicy" + }, + "podLabels": { + "$ref": "#/$defs/helm-values.podLabels" + }, + "prometheus": { + "$ref": "#/$defs/helm-values.prometheus" + }, + "replicaCount": { + "$ref": "#/$defs/helm-values.replicaCount" + }, + "resources": { + "$ref": "#/$defs/helm-values.resources" + }, + "securityContext": { + "$ref": "#/$defs/helm-values.securityContext" + }, + "serviceAccount": { + "$ref": "#/$defs/helm-values.serviceAccount" + }, + "serviceAnnotations": { + "$ref": "#/$defs/helm-values.serviceAnnotations" + }, + "serviceIPFamilies": { + "$ref": "#/$defs/helm-values.serviceIPFamilies" + }, + "serviceIPFamilyPolicy": { + "$ref": "#/$defs/helm-values.serviceIPFamilyPolicy" + }, + "serviceLabels": { + "$ref": "#/$defs/helm-values.serviceLabels" + }, + "startupapicheck": { + "$ref": "#/$defs/helm-values.startupapicheck" + }, + "strategy": { + "$ref": "#/$defs/helm-values.strategy" + }, + "tolerations": { + "$ref": "#/$defs/helm-values.tolerations" + }, + "topologySpreadConstraints": { + "$ref": "#/$defs/helm-values.topologySpreadConstraints" + }, + "volumeMounts": { + "$ref": "#/$defs/helm-values.volumeMounts" + }, + "volumes": { + "$ref": "#/$defs/helm-values.volumes" + }, + "webhook": { + "$ref": "#/$defs/helm-values.webhook" + } + }, + "type": "object" + }, + "helm-values.acmesolver": { + "additionalProperties": false, + "properties": { + "image": { + "$ref": "#/$defs/helm-values.acmesolver.image" + } + }, + "type": "object" + }, + "helm-values.acmesolver.image": { + "additionalProperties": false, + "properties": { + "digest": { + "$ref": "#/$defs/helm-values.acmesolver.image.digest" + }, + "pullPolicy": { + "$ref": "#/$defs/helm-values.acmesolver.image.pullPolicy" + }, + "registry": { + "$ref": "#/$defs/helm-values.acmesolver.image.registry" + }, + "repository": { + "$ref": "#/$defs/helm-values.acmesolver.image.repository" + }, + "tag": { + "$ref": "#/$defs/helm-values.acmesolver.image.tag" + } + }, + "type": "object" + }, + "helm-values.acmesolver.image.digest": { + "description": "Setting a digest will override any tag.", + "type": "string" + }, + "helm-values.acmesolver.image.pullPolicy": { + "default": "IfNotPresent", + "description": "Kubernetes imagePullPolicy on Deployment.", + "type": "string" + }, + "helm-values.acmesolver.image.registry": { + "description": "The container registry to pull the acmesolver image from.", + "type": "string" + }, + "helm-values.acmesolver.image.repository": { + "default": "quay.io/jetstack/cert-manager-acmesolver", + "description": "The container image for the cert-manager acmesolver.", + "type": "string" + }, + "helm-values.acmesolver.image.tag": { + "description": "Override the image tag to deploy by setting this variable. If no value is set, the chart's appVersion is used.", + "type": "string" + }, + "helm-values.affinity": { + "default": {}, + "description": "A Kubernetes Affinity, if required. For more information, see [Affinity v1 core](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#affinity-v1-core).\n\nFor example:\naffinity:\n nodeAffinity:\n requiredDuringSchedulingIgnoredDuringExecution:\n nodeSelectorTerms:\n - matchExpressions:\n - key: foo.bar.com/role\n operator: In\n values:\n - master", + "type": "object" + }, + "helm-values.approveSignerNames": { + "default": [ + "issuers.cert-manager.io/*", + "clusterissuers.cert-manager.io/*" + ], + "description": "List of signer names that cert-manager will approve by default. CertificateRequests referencing these signer names will be auto-approved by cert-manager. Defaults to just approving the cert-manager.io Issuer and ClusterIssuer issuers. When set to an empty array, ALL issuers will be auto-approved by cert-manager. To disable the auto-approval, because eg. you are using approver-policy, you can enable 'disableAutoApproval'.\nref: https://cert-manager.io/docs/concepts/certificaterequest/#approval", + "items": {}, + "type": "array" + }, + "helm-values.automountServiceAccountToken": { + "description": "Automounting API credentials for a particular pod.", + "type": "boolean" + }, + "helm-values.cainjector": { + "additionalProperties": false, + "properties": { + "affinity": { + "$ref": "#/$defs/helm-values.cainjector.affinity" + }, + "automountServiceAccountToken": { + "$ref": "#/$defs/helm-values.cainjector.automountServiceAccountToken" + }, + "config": { + "$ref": "#/$defs/helm-values.cainjector.config" + }, + "containerSecurityContext": { + "$ref": "#/$defs/helm-values.cainjector.containerSecurityContext" + }, + "deploymentAnnotations": { + "$ref": "#/$defs/helm-values.cainjector.deploymentAnnotations" + }, + "enableServiceLinks": { + "$ref": "#/$defs/helm-values.cainjector.enableServiceLinks" + }, + "enabled": { + "$ref": "#/$defs/helm-values.cainjector.enabled" + }, + "extraArgs": { + "$ref": "#/$defs/helm-values.cainjector.extraArgs" + }, + "extraEnv": { + "$ref": "#/$defs/helm-values.cainjector.extraEnv" + }, + "featureGates": { + "$ref": "#/$defs/helm-values.cainjector.featureGates" + }, + "image": { + "$ref": "#/$defs/helm-values.cainjector.image" + }, + "nodeSelector": { + "$ref": "#/$defs/helm-values.cainjector.nodeSelector" + }, + "podAnnotations": { + "$ref": "#/$defs/helm-values.cainjector.podAnnotations" + }, + "podDisruptionBudget": { + "$ref": "#/$defs/helm-values.cainjector.podDisruptionBudget" + }, + "podLabels": { + "$ref": "#/$defs/helm-values.cainjector.podLabels" + }, + "replicaCount": { + "$ref": "#/$defs/helm-values.cainjector.replicaCount" + }, + "resources": { + "$ref": "#/$defs/helm-values.cainjector.resources" + }, + "securityContext": { + "$ref": "#/$defs/helm-values.cainjector.securityContext" + }, + "serviceAccount": { + "$ref": "#/$defs/helm-values.cainjector.serviceAccount" + }, + "serviceAnnotations": { + "$ref": "#/$defs/helm-values.cainjector.serviceAnnotations" + }, + "serviceLabels": { + "$ref": "#/$defs/helm-values.cainjector.serviceLabels" + }, + "strategy": { + "$ref": "#/$defs/helm-values.cainjector.strategy" + }, + "tolerations": { + "$ref": "#/$defs/helm-values.cainjector.tolerations" + }, + "topologySpreadConstraints": { + "$ref": "#/$defs/helm-values.cainjector.topologySpreadConstraints" + }, + "volumeMounts": { + "$ref": "#/$defs/helm-values.cainjector.volumeMounts" + }, + "volumes": { + "$ref": "#/$defs/helm-values.cainjector.volumes" + } + }, + "type": "object" + }, + "helm-values.cainjector.affinity": { + "default": {}, + "description": "A Kubernetes Affinity, if required. For more information, see [Affinity v1 core](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#affinity-v1-core).\n\nFor example:\naffinity:\n nodeAffinity:\n requiredDuringSchedulingIgnoredDuringExecution:\n nodeSelectorTerms:\n - matchExpressions:\n - key: foo.bar.com/role\n operator: In\n values:\n - master", + "type": "object" + }, + "helm-values.cainjector.automountServiceAccountToken": { + "description": "Automounting API credentials for a particular pod.", + "type": "boolean" + }, + "helm-values.cainjector.config": { + "default": {}, + "description": "This is used to configure options for the cainjector pod. It allows setting options that are usually provided via flags.\n\nIf `apiVersion` and `kind` are unspecified they default to the current latest version (currently `cainjector.config.cert-manager.io/v1alpha1`). You can pin the version by specifying the `apiVersion` yourself.\n\nFor example:\napiVersion: cainjector.config.cert-manager.io/v1alpha1\nkind: CAInjectorConfiguration\nlogging:\n verbosity: 2\n format: text\nleaderElectionConfig:\n namespace: kube-system\n# Configure the metrics server for TLS\n# See https://cert-manager.io/docs/devops-tips/prometheus-metrics/#tls\nmetricsTLSConfig:\n dynamic:\n secretNamespace: \"cert-manager\"\n secretName: \"cert-manager-metrics-ca\"\n dnsNames:\n - cert-manager-metrics", + "type": "object" + }, + "helm-values.cainjector.containerSecurityContext": { + "default": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "description": "Container Security Context to be set on the cainjector component container. For more information, see [Configure a Security Context for a Pod or Container](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/).", + "type": "object" + }, + "helm-values.cainjector.deploymentAnnotations": { + "description": "Optional additional annotations to add to the cainjector Deployment.", + "type": "object" + }, + "helm-values.cainjector.enableServiceLinks": { + "default": false, + "description": "enableServiceLinks indicates whether information about services should be injected into the pod's environment variables, matching the syntax of Docker links.", + "type": "boolean" + }, + "helm-values.cainjector.enabled": { + "default": true, + "description": "Create the CA Injector deployment", + "type": "boolean" + }, + "helm-values.cainjector.extraArgs": { + "default": [], + "description": "Additional command line flags to pass to cert-manager cainjector binary. To see all available flags run `docker run quay.io/jetstack/cert-manager-cainjector: --help`.", + "items": {}, + "type": "array" + }, + "helm-values.cainjector.extraEnv": { + "default": [], + "description": "Additional environment variables to pass to cert-manager cainjector binary.\nFor example:\nextraEnv:\n- name: SOME_VAR\n value: 'some value'", + "items": {}, + "type": "array" + }, + "helm-values.cainjector.featureGates": { + "default": "", + "description": "Comma separated list of feature gates that should be enabled on the cainjector pod.", + "type": "string" + }, + "helm-values.cainjector.image": { + "additionalProperties": false, + "properties": { + "digest": { + "$ref": "#/$defs/helm-values.cainjector.image.digest" + }, + "pullPolicy": { + "$ref": "#/$defs/helm-values.cainjector.image.pullPolicy" + }, + "registry": { + "$ref": "#/$defs/helm-values.cainjector.image.registry" + }, + "repository": { + "$ref": "#/$defs/helm-values.cainjector.image.repository" + }, + "tag": { + "$ref": "#/$defs/helm-values.cainjector.image.tag" + } + }, + "type": "object" + }, + "helm-values.cainjector.image.digest": { + "description": "Setting a digest will override any tag.", + "type": "string" + }, + "helm-values.cainjector.image.pullPolicy": { + "default": "IfNotPresent", + "description": "Kubernetes imagePullPolicy on Deployment.", + "type": "string" + }, + "helm-values.cainjector.image.registry": { + "description": "The container registry to pull the cainjector image from.", + "type": "string" + }, + "helm-values.cainjector.image.repository": { + "default": "quay.io/jetstack/cert-manager-cainjector", + "description": "The container image for the cert-manager cainjector", + "type": "string" + }, + "helm-values.cainjector.image.tag": { + "description": "Override the image tag to deploy by setting this variable. If no value is set, the chart's appVersion will be used.", + "type": "string" + }, + "helm-values.cainjector.nodeSelector": { + "default": { + "kubernetes.io/os": "linux" + }, + "description": "The nodeSelector on Pods tells Kubernetes to schedule Pods on the nodes with matching labels. For more information, see [Assigning Pods to Nodes](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/).\n\nThis default ensures that Pods are only scheduled to Linux nodes. It prevents Pods being scheduled to Windows nodes in a mixed OS cluster.", + "type": "object" + }, + "helm-values.cainjector.podAnnotations": { + "description": "Optional additional annotations to add to the cainjector Pods.", + "type": "object" + }, + "helm-values.cainjector.podDisruptionBudget": { + "additionalProperties": false, + "properties": { + "enabled": { + "$ref": "#/$defs/helm-values.cainjector.podDisruptionBudget.enabled" + }, + "maxUnavailable": { + "$ref": "#/$defs/helm-values.cainjector.podDisruptionBudget.maxUnavailable" + }, + "minAvailable": { + "$ref": "#/$defs/helm-values.cainjector.podDisruptionBudget.minAvailable" + } + }, + "type": "object" + }, + "helm-values.cainjector.podDisruptionBudget.enabled": { + "default": false, + "description": "Enable or disable the PodDisruptionBudget resource.\n\nThis prevents downtime during voluntary disruptions such as during a Node upgrade. For example, the PodDisruptionBudget will block `kubectl drain` if it is used on the Node where the only remaining cert-manager\nPod is currently running.", + "type": "boolean" + }, + "helm-values.cainjector.podDisruptionBudget.maxUnavailable": { + "description": "`maxUnavailable` configures the maximum unavailable pods for disruptions. It can either be set to\nan integer (e.g. 1) or a percentage value (e.g. 25%).\nCannot be used if `minAvailable` is set." + }, + "helm-values.cainjector.podDisruptionBudget.minAvailable": { + "description": "`minAvailable` configures the minimum available pods for disruptions. It can either be set to\nan integer (e.g. 1) or a percentage value (e.g. 25%).\nCannot be used if `maxUnavailable` is set." + }, + "helm-values.cainjector.podLabels": { + "default": {}, + "description": "Optional additional labels to add to the CA Injector Pods.", + "type": "object" + }, + "helm-values.cainjector.replicaCount": { + "default": 1, + "description": "The number of replicas of the cert-manager cainjector to run.\n\nThe default is 1, but in production set this to 2 or 3 to provide high availability.\n\nIf `replicas > 1`, consider setting `cainjector.podDisruptionBudget.enabled=true`.\n\nNote that cert-manager uses leader election to ensure that there can only be a single instance active at a time.", + "type": "number" + }, + "helm-values.cainjector.resources": { + "default": {}, + "description": "Resources to provide to the cert-manager cainjector pod.\n\nFor example:\nrequests:\n cpu: 10m\n memory: 32Mi\nFor more information, see [Resource Management for Pods and Containers](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/).", + "type": "object" + }, + "helm-values.cainjector.securityContext": { + "default": { + "runAsNonRoot": true, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "description": "Pod Security Context to be set on the cainjector component Pod. For more information, see [Configure a Security Context for a Pod or Container](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/).", + "type": "object" + }, + "helm-values.cainjector.serviceAccount": { + "additionalProperties": false, + "properties": { + "annotations": { + "$ref": "#/$defs/helm-values.cainjector.serviceAccount.annotations" + }, + "automountServiceAccountToken": { + "$ref": "#/$defs/helm-values.cainjector.serviceAccount.automountServiceAccountToken" + }, + "create": { + "$ref": "#/$defs/helm-values.cainjector.serviceAccount.create" + }, + "labels": { + "$ref": "#/$defs/helm-values.cainjector.serviceAccount.labels" + }, + "name": { + "$ref": "#/$defs/helm-values.cainjector.serviceAccount.name" + } + }, + "type": "object" + }, + "helm-values.cainjector.serviceAccount.annotations": { + "description": "Optional additional annotations to add to the cainjector's Service Account.", + "type": "object" + }, + "helm-values.cainjector.serviceAccount.automountServiceAccountToken": { + "default": true, + "description": "Automount API credentials for a Service Account.", + "type": "boolean" + }, + "helm-values.cainjector.serviceAccount.create": { + "default": true, + "description": "Specifies whether a service account should be created.", + "type": "boolean" + }, + "helm-values.cainjector.serviceAccount.labels": { + "description": "Optional additional labels to add to the cainjector's Service Account.", + "type": "object" + }, + "helm-values.cainjector.serviceAccount.name": { + "description": "The name of the service account to use.\nIf not set and create is true, a name is generated using the fullname template", + "type": "string" + }, + "helm-values.cainjector.serviceAnnotations": { + "description": "Optional additional annotations to add to the cainjector metrics Service.", + "type": "object" + }, + "helm-values.cainjector.serviceLabels": { + "default": {}, + "description": "Optional additional labels to add to the CA Injector metrics Service.", + "type": "object" + }, + "helm-values.cainjector.strategy": { + "default": {}, + "description": "Deployment update strategy for the cert-manager cainjector deployment. For more information, see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy).\n\nFor example:\nstrategy:\n type: RollingUpdate\n rollingUpdate:\n maxSurge: 0\n maxUnavailable: 1", + "type": "object" + }, + "helm-values.cainjector.tolerations": { + "default": [], + "description": "A list of Kubernetes Tolerations, if required. For more information, see [Toleration v1 core](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#toleration-v1-core).\n\nFor example:\ntolerations:\n- key: foo.bar.com/role\n operator: Equal\n value: master\n effect: NoSchedule", + "items": {}, + "type": "array" + }, + "helm-values.cainjector.topologySpreadConstraints": { + "default": [], + "description": "A list of Kubernetes TopologySpreadConstraints, if required. For more information, see [Topology spread constraint v1 core](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#topologyspreadconstraint-v1-core).\n\nFor example:\ntopologySpreadConstraints:\n- maxSkew: 2\n topologyKey: topology.kubernetes.io/zone\n whenUnsatisfiable: ScheduleAnyway\n labelSelector:\n matchLabels:\n app.kubernetes.io/instance: cert-manager\n app.kubernetes.io/component: controller", + "items": {}, + "type": "array" + }, + "helm-values.cainjector.volumeMounts": { + "default": [], + "description": "Additional volume mounts to add to the cert-manager controller container.", + "items": {}, + "type": "array" + }, + "helm-values.cainjector.volumes": { + "default": [], + "description": "Additional volumes to add to the cert-manager controller pod.", + "items": {}, + "type": "array" + }, + "helm-values.clusterResourceNamespace": { + "default": "", + "description": "Override the namespace used to store DNS provider credentials etc. for ClusterIssuer resources. By default, the same namespace as cert-manager is deployed within is used. This namespace will not be automatically created by the Helm chart.", + "type": "string" + }, + "helm-values.config": { + "default": {}, + "description": "This property is used to configure options for the controller pod. This allows setting options that would usually be provided using flags.\n\nIf `apiVersion` and `kind` are unspecified they default to the current latest version (currently `controller.config.cert-manager.io/v1alpha1`). You can pin the version by specifying the `apiVersion` yourself.\n\nFor example:\nconfig:\n apiVersion: controller.config.cert-manager.io/v1alpha1\n kind: ControllerConfiguration\n logging:\n verbosity: 2\n format: text\n leaderElectionConfig:\n namespace: kube-system\n kubernetesAPIQPS: 9000\n kubernetesAPIBurst: 9000\n numberOfConcurrentWorkers: 200\n featureGates:\n AdditionalCertificateOutputFormats: true\n DisallowInsecureCSRUsageDefinition: true\n ExperimentalCertificateSigningRequestControllers: true\n ExperimentalGatewayAPISupport: true\n LiteralCertificateSubject: true\n SecretsFilteredCaching: true\n ServerSideApply: true\n StableCertificateRequestName: true\n UseCertificateRequestBasicConstraints: true\n ValidateCAA: true\n # Configure the metrics server for TLS\n # See https://cert-manager.io/docs/devops-tips/prometheus-metrics/#tls\n metricsTLSConfig:\n dynamic:\n secretNamespace: \"cert-manager\"\n secretName: \"cert-manager-metrics-ca\"\n dnsNames:\n - cert-manager-metrics", + "type": "object" + }, + "helm-values.containerSecurityContext": { + "default": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "description": "Container Security Context to be set on the controller component container. For more information, see [Configure a Security Context for a Pod or Container](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/).", + "type": "object" + }, + "helm-values.crds": { + "additionalProperties": false, + "properties": { + "enabled": { + "$ref": "#/$defs/helm-values.crds.enabled" + }, + "keep": { + "$ref": "#/$defs/helm-values.crds.keep" + } + }, + "type": "object" + }, + "helm-values.crds.enabled": { + "default": false, + "description": "This option decides if the CRDs should be installed as part of the Helm installation.", + "type": "boolean" + }, + "helm-values.crds.keep": { + "default": true, + "description": "This option makes it so that the \"helm.sh/resource-policy\": keep annotation is added to the CRD. This will prevent Helm from uninstalling the CRD when the Helm release is uninstalled. WARNING: when the CRDs are removed, all cert-manager custom resources\n(Certificates, Issuers, ...) will be removed too by the garbage collector.", + "type": "boolean" + }, + "helm-values.creator": { + "default": "helm", + "description": "Field used by our release pipeline to produce the static manifests. The field defaults to \"helm\" but is set to \"static\" when we render the static YAML manifests.", + "type": "string" + }, + "helm-values.deploymentAnnotations": { + "description": "Optional additional annotations to add to the controller Deployment.", + "type": "object" + }, + "helm-values.disableAutoApproval": { + "default": false, + "description": "Option to disable cert-manager's build-in auto-approver. The auto-approver approves all CertificateRequests that reference issuers matching the 'approveSignerNames' option. This 'disableAutoApproval' option is useful when you want to make all approval decisions using a different approver (like approver-policy - https://github.com/cert-manager/approver-policy).", + "type": "boolean" + }, + "helm-values.dns01RecursiveNameservers": { + "default": "", + "description": "A comma-separated string with the host and port of the recursive nameservers cert-manager should query.", + "type": "string" + }, + "helm-values.dns01RecursiveNameserversOnly": { + "default": false, + "description": "Forces cert-manager to use only the recursive nameservers for verification. Enabling this option could cause the DNS01 self check to take longer owing to caching performed by the recursive nameservers.", + "type": "boolean" + }, + "helm-values.enableCertificateOwnerRef": { + "default": false, + "description": "When this flag is enabled, secrets will be automatically removed when the certificate resource is deleted.", + "type": "boolean" + }, + "helm-values.enableServiceLinks": { + "default": false, + "description": "enableServiceLinks indicates whether information about services should be injected into the pod's environment variables, matching the syntax of Docker links.", + "type": "boolean" + }, + "helm-values.enabled": { + "default": true, + "description": "Field that can be used as a condition when cert-manager is a dependency. This definition is only here as a placeholder such that it is included in the json schema. See https://helm.sh/docs/chart_best_practices/dependencies/#conditions-and-tags for more info.", + "type": "boolean" + }, + "helm-values.extraArgs": { + "default": [], + "description": "Additional command line flags to pass to cert-manager controller binary. To see all available flags run `docker run quay.io/jetstack/cert-manager-controller: --help`.\n\nUse this flag to enable or disable arbitrary controllers. For example, to disable the CertificateRequests approver.\n\nFor example:\nextraArgs:\n - --controllers=*,-certificaterequests-approver", + "items": {}, + "type": "array" + }, + "helm-values.extraEnv": { + "default": [], + "description": "Additional environment variables to pass to cert-manager controller binary.\nFor example:\nextraEnv:\n- name: SOME_VAR\n value: 'some value'", + "items": {}, + "type": "array" + }, + "helm-values.extraObjects": { + "default": [], + "description": "Create dynamic manifests via values.\n\nFor example:\nextraObjects:\n - |\n apiVersion: v1\n kind: ConfigMap\n metadata:\n name: '{{ template \"cert-manager.fullname\" . }}-extra-configmap'", + "items": {}, + "type": "array" + }, + "helm-values.featureGates": { + "default": "", + "description": "A comma-separated list of feature gates that should be enabled on the controller pod.", + "type": "string" + }, + "helm-values.fullnameOverride": { + "description": "Override the \"cert-manager.fullname\" value. This value is used as part of most of the names of the resources created by this Helm chart.", + "type": "string" + }, + "helm-values.global": { + "description": "Global values shared across all (sub)charts", + "properties": { + "commonLabels": { + "$ref": "#/$defs/helm-values.global.commonLabels" + }, + "imagePullSecrets": { + "$ref": "#/$defs/helm-values.global.imagePullSecrets" + }, + "leaderElection": { + "$ref": "#/$defs/helm-values.global.leaderElection" + }, + "logLevel": { + "$ref": "#/$defs/helm-values.global.logLevel" + }, + "podSecurityPolicy": { + "$ref": "#/$defs/helm-values.global.podSecurityPolicy" + }, + "priorityClassName": { + "$ref": "#/$defs/helm-values.global.priorityClassName" + }, + "rbac": { + "$ref": "#/$defs/helm-values.global.rbac" + }, + "revisionHistoryLimit": { + "$ref": "#/$defs/helm-values.global.revisionHistoryLimit" + } + }, + "type": "object" + }, + "helm-values.global.commonLabels": { + "default": {}, + "description": "Labels to apply to all resources.\nPlease note that this does not add labels to the resources created dynamically by the controllers. For these resources, you have to add the labels in the template in the cert-manager custom resource: For example, podTemplate/ ingressTemplate in ACMEChallengeSolverHTTP01Ingress. For more information, see the [cert-manager documentation](https://cert-manager.io/docs/reference/api-docs/#acme.cert-manager.io/v1.ACMEChallengeSolverHTTP01Ingress).\nFor example, secretTemplate in CertificateSpec\nFor more information, see the [cert-manager documentation](https://cert-manager.io/docs/reference/api-docs/#cert-manager.io/v1.CertificateSpec).", + "type": "object" + }, + "helm-values.global.imagePullSecrets": { + "default": [], + "description": "Reference to one or more secrets to be used when pulling images. For more information, see [Pull an Image from a Private Registry](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/).\n\nFor example:\nimagePullSecrets:\n - name: \"image-pull-secret\"", + "items": {}, + "type": "array" + }, + "helm-values.global.leaderElection": { + "properties": { + "leaseDuration": { + "$ref": "#/$defs/helm-values.global.leaderElection.leaseDuration" + }, + "namespace": { + "$ref": "#/$defs/helm-values.global.leaderElection.namespace" + }, + "renewDeadline": { + "$ref": "#/$defs/helm-values.global.leaderElection.renewDeadline" + }, + "retryPeriod": { + "$ref": "#/$defs/helm-values.global.leaderElection.retryPeriod" + } + }, + "type": "object" + }, + "helm-values.global.leaderElection.leaseDuration": { + "description": "The duration that non-leader candidates will wait after observing a leadership renewal until attempting to acquire leadership of a led but unrenewed leader slot. This is effectively the maximum duration that a leader can be stopped before it is replaced by another candidate.", + "type": "string" + }, + "helm-values.global.leaderElection.namespace": { + "default": "kube-system", + "description": "Override the namespace used for the leader election lease.", + "type": "string" + }, + "helm-values.global.leaderElection.renewDeadline": { + "description": "The interval between attempts by the acting master to renew a leadership slot before it stops leading. This must be less than or equal to the lease duration.", + "type": "string" + }, + "helm-values.global.leaderElection.retryPeriod": { + "description": "The duration the clients should wait between attempting acquisition and renewal of a leadership.", + "type": "string" + }, + "helm-values.global.logLevel": { + "default": 2, + "description": "Set the verbosity of cert-manager. A range of 0 - 6, with 6 being the most verbose.", + "type": "number" + }, + "helm-values.global.podSecurityPolicy": { + "properties": { + "enabled": { + "$ref": "#/$defs/helm-values.global.podSecurityPolicy.enabled" + }, + "useAppArmor": { + "$ref": "#/$defs/helm-values.global.podSecurityPolicy.useAppArmor" + } + }, + "type": "object" + }, + "helm-values.global.podSecurityPolicy.enabled": { + "default": false, + "description": "Create PodSecurityPolicy for cert-manager.\n\nNote that PodSecurityPolicy was deprecated in Kubernetes 1.21 and removed in Kubernetes 1.25.", + "type": "boolean" + }, + "helm-values.global.podSecurityPolicy.useAppArmor": { + "default": true, + "description": "Configure the PodSecurityPolicy to use AppArmor.", + "type": "boolean" + }, + "helm-values.global.priorityClassName": { + "default": "", + "description": "The optional priority class to be used for the cert-manager pods.", + "type": "string" + }, + "helm-values.global.rbac": { + "properties": { + "aggregateClusterRoles": { + "$ref": "#/$defs/helm-values.global.rbac.aggregateClusterRoles" + }, + "create": { + "$ref": "#/$defs/helm-values.global.rbac.create" + } + }, + "type": "object" + }, + "helm-values.global.rbac.aggregateClusterRoles": { + "default": true, + "description": "Aggregate ClusterRoles to Kubernetes default user-facing roles. For more information, see [User-facing roles](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles)", + "type": "boolean" + }, + "helm-values.global.rbac.create": { + "default": true, + "description": "Create required ClusterRoles and ClusterRoleBindings for cert-manager.", + "type": "boolean" + }, + "helm-values.global.revisionHistoryLimit": { + "description": "The number of old ReplicaSets to retain to allow rollback (if not set, the default Kubernetes value is set to 10).", + "type": "number" + }, + "helm-values.hostAliases": { + "default": [], + "description": "Optional hostAliases for cert-manager-controller pods. May be useful when performing ACME DNS-01 self checks.", + "items": {}, + "type": "array" + }, + "helm-values.http_proxy": { + "description": "Configures the HTTP_PROXY environment variable where a HTTP proxy is required.", + "type": "string" + }, + "helm-values.https_proxy": { + "description": "Configures the HTTPS_PROXY environment variable where a HTTP proxy is required.", + "type": "string" + }, + "helm-values.image": { + "additionalProperties": false, + "properties": { + "digest": { + "$ref": "#/$defs/helm-values.image.digest" + }, + "pullPolicy": { + "$ref": "#/$defs/helm-values.image.pullPolicy" + }, + "registry": { + "$ref": "#/$defs/helm-values.image.registry" + }, + "repository": { + "$ref": "#/$defs/helm-values.image.repository" + }, + "tag": { + "$ref": "#/$defs/helm-values.image.tag" + } + }, + "type": "object" + }, + "helm-values.image.digest": { + "description": "Setting a digest will override any tag.", + "type": "string" + }, + "helm-values.image.pullPolicy": { + "default": "IfNotPresent", + "description": "Kubernetes imagePullPolicy on Deployment.", + "type": "string" + }, + "helm-values.image.registry": { + "description": "The container registry to pull the manager image from.", + "type": "string" + }, + "helm-values.image.repository": { + "default": "quay.io/jetstack/cert-manager-controller", + "description": "The container image for the cert-manager controller.", + "type": "string" + }, + "helm-values.image.tag": { + "description": "Override the image tag to deploy by setting this variable. If no value is set, the chart's appVersion is used.", + "type": "string" + }, + "helm-values.ingressShim": { + "additionalProperties": false, + "properties": { + "defaultIssuerGroup": { + "$ref": "#/$defs/helm-values.ingressShim.defaultIssuerGroup" + }, + "defaultIssuerKind": { + "$ref": "#/$defs/helm-values.ingressShim.defaultIssuerKind" + }, + "defaultIssuerName": { + "$ref": "#/$defs/helm-values.ingressShim.defaultIssuerName" + } + }, + "type": "object" + }, + "helm-values.ingressShim.defaultIssuerGroup": { + "description": "Optional default issuer group to use for ingress resources.", + "type": "string" + }, + "helm-values.ingressShim.defaultIssuerKind": { + "description": "Optional default issuer kind to use for ingress resources.", + "type": "string" + }, + "helm-values.ingressShim.defaultIssuerName": { + "description": "Optional default issuer to use for ingress resources.", + "type": "string" + }, + "helm-values.installCRDs": { + "default": false, + "description": "This option is equivalent to setting crds.enabled=true and crds.keep=true. Deprecated: use crds.enabled and crds.keep instead.", + "type": "boolean" + }, + "helm-values.livenessProbe": { + "default": { + "enabled": true, + "failureThreshold": 8, + "initialDelaySeconds": 10, + "periodSeconds": 10, + "successThreshold": 1, + "timeoutSeconds": 15 + }, + "description": "LivenessProbe settings for the controller container of the controller Pod.\n\nThis is enabled by default, in order to enable the clock-skew liveness probe that restarts the controller in case of a skew between the system clock and the monotonic clock. LivenessProbe durations and thresholds are based on those used for the Kubernetes controller-manager. For more information see the following on the\n[Kubernetes GitHub repository](https://github.com/kubernetes/kubernetes/blob/806b30170c61a38fedd54cc9ede4cd6275a1ad3b/cmd/kubeadm/app/util/staticpod/utils.go#L241-L245)", + "type": "object" + }, + "helm-values.maxConcurrentChallenges": { + "default": 60, + "description": "The maximum number of challenges that can be scheduled as 'processing' at once.", + "type": "number" + }, + "helm-values.nameOverride": { + "description": "Override the \"cert-manager.name\" value, which is used to annotate some of the resources that are created by this Chart (using \"app.kubernetes.io/name\"). NOTE: There are some inconsistencies in the Helm chart when it comes to these annotations (some resources use eg. \"cainjector.name\" which resolves to the value \"cainjector\").", + "type": "string" + }, + "helm-values.namespace": { + "default": "", + "description": "This namespace allows you to define where the services are installed into. If not set then they use the namespace of the release. This is helpful when installing cert manager as a chart dependency (sub chart).", + "type": "string" + }, + "helm-values.no_proxy": { + "description": "Configures the NO_PROXY environment variable where a HTTP proxy is required, but certain domains should be excluded.", + "type": "string" + }, + "helm-values.nodeSelector": { + "default": { + "kubernetes.io/os": "linux" + }, + "description": "The nodeSelector on Pods tells Kubernetes to schedule Pods on the nodes with matching labels. For more information, see [Assigning Pods to Nodes](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/).\n\nThis default ensures that Pods are only scheduled to Linux nodes. It prevents Pods being scheduled to Windows nodes in a mixed OS cluster.", + "type": "object" + }, + "helm-values.podAnnotations": { + "description": "Optional additional annotations to add to the controller Pods.", + "type": "object" + }, + "helm-values.podDisruptionBudget": { + "additionalProperties": false, + "properties": { + "enabled": { + "$ref": "#/$defs/helm-values.podDisruptionBudget.enabled" + }, + "maxUnavailable": { + "$ref": "#/$defs/helm-values.podDisruptionBudget.maxUnavailable" + }, + "minAvailable": { + "$ref": "#/$defs/helm-values.podDisruptionBudget.minAvailable" + } + }, + "type": "object" + }, + "helm-values.podDisruptionBudget.enabled": { + "default": false, + "description": "Enable or disable the PodDisruptionBudget resource.\n\nThis prevents downtime during voluntary disruptions such as during a Node upgrade. For example, the PodDisruptionBudget will block `kubectl drain` if it is used on the Node where the only remaining cert-manager\nPod is currently running.", + "type": "boolean" + }, + "helm-values.podDisruptionBudget.maxUnavailable": { + "description": "This configures the maximum unavailable pods for disruptions. It can either be set to an integer (e.g. 1) or a percentage value (e.g. 25%). it cannot be used if `minAvailable` is set." + }, + "helm-values.podDisruptionBudget.minAvailable": { + "description": "This configures the minimum available pods for disruptions. It can either be set to an integer (e.g. 1) or a percentage value (e.g. 25%).\nIt cannot be used if `maxUnavailable` is set." + }, + "helm-values.podDnsConfig": { + "description": "Pod DNS configuration. The podDnsConfig field is optional and can work with any podDnsPolicy settings. However, when a Pod's dnsPolicy is set to \"None\", the dnsConfig field has to be specified. For more information, see [Pod's DNS Config](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config).", + "type": "object" + }, + "helm-values.podDnsPolicy": { + "description": "Pod DNS policy.\nFor more information, see [Pod's DNS Policy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy).", + "type": "string" + }, + "helm-values.podLabels": { + "default": {}, + "description": "Optional additional labels to add to the controller Pods.", + "type": "object" + }, + "helm-values.prometheus": { + "additionalProperties": false, + "properties": { + "enabled": { + "$ref": "#/$defs/helm-values.prometheus.enabled" + }, + "podmonitor": { + "$ref": "#/$defs/helm-values.prometheus.podmonitor" + }, + "servicemonitor": { + "$ref": "#/$defs/helm-values.prometheus.servicemonitor" + } + }, + "type": "object" + }, + "helm-values.prometheus.enabled": { + "default": true, + "description": "Enable Prometheus monitoring for the cert-manager controller and webhook. If you use the Prometheus Operator, set prometheus.podmonitor.enabled or prometheus.servicemonitor.enabled, to create a PodMonitor or a\nServiceMonitor resource.\nOtherwise, 'prometheus.io' annotations are added to the cert-manager and cert-manager-webhook Deployments. Note that you can not enable both PodMonitor and ServiceMonitor as they are mutually exclusive. Enabling both will result in an error.", + "type": "boolean" + }, + "helm-values.prometheus.podmonitor": { + "additionalProperties": false, + "properties": { + "annotations": { + "$ref": "#/$defs/helm-values.prometheus.podmonitor.annotations" + }, + "enabled": { + "$ref": "#/$defs/helm-values.prometheus.podmonitor.enabled" + }, + "endpointAdditionalProperties": { + "$ref": "#/$defs/helm-values.prometheus.podmonitor.endpointAdditionalProperties" + }, + "honorLabels": { + "$ref": "#/$defs/helm-values.prometheus.podmonitor.honorLabels" + }, + "interval": { + "$ref": "#/$defs/helm-values.prometheus.podmonitor.interval" + }, + "labels": { + "$ref": "#/$defs/helm-values.prometheus.podmonitor.labels" + }, + "namespace": { + "$ref": "#/$defs/helm-values.prometheus.podmonitor.namespace" + }, + "path": { + "$ref": "#/$defs/helm-values.prometheus.podmonitor.path" + }, + "prometheusInstance": { + "$ref": "#/$defs/helm-values.prometheus.podmonitor.prometheusInstance" + }, + "scrapeTimeout": { + "$ref": "#/$defs/helm-values.prometheus.podmonitor.scrapeTimeout" + } + }, + "type": "object" + }, + "helm-values.prometheus.podmonitor.annotations": { + "default": {}, + "description": "Additional annotations to add to the PodMonitor.", + "type": "object" + }, + "helm-values.prometheus.podmonitor.enabled": { + "default": false, + "description": "Create a PodMonitor to add cert-manager to Prometheus.", + "type": "boolean" + }, + "helm-values.prometheus.podmonitor.endpointAdditionalProperties": { + "default": {}, + "description": "EndpointAdditionalProperties allows setting additional properties on the endpoint such as relabelings, metricRelabelings etc.\n\nFor example:\nendpointAdditionalProperties:\n relabelings:\n - action: replace\n sourceLabels:\n - __meta_kubernetes_pod_node_name\n targetLabel: instance\n # Configure the PodMonitor for TLS connections\n # See https://cert-manager.io/docs/devops-tips/prometheus-metrics/#tls\n scheme: https\n tlsConfig:\n serverName: cert-manager-metrics\n ca:\n secret:\n name: cert-manager-metrics-ca\n key: \"tls.crt\"", + "type": "object" + }, + "helm-values.prometheus.podmonitor.honorLabels": { + "default": false, + "description": "Keep labels from scraped data, overriding server-side labels.", + "type": "boolean" + }, + "helm-values.prometheus.podmonitor.interval": { + "default": "60s", + "description": "The interval to scrape metrics.", + "type": "string" + }, + "helm-values.prometheus.podmonitor.labels": { + "default": {}, + "description": "Additional labels to add to the PodMonitor.", + "type": "object" + }, + "helm-values.prometheus.podmonitor.namespace": { + "description": "The namespace that the pod monitor should live in, defaults to the cert-manager namespace.", + "type": "string" + }, + "helm-values.prometheus.podmonitor.path": { + "default": "/metrics", + "description": "The path to scrape for metrics.", + "type": "string" + }, + "helm-values.prometheus.podmonitor.prometheusInstance": { + "default": "default", + "description": "Specifies the `prometheus` label on the created PodMonitor. This is used when different Prometheus instances have label selectors matching different PodMonitors.", + "type": "string" + }, + "helm-values.prometheus.podmonitor.scrapeTimeout": { + "default": "30s", + "description": "The timeout before a metrics scrape fails.", + "type": "string" + }, + "helm-values.prometheus.servicemonitor": { + "additionalProperties": false, + "properties": { + "annotations": { + "$ref": "#/$defs/helm-values.prometheus.servicemonitor.annotations" + }, + "enabled": { + "$ref": "#/$defs/helm-values.prometheus.servicemonitor.enabled" + }, + "endpointAdditionalProperties": { + "$ref": "#/$defs/helm-values.prometheus.servicemonitor.endpointAdditionalProperties" + }, + "honorLabels": { + "$ref": "#/$defs/helm-values.prometheus.servicemonitor.honorLabels" + }, + "interval": { + "$ref": "#/$defs/helm-values.prometheus.servicemonitor.interval" + }, + "labels": { + "$ref": "#/$defs/helm-values.prometheus.servicemonitor.labels" + }, + "namespace": { + "$ref": "#/$defs/helm-values.prometheus.servicemonitor.namespace" + }, + "path": { + "$ref": "#/$defs/helm-values.prometheus.servicemonitor.path" + }, + "prometheusInstance": { + "$ref": "#/$defs/helm-values.prometheus.servicemonitor.prometheusInstance" + }, + "scrapeTimeout": { + "$ref": "#/$defs/helm-values.prometheus.servicemonitor.scrapeTimeout" + }, + "targetPort": { + "$ref": "#/$defs/helm-values.prometheus.servicemonitor.targetPort" + } + }, + "type": "object" + }, + "helm-values.prometheus.servicemonitor.annotations": { + "default": {}, + "description": "Additional annotations to add to the ServiceMonitor.", + "type": "object" + }, + "helm-values.prometheus.servicemonitor.enabled": { + "default": false, + "description": "Create a ServiceMonitor to add cert-manager to Prometheus.", + "type": "boolean" + }, + "helm-values.prometheus.servicemonitor.endpointAdditionalProperties": { + "default": {}, + "description": "EndpointAdditionalProperties allows setting additional properties on the endpoint such as relabelings, metricRelabelings etc.\n\nFor example:\nendpointAdditionalProperties:\n relabelings:\n - action: replace\n sourceLabels:\n - __meta_kubernetes_pod_node_name\n targetLabel: instance", + "type": "object" + }, + "helm-values.prometheus.servicemonitor.honorLabels": { + "default": false, + "description": "Keep labels from scraped data, overriding server-side labels.", + "type": "boolean" + }, + "helm-values.prometheus.servicemonitor.interval": { + "default": "60s", + "description": "The interval to scrape metrics.", + "type": "string" + }, + "helm-values.prometheus.servicemonitor.labels": { + "default": {}, + "description": "Additional labels to add to the ServiceMonitor.", + "type": "object" + }, + "helm-values.prometheus.servicemonitor.namespace": { + "description": "The namespace that the service monitor should live in, defaults to the cert-manager namespace.", + "type": "string" + }, + "helm-values.prometheus.servicemonitor.path": { + "default": "/metrics", + "description": "The path to scrape for metrics.", + "type": "string" + }, + "helm-values.prometheus.servicemonitor.prometheusInstance": { + "default": "default", + "description": "Specifies the `prometheus` label on the created ServiceMonitor. This is used when different Prometheus instances have label selectors matching different ServiceMonitors.", + "type": "string" + }, + "helm-values.prometheus.servicemonitor.scrapeTimeout": { + "default": "30s", + "description": "The timeout before a metrics scrape fails.", + "type": "string" + }, + "helm-values.prometheus.servicemonitor.targetPort": { + "default": 9402, + "description": "The target port to set on the ServiceMonitor. This must match the port that the cert-manager controller is listening on for metrics.", + "type": "number" + }, + "helm-values.replicaCount": { + "default": 1, + "description": "The number of replicas of the cert-manager controller to run.\n\nThe default is 1, but in production set this to 2 or 3 to provide high availability.\n\nIf `replicas > 1`, consider setting `podDisruptionBudget.enabled=true`.\n\nNote that cert-manager uses leader election to ensure that there can only be a single instance active at a time.", + "type": "number" + }, + "helm-values.resources": { + "default": {}, + "description": "Resources to provide to the cert-manager controller pod.\n\nFor example:\nrequests:\n cpu: 10m\n memory: 32Mi\nFor more information, see [Resource Management for Pods and Containers](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/).", + "type": "object" + }, + "helm-values.securityContext": { + "default": { + "runAsNonRoot": true, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "description": "Pod Security Context.\nFor more information, see [Configure a Security Context for a Pod or Container](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/).", + "type": "object" + }, + "helm-values.serviceAccount": { + "additionalProperties": false, + "properties": { + "annotations": { + "$ref": "#/$defs/helm-values.serviceAccount.annotations" + }, + "automountServiceAccountToken": { + "$ref": "#/$defs/helm-values.serviceAccount.automountServiceAccountToken" + }, + "create": { + "$ref": "#/$defs/helm-values.serviceAccount.create" + }, + "labels": { + "$ref": "#/$defs/helm-values.serviceAccount.labels" + }, + "name": { + "$ref": "#/$defs/helm-values.serviceAccount.name" + } + }, + "type": "object" + }, + "helm-values.serviceAccount.annotations": { + "description": "Optional additional annotations to add to the controller's Service Account.", + "type": "object" + }, + "helm-values.serviceAccount.automountServiceAccountToken": { + "default": true, + "description": "Automount API credentials for a Service Account.", + "type": "boolean" + }, + "helm-values.serviceAccount.create": { + "default": true, + "description": "Specifies whether a service account should be created.", + "type": "boolean" + }, + "helm-values.serviceAccount.labels": { + "description": "Optional additional labels to add to the controller's Service Account.", + "type": "object" + }, + "helm-values.serviceAccount.name": { + "description": "The name of the service account to use.\nIf not set and create is true, a name is generated using the fullname template.", + "type": "string" + }, + "helm-values.serviceAnnotations": { + "description": "Optional annotations to add to the controller Service.", + "type": "object" + }, + "helm-values.serviceIPFamilies": { + "description": "Optionally set the IP families for the controller Service that should be supported, in the order in which they should be applied to ClusterIP. Can be IPv4 and/or IPv6.", + "items": {}, + "type": "array" + }, + "helm-values.serviceIPFamilyPolicy": { + "description": "Optionally set the IP family policy for the controller Service to configure dual-stack; see [Configure dual-stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services).", + "type": "string" + }, + "helm-values.serviceLabels": { + "description": "Optional additional labels to add to the controller Service.", + "type": "object" + }, + "helm-values.startupapicheck": { + "additionalProperties": false, + "properties": { + "affinity": { + "$ref": "#/$defs/helm-values.startupapicheck.affinity" + }, + "automountServiceAccountToken": { + "$ref": "#/$defs/helm-values.startupapicheck.automountServiceAccountToken" + }, + "backoffLimit": { + "$ref": "#/$defs/helm-values.startupapicheck.backoffLimit" + }, + "containerSecurityContext": { + "$ref": "#/$defs/helm-values.startupapicheck.containerSecurityContext" + }, + "enableServiceLinks": { + "$ref": "#/$defs/helm-values.startupapicheck.enableServiceLinks" + }, + "enabled": { + "$ref": "#/$defs/helm-values.startupapicheck.enabled" + }, + "extraArgs": { + "$ref": "#/$defs/helm-values.startupapicheck.extraArgs" + }, + "extraEnv": { + "$ref": "#/$defs/helm-values.startupapicheck.extraEnv" + }, + "image": { + "$ref": "#/$defs/helm-values.startupapicheck.image" + }, + "jobAnnotations": { + "$ref": "#/$defs/helm-values.startupapicheck.jobAnnotations" + }, + "nodeSelector": { + "$ref": "#/$defs/helm-values.startupapicheck.nodeSelector" + }, + "podAnnotations": { + "$ref": "#/$defs/helm-values.startupapicheck.podAnnotations" + }, + "podLabels": { + "$ref": "#/$defs/helm-values.startupapicheck.podLabels" + }, + "rbac": { + "$ref": "#/$defs/helm-values.startupapicheck.rbac" + }, + "resources": { + "$ref": "#/$defs/helm-values.startupapicheck.resources" + }, + "securityContext": { + "$ref": "#/$defs/helm-values.startupapicheck.securityContext" + }, + "serviceAccount": { + "$ref": "#/$defs/helm-values.startupapicheck.serviceAccount" + }, + "timeout": { + "$ref": "#/$defs/helm-values.startupapicheck.timeout" + }, + "tolerations": { + "$ref": "#/$defs/helm-values.startupapicheck.tolerations" + }, + "volumeMounts": { + "$ref": "#/$defs/helm-values.startupapicheck.volumeMounts" + }, + "volumes": { + "$ref": "#/$defs/helm-values.startupapicheck.volumes" + } + }, + "type": "object" + }, + "helm-values.startupapicheck.affinity": { + "default": {}, + "description": "A Kubernetes Affinity, if required. For more information, see [Affinity v1 core](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#affinity-v1-core).\nFor example:\naffinity:\n nodeAffinity:\n requiredDuringSchedulingIgnoredDuringExecution:\n nodeSelectorTerms:\n - matchExpressions:\n - key: foo.bar.com/role\n operator: In\n values:\n - master", + "type": "object" + }, + "helm-values.startupapicheck.automountServiceAccountToken": { + "description": "Automounting API credentials for a particular pod.", + "type": "boolean" + }, + "helm-values.startupapicheck.backoffLimit": { + "default": 4, + "description": "Job backoffLimit", + "type": "number" + }, + "helm-values.startupapicheck.containerSecurityContext": { + "default": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "description": "Container Security Context to be set on the controller component container. For more information, see [Configure a Security Context for a Pod or Container](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/).", + "type": "object" + }, + "helm-values.startupapicheck.enableServiceLinks": { + "default": false, + "description": "enableServiceLinks indicates whether information about services should be injected into pod's environment variables, matching the syntax of Docker links.", + "type": "boolean" + }, + "helm-values.startupapicheck.enabled": { + "default": true, + "description": "Enables the startup api check.", + "type": "boolean" + }, + "helm-values.startupapicheck.extraArgs": { + "default": [ + "-v" + ], + "description": "Additional command line flags to pass to startupapicheck binary. To see all available flags run `docker run quay.io/jetstack/cert-manager-startupapicheck: --help`.\n\nVerbose logging is enabled by default so that if startupapicheck fails, you can know what exactly caused the failure. Verbose logs include details of the webhook URL, IP address and TCP connect errors for example.", + "items": {}, + "type": "array" + }, + "helm-values.startupapicheck.extraEnv": { + "default": [], + "description": "Additional environment variables to pass to cert-manager startupapicheck binary.\nFor example:\nextraEnv:\n- name: SOME_VAR\n value: 'some value'", + "items": {}, + "type": "array" + }, + "helm-values.startupapicheck.image": { + "additionalProperties": false, + "properties": { + "digest": { + "$ref": "#/$defs/helm-values.startupapicheck.image.digest" + }, + "pullPolicy": { + "$ref": "#/$defs/helm-values.startupapicheck.image.pullPolicy" + }, + "registry": { + "$ref": "#/$defs/helm-values.startupapicheck.image.registry" + }, + "repository": { + "$ref": "#/$defs/helm-values.startupapicheck.image.repository" + }, + "tag": { + "$ref": "#/$defs/helm-values.startupapicheck.image.tag" + } + }, + "type": "object" + }, + "helm-values.startupapicheck.image.digest": { + "description": "Setting a digest will override any tag.", + "type": "string" + }, + "helm-values.startupapicheck.image.pullPolicy": { + "default": "IfNotPresent", + "description": "Kubernetes imagePullPolicy on Deployment.", + "type": "string" + }, + "helm-values.startupapicheck.image.registry": { + "description": "The container registry to pull the startupapicheck image from.", + "type": "string" + }, + "helm-values.startupapicheck.image.repository": { + "default": "quay.io/jetstack/cert-manager-startupapicheck", + "description": "The container image for the cert-manager startupapicheck.", + "type": "string" + }, + "helm-values.startupapicheck.image.tag": { + "description": "Override the image tag to deploy by setting this variable. If no value is set, the chart's appVersion is used.", + "type": "string" + }, + "helm-values.startupapicheck.jobAnnotations": { + "default": { + "helm.sh/hook": "post-install", + "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded", + "helm.sh/hook-weight": "1" + }, + "description": "Optional additional annotations to add to the startupapicheck Job.", + "type": "object" + }, + "helm-values.startupapicheck.nodeSelector": { + "default": { + "kubernetes.io/os": "linux" + }, + "description": "The nodeSelector on Pods tells Kubernetes to schedule Pods on the nodes with matching labels. For more information, see [Assigning Pods to Nodes](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/).\n\nThis default ensures that Pods are only scheduled to Linux nodes. It prevents Pods being scheduled to Windows nodes in a mixed OS cluster.", + "type": "object" + }, + "helm-values.startupapicheck.podAnnotations": { + "description": "Optional additional annotations to add to the startupapicheck Pods.", + "type": "object" + }, + "helm-values.startupapicheck.podLabels": { + "default": {}, + "description": "Optional additional labels to add to the startupapicheck Pods.", + "type": "object" + }, + "helm-values.startupapicheck.rbac": { + "additionalProperties": false, + "properties": { + "annotations": { + "$ref": "#/$defs/helm-values.startupapicheck.rbac.annotations" + } + }, + "type": "object" + }, + "helm-values.startupapicheck.rbac.annotations": { + "default": { + "helm.sh/hook": "post-install", + "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded", + "helm.sh/hook-weight": "-5" + }, + "description": "annotations for the startup API Check job RBAC and PSP resources.", + "type": "object" + }, + "helm-values.startupapicheck.resources": { + "default": {}, + "description": "Resources to provide to the cert-manager controller pod.\n\nFor example:\nrequests:\n cpu: 10m\n memory: 32Mi\nFor more information, see [Resource Management for Pods and Containers](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/).", + "type": "object" + }, + "helm-values.startupapicheck.securityContext": { + "default": { + "runAsNonRoot": true, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "description": "Pod Security Context to be set on the startupapicheck component Pod. For more information, see [Configure a Security Context for a Pod or Container](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/).", + "type": "object" + }, + "helm-values.startupapicheck.serviceAccount": { + "additionalProperties": false, + "properties": { + "annotations": { + "$ref": "#/$defs/helm-values.startupapicheck.serviceAccount.annotations" + }, + "automountServiceAccountToken": { + "$ref": "#/$defs/helm-values.startupapicheck.serviceAccount.automountServiceAccountToken" + }, + "create": { + "$ref": "#/$defs/helm-values.startupapicheck.serviceAccount.create" + }, + "labels": { + "$ref": "#/$defs/helm-values.startupapicheck.serviceAccount.labels" + }, + "name": { + "$ref": "#/$defs/helm-values.startupapicheck.serviceAccount.name" + } + }, + "type": "object" + }, + "helm-values.startupapicheck.serviceAccount.annotations": { + "default": { + "helm.sh/hook": "post-install", + "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded", + "helm.sh/hook-weight": "-5" + }, + "description": "Optional additional annotations to add to the Job's Service Account.", + "type": "object" + }, + "helm-values.startupapicheck.serviceAccount.automountServiceAccountToken": { + "default": true, + "description": "Automount API credentials for a Service Account.", + "type": "boolean" + }, + "helm-values.startupapicheck.serviceAccount.create": { + "default": true, + "description": "Specifies whether a service account should be created.", + "type": "boolean" + }, + "helm-values.startupapicheck.serviceAccount.labels": { + "description": "Optional additional labels to add to the startupapicheck's Service Account.", + "type": "object" + }, + "helm-values.startupapicheck.serviceAccount.name": { + "description": "The name of the service account to use.\nIf not set and create is true, a name is generated using the fullname template.", + "type": "string" + }, + "helm-values.startupapicheck.timeout": { + "default": "1m", + "description": "Timeout for 'kubectl check api' command.", + "type": "string" + }, + "helm-values.startupapicheck.tolerations": { + "default": [], + "description": "A list of Kubernetes Tolerations, if required. For more information, see [Toleration v1 core](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#toleration-v1-core).\n\nFor example:\ntolerations:\n- key: foo.bar.com/role\n operator: Equal\n value: master\n effect: NoSchedule", + "items": {}, + "type": "array" + }, + "helm-values.startupapicheck.volumeMounts": { + "default": [], + "description": "Additional volume mounts to add to the cert-manager controller container.", + "items": {}, + "type": "array" + }, + "helm-values.startupapicheck.volumes": { + "default": [], + "description": "Additional volumes to add to the cert-manager controller pod.", + "items": {}, + "type": "array" + }, + "helm-values.strategy": { + "default": {}, + "description": "Deployment update strategy for the cert-manager controller deployment. For more information, see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy).\n\nFor example:\nstrategy:\n type: RollingUpdate\n rollingUpdate:\n maxSurge: 0\n maxUnavailable: 1", + "type": "object" + }, + "helm-values.tolerations": { + "default": [], + "description": "A list of Kubernetes Tolerations, if required. For more information, see [Toleration v1 core](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#toleration-v1-core).\n\nFor example:\ntolerations:\n- key: foo.bar.com/role\n operator: Equal\n value: master\n effect: NoSchedule", + "items": {}, + "type": "array" + }, + "helm-values.topologySpreadConstraints": { + "default": [], + "description": "A list of Kubernetes TopologySpreadConstraints, if required. For more information, see [Topology spread constraint v1 core](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#topologyspreadconstraint-v1-core\n\nFor example:\ntopologySpreadConstraints:\n- maxSkew: 2\n topologyKey: topology.kubernetes.io/zone\n whenUnsatisfiable: ScheduleAnyway\n labelSelector:\n matchLabels:\n app.kubernetes.io/instance: cert-manager\n app.kubernetes.io/component: controller", + "items": {}, + "type": "array" + }, + "helm-values.volumeMounts": { + "default": [], + "description": "Additional volume mounts to add to the cert-manager controller container.", + "items": {}, + "type": "array" + }, + "helm-values.volumes": { + "default": [], + "description": "Additional volumes to add to the cert-manager controller pod.", + "items": {}, + "type": "array" + }, + "helm-values.webhook": { + "additionalProperties": false, + "properties": { + "affinity": { + "$ref": "#/$defs/helm-values.webhook.affinity" + }, + "automountServiceAccountToken": { + "$ref": "#/$defs/helm-values.webhook.automountServiceAccountToken" + }, + "config": { + "$ref": "#/$defs/helm-values.webhook.config" + }, + "containerSecurityContext": { + "$ref": "#/$defs/helm-values.webhook.containerSecurityContext" + }, + "deploymentAnnotations": { + "$ref": "#/$defs/helm-values.webhook.deploymentAnnotations" + }, + "enableServiceLinks": { + "$ref": "#/$defs/helm-values.webhook.enableServiceLinks" + }, + "extraArgs": { + "$ref": "#/$defs/helm-values.webhook.extraArgs" + }, + "extraEnv": { + "$ref": "#/$defs/helm-values.webhook.extraEnv" + }, + "featureGates": { + "$ref": "#/$defs/helm-values.webhook.featureGates" + }, + "hostNetwork": { + "$ref": "#/$defs/helm-values.webhook.hostNetwork" + }, + "image": { + "$ref": "#/$defs/helm-values.webhook.image" + }, + "livenessProbe": { + "$ref": "#/$defs/helm-values.webhook.livenessProbe" + }, + "loadBalancerIP": { + "$ref": "#/$defs/helm-values.webhook.loadBalancerIP" + }, + "mutatingWebhookConfiguration": { + "$ref": "#/$defs/helm-values.webhook.mutatingWebhookConfiguration" + }, + "mutatingWebhookConfigurationAnnotations": { + "$ref": "#/$defs/helm-values.webhook.mutatingWebhookConfigurationAnnotations" + }, + "networkPolicy": { + "$ref": "#/$defs/helm-values.webhook.networkPolicy" + }, + "nodeSelector": { + "$ref": "#/$defs/helm-values.webhook.nodeSelector" + }, + "podAnnotations": { + "$ref": "#/$defs/helm-values.webhook.podAnnotations" + }, + "podDisruptionBudget": { + "$ref": "#/$defs/helm-values.webhook.podDisruptionBudget" + }, + "podLabels": { + "$ref": "#/$defs/helm-values.webhook.podLabels" + }, + "readinessProbe": { + "$ref": "#/$defs/helm-values.webhook.readinessProbe" + }, + "replicaCount": { + "$ref": "#/$defs/helm-values.webhook.replicaCount" + }, + "resources": { + "$ref": "#/$defs/helm-values.webhook.resources" + }, + "securePort": { + "$ref": "#/$defs/helm-values.webhook.securePort" + }, + "securityContext": { + "$ref": "#/$defs/helm-values.webhook.securityContext" + }, + "serviceAccount": { + "$ref": "#/$defs/helm-values.webhook.serviceAccount" + }, + "serviceAnnotations": { + "$ref": "#/$defs/helm-values.webhook.serviceAnnotations" + }, + "serviceIPFamilies": { + "$ref": "#/$defs/helm-values.webhook.serviceIPFamilies" + }, + "serviceIPFamilyPolicy": { + "$ref": "#/$defs/helm-values.webhook.serviceIPFamilyPolicy" + }, + "serviceLabels": { + "$ref": "#/$defs/helm-values.webhook.serviceLabels" + }, + "serviceType": { + "$ref": "#/$defs/helm-values.webhook.serviceType" + }, + "strategy": { + "$ref": "#/$defs/helm-values.webhook.strategy" + }, + "timeoutSeconds": { + "$ref": "#/$defs/helm-values.webhook.timeoutSeconds" + }, + "tolerations": { + "$ref": "#/$defs/helm-values.webhook.tolerations" + }, + "topologySpreadConstraints": { + "$ref": "#/$defs/helm-values.webhook.topologySpreadConstraints" + }, + "url": { + "$ref": "#/$defs/helm-values.webhook.url" + }, + "validatingWebhookConfiguration": { + "$ref": "#/$defs/helm-values.webhook.validatingWebhookConfiguration" + }, + "validatingWebhookConfigurationAnnotations": { + "$ref": "#/$defs/helm-values.webhook.validatingWebhookConfigurationAnnotations" + }, + "volumeMounts": { + "$ref": "#/$defs/helm-values.webhook.volumeMounts" + }, + "volumes": { + "$ref": "#/$defs/helm-values.webhook.volumes" + } + }, + "type": "object" + }, + "helm-values.webhook.affinity": { + "default": {}, + "description": "A Kubernetes Affinity, if required. For more information, see [Affinity v1 core](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#affinity-v1-core).\n\nFor example:\naffinity:\n nodeAffinity:\n requiredDuringSchedulingIgnoredDuringExecution:\n nodeSelectorTerms:\n - matchExpressions:\n - key: foo.bar.com/role\n operator: In\n values:\n - master", + "type": "object" + }, + "helm-values.webhook.automountServiceAccountToken": { + "description": "Automounting API credentials for a particular pod.", + "type": "boolean" + }, + "helm-values.webhook.config": { + "default": {}, + "description": "This is used to configure options for the webhook pod. This allows setting options that would usually be provided using flags.\n\nIf `apiVersion` and `kind` are unspecified they default to the current latest version (currently `webhook.config.cert-manager.io/v1alpha1`). You can pin the version by specifying the `apiVersion` yourself.\n\nFor example:\napiVersion: webhook.config.cert-manager.io/v1alpha1\nkind: WebhookConfiguration\n# The port that the webhook listens on for requests.\n# In GKE private clusters, by default Kubernetes apiservers are allowed to\n# talk to the cluster nodes only on 443 and 10250. Configuring\n# securePort: 10250 therefore will work out-of-the-box without needing to add firewall\n# rules or requiring NET_BIND_SERVICE capabilities to bind port numbers < 1000.\n# This should be uncommented and set as a default by the chart once\n# the apiVersion of WebhookConfiguration graduates beyond v1alpha1.\nsecurePort: 10250\n# Configure the metrics server for TLS\n# See https://cert-manager.io/docs/devops-tips/prometheus-metrics/#tls\nmetricsTLSConfig:\n dynamic:\n secretNamespace: \"cert-manager\"\n secretName: \"cert-manager-metrics-ca\"\n dnsNames:\n - cert-manager-metrics", + "type": "object" + }, + "helm-values.webhook.containerSecurityContext": { + "default": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "description": "Container Security Context to be set on the webhook component container. For more information, see [Configure a Security Context for a Pod or Container](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/).", + "type": "object" + }, + "helm-values.webhook.deploymentAnnotations": { + "description": "Optional additional annotations to add to the webhook Deployment.", + "type": "object" + }, + "helm-values.webhook.enableServiceLinks": { + "default": false, + "description": "enableServiceLinks indicates whether information about services should be injected into the pod's environment variables, matching the syntax of Docker links.", + "type": "boolean" + }, + "helm-values.webhook.extraArgs": { + "default": [], + "description": "Additional command line flags to pass to cert-manager webhook binary. To see all available flags run `docker run quay.io/jetstack/cert-manager-webhook: --help`.", + "items": {}, + "type": "array" + }, + "helm-values.webhook.extraEnv": { + "default": [], + "description": "Additional environment variables to pass to cert-manager webhook binary.\nFor example:\nextraEnv:\n- name: SOME_VAR\n value: 'some value'", + "items": {}, + "type": "array" + }, + "helm-values.webhook.featureGates": { + "default": "", + "description": "Comma separated list of feature gates that should be enabled on the webhook pod.", + "type": "string" + }, + "helm-values.webhook.hostNetwork": { + "default": false, + "description": "Specifies if the webhook should be started in hostNetwork mode.\n\nRequired for use in some managed kubernetes clusters (such as AWS EKS) with custom. CNI (such as calico), because control-plane managed by AWS cannot communicate with pods' IP CIDR and admission webhooks are not working\n\nSince the default port for the webhook conflicts with kubelet on the host network, `webhook.securePort` should be changed to an available port if running in hostNetwork mode.", + "type": "boolean" + }, + "helm-values.webhook.image": { + "additionalProperties": false, + "properties": { + "digest": { + "$ref": "#/$defs/helm-values.webhook.image.digest" + }, + "pullPolicy": { + "$ref": "#/$defs/helm-values.webhook.image.pullPolicy" + }, + "registry": { + "$ref": "#/$defs/helm-values.webhook.image.registry" + }, + "repository": { + "$ref": "#/$defs/helm-values.webhook.image.repository" + }, + "tag": { + "$ref": "#/$defs/helm-values.webhook.image.tag" + } + }, + "type": "object" + }, + "helm-values.webhook.image.digest": { + "description": "Setting a digest will override any tag", + "type": "string" + }, + "helm-values.webhook.image.pullPolicy": { + "default": "IfNotPresent", + "description": "Kubernetes imagePullPolicy on Deployment.", + "type": "string" + }, + "helm-values.webhook.image.registry": { + "description": "The container registry to pull the webhook image from.", + "type": "string" + }, + "helm-values.webhook.image.repository": { + "default": "quay.io/jetstack/cert-manager-webhook", + "description": "The container image for the cert-manager webhook", + "type": "string" + }, + "helm-values.webhook.image.tag": { + "description": "Override the image tag to deploy by setting this variable. If no value is set, the chart's appVersion will be used.", + "type": "string" + }, + "helm-values.webhook.livenessProbe": { + "default": { + "failureThreshold": 3, + "initialDelaySeconds": 60, + "periodSeconds": 10, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "description": "Liveness probe values.\nFor more information, see [Container probes](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes).", + "type": "object" + }, + "helm-values.webhook.loadBalancerIP": { + "description": "Specify the load balancer IP for the created service.", + "type": "string" + }, + "helm-values.webhook.mutatingWebhookConfiguration": { + "additionalProperties": false, + "properties": { + "namespaceSelector": { + "$ref": "#/$defs/helm-values.webhook.mutatingWebhookConfiguration.namespaceSelector" + } + }, + "type": "object" + }, + "helm-values.webhook.mutatingWebhookConfiguration.namespaceSelector": { + "default": {}, + "description": "Configure spec.namespaceSelector for mutating webhooks.", + "type": "object" + }, + "helm-values.webhook.mutatingWebhookConfigurationAnnotations": { + "description": "Optional additional annotations to add to the webhook MutatingWebhookConfiguration.", + "type": "object" + }, + "helm-values.webhook.networkPolicy": { + "additionalProperties": false, + "properties": { + "egress": { + "$ref": "#/$defs/helm-values.webhook.networkPolicy.egress" + }, + "enabled": { + "$ref": "#/$defs/helm-values.webhook.networkPolicy.enabled" + }, + "ingress": { + "$ref": "#/$defs/helm-values.webhook.networkPolicy.ingress" + } + }, + "type": "object" + }, + "helm-values.webhook.networkPolicy.egress": { + "default": [ + { + "ports": [ + { + "port": 80, + "protocol": "TCP" + }, + { + "port": 443, + "protocol": "TCP" + }, + { + "port": 53, + "protocol": "TCP" + }, + { + "port": 53, + "protocol": "UDP" + }, + { + "port": 6443, + "protocol": "TCP" + } + ], + "to": [ + { + "ipBlock": { + "cidr": "0.0.0.0/0" + } + } + ] + } + ], + "description": "Egress rule for the webhook network policy. By default, it allows all outbound traffic to ports 80 and 443, as well as DNS ports.", + "items": {}, + "type": "array" + }, + "helm-values.webhook.networkPolicy.enabled": { + "default": false, + "description": "Create network policies for the webhooks.", + "type": "boolean" + }, + "helm-values.webhook.networkPolicy.ingress": { + "default": [ + { + "from": [ + { + "ipBlock": { + "cidr": "0.0.0.0/0" + } + } + ] + } + ], + "description": "Ingress rule for the webhook network policy. By default, it allows all inbound traffic.", + "items": {}, + "type": "array" + }, + "helm-values.webhook.nodeSelector": { + "default": { + "kubernetes.io/os": "linux" + }, + "description": "The nodeSelector on Pods tells Kubernetes to schedule Pods on the nodes with matching labels. For more information, see [Assigning Pods to Nodes](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/).\n\nThis default ensures that Pods are only scheduled to Linux nodes. It prevents Pods being scheduled to Windows nodes in a mixed OS cluster.", + "type": "object" + }, + "helm-values.webhook.podAnnotations": { + "description": "Optional additional annotations to add to the webhook Pods.", + "type": "object" + }, + "helm-values.webhook.podDisruptionBudget": { + "additionalProperties": false, + "properties": { + "enabled": { + "$ref": "#/$defs/helm-values.webhook.podDisruptionBudget.enabled" + }, + "maxUnavailable": { + "$ref": "#/$defs/helm-values.webhook.podDisruptionBudget.maxUnavailable" + }, + "minAvailable": { + "$ref": "#/$defs/helm-values.webhook.podDisruptionBudget.minAvailable" + } + }, + "type": "object" + }, + "helm-values.webhook.podDisruptionBudget.enabled": { + "default": false, + "description": "Enable or disable the PodDisruptionBudget resource.\n\nThis prevents downtime during voluntary disruptions such as during a Node upgrade. For example, the PodDisruptionBudget will block `kubectl drain` if it is used on the Node where the only remaining cert-manager\nPod is currently running.", + "type": "boolean" + }, + "helm-values.webhook.podDisruptionBudget.maxUnavailable": { + "description": "This property configures the maximum unavailable pods for disruptions. Can either be set to an integer (e.g. 1) or a percentage value (e.g. 25%).\nIt cannot be used if `minAvailable` is set." + }, + "helm-values.webhook.podDisruptionBudget.minAvailable": { + "description": "This property configures the minimum available pods for disruptions. Can either be set to an integer (e.g. 1) or a percentage value (e.g. 25%).\nIt cannot be used if `maxUnavailable` is set." + }, + "helm-values.webhook.podLabels": { + "default": {}, + "description": "Optional additional labels to add to the Webhook Pods.", + "type": "object" + }, + "helm-values.webhook.readinessProbe": { + "default": { + "failureThreshold": 3, + "initialDelaySeconds": 5, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "description": "Readiness probe values.\nFor more information, see [Container probes](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes).", + "type": "object" + }, + "helm-values.webhook.replicaCount": { + "default": 1, + "description": "Number of replicas of the cert-manager webhook to run.\n\nThe default is 1, but in production set this to 2 or 3 to provide high availability.\n\nIf `replicas > 1`, consider setting `webhook.podDisruptionBudget.enabled=true`.", + "type": "number" + }, + "helm-values.webhook.resources": { + "default": {}, + "description": "Resources to provide to the cert-manager webhook pod.\n\nFor example:\nrequests:\n cpu: 10m\n memory: 32Mi\nFor more information, see [Resource Management for Pods and Containers](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/).", + "type": "object" + }, + "helm-values.webhook.securePort": { + "default": 10250, + "description": "The port that the webhook listens on for requests. In GKE private clusters, by default Kubernetes apiservers are allowed to talk to the cluster nodes only on 443 and 10250. Configuring securePort: 10250, therefore will work out-of-the-box without needing to add firewall rules or requiring NET_BIND_SERVICE capabilities to bind port numbers <1000.", + "type": "number" + }, + "helm-values.webhook.securityContext": { + "default": { + "runAsNonRoot": true, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "description": "Pod Security Context to be set on the webhook component Pod. For more information, see [Configure a Security Context for a Pod or Container](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/).", + "type": "object" + }, + "helm-values.webhook.serviceAccount": { + "additionalProperties": false, + "properties": { + "annotations": { + "$ref": "#/$defs/helm-values.webhook.serviceAccount.annotations" + }, + "automountServiceAccountToken": { + "$ref": "#/$defs/helm-values.webhook.serviceAccount.automountServiceAccountToken" + }, + "create": { + "$ref": "#/$defs/helm-values.webhook.serviceAccount.create" + }, + "labels": { + "$ref": "#/$defs/helm-values.webhook.serviceAccount.labels" + }, + "name": { + "$ref": "#/$defs/helm-values.webhook.serviceAccount.name" + } + }, + "type": "object" + }, + "helm-values.webhook.serviceAccount.annotations": { + "description": "Optional additional annotations to add to the webhook's Service Account.", + "type": "object" + }, + "helm-values.webhook.serviceAccount.automountServiceAccountToken": { + "default": true, + "description": "Automount API credentials for a Service Account.", + "type": "boolean" + }, + "helm-values.webhook.serviceAccount.create": { + "default": true, + "description": "Specifies whether a service account should be created.", + "type": "boolean" + }, + "helm-values.webhook.serviceAccount.labels": { + "description": "Optional additional labels to add to the webhook's Service Account.", + "type": "object" + }, + "helm-values.webhook.serviceAccount.name": { + "description": "The name of the service account to use.\nIf not set and create is true, a name is generated using the fullname template.", + "type": "string" + }, + "helm-values.webhook.serviceAnnotations": { + "description": "Optional additional annotations to add to the webhook Service.", + "type": "object" + }, + "helm-values.webhook.serviceIPFamilies": { + "default": [], + "description": "Optionally set the IP families for the controller Service that should be supported, in the order in which they should be applied to ClusterIP. Can be IPv4 and/or IPv6.", + "items": {}, + "type": "array" + }, + "helm-values.webhook.serviceIPFamilyPolicy": { + "default": "", + "description": "Optionally set the IP family policy for the controller Service to configure dual-stack; see [Configure dual-stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services).", + "type": "string" + }, + "helm-values.webhook.serviceLabels": { + "default": {}, + "description": "Optional additional labels to add to the Webhook Service.", + "type": "object" + }, + "helm-values.webhook.serviceType": { + "default": "ClusterIP", + "description": "Specifies how the service should be handled. Useful if you want to expose the webhook outside of the cluster. In some cases, the control plane cannot reach internal services.", + "type": "string" + }, + "helm-values.webhook.strategy": { + "default": {}, + "description": "The update strategy for the cert-manager webhook deployment. For more information, see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy)\n\nFor example:\nstrategy:\n type: RollingUpdate\n rollingUpdate:\n maxSurge: 0\n maxUnavailable: 1", + "type": "object" + }, + "helm-values.webhook.timeoutSeconds": { + "default": 30, + "description": "The number of seconds the API server should wait for the webhook to respond before treating the call as a failure. The value must be between 1 and 30 seconds. For more information, see\n[Validating webhook configuration v1](https://kubernetes.io/docs/reference/kubernetes-api/extend-resources/validating-webhook-configuration-v1/).\n\nThe default is set to the maximum value of 30 seconds as users sometimes report that the connection between the K8S API server and the cert-manager webhook server times out. If *this* timeout is reached, the error message will be \"context deadline exceeded\", which doesn't help the user diagnose what phase of the HTTPS connection timed out. For example, it could be during DNS resolution, TCP connection, TLS negotiation, HTTP negotiation, or slow HTTP response from the webhook server. By setting this timeout to its maximum value the underlying timeout error message has more chance of being returned to the end user.", + "type": "number" + }, + "helm-values.webhook.tolerations": { + "default": [], + "description": "A list of Kubernetes Tolerations, if required. For more information, see [Toleration v1 core](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#toleration-v1-core).\n\nFor example:\ntolerations:\n- key: foo.bar.com/role\n operator: Equal\n value: master\n effect: NoSchedule", + "items": {}, + "type": "array" + }, + "helm-values.webhook.topologySpreadConstraints": { + "default": [], + "description": "A list of Kubernetes TopologySpreadConstraints, if required. For more information, see [Topology spread constraint v1 core](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#topologyspreadconstraint-v1-core).\n\nFor example:\ntopologySpreadConstraints:\n- maxSkew: 2\n topologyKey: topology.kubernetes.io/zone\n whenUnsatisfiable: ScheduleAnyway\n labelSelector:\n matchLabels:\n app.kubernetes.io/instance: cert-manager\n app.kubernetes.io/component: controller", + "items": {}, + "type": "array" + }, + "helm-values.webhook.url": { + "default": {}, + "description": "Overrides the mutating webhook and validating webhook so they reach the webhook service using the `url` field instead of a service.", + "type": "object" + }, + "helm-values.webhook.validatingWebhookConfiguration": { + "additionalProperties": false, + "properties": { + "namespaceSelector": { + "$ref": "#/$defs/helm-values.webhook.validatingWebhookConfiguration.namespaceSelector" + } + }, + "type": "object" + }, + "helm-values.webhook.validatingWebhookConfiguration.namespaceSelector": { + "default": { + "matchExpressions": [ + { + "key": "cert-manager.io/disable-validation", + "operator": "NotIn", + "values": [ + "true" + ] + } + ] + }, + "description": "Configure spec.namespaceSelector for validating webhooks.", + "type": "object" + }, + "helm-values.webhook.validatingWebhookConfigurationAnnotations": { + "description": "Optional additional annotations to add to the webhook ValidatingWebhookConfiguration.", + "type": "object" + }, + "helm-values.webhook.volumeMounts": { + "default": [], + "description": "Additional volume mounts to add to the cert-manager controller container.", + "items": {}, + "type": "array" + }, + "helm-values.webhook.volumes": { + "default": [], + "description": "Additional volumes to add to the cert-manager controller pod.", + "items": {}, + "type": "array" + } + }, + "$ref": "#/$defs/helm-values", + "$schema": "http://json-schema.org/draft-07/schema#" +} diff --git a/deploy/charts/cert-manager/values.yaml b/deploy/charts/cert-manager/values.yaml index 7630c048e0d..7a1c2953055 100644 --- a/deploy/charts/cert-manager/values.yaml +++ b/deploy/charts/cert-manager/values.yaml @@ -120,12 +120,14 @@ podDisruptionBudget: # an integer (e.g. 1) or a percentage value (e.g. 25%). # It cannot be used if `maxUnavailable` is set. # +docs:property + # +docs:type=unknown # minAvailable: 1 # This configures the maximum unavailable pods for disruptions. It can either be set to # an integer (e.g. 1) or a percentage value (e.g. 25%). # it cannot be used if `minAvailable` is set. # +docs:property + # +docs:type=unknown # maxUnavailable: 1 # A comma-separated list of feature gates that should be enabled on the @@ -166,6 +168,19 @@ clusterResourceNamespace: "" # This is helpful when installing cert manager as a chart dependency (sub chart). namespace: "" +# Override the "cert-manager.fullname" value. This value is used as part of +# most of the names of the resources created by this Helm chart. +# +docs:property +# fullnameOverride: "my-cert-manager" + +# Override the "cert-manager.name" value, which is used to annotate some of +# the resources that are created by this Chart (using "app.kubernetes.io/name"). +# NOTE: There are some inconsistencies in the Helm chart when it comes to +# these annotations (some resources use eg. "cainjector.name" which resolves +# to the value "cainjector"). +# +docs:property +# nameOverride: "my-cert-manager" + serviceAccount: # Specifies whether a service account should be created. create: true @@ -195,8 +210,10 @@ enableCertificateOwnerRef: false # This property is used to configure options for the controller pod. # This allows setting options that would usually be provided using flags. -# An APIVersion and Kind must be specified in your values.yaml file. -# Flags will override options that are set here. +# +# If `apiVersion` and `kind` are unspecified they default to the current latest +# version (currently `controller.config.cert-manager.io/v1alpha1`). You can pin +# the version by specifying the `apiVersion` yourself. # # For example: # config: @@ -221,14 +238,14 @@ enableCertificateOwnerRef: false # StableCertificateRequestName: true # UseCertificateRequestBasicConstraints: true # ValidateCAA: true +# # Configure the metrics server for TLS +# # See https://cert-manager.io/docs/devops-tips/prometheus-metrics/#tls # metricsTLSConfig: # dynamic: # secretNamespace: "cert-manager" # secretName: "cert-manager-metrics-ca" # dnsNames: # - cert-manager-metrics -# - cert-manager-metrics.cert-manager -# - cert-manager-metrics.cert-manager.svc config: {} # Setting Nameservers for DNS01 Self Check. @@ -261,7 +278,7 @@ approveSignerNames: # Additional command line flags to pass to cert-manager controller binary. # To see all available flags run `docker run quay.io/jetstack/cert-manager-controller: --help`. # -# Use this flag to enable or disable arbitrary controllers. For example, to disable the CertificiateRequests approver. +# Use this flag to enable or disable arbitrary controllers. For example, to disable the CertificateRequests approver. # # For example: # extraArgs: @@ -269,9 +286,11 @@ approveSignerNames: extraArgs: [] # Additional environment variables to pass to cert-manager controller binary. +# For example: +# extraEnv: +# - name: SOME_VAR +# value: 'some value' extraEnv: [] -# - name: SOME_VAR -# value: 'some value' # Resources to provide to the cert-manager controller pod. # @@ -467,18 +486,25 @@ enableServiceLinks: false # +docs:section=Prometheus prometheus: - # Enable Prometheus monitoring for the cert-manager controller to use with the - # Prometheus Operator. If this option is enabled without enabling `prometheus.servicemonitor.enabled` or - # `prometheus.podmonitor.enabled`, 'prometheus.io' annotations are added to the cert-manager Deployment - # resources. Additionally, a service is created which can be used together - # with your own ServiceMonitor (managed outside of this Helm chart). - # Otherwise, a ServiceMonitor/ PodMonitor is created. + # Enable Prometheus monitoring for the cert-manager controller and webhook. + # If you use the Prometheus Operator, set prometheus.podmonitor.enabled or + # prometheus.servicemonitor.enabled, to create a PodMonitor or a + # ServiceMonitor resource. + # Otherwise, 'prometheus.io' annotations are added to the cert-manager and + # cert-manager-webhook Deployments. + # Note that you can not enable both PodMonitor and ServiceMonitor as they are + # mutually exclusive. Enabling both will result in an error. enabled: true servicemonitor: # Create a ServiceMonitor to add cert-manager to Prometheus. enabled: false + # The namespace that the service monitor should live in, defaults + # to the cert-manager namespace. + # +docs:property + # namespace: cert-manager + # Specifies the `prometheus` label on the created ServiceMonitor. This is # used when different Prometheus instances have label selectors matching # different ServiceMonitors. @@ -520,11 +546,16 @@ prometheus: # +docs:property endpointAdditionalProperties: {} - # Note that you can not enable both PodMonitor and ServiceMonitor as they are mutually exclusive. Enabling both will result in a error. + # Note that you can not enable both PodMonitor and ServiceMonitor as they are mutually exclusive. Enabling both will result in an error. podmonitor: # Create a PodMonitor to add cert-manager to Prometheus. enabled: false + # The namespace that the pod monitor should live in, defaults + # to the cert-manager namespace. + # +docs:property + # namespace: cert-manager + # Specifies the `prometheus` label on the created PodMonitor. This is # used when different Prometheus instances have label selectors matching # different PodMonitors. @@ -558,6 +589,15 @@ prometheus: # sourceLabels: # - __meta_kubernetes_pod_node_name # targetLabel: instance + # # Configure the PodMonitor for TLS connections + # # See https://cert-manager.io/docs/devops-tips/prometheus-metrics/#tls + # scheme: https + # tlsConfig: + # serverName: cert-manager-metrics + # ca: + # secret: + # name: cert-manager-metrics-ca + # key: "tls.crt" # # +docs:property endpointAdditionalProperties: {} @@ -591,8 +631,10 @@ webhook: # This is used to configure options for the webhook pod. # This allows setting options that would usually be provided using flags. - # An APIVersion and Kind must be specified in your values.yaml file. - # Flags override options that are set here. + # + # If `apiVersion` and `kind` are unspecified they default to the current latest + # version (currently `webhook.config.cert-manager.io/v1alpha1`). You can pin + # the version by specifying the `apiVersion` yourself. # # For example: # apiVersion: webhook.config.cert-manager.io/v1alpha1 @@ -605,6 +647,14 @@ webhook: # # This should be uncommented and set as a default by the chart once # # the apiVersion of WebhookConfiguration graduates beyond v1alpha1. # securePort: 10250 + # # Configure the metrics server for TLS + # # See https://cert-manager.io/docs/devops-tips/prometheus-metrics/#tls + # metricsTLSConfig: + # dynamic: + # secretNamespace: "cert-manager" + # secretName: "cert-manager-metrics-ca" + # dnsNames: + # - cert-manager-metrics config: {} # The update strategy for the cert-manager webhook deployment. @@ -649,12 +699,14 @@ webhook: # an integer (e.g. 1) or a percentage value (e.g. 25%). # It cannot be used if `maxUnavailable` is set. # +docs:property + # +docs:type=unknown # minAvailable: 1 # This property configures the maximum unavailable pods for disruptions. Can either be set to # an integer (e.g. 1) or a percentage value (e.g. 25%). # It cannot be used if `minAvailable` is set. # +docs:property + # +docs:type=unknown # maxUnavailable: 1 # Optional additional annotations to add to the webhook Deployment. @@ -706,6 +758,13 @@ webhook: # Path to a file containing a WebhookConfiguration object used to configure the webhook. # - --config= + # Additional environment variables to pass to cert-manager webhook binary. + # For example: + # extraEnv: + # - name: SOME_VAR + # value: 'some value' + extraEnv: [] + # Comma separated list of feature gates that should be enabled on the # webhook pod. featureGates: "" @@ -831,7 +890,7 @@ webhook: # +docs:property # name: "" - # Optional additional annotations to add to the controller's Service Account. + # Optional additional annotations to add to the webhook's Service Account. # +docs:property # annotations: {} @@ -942,8 +1001,10 @@ cainjector: # This is used to configure options for the cainjector pod. # It allows setting options that are usually provided via flags. - # An APIVersion and Kind must be specified in your values.yaml file. - # Flags override options that are set here. + # + # If `apiVersion` and `kind` are unspecified they default to the current latest + # version (currently `cainjector.config.cert-manager.io/v1alpha1`). You can pin + # the version by specifying the `apiVersion` yourself. # # For example: # apiVersion: cainjector.config.cert-manager.io/v1alpha1 @@ -953,6 +1014,14 @@ cainjector: # format: text # leaderElectionConfig: # namespace: kube-system + # # Configure the metrics server for TLS + # # See https://cert-manager.io/docs/devops-tips/prometheus-metrics/#tls + # metricsTLSConfig: + # dynamic: + # secretNamespace: "cert-manager" + # secretName: "cert-manager-metrics-ca" + # dnsNames: + # - cert-manager-metrics config: {} # Deployment update strategy for the cert-manager cainjector deployment. @@ -997,12 +1066,14 @@ cainjector: # an integer (e.g. 1) or a percentage value (e.g. 25%). # Cannot be used if `maxUnavailable` is set. # +docs:property + # +docs:type=unknown # minAvailable: 1 # `maxUnavailable` configures the maximum unavailable pods for disruptions. It can either be set to # an integer (e.g. 1) or a percentage value (e.g. 25%). # Cannot be used if `minAvailable` is set. # +docs:property + # +docs:type=unknown # maxUnavailable: 1 # Optional additional annotations to add to the cainjector Deployment. @@ -1013,12 +1084,23 @@ cainjector: # +docs:property # podAnnotations: {} + # Optional additional annotations to add to the cainjector metrics Service. + # +docs:property + # serviceAnnotations: {} + # Additional command line flags to pass to cert-manager cainjector binary. # To see all available flags run `docker run quay.io/jetstack/cert-manager-cainjector: --help`. extraArgs: [] # Enable profiling for cainjector. # - --enable-profiling=true + # Additional environment variables to pass to cert-manager cainjector binary. + # For example: + # extraEnv: + # - name: SOME_VAR + # value: 'some value' + extraEnv: [] + # Comma separated list of feature gates that should be enabled on the # cainjector pod. featureGates: "" @@ -1084,6 +1166,9 @@ cainjector: # Optional additional labels to add to the CA Injector Pods. podLabels: {} + # Optional additional labels to add to the CA Injector metrics Service. + serviceLabels: {} + image: # The container registry to pull the cainjector image from. # +docs:property @@ -1114,7 +1199,7 @@ cainjector: # +docs:property # name: "" - # Optional additional annotations to add to the controller's Service Account. + # Optional additional annotations to add to the cainjector's Service Account. # +docs:property # annotations: {} @@ -1222,6 +1307,13 @@ startupapicheck: extraArgs: - -v + # Additional environment variables to pass to cert-manager startupapicheck binary. + # For example: + # extraEnv: + # - name: SOME_VAR + # value: 'some value' + extraEnv: [] + # Resources to provide to the cert-manager controller pod. # # For example: @@ -1345,5 +1437,19 @@ startupapicheck: # apiVersion: v1 # kind: ConfigMap # metadata: -# name: '{{ template "cert-manager.name" . }}-extra-configmap' +# name: '{{ template "cert-manager.fullname" . }}-extra-configmap' extraObjects: [] + +# Field used by our release pipeline to produce the static manifests. +# The field defaults to "helm" but is set to "static" when we render +# the static YAML manifests. +# +docs:hidden +creator: "helm" + +# Field that can be used as a condition when cert-manager is a dependency. +# This definition is only here as a placeholder such that it is included in +# the json schema. +# See https://helm.sh/docs/chart_best_practices/dependencies/#conditions-and-tags +# for more info. +# +docs:hidden +enabled: true diff --git a/deploy/crds/crd-certificaterequests.yaml b/deploy/crds/crd-certificaterequests.yaml index 60730f713f2..5d6b598995e 100644 --- a/deploy/crds/crd-certificaterequests.yaml +++ b/deploy/crds/crd-certificaterequests.yaml @@ -44,7 +44,7 @@ spec: name: Issuer type: string - jsonPath: .spec.username - name: Requestor + name: Requester type: string - jsonPath: .status.conditions[?(@.type=="Ready")].message name: Status @@ -60,12 +60,10 @@ spec: A CertificateRequest is used to request a signed certificate from one of the configured issuers. - All fields within the CertificateRequest's `spec` are immutable after creation. A CertificateRequest will either succeed or fail, as denoted by its `Ready` status condition and its `status.failureTime` field. - A CertificateRequest is a one-shot resource, meaning it represents a single point in time request for a certificate and cannot be re-used. type: object @@ -124,11 +122,9 @@ spec: Requested basic constraints isCA value. Note that the issuer may choose to ignore the requested isCA value, just like any other requested attribute. - NOTE: If the CSR in the `Request` field has a BasicConstraints extension, it must have the same isCA value as specified here. - If true, this will automatically add the `cert sign` usage to the list of requested `usages`. type: boolean @@ -139,7 +135,6 @@ spec: as the Certificate. If the issuer is cluster-scoped, it can be used from any namespace. - The `name` field of the reference must always be specified. type: object required: @@ -159,7 +154,6 @@ spec: The PEM-encoded X.509 certificate signing request to be submitted to the issuer for signing. - If the CSR has a BasicConstraints extension, its isCA attribute must match the `isCA` value of this CertificateRequest. If the CSR has a KeyUsage extension, its key usages must match the @@ -178,12 +172,10 @@ spec: description: |- Requested key usages and extended key usages. - NOTE: If the CSR in the `Request` field has uses the KeyUsage or ExtKeyUsage extension, these extensions must have the same values as specified here without any additional values. - If unset, defaults to `digital signature` and `key encipherment`. type: array items: @@ -193,7 +185,6 @@ spec: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 https://tools.ietf.org/html/rfc5280#section-4.2.1.12 - Valid KeyUsage values are as follows: "signing", "digital signature", diff --git a/deploy/crds/crd-certificates.yaml b/deploy/crds/crd-certificates.yaml index 461ae1bc277..e302f4dd8e3 100644 --- a/deploy/crds/crd-certificates.yaml +++ b/deploy/crds/crd-certificates.yaml @@ -54,7 +54,6 @@ spec: A Certificate resource should be created to ensure an up to date and signed X.509 certificate is stored in the Kubernetes Secret resource named in `spec.secretName`. - The stored certificate will be renewed before it expires (as configured by `spec.renewBefore`). type: object properties: @@ -89,7 +88,6 @@ spec: Defines extra output formats of the private key and signed certificate chain to be written to this Certificate's target Secret. - This is a Beta Feature enabled by default. It can be disabled with the `--feature-gates=AdditionalCertificateOutputFormats=false` option set on both the controller and webhook components. @@ -118,7 +116,6 @@ spec: NOTE: TLS clients will ignore this value when any subject alternative name is set (see https://tools.ietf.org/html/rfc6125#section-6.4.4). - Should have a length of 64 characters or fewer to avoid generating invalid CSRs. Cannot be set if the `literalSubject` field is set. type: string @@ -133,7 +130,6 @@ spec: issuer may choose to ignore the requested duration, just like any other requested attribute. - If unset, this defaults to 90 days. Minimum accepted duration is 1 hour. Value must be in units accepted by Go time.ParseDuration https://golang.org/pkg/time/#ParseDuration. @@ -147,7 +143,6 @@ spec: description: |- Whether the KeyUsage and ExtKeyUsage extensions should be set in the encoded CSR. - This option defaults to true, and should only be disabled if the target issuer does not support CSRs with these X509 KeyUsage/ ExtKeyUsage extensions. type: boolean @@ -163,7 +158,6 @@ spec: resources. Note that the issuer may choose to ignore the requested isCA value, just like any other requested attribute. - If true, this will automatically add the `cert sign` usage to the list of requested `usages`. type: boolean @@ -174,7 +168,6 @@ spec: as the Certificate. If the issuer is cluster-scoped, it can be used from any namespace. - The `name` field of the reference must always be specified. type: object required: @@ -283,7 +276,6 @@ spec: Profile specifies the key and certificate encryption algorithms and the HMAC algorithm used to create the PKCS12 keystore. Default value is `LegacyRC2` for backward compatibility. - If provided, allowed values are: `LegacyRC2`: Deprecated. Not supported by default in OpenSSL 3 or Java 20. `LegacyDES`: Less secure algorithm. Use this option for maximal compatibility. @@ -306,7 +298,6 @@ spec: More info: https://github.com/cert-manager/cert-manager/issues/3203 More info: https://github.com/cert-manager/cert-manager/issues/4424 - Cannot be set if the `subject` or `commonName` field is set. type: string nameConstraints: @@ -314,7 +305,6 @@ spec: x.509 certificate NameConstraint extension which MUST NOT be used in a non-CA certificate. More Info: https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.10 - This is an Alpha Feature and is only enabled with the `--feature-gates=NameConstraints=true` option set on both the controller and webhook components. @@ -410,7 +400,6 @@ spec: Algorithm is the private key algorithm of the corresponding private key for this certificate. - If provided, allowed values are either `RSA`, `ECDSA` or `Ed25519`. If `algorithm` is specified and `size` is not provided, key size of 2048 will be used for `RSA` key algorithm and @@ -426,7 +415,6 @@ spec: The private key cryptography standards (PKCS) encoding for this certificate's private key to be encoded in. - If provided, allowed values are `PKCS1` and `PKCS8` standing for PKCS#1 and PKCS#8, respectively. Defaults to `PKCS1` if not specified. @@ -439,9 +427,8 @@ spec: RotationPolicy controls how private keys should be regenerated when a re-issuance is being processed. - If set to `Never`, a private key will only be generated if one does not - already exist in the target `spec.secretName`. If one does exists but it + already exist in the target `spec.secretName`. If one does exist but it does not have the correct algorithm or size, a warning will be raised to await user intervention. If set to `Always`, a private key matching the specified requirements @@ -455,7 +442,6 @@ spec: description: |- Size is the key bit size of the corresponding private key for this certificate. - If `algorithm` is set to `RSA`, valid values are `2048`, `4096` or `8192`, and will default to `2048` if not specified. If `algorithm` is set to `ECDSA`, valid values are `256`, `384` or `521`, @@ -471,16 +457,33 @@ spec: 50 minutes after it was issued (i.e. when there are 10 minutes remaining until the certificate is no longer valid). - NOTE: The actual lifetime of the issued certificate is used to determine the renewal time. If an issuer returns a certificate with a different lifetime than the one requested, cert-manager will use the lifetime of the issued certificate. - If unset, this defaults to 1/3 of the issued certificate's lifetime. Minimum accepted value is 5 minutes. Value must be in units accepted by Go time.ParseDuration https://golang.org/pkg/time/#ParseDuration. + Cannot be set if the `renewBeforePercentage` field is set. type: string + renewBeforePercentage: + description: |- + `renewBeforePercentage` is like `renewBefore`, except it is a relative percentage + rather than an absolute duration. For example, if a certificate is valid for 60 + minutes, and `renewBeforePercentage=25`, cert-manager will begin to attempt to + renew the certificate 45 minutes after it was issued (i.e. when there are 15 + minutes (25%) remaining until the certificate is no longer valid). + + NOTE: The actual lifetime of the issued certificate is used to determine the + renewal time. If an issuer returns a certificate with a different lifetime than + the one requested, cert-manager will use the lifetime of the issued certificate. + + Value must be an integer in the range (0,100). The minimum effective + `renewBefore` derived from the `renewBeforePercentage` and `duration` fields is 5 + minutes. + Cannot be set if the `renewBefore` field is set. + type: integer + format: int32 revisionHistoryLimit: description: |- The maximum number of CertificateRequest revisions that are maintained in @@ -489,7 +492,6 @@ spec: was changed. Revisions will be removed by oldest first if the number of revisions exceeds this number. - If set, revisionHistoryLimit must be a value of `1` or greater. If unset (`nil`), revisions will not be garbage collected. Default value is `nil`. @@ -526,7 +528,6 @@ spec: Requested set of X509 certificate subject attributes. More info: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6 - The common name attribute is specified separately in the `commonName` field. Cannot be set if the `literalSubject` field is set. type: object @@ -581,7 +582,6 @@ spec: resources. If `encodeUsagesInRequest` is unset or set to `true`, the usages will additionally be encoded in the `request` field which contains the CSR blob. - If unset, defaults to `digital signature` and `key encipherment`. type: array items: @@ -591,7 +591,6 @@ spec: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 https://tools.ietf.org/html/rfc5280#section-4.2.1.12 - Valid KeyUsage values are as follows: "signing", "digital signature", @@ -655,7 +654,7 @@ spec: Known condition types are `Ready` and `Issuing`. type: array items: - description: CertificateCondition contains condition information for an Certificate. + description: CertificateCondition contains condition information for a Certificate. type: object required: - status @@ -709,7 +708,7 @@ spec: type: integer lastFailureTime: description: |- - LastFailureTime is set only if the lastest issuance for this + LastFailureTime is set only if the latest issuance for this Certificate failed and contains the time of the failure. If an issuance has failed, the delay till the next issuance will be calculated using formula time.Hour * 2 ^ (failedIssuanceAttempts - @@ -748,16 +747,13 @@ spec: description: |- The current 'revision' of the certificate as issued. - When a CertificateRequest resource is created, it will have the `cert-manager.io/certificate-revision` set to one greater than the current value of this field. - Upon issuance, this field will be set to the value of the annotation on the CertificateRequest resource used to issue the certificate. - Persisting the value on the CertificateRequest resource allows the certificates controller to know whether a request is part of an old issuance or if it is part of the ongoing revision's issuance by diff --git a/deploy/crds/crd-challenges.yaml b/deploy/crds/crd-challenges.yaml index 8ffad4170d6..1a498c1b801 100644 --- a/deploy/crds/crd-challenges.yaml +++ b/deploy/crds/crd-challenges.yaml @@ -458,8 +458,6 @@ spec: route53: description: Use the AWS Route53 API to manage DNS01 challenge records. type: object - required: - - region properties: accessKeyID: description: |- @@ -528,10 +526,32 @@ spec: description: Name of the ServiceAccount used to request a token. type: string hostedZoneID: - description: If set, the provider will manage only this zone in Route53 and will not do an lookup using the route53:ListHostedZonesByName api call. + description: If set, the provider will manage only this zone in Route53 and will not do a lookup using the route53:ListHostedZonesByName api call. type: string region: - description: Always set the region when using AccessKeyID and SecretAccessKey + description: |- + Override the AWS region. + + Route53 is a global service and does not have regional endpoints but the + region specified here (or via environment variables) is used as a hint to + help compute the correct AWS credential scope and partition when it + connects to Route53. See: + - [Amazon Route 53 endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/r53.html) + - [Global services](https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/global-services.html) + + If you omit this region field, cert-manager will use the region from + AWS_REGION and AWS_DEFAULT_REGION environment variables, if they are set + in the cert-manager controller Pod. + + The `region` field is not needed if you use [IAM Roles for Service Accounts (IRSA)](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html). + Instead an AWS_REGION environment variable is added to the cert-manager controller Pod by: + [Amazon EKS Pod Identity Webhook](https://github.com/aws/amazon-eks-pod-identity-webhook). + In this case this `region` field value is ignored. + + The `region` field is not needed if you use [EKS Pod Identities](https://docs.aws.amazon.com/eks/latest/userguide/pod-identities.html). + Instead an AWS_REGION environment variable is added to the cert-manager controller Pod by: + [Amazon EKS Pod Identity Agent](https://github.com/aws/eks-pod-identity-agent), + In this case this `region` field value is ignored. type: string role: description: |- @@ -628,15 +648,12 @@ spec: a parent of this resource (usually a route). There are two kinds of parent resources with "Core" support: - * Gateway (Gateway conformance profile) * Service (Mesh conformance profile, ClusterIP Services only) - This API may be extended in the future to support additional kinds of parent resources. - The API object must be valid in the cluster; the Group and Kind must be registered in the cluster for this reference to be valid. type: object @@ -650,7 +667,6 @@ spec: To set the core API group (such as for a "Service" kind referent), Group must be explicitly set to "" (empty string). - Support: Core type: string default: gateway.networking.k8s.io @@ -660,14 +676,11 @@ spec: description: |- Kind is kind of the referent. - There are two kinds of parent resources with "Core" support: - * Gateway (Gateway conformance profile) * Service (Mesh conformance profile, ClusterIP Services only) - Support for other resources is Implementation-Specific. type: string default: Gateway @@ -678,7 +691,6 @@ spec: description: |- Name is the name of the referent. - Support: Core type: string maxLength: 253 @@ -688,20 +700,17 @@ spec: Namespace is the namespace of the referent. When unspecified, this refers to the local namespace of the Route. - Note that there are specific rules for ParentRefs which cross namespace boundaries. Cross-namespace references are only valid if they are explicitly allowed by something in the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace reference. - ParentRefs from a Route to a Service in the same namespace are "producer" routes, which apply default routing rules to inbound connections from any namespace to the Service. - ParentRefs from a Route to a Service in a different namespace are "consumer" routes, and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which @@ -709,7 +718,6 @@ spec: ParentRef of the Route. - Support: Core type: string maxLength: 63 @@ -720,7 +728,6 @@ spec: Port is the network port this Route targets. It can be interpreted differently based on the type of parent resource. - When the parent resource is a Gateway, this targets all listeners listening on the specified port that also support this kind of Route(and select this Route). It's not recommended to set `Port` unless the @@ -729,19 +736,16 @@ spec: and SectionName are specified, the name and port of the selected listener must match both specified values. - When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must match both specified values. - Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted. - For the purpose of status, an attachment is considered successful as long as the parent resource accepts it partially. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, @@ -750,7 +754,6 @@ spec: attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway. - Support: Extended type: integer format: int32 @@ -761,7 +764,6 @@ spec: SectionName is the name of a section within the target resource. In the following resources, SectionName is interpreted as the following: - * Gateway: Listener name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values. @@ -769,12 +771,10 @@ spec: are specified, the name and port of the selected listener must match both specified values. - Implementations MAY choose to support attaching Routes to other resources. If that is the case, they MUST clearly document how SectionName is interpreted. - When unspecified (empty string), this will reference the entire resource. For the purpose of status, an attachment is considered successful if at least one section in the parent resource accepts it. For example, Gateway @@ -784,72 +784,11 @@ spec: attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway. - Support: Core type: string maxLength: 253 minLength: 1 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - serviceType: - description: |- - Optional service type for Kubernetes solver service. Supported values - are NodePort or ClusterIP. If unset, defaults to NodePort. - type: string - ingress: - description: |- - The ingress based HTTP01 challenge solver will solve challenges by - creating or modifying Ingress resources in order to route requests for - '/.well-known/acme-challenge/XYZ' to 'challenge solver' pods that are - provisioned by cert-manager for each Challenge to be completed. - type: object - properties: - class: - description: |- - This field configures the annotation `kubernetes.io/ingress.class` when - creating Ingress resources to solve ACME challenges that use this - challenge solver. Only one of `class`, `name` or `ingressClassName` may - be specified. - type: string - ingressClassName: - description: |- - This field configures the field `ingressClassName` on the created Ingress - resources used to solve ACME challenges that use this challenge solver. - This is the recommended way of configuring the ingress class. Only one of - `class`, `name` or `ingressClassName` may be specified. - type: string - ingressTemplate: - description: |- - Optional ingress template used to configure the ACME challenge solver - ingress used for HTTP01 challenges. - type: object - properties: - metadata: - description: |- - ObjectMeta overrides for the ingress used to solve HTTP01 challenges. - Only the 'labels' and 'annotations' fields may be set. - If labels or annotations overlap with in-built values, the values here - will override the in-built values. - type: object - properties: - annotations: - description: Annotations that should be added to the created ACME HTTP01 solver ingress. - type: object - additionalProperties: - type: string - labels: - description: Labels that should be added to the created ACME HTTP01 solver ingress. - type: object - additionalProperties: - type: string - name: - description: |- - The name of the ingress resource that should have ACME challenge solving - routes inserted into it in order to solve HTTP01 challenges. - This is typically used in conjunction with ingress controllers like - ingress-gce, which maintains a 1:1 mapping between external IPs and - ingress resources. Only one of `class`, `name` or `ingressClassName` may - be specified. - type: string podTemplate: description: |- Optional pod template used to configure the ACME challenge solver pods @@ -865,7 +804,7 @@ spec: type: object properties: annotations: - description: Annotations that should be added to the create ACME HTTP01 solver pods. + description: Annotations that should be added to the created ACME HTTP01 solver pods. type: object additionalProperties: type: string @@ -1157,7 +1096,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1172,7 +1111,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1329,7 +1268,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1344,7 +1283,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1502,7 +1441,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1517,7 +1456,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1674,7 +1613,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1689,7 +1628,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1777,9 +1716,7 @@ spec: This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. - TODO: Add other useful fields. apiVersion, kind, uid? More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896. type: string default: "" x-kubernetes-map-type: atomic @@ -1794,6 +1731,1320 @@ spec: priorityClassName: description: If specified, the pod's priorityClassName. type: string + securityContext: + description: If specified, the pod's security context + type: object + properties: + fsGroup: + description: |- + A special supplemental group that applies to all containers in a pod. + Some volume types allow the Kubelet to change the ownership of that volume + to be owned by the pod: + + 1. The owning GID will be the FSGroup + 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) + 3. The permission bits are OR'd with rw-rw---- + + If unset, the Kubelet will not modify the ownership and permissions of any volume. + Note that this field cannot be set when spec.os.name is windows. + type: integer + format: int64 + fsGroupChangePolicy: + description: |- + fsGroupChangePolicy defines behavior of changing ownership and permission of the volume + before being exposed inside Pod. This field will only apply to + volume types which support fsGroup based ownership(and permissions). + It will have no effect on ephemeral volume types such as: secret, configmaps + and emptydir. + Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. + Note that this field cannot be set when spec.os.name is windows. + type: string + runAsGroup: + description: |- + The GID to run the entrypoint of the container process. + Uses runtime default if unset. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence + for that container. + Note that this field cannot be set when spec.os.name is windows. + type: integer + format: int64 + runAsNonRoot: + description: |- + Indicates that the container must run as a non-root user. + If true, the Kubelet will validate the image at runtime to ensure that it + does not run as UID 0 (root) and fail to start the container if it does. + If unset or false, no such validation will be performed. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: |- + The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence + for that container. + Note that this field cannot be set when spec.os.name is windows. + type: integer + format: int64 + seLinuxOptions: + description: |- + The SELinux context to be applied to all containers. + If unspecified, the container runtime will allocate a random SELinux context for each + container. May also be set in SecurityContext. If set in + both SecurityContext and PodSecurityContext, the value specified in SecurityContext + takes precedence for that container. + Note that this field cannot be set when spec.os.name is windows. + type: object + properties: + level: + description: Level is SELinux level label that applies to the container. + type: string + role: + description: Role is a SELinux role label that applies to the container. + type: string + type: + description: Type is a SELinux type label that applies to the container. + type: string + user: + description: User is a SELinux user label that applies to the container. + type: string + seccompProfile: + description: |- + The seccomp options to use by the containers in this pod. + Note that this field cannot be set when spec.os.name is windows. + type: object + required: + - type + properties: + localhostProfile: + description: |- + localhostProfile indicates a profile defined in a file on the node should be used. + The profile must be preconfigured on the node to work. + Must be a descending path, relative to the kubelet's configured seccomp profile location. + Must be set if type is "Localhost". Must NOT be set for any other type. + type: string + type: + description: |- + type indicates which kind of seccomp profile will be applied. + Valid options are: + + Localhost - a profile defined in a file on the node should be used. + RuntimeDefault - the container runtime default profile should be used. + Unconfined - no profile should be applied. + type: string + supplementalGroups: + description: |- + A list of groups applied to the first process run in each container, in addition + to the container's primary GID, the fsGroup (if specified), and group memberships + defined in the container image for the uid of the container process. If unspecified, + no additional groups are added to any container. Note that group memberships + defined in the container image for the uid of the container process are still effective, + even if they are not included in this list. + Note that this field cannot be set when spec.os.name is windows. + type: array + items: + type: integer + format: int64 + sysctls: + description: |- + Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported + sysctls (by the container runtime) might fail to launch. + Note that this field cannot be set when spec.os.name is windows. + type: array + items: + description: Sysctl defines a kernel parameter to be set + type: object + required: + - name + - value + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + serviceAccountName: + description: If specified, the pod's service account + type: string + tolerations: + description: If specified, the pod's tolerations. + type: array + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + type: object + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + type: integer + format: int64 + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + serviceType: + description: |- + Optional service type for Kubernetes solver service. Supported values + are NodePort or ClusterIP. If unset, defaults to NodePort. + type: string + ingress: + description: |- + The ingress based HTTP01 challenge solver will solve challenges by + creating or modifying Ingress resources in order to route requests for + '/.well-known/acme-challenge/XYZ' to 'challenge solver' pods that are + provisioned by cert-manager for each Challenge to be completed. + type: object + properties: + class: + description: |- + This field configures the annotation `kubernetes.io/ingress.class` when + creating Ingress resources to solve ACME challenges that use this + challenge solver. Only one of `class`, `name` or `ingressClassName` may + be specified. + type: string + ingressClassName: + description: |- + This field configures the field `ingressClassName` on the created Ingress + resources used to solve ACME challenges that use this challenge solver. + This is the recommended way of configuring the ingress class. Only one of + `class`, `name` or `ingressClassName` may be specified. + type: string + ingressTemplate: + description: |- + Optional ingress template used to configure the ACME challenge solver + ingress used for HTTP01 challenges. + type: object + properties: + metadata: + description: |- + ObjectMeta overrides for the ingress used to solve HTTP01 challenges. + Only the 'labels' and 'annotations' fields may be set. + If labels or annotations overlap with in-built values, the values here + will override the in-built values. + type: object + properties: + annotations: + description: Annotations that should be added to the created ACME HTTP01 solver ingress. + type: object + additionalProperties: + type: string + labels: + description: Labels that should be added to the created ACME HTTP01 solver ingress. + type: object + additionalProperties: + type: string + name: + description: |- + The name of the ingress resource that should have ACME challenge solving + routes inserted into it in order to solve HTTP01 challenges. + This is typically used in conjunction with ingress controllers like + ingress-gce, which maintains a 1:1 mapping between external IPs and + ingress resources. Only one of `class`, `name` or `ingressClassName` may + be specified. + type: string + podTemplate: + description: |- + Optional pod template used to configure the ACME challenge solver pods + used for HTTP01 challenges. + type: object + properties: + metadata: + description: |- + ObjectMeta overrides for the pod used to solve HTTP01 challenges. + Only the 'labels' and 'annotations' fields may be set. + If labels or annotations overlap with in-built values, the values here + will override the in-built values. + type: object + properties: + annotations: + description: Annotations that should be added to the created ACME HTTP01 solver pods. + type: object + additionalProperties: + type: string + labels: + description: Labels that should be added to the created ACME HTTP01 solver pods. + type: object + additionalProperties: + type: string + spec: + description: |- + PodSpec defines overrides for the HTTP01 challenge solver pod. + Check ACMEChallengeSolverHTTP01IngressPodSpec to find out currently supported fields. + All other fields will be ignored. + type: object + properties: + affinity: + description: If specified, the pod's scheduling constraints + type: object + properties: + nodeAffinity: + description: Describes node affinity scheduling rules for the pod. + type: object + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: |- + The scheduler will prefer to schedule pods to nodes that satisfy + the affinity expressions specified by this field, but it may choose + a node that violates one or more of the expressions. The node that is + most preferred is the one with the greatest sum of weights, i.e. + for each node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, etc.), + compute a sum by iterating through the elements of this field and adding + "weight" to the sum if the node matches the corresponding matchExpressions; the + node(s) with the highest sum are the most preferred. + type: array + items: + description: |- + An empty preferred scheduling term matches all objects with implicit weight 0 + (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). + type: object + required: + - preference + - weight + properties: + preference: + description: A node selector term, associated with the corresponding weight. + type: object + properties: + matchExpressions: + description: A list of node selector requirements by node's labels. + type: array + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: The label key that the selector applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchFields: + description: A list of node selector requirements by node's fields. + type: array + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: The label key that the selector applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + x-kubernetes-map-type: atomic + weight: + description: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. + type: integer + format: int32 + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + description: |- + If the affinity requirements specified by this field are not met at + scheduling time, the pod will not be scheduled onto the node. + If the affinity requirements specified by this field cease to be met + at some point during pod execution (e.g. due to an update), the system + may or may not try to eventually evict the pod from its node. + type: object + required: + - nodeSelectorTerms + properties: + nodeSelectorTerms: + description: Required. A list of node selector terms. The terms are ORed. + type: array + items: + description: |- + A null or empty node selector term matches no objects. The requirements of + them are ANDed. + The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. + type: object + properties: + matchExpressions: + description: A list of node selector requirements by node's labels. + type: array + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: The label key that the selector applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchFields: + description: A list of node selector requirements by node's fields. + type: array + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: The label key that the selector applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + x-kubernetes-map-type: atomic + x-kubernetes-list-type: atomic + x-kubernetes-map-type: atomic + podAffinity: + description: Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). + type: object + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: |- + The scheduler will prefer to schedule pods to nodes that satisfy + the affinity expressions specified by this field, but it may choose + a node that violates one or more of the expressions. The node that is + most preferred is the one with the greatest sum of weights, i.e. + for each node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, etc.), + compute a sum by iterating through the elements of this field and adding + "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + type: array + items: + description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) + type: object + required: + - podAffinityTerm + - weight + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated with the corresponding weight. + type: object + required: + - topologyKey + properties: + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + matchLabelKeys: + description: |- + MatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both matchLabelKeys and labelSelector. + Also, matchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: |- + MismatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. + Also, mismatchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + type: array + items: + type: string + x-kubernetes-list-type: atomic + topologyKey: + description: |- + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + weight: + description: |- + weight associated with matching the corresponding podAffinityTerm, + in the range 1-100. + type: integer + format: int32 + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + description: |- + If the affinity requirements specified by this field are not met at + scheduling time, the pod will not be scheduled onto the node. + If the affinity requirements specified by this field cease to be met + at some point during pod execution (e.g. due to a pod label update), the + system may or may not try to eventually evict the pod from its node. + When there are multiple elements, the lists of nodes corresponding to each + podAffinityTerm are intersected, i.e. all terms must be satisfied. + type: array + items: + description: |- + Defines a set of pods (namely those matching the labelSelector + relative to the given namespace(s)) that this pod should be + co-located (affinity) or not co-located (anti-affinity) with, + where co-located is defined as running on a node whose value of + the label with key matches that of any node on which + a pod of the set of pods is running + type: object + required: + - topologyKey + properties: + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + matchLabelKeys: + description: |- + MatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both matchLabelKeys and labelSelector. + Also, matchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: |- + MismatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. + Also, mismatchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + type: array + items: + type: string + x-kubernetes-list-type: atomic + topologyKey: + description: |- + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + x-kubernetes-list-type: atomic + podAntiAffinity: + description: Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). + type: object + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: |- + The scheduler will prefer to schedule pods to nodes that satisfy + the anti-affinity expressions specified by this field, but it may choose + a node that violates one or more of the expressions. The node that is + most preferred is the one with the greatest sum of weights, i.e. + for each node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling anti-affinity expressions, etc.), + compute a sum by iterating through the elements of this field and adding + "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + type: array + items: + description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) + type: object + required: + - podAffinityTerm + - weight + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated with the corresponding weight. + type: object + required: + - topologyKey + properties: + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + matchLabelKeys: + description: |- + MatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both matchLabelKeys and labelSelector. + Also, matchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: |- + MismatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. + Also, mismatchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + type: array + items: + type: string + x-kubernetes-list-type: atomic + topologyKey: + description: |- + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + weight: + description: |- + weight associated with matching the corresponding podAffinityTerm, + in the range 1-100. + type: integer + format: int32 + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + description: |- + If the anti-affinity requirements specified by this field are not met at + scheduling time, the pod will not be scheduled onto the node. + If the anti-affinity requirements specified by this field cease to be met + at some point during pod execution (e.g. due to a pod label update), the + system may or may not try to eventually evict the pod from its node. + When there are multiple elements, the lists of nodes corresponding to each + podAffinityTerm are intersected, i.e. all terms must be satisfied. + type: array + items: + description: |- + Defines a set of pods (namely those matching the labelSelector + relative to the given namespace(s)) that this pod should be + co-located (affinity) or not co-located (anti-affinity) with, + where co-located is defined as running on a node whose value of + the label with key matches that of any node on which + a pod of the set of pods is running + type: object + required: + - topologyKey + properties: + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + matchLabelKeys: + description: |- + MatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both matchLabelKeys and labelSelector. + Also, matchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: |- + MismatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. + Also, mismatchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + type: array + items: + type: string + x-kubernetes-list-type: atomic + topologyKey: + description: |- + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + x-kubernetes-list-type: atomic + imagePullSecrets: + description: If specified, the pod's imagePullSecrets + type: array + items: + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. + type: object + properties: + name: + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + default: "" + x-kubernetes-map-type: atomic + nodeSelector: + description: |- + NodeSelector is a selector which must be true for the pod to fit on a node. + Selector which must match a node's labels for the pod to be scheduled on that node. + More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + type: object + additionalProperties: + type: string + priorityClassName: + description: If specified, the pod's priorityClassName. + type: string + securityContext: + description: If specified, the pod's security context + type: object + properties: + fsGroup: + description: |- + A special supplemental group that applies to all containers in a pod. + Some volume types allow the Kubelet to change the ownership of that volume + to be owned by the pod: + + 1. The owning GID will be the FSGroup + 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) + 3. The permission bits are OR'd with rw-rw---- + + If unset, the Kubelet will not modify the ownership and permissions of any volume. + Note that this field cannot be set when spec.os.name is windows. + type: integer + format: int64 + fsGroupChangePolicy: + description: |- + fsGroupChangePolicy defines behavior of changing ownership and permission of the volume + before being exposed inside Pod. This field will only apply to + volume types which support fsGroup based ownership(and permissions). + It will have no effect on ephemeral volume types such as: secret, configmaps + and emptydir. + Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. + Note that this field cannot be set when spec.os.name is windows. + type: string + runAsGroup: + description: |- + The GID to run the entrypoint of the container process. + Uses runtime default if unset. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence + for that container. + Note that this field cannot be set when spec.os.name is windows. + type: integer + format: int64 + runAsNonRoot: + description: |- + Indicates that the container must run as a non-root user. + If true, the Kubelet will validate the image at runtime to ensure that it + does not run as UID 0 (root) and fail to start the container if it does. + If unset or false, no such validation will be performed. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: |- + The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence + for that container. + Note that this field cannot be set when spec.os.name is windows. + type: integer + format: int64 + seLinuxOptions: + description: |- + The SELinux context to be applied to all containers. + If unspecified, the container runtime will allocate a random SELinux context for each + container. May also be set in SecurityContext. If set in + both SecurityContext and PodSecurityContext, the value specified in SecurityContext + takes precedence for that container. + Note that this field cannot be set when spec.os.name is windows. + type: object + properties: + level: + description: Level is SELinux level label that applies to the container. + type: string + role: + description: Role is a SELinux role label that applies to the container. + type: string + type: + description: Type is a SELinux type label that applies to the container. + type: string + user: + description: User is a SELinux user label that applies to the container. + type: string + seccompProfile: + description: |- + The seccomp options to use by the containers in this pod. + Note that this field cannot be set when spec.os.name is windows. + type: object + required: + - type + properties: + localhostProfile: + description: |- + localhostProfile indicates a profile defined in a file on the node should be used. + The profile must be preconfigured on the node to work. + Must be a descending path, relative to the kubelet's configured seccomp profile location. + Must be set if type is "Localhost". Must NOT be set for any other type. + type: string + type: + description: |- + type indicates which kind of seccomp profile will be applied. + Valid options are: + + Localhost - a profile defined in a file on the node should be used. + RuntimeDefault - the container runtime default profile should be used. + Unconfined - no profile should be applied. + type: string + supplementalGroups: + description: |- + A list of groups applied to the first process run in each container, in addition + to the container's primary GID, the fsGroup (if specified), and group memberships + defined in the container image for the uid of the container process. If unspecified, + no additional groups are added to any container. Note that group memberships + defined in the container image for the uid of the container process are still effective, + even if they are not included in this list. + Note that this field cannot be set when spec.os.name is windows. + type: array + items: + type: integer + format: int64 + sysctls: + description: |- + Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported + sysctls (by the container runtime) might fail to launch. + Note that this field cannot be set when spec.os.name is windows. + type: array + items: + description: Sysctl defines a kernel parameter to be set + type: object + required: + - name + - value + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string serviceAccountName: description: If specified, the pod's service account type: string diff --git a/deploy/crds/crd-clusterissuers.yaml b/deploy/crds/crd-clusterissuers.yaml index 01c374561f9..9110e3ac7c8 100644 --- a/deploy/crds/crd-clusterissuers.yaml +++ b/deploy/crds/crd-clusterissuers.yaml @@ -565,8 +565,6 @@ spec: route53: description: Use the AWS Route53 API to manage DNS01 challenge records. type: object - required: - - region properties: accessKeyID: description: |- @@ -635,10 +633,32 @@ spec: description: Name of the ServiceAccount used to request a token. type: string hostedZoneID: - description: If set, the provider will manage only this zone in Route53 and will not do an lookup using the route53:ListHostedZonesByName api call. + description: If set, the provider will manage only this zone in Route53 and will not do a lookup using the route53:ListHostedZonesByName api call. type: string region: - description: Always set the region when using AccessKeyID and SecretAccessKey + description: |- + Override the AWS region. + + Route53 is a global service and does not have regional endpoints but the + region specified here (or via environment variables) is used as a hint to + help compute the correct AWS credential scope and partition when it + connects to Route53. See: + - [Amazon Route 53 endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/r53.html) + - [Global services](https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/global-services.html) + + If you omit this region field, cert-manager will use the region from + AWS_REGION and AWS_DEFAULT_REGION environment variables, if they are set + in the cert-manager controller Pod. + + The `region` field is not needed if you use [IAM Roles for Service Accounts (IRSA)](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html). + Instead an AWS_REGION environment variable is added to the cert-manager controller Pod by: + [Amazon EKS Pod Identity Webhook](https://github.com/aws/amazon-eks-pod-identity-webhook). + In this case this `region` field value is ignored. + + The `region` field is not needed if you use [EKS Pod Identities](https://docs.aws.amazon.com/eks/latest/userguide/pod-identities.html). + Instead an AWS_REGION environment variable is added to the cert-manager controller Pod by: + [Amazon EKS Pod Identity Agent](https://github.com/aws/eks-pod-identity-agent), + In this case this `region` field value is ignored. type: string role: description: |- @@ -735,15 +755,12 @@ spec: a parent of this resource (usually a route). There are two kinds of parent resources with "Core" support: - * Gateway (Gateway conformance profile) * Service (Mesh conformance profile, ClusterIP Services only) - This API may be extended in the future to support additional kinds of parent resources. - The API object must be valid in the cluster; the Group and Kind must be registered in the cluster for this reference to be valid. type: object @@ -757,7 +774,6 @@ spec: To set the core API group (such as for a "Service" kind referent), Group must be explicitly set to "" (empty string). - Support: Core type: string default: gateway.networking.k8s.io @@ -767,14 +783,11 @@ spec: description: |- Kind is kind of the referent. - There are two kinds of parent resources with "Core" support: - * Gateway (Gateway conformance profile) * Service (Mesh conformance profile, ClusterIP Services only) - Support for other resources is Implementation-Specific. type: string default: Gateway @@ -785,7 +798,6 @@ spec: description: |- Name is the name of the referent. - Support: Core type: string maxLength: 253 @@ -795,20 +807,17 @@ spec: Namespace is the namespace of the referent. When unspecified, this refers to the local namespace of the Route. - Note that there are specific rules for ParentRefs which cross namespace boundaries. Cross-namespace references are only valid if they are explicitly allowed by something in the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace reference. - ParentRefs from a Route to a Service in the same namespace are "producer" routes, which apply default routing rules to inbound connections from any namespace to the Service. - ParentRefs from a Route to a Service in a different namespace are "consumer" routes, and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which @@ -816,7 +825,6 @@ spec: ParentRef of the Route. - Support: Core type: string maxLength: 63 @@ -827,7 +835,6 @@ spec: Port is the network port this Route targets. It can be interpreted differently based on the type of parent resource. - When the parent resource is a Gateway, this targets all listeners listening on the specified port that also support this kind of Route(and select this Route). It's not recommended to set `Port` unless the @@ -836,19 +843,16 @@ spec: and SectionName are specified, the name and port of the selected listener must match both specified values. - When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must match both specified values. - Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted. - For the purpose of status, an attachment is considered successful as long as the parent resource accepts it partially. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, @@ -857,7 +861,6 @@ spec: attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway. - Support: Extended type: integer format: int32 @@ -868,7 +871,6 @@ spec: SectionName is the name of a section within the target resource. In the following resources, SectionName is interpreted as the following: - * Gateway: Listener name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values. @@ -876,27 +878,1143 @@ spec: are specified, the name and port of the selected listener must match both specified values. - Implementations MAY choose to support attaching Routes to other resources. If that is the case, they MUST clearly document how SectionName is interpreted. + When unspecified (empty string), this will reference the entire resource. + For the purpose of status, an attachment is considered successful if at + least one section in the parent resource accepts it. For example, Gateway + listeners can restrict which Routes can attach to them by Route kind, + namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from + the referencing Route, the Route MUST be considered successfully + attached. If no Gateway listeners accept attachment from this Route, the + Route MUST be considered detached from the Gateway. + + Support: Core + type: string + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + podTemplate: + description: |- + Optional pod template used to configure the ACME challenge solver pods + used for HTTP01 challenges. + type: object + properties: + metadata: + description: |- + ObjectMeta overrides for the pod used to solve HTTP01 challenges. + Only the 'labels' and 'annotations' fields may be set. + If labels or annotations overlap with in-built values, the values here + will override the in-built values. + type: object + properties: + annotations: + description: Annotations that should be added to the created ACME HTTP01 solver pods. + type: object + additionalProperties: + type: string + labels: + description: Labels that should be added to the created ACME HTTP01 solver pods. + type: object + additionalProperties: + type: string + spec: + description: |- + PodSpec defines overrides for the HTTP01 challenge solver pod. + Check ACMEChallengeSolverHTTP01IngressPodSpec to find out currently supported fields. + All other fields will be ignored. + type: object + properties: + affinity: + description: If specified, the pod's scheduling constraints + type: object + properties: + nodeAffinity: + description: Describes node affinity scheduling rules for the pod. + type: object + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: |- + The scheduler will prefer to schedule pods to nodes that satisfy + the affinity expressions specified by this field, but it may choose + a node that violates one or more of the expressions. The node that is + most preferred is the one with the greatest sum of weights, i.e. + for each node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, etc.), + compute a sum by iterating through the elements of this field and adding + "weight" to the sum if the node matches the corresponding matchExpressions; the + node(s) with the highest sum are the most preferred. + type: array + items: + description: |- + An empty preferred scheduling term matches all objects with implicit weight 0 + (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). + type: object + required: + - preference + - weight + properties: + preference: + description: A node selector term, associated with the corresponding weight. + type: object + properties: + matchExpressions: + description: A list of node selector requirements by node's labels. + type: array + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: The label key that the selector applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchFields: + description: A list of node selector requirements by node's fields. + type: array + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: The label key that the selector applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + x-kubernetes-map-type: atomic + weight: + description: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. + type: integer + format: int32 + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + description: |- + If the affinity requirements specified by this field are not met at + scheduling time, the pod will not be scheduled onto the node. + If the affinity requirements specified by this field cease to be met + at some point during pod execution (e.g. due to an update), the system + may or may not try to eventually evict the pod from its node. + type: object + required: + - nodeSelectorTerms + properties: + nodeSelectorTerms: + description: Required. A list of node selector terms. The terms are ORed. + type: array + items: + description: |- + A null or empty node selector term matches no objects. The requirements of + them are ANDed. + The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. + type: object + properties: + matchExpressions: + description: A list of node selector requirements by node's labels. + type: array + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: The label key that the selector applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchFields: + description: A list of node selector requirements by node's fields. + type: array + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: The label key that the selector applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + x-kubernetes-map-type: atomic + x-kubernetes-list-type: atomic + x-kubernetes-map-type: atomic + podAffinity: + description: Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). + type: object + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: |- + The scheduler will prefer to schedule pods to nodes that satisfy + the affinity expressions specified by this field, but it may choose + a node that violates one or more of the expressions. The node that is + most preferred is the one with the greatest sum of weights, i.e. + for each node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, etc.), + compute a sum by iterating through the elements of this field and adding + "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + type: array + items: + description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) + type: object + required: + - podAffinityTerm + - weight + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated with the corresponding weight. + type: object + required: + - topologyKey + properties: + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + matchLabelKeys: + description: |- + MatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both matchLabelKeys and labelSelector. + Also, matchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: |- + MismatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. + Also, mismatchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + type: array + items: + type: string + x-kubernetes-list-type: atomic + topologyKey: + description: |- + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + weight: + description: |- + weight associated with matching the corresponding podAffinityTerm, + in the range 1-100. + type: integer + format: int32 + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + description: |- + If the affinity requirements specified by this field are not met at + scheduling time, the pod will not be scheduled onto the node. + If the affinity requirements specified by this field cease to be met + at some point during pod execution (e.g. due to a pod label update), the + system may or may not try to eventually evict the pod from its node. + When there are multiple elements, the lists of nodes corresponding to each + podAffinityTerm are intersected, i.e. all terms must be satisfied. + type: array + items: + description: |- + Defines a set of pods (namely those matching the labelSelector + relative to the given namespace(s)) that this pod should be + co-located (affinity) or not co-located (anti-affinity) with, + where co-located is defined as running on a node whose value of + the label with key matches that of any node on which + a pod of the set of pods is running + type: object + required: + - topologyKey + properties: + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + matchLabelKeys: + description: |- + MatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both matchLabelKeys and labelSelector. + Also, matchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: |- + MismatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. + Also, mismatchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + type: array + items: + type: string + x-kubernetes-list-type: atomic + topologyKey: + description: |- + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + x-kubernetes-list-type: atomic + podAntiAffinity: + description: Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). + type: object + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: |- + The scheduler will prefer to schedule pods to nodes that satisfy + the anti-affinity expressions specified by this field, but it may choose + a node that violates one or more of the expressions. The node that is + most preferred is the one with the greatest sum of weights, i.e. + for each node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling anti-affinity expressions, etc.), + compute a sum by iterating through the elements of this field and adding + "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + type: array + items: + description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) + type: object + required: + - podAffinityTerm + - weight + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated with the corresponding weight. + type: object + required: + - topologyKey + properties: + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + matchLabelKeys: + description: |- + MatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both matchLabelKeys and labelSelector. + Also, matchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: |- + MismatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. + Also, mismatchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + type: array + items: + type: string + x-kubernetes-list-type: atomic + topologyKey: + description: |- + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + weight: + description: |- + weight associated with matching the corresponding podAffinityTerm, + in the range 1-100. + type: integer + format: int32 + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + description: |- + If the anti-affinity requirements specified by this field are not met at + scheduling time, the pod will not be scheduled onto the node. + If the anti-affinity requirements specified by this field cease to be met + at some point during pod execution (e.g. due to a pod label update), the + system may or may not try to eventually evict the pod from its node. + When there are multiple elements, the lists of nodes corresponding to each + podAffinityTerm are intersected, i.e. all terms must be satisfied. + type: array + items: + description: |- + Defines a set of pods (namely those matching the labelSelector + relative to the given namespace(s)) that this pod should be + co-located (affinity) or not co-located (anti-affinity) with, + where co-located is defined as running on a node whose value of + the label with key matches that of any node on which + a pod of the set of pods is running + type: object + required: + - topologyKey + properties: + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + matchLabelKeys: + description: |- + MatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both matchLabelKeys and labelSelector. + Also, matchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: |- + MismatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. + Also, mismatchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + type: array + items: + type: string + x-kubernetes-list-type: atomic + topologyKey: + description: |- + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + x-kubernetes-list-type: atomic + imagePullSecrets: + description: If specified, the pod's imagePullSecrets + type: array + items: + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. + type: object + properties: + name: + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + default: "" + x-kubernetes-map-type: atomic + nodeSelector: + description: |- + NodeSelector is a selector which must be true for the pod to fit on a node. + Selector which must match a node's labels for the pod to be scheduled on that node. + More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + type: object + additionalProperties: + type: string + priorityClassName: + description: If specified, the pod's priorityClassName. + type: string + securityContext: + description: If specified, the pod's security context + type: object + properties: + fsGroup: + description: |- + A special supplemental group that applies to all containers in a pod. + Some volume types allow the Kubelet to change the ownership of that volume + to be owned by the pod: - When unspecified (empty string), this will reference the entire resource. - For the purpose of status, an attachment is considered successful if at - least one section in the parent resource accepts it. For example, Gateway - listeners can restrict which Routes can attach to them by Route kind, - namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from - the referencing Route, the Route MUST be considered successfully - attached. If no Gateway listeners accept attachment from this Route, the - Route MUST be considered detached from the Gateway. + 1. The owning GID will be the FSGroup + 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) + 3. The permission bits are OR'd with rw-rw---- + If unset, the Kubelet will not modify the ownership and permissions of any volume. + Note that this field cannot be set when spec.os.name is windows. + type: integer + format: int64 + fsGroupChangePolicy: + description: |- + fsGroupChangePolicy defines behavior of changing ownership and permission of the volume + before being exposed inside Pod. This field will only apply to + volume types which support fsGroup based ownership(and permissions). + It will have no effect on ephemeral volume types such as: secret, configmaps + and emptydir. + Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. + Note that this field cannot be set when spec.os.name is windows. + type: string + runAsGroup: + description: |- + The GID to run the entrypoint of the container process. + Uses runtime default if unset. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence + for that container. + Note that this field cannot be set when spec.os.name is windows. + type: integer + format: int64 + runAsNonRoot: + description: |- + Indicates that the container must run as a non-root user. + If true, the Kubelet will validate the image at runtime to ensure that it + does not run as UID 0 (root) and fail to start the container if it does. + If unset or false, no such validation will be performed. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: |- + The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence + for that container. + Note that this field cannot be set when spec.os.name is windows. + type: integer + format: int64 + seLinuxOptions: + description: |- + The SELinux context to be applied to all containers. + If unspecified, the container runtime will allocate a random SELinux context for each + container. May also be set in SecurityContext. If set in + both SecurityContext and PodSecurityContext, the value specified in SecurityContext + takes precedence for that container. + Note that this field cannot be set when spec.os.name is windows. + type: object + properties: + level: + description: Level is SELinux level label that applies to the container. + type: string + role: + description: Role is a SELinux role label that applies to the container. + type: string + type: + description: Type is a SELinux type label that applies to the container. + type: string + user: + description: User is a SELinux user label that applies to the container. + type: string + seccompProfile: + description: |- + The seccomp options to use by the containers in this pod. + Note that this field cannot be set when spec.os.name is windows. + type: object + required: + - type + properties: + localhostProfile: + description: |- + localhostProfile indicates a profile defined in a file on the node should be used. + The profile must be preconfigured on the node to work. + Must be a descending path, relative to the kubelet's configured seccomp profile location. + Must be set if type is "Localhost". Must NOT be set for any other type. + type: string + type: + description: |- + type indicates which kind of seccomp profile will be applied. + Valid options are: - Support: Core - type: string - maxLength: 253 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + Localhost - a profile defined in a file on the node should be used. + RuntimeDefault - the container runtime default profile should be used. + Unconfined - no profile should be applied. + type: string + supplementalGroups: + description: |- + A list of groups applied to the first process run in each container, in addition + to the container's primary GID, the fsGroup (if specified), and group memberships + defined in the container image for the uid of the container process. If unspecified, + no additional groups are added to any container. Note that group memberships + defined in the container image for the uid of the container process are still effective, + even if they are not included in this list. + Note that this field cannot be set when spec.os.name is windows. + type: array + items: + type: integer + format: int64 + sysctls: + description: |- + Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported + sysctls (by the container runtime) might fail to launch. + Note that this field cannot be set when spec.os.name is windows. + type: array + items: + description: Sysctl defines a kernel parameter to be set + type: object + required: + - name + - value + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + serviceAccountName: + description: If specified, the pod's service account + type: string + tolerations: + description: If specified, the pod's tolerations. + type: array + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + type: object + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + type: integer + format: int64 + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string serviceType: description: |- Optional service type for Kubernetes solver service. Supported values @@ -972,7 +2090,7 @@ spec: type: object properties: annotations: - description: Annotations that should be added to the create ACME HTTP01 solver pods. + description: Annotations that should be added to the created ACME HTTP01 solver pods. type: object additionalProperties: type: string @@ -1264,7 +2382,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1279,7 +2397,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1436,7 +2554,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1451,7 +2569,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1609,7 +2727,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1624,7 +2742,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1781,7 +2899,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1796,7 +2914,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1884,9 +3002,7 @@ spec: This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. - TODO: Add other useful fields. apiVersion, kind, uid? More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896. type: string default: "" x-kubernetes-map-type: atomic @@ -1901,6 +3017,141 @@ spec: priorityClassName: description: If specified, the pod's priorityClassName. type: string + securityContext: + description: If specified, the pod's security context + type: object + properties: + fsGroup: + description: |- + A special supplemental group that applies to all containers in a pod. + Some volume types allow the Kubelet to change the ownership of that volume + to be owned by the pod: + + 1. The owning GID will be the FSGroup + 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) + 3. The permission bits are OR'd with rw-rw---- + + If unset, the Kubelet will not modify the ownership and permissions of any volume. + Note that this field cannot be set when spec.os.name is windows. + type: integer + format: int64 + fsGroupChangePolicy: + description: |- + fsGroupChangePolicy defines behavior of changing ownership and permission of the volume + before being exposed inside Pod. This field will only apply to + volume types which support fsGroup based ownership(and permissions). + It will have no effect on ephemeral volume types such as: secret, configmaps + and emptydir. + Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. + Note that this field cannot be set when spec.os.name is windows. + type: string + runAsGroup: + description: |- + The GID to run the entrypoint of the container process. + Uses runtime default if unset. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence + for that container. + Note that this field cannot be set when spec.os.name is windows. + type: integer + format: int64 + runAsNonRoot: + description: |- + Indicates that the container must run as a non-root user. + If true, the Kubelet will validate the image at runtime to ensure that it + does not run as UID 0 (root) and fail to start the container if it does. + If unset or false, no such validation will be performed. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: |- + The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence + for that container. + Note that this field cannot be set when spec.os.name is windows. + type: integer + format: int64 + seLinuxOptions: + description: |- + The SELinux context to be applied to all containers. + If unspecified, the container runtime will allocate a random SELinux context for each + container. May also be set in SecurityContext. If set in + both SecurityContext and PodSecurityContext, the value specified in SecurityContext + takes precedence for that container. + Note that this field cannot be set when spec.os.name is windows. + type: object + properties: + level: + description: Level is SELinux level label that applies to the container. + type: string + role: + description: Role is a SELinux role label that applies to the container. + type: string + type: + description: Type is a SELinux type label that applies to the container. + type: string + user: + description: User is a SELinux user label that applies to the container. + type: string + seccompProfile: + description: |- + The seccomp options to use by the containers in this pod. + Note that this field cannot be set when spec.os.name is windows. + type: object + required: + - type + properties: + localhostProfile: + description: |- + localhostProfile indicates a profile defined in a file on the node should be used. + The profile must be preconfigured on the node to work. + Must be a descending path, relative to the kubelet's configured seccomp profile location. + Must be set if type is "Localhost". Must NOT be set for any other type. + type: string + type: + description: |- + type indicates which kind of seccomp profile will be applied. + Valid options are: + + Localhost - a profile defined in a file on the node should be used. + RuntimeDefault - the container runtime default profile should be used. + Unconfined - no profile should be applied. + type: string + supplementalGroups: + description: |- + A list of groups applied to the first process run in each container, in addition + to the container's primary GID, the fsGroup (if specified), and group memberships + defined in the container image for the uid of the container process. If unspecified, + no additional groups are added to any container. Note that group memberships + defined in the container image for the uid of the container process are still effective, + even if they are not included in this list. + Note that this field cannot be set when spec.os.name is windows. + type: array + items: + type: integer + format: int64 + sysctls: + description: |- + Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported + sysctls (by the container runtime) might fail to launch. + Note that this field cannot be set when spec.os.name is windows. + type: array + items: + description: Sysctl defines a kernel parameter to be set + type: object + required: + - name + - value + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string serviceAccountName: description: If specified, the pod's service account type: string @@ -2099,6 +3350,31 @@ spec: Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string + clientCertificate: + description: |- + ClientCertificate authenticates with Vault by presenting a client + certificate during the request's TLS handshake. + Works only when using HTTPS protocol. + type: object + properties: + mountPath: + description: |- + The Vault mountPath here is the mount path to use when authenticating with + Vault. For example, setting a value to `/v1/auth/foo`, will use the path + `/v1/auth/foo/login` to authenticate with Vault. If unspecified, the + default value "/v1/auth/cert" will be used. + type: string + name: + description: |- + Name of the certificate role to authenticate against. + If not set, matching any certificate role, if available. + type: string + secretName: + description: |- + Reference to Kubernetes Secret of type "kubernetes.io/tls" (hence containing + tls.crt and tls.key) used to authenticate to Vault using TLS client + authentication. + type: string kubernetes: description: |- Kubernetes authenticates with Vault by passing the ServiceAccount @@ -2316,11 +3592,33 @@ spec: is used to validate the chain. type: string format: byte + caBundleSecretRef: + description: |- + Reference to a Secret containing a base64-encoded bundle of PEM CAs + which will be used to validate the certificate chain presented by the TPP server. + Only used if using HTTPS; ignored for HTTP. Mutually exclusive with CABundle. + If neither CABundle nor CABundleSecretRef is defined, the certificate bundle in + the cert-manager controller container is used to validate the TLS connection. + type: object + required: + - name + properties: + key: + description: |- + The key of the entry in the Secret resource's `data` field to be used. + Some instances of this field may be defaulted, in others it may be + required. + type: string + name: + description: |- + Name of the resource being referred to. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string credentialsRef: description: |- - CredentialsRef is a reference to a Secret containing the username and - password for the TPP server. - The secret must contain two keys, 'username' and 'password'. + CredentialsRef is a reference to a Secret containing the Venafi TPP API credentials. + The secret must contain the key 'access-token' for the Access Token Authentication, + or two keys, 'username' and 'password' for the API Keys Authentication. type: object required: - name diff --git a/deploy/crds/crd-issuers.yaml b/deploy/crds/crd-issuers.yaml index bc75735c5e4..cdcaf534b46 100644 --- a/deploy/crds/crd-issuers.yaml +++ b/deploy/crds/crd-issuers.yaml @@ -565,8 +565,6 @@ spec: route53: description: Use the AWS Route53 API to manage DNS01 challenge records. type: object - required: - - region properties: accessKeyID: description: |- @@ -635,10 +633,32 @@ spec: description: Name of the ServiceAccount used to request a token. type: string hostedZoneID: - description: If set, the provider will manage only this zone in Route53 and will not do an lookup using the route53:ListHostedZonesByName api call. + description: If set, the provider will manage only this zone in Route53 and will not do a lookup using the route53:ListHostedZonesByName api call. type: string region: - description: Always set the region when using AccessKeyID and SecretAccessKey + description: |- + Override the AWS region. + + Route53 is a global service and does not have regional endpoints but the + region specified here (or via environment variables) is used as a hint to + help compute the correct AWS credential scope and partition when it + connects to Route53. See: + - [Amazon Route 53 endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/r53.html) + - [Global services](https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/global-services.html) + + If you omit this region field, cert-manager will use the region from + AWS_REGION and AWS_DEFAULT_REGION environment variables, if they are set + in the cert-manager controller Pod. + + The `region` field is not needed if you use [IAM Roles for Service Accounts (IRSA)](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html). + Instead an AWS_REGION environment variable is added to the cert-manager controller Pod by: + [Amazon EKS Pod Identity Webhook](https://github.com/aws/amazon-eks-pod-identity-webhook). + In this case this `region` field value is ignored. + + The `region` field is not needed if you use [EKS Pod Identities](https://docs.aws.amazon.com/eks/latest/userguide/pod-identities.html). + Instead an AWS_REGION environment variable is added to the cert-manager controller Pod by: + [Amazon EKS Pod Identity Agent](https://github.com/aws/eks-pod-identity-agent), + In this case this `region` field value is ignored. type: string role: description: |- @@ -735,15 +755,12 @@ spec: a parent of this resource (usually a route). There are two kinds of parent resources with "Core" support: - * Gateway (Gateway conformance profile) * Service (Mesh conformance profile, ClusterIP Services only) - This API may be extended in the future to support additional kinds of parent resources. - The API object must be valid in the cluster; the Group and Kind must be registered in the cluster for this reference to be valid. type: object @@ -757,7 +774,6 @@ spec: To set the core API group (such as for a "Service" kind referent), Group must be explicitly set to "" (empty string). - Support: Core type: string default: gateway.networking.k8s.io @@ -767,14 +783,11 @@ spec: description: |- Kind is kind of the referent. - There are two kinds of parent resources with "Core" support: - * Gateway (Gateway conformance profile) * Service (Mesh conformance profile, ClusterIP Services only) - Support for other resources is Implementation-Specific. type: string default: Gateway @@ -785,7 +798,6 @@ spec: description: |- Name is the name of the referent. - Support: Core type: string maxLength: 253 @@ -795,20 +807,17 @@ spec: Namespace is the namespace of the referent. When unspecified, this refers to the local namespace of the Route. - Note that there are specific rules for ParentRefs which cross namespace boundaries. Cross-namespace references are only valid if they are explicitly allowed by something in the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace reference. - ParentRefs from a Route to a Service in the same namespace are "producer" routes, which apply default routing rules to inbound connections from any namespace to the Service. - ParentRefs from a Route to a Service in a different namespace are "consumer" routes, and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which @@ -816,7 +825,6 @@ spec: ParentRef of the Route. - Support: Core type: string maxLength: 63 @@ -827,7 +835,6 @@ spec: Port is the network port this Route targets. It can be interpreted differently based on the type of parent resource. - When the parent resource is a Gateway, this targets all listeners listening on the specified port that also support this kind of Route(and select this Route). It's not recommended to set `Port` unless the @@ -836,19 +843,16 @@ spec: and SectionName are specified, the name and port of the selected listener must match both specified values. - When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must match both specified values. - Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted. - For the purpose of status, an attachment is considered successful as long as the parent resource accepts it partially. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, @@ -857,7 +861,6 @@ spec: attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway. - Support: Extended type: integer format: int32 @@ -868,7 +871,6 @@ spec: SectionName is the name of a section within the target resource. In the following resources, SectionName is interpreted as the following: - * Gateway: Listener name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values. @@ -876,27 +878,1143 @@ spec: are specified, the name and port of the selected listener must match both specified values. - Implementations MAY choose to support attaching Routes to other resources. If that is the case, they MUST clearly document how SectionName is interpreted. + When unspecified (empty string), this will reference the entire resource. + For the purpose of status, an attachment is considered successful if at + least one section in the parent resource accepts it. For example, Gateway + listeners can restrict which Routes can attach to them by Route kind, + namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from + the referencing Route, the Route MUST be considered successfully + attached. If no Gateway listeners accept attachment from this Route, the + Route MUST be considered detached from the Gateway. + + Support: Core + type: string + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + podTemplate: + description: |- + Optional pod template used to configure the ACME challenge solver pods + used for HTTP01 challenges. + type: object + properties: + metadata: + description: |- + ObjectMeta overrides for the pod used to solve HTTP01 challenges. + Only the 'labels' and 'annotations' fields may be set. + If labels or annotations overlap with in-built values, the values here + will override the in-built values. + type: object + properties: + annotations: + description: Annotations that should be added to the created ACME HTTP01 solver pods. + type: object + additionalProperties: + type: string + labels: + description: Labels that should be added to the created ACME HTTP01 solver pods. + type: object + additionalProperties: + type: string + spec: + description: |- + PodSpec defines overrides for the HTTP01 challenge solver pod. + Check ACMEChallengeSolverHTTP01IngressPodSpec to find out currently supported fields. + All other fields will be ignored. + type: object + properties: + affinity: + description: If specified, the pod's scheduling constraints + type: object + properties: + nodeAffinity: + description: Describes node affinity scheduling rules for the pod. + type: object + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: |- + The scheduler will prefer to schedule pods to nodes that satisfy + the affinity expressions specified by this field, but it may choose + a node that violates one or more of the expressions. The node that is + most preferred is the one with the greatest sum of weights, i.e. + for each node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, etc.), + compute a sum by iterating through the elements of this field and adding + "weight" to the sum if the node matches the corresponding matchExpressions; the + node(s) with the highest sum are the most preferred. + type: array + items: + description: |- + An empty preferred scheduling term matches all objects with implicit weight 0 + (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). + type: object + required: + - preference + - weight + properties: + preference: + description: A node selector term, associated with the corresponding weight. + type: object + properties: + matchExpressions: + description: A list of node selector requirements by node's labels. + type: array + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: The label key that the selector applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchFields: + description: A list of node selector requirements by node's fields. + type: array + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: The label key that the selector applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + x-kubernetes-map-type: atomic + weight: + description: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. + type: integer + format: int32 + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + description: |- + If the affinity requirements specified by this field are not met at + scheduling time, the pod will not be scheduled onto the node. + If the affinity requirements specified by this field cease to be met + at some point during pod execution (e.g. due to an update), the system + may or may not try to eventually evict the pod from its node. + type: object + required: + - nodeSelectorTerms + properties: + nodeSelectorTerms: + description: Required. A list of node selector terms. The terms are ORed. + type: array + items: + description: |- + A null or empty node selector term matches no objects. The requirements of + them are ANDed. + The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. + type: object + properties: + matchExpressions: + description: A list of node selector requirements by node's labels. + type: array + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: The label key that the selector applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchFields: + description: A list of node selector requirements by node's fields. + type: array + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: The label key that the selector applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + x-kubernetes-map-type: atomic + x-kubernetes-list-type: atomic + x-kubernetes-map-type: atomic + podAffinity: + description: Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). + type: object + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: |- + The scheduler will prefer to schedule pods to nodes that satisfy + the affinity expressions specified by this field, but it may choose + a node that violates one or more of the expressions. The node that is + most preferred is the one with the greatest sum of weights, i.e. + for each node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, etc.), + compute a sum by iterating through the elements of this field and adding + "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + type: array + items: + description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) + type: object + required: + - podAffinityTerm + - weight + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated with the corresponding weight. + type: object + required: + - topologyKey + properties: + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + matchLabelKeys: + description: |- + MatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both matchLabelKeys and labelSelector. + Also, matchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: |- + MismatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. + Also, mismatchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + type: array + items: + type: string + x-kubernetes-list-type: atomic + topologyKey: + description: |- + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + weight: + description: |- + weight associated with matching the corresponding podAffinityTerm, + in the range 1-100. + type: integer + format: int32 + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + description: |- + If the affinity requirements specified by this field are not met at + scheduling time, the pod will not be scheduled onto the node. + If the affinity requirements specified by this field cease to be met + at some point during pod execution (e.g. due to a pod label update), the + system may or may not try to eventually evict the pod from its node. + When there are multiple elements, the lists of nodes corresponding to each + podAffinityTerm are intersected, i.e. all terms must be satisfied. + type: array + items: + description: |- + Defines a set of pods (namely those matching the labelSelector + relative to the given namespace(s)) that this pod should be + co-located (affinity) or not co-located (anti-affinity) with, + where co-located is defined as running on a node whose value of + the label with key matches that of any node on which + a pod of the set of pods is running + type: object + required: + - topologyKey + properties: + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + matchLabelKeys: + description: |- + MatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both matchLabelKeys and labelSelector. + Also, matchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: |- + MismatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. + Also, mismatchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + type: array + items: + type: string + x-kubernetes-list-type: atomic + topologyKey: + description: |- + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + x-kubernetes-list-type: atomic + podAntiAffinity: + description: Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). + type: object + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: |- + The scheduler will prefer to schedule pods to nodes that satisfy + the anti-affinity expressions specified by this field, but it may choose + a node that violates one or more of the expressions. The node that is + most preferred is the one with the greatest sum of weights, i.e. + for each node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling anti-affinity expressions, etc.), + compute a sum by iterating through the elements of this field and adding + "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + type: array + items: + description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) + type: object + required: + - podAffinityTerm + - weight + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated with the corresponding weight. + type: object + required: + - topologyKey + properties: + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + matchLabelKeys: + description: |- + MatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both matchLabelKeys and labelSelector. + Also, matchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: |- + MismatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. + Also, mismatchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + type: array + items: + type: string + x-kubernetes-list-type: atomic + topologyKey: + description: |- + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + weight: + description: |- + weight associated with matching the corresponding podAffinityTerm, + in the range 1-100. + type: integer + format: int32 + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + description: |- + If the anti-affinity requirements specified by this field are not met at + scheduling time, the pod will not be scheduled onto the node. + If the anti-affinity requirements specified by this field cease to be met + at some point during pod execution (e.g. due to a pod label update), the + system may or may not try to eventually evict the pod from its node. + When there are multiple elements, the lists of nodes corresponding to each + podAffinityTerm are intersected, i.e. all terms must be satisfied. + type: array + items: + description: |- + Defines a set of pods (namely those matching the labelSelector + relative to the given namespace(s)) that this pod should be + co-located (affinity) or not co-located (anti-affinity) with, + where co-located is defined as running on a node whose value of + the label with key matches that of any node on which + a pod of the set of pods is running + type: object + required: + - topologyKey + properties: + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + matchLabelKeys: + description: |- + MatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both matchLabelKeys and labelSelector. + Also, matchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: |- + MismatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. + Also, mismatchLabelKeys cannot be set when labelSelector isn't set. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + type: array + items: + type: string + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + type: object + required: + - key + - operator + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + type: array + items: + type: string + x-kubernetes-list-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + additionalProperties: + type: string + x-kubernetes-map-type: atomic + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + type: array + items: + type: string + x-kubernetes-list-type: atomic + topologyKey: + description: |- + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + x-kubernetes-list-type: atomic + imagePullSecrets: + description: If specified, the pod's imagePullSecrets + type: array + items: + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. + type: object + properties: + name: + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + default: "" + x-kubernetes-map-type: atomic + nodeSelector: + description: |- + NodeSelector is a selector which must be true for the pod to fit on a node. + Selector which must match a node's labels for the pod to be scheduled on that node. + More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + type: object + additionalProperties: + type: string + priorityClassName: + description: If specified, the pod's priorityClassName. + type: string + securityContext: + description: If specified, the pod's security context + type: object + properties: + fsGroup: + description: |- + A special supplemental group that applies to all containers in a pod. + Some volume types allow the Kubelet to change the ownership of that volume + to be owned by the pod: - When unspecified (empty string), this will reference the entire resource. - For the purpose of status, an attachment is considered successful if at - least one section in the parent resource accepts it. For example, Gateway - listeners can restrict which Routes can attach to them by Route kind, - namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from - the referencing Route, the Route MUST be considered successfully - attached. If no Gateway listeners accept attachment from this Route, the - Route MUST be considered detached from the Gateway. + 1. The owning GID will be the FSGroup + 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) + 3. The permission bits are OR'd with rw-rw---- + If unset, the Kubelet will not modify the ownership and permissions of any volume. + Note that this field cannot be set when spec.os.name is windows. + type: integer + format: int64 + fsGroupChangePolicy: + description: |- + fsGroupChangePolicy defines behavior of changing ownership and permission of the volume + before being exposed inside Pod. This field will only apply to + volume types which support fsGroup based ownership(and permissions). + It will have no effect on ephemeral volume types such as: secret, configmaps + and emptydir. + Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. + Note that this field cannot be set when spec.os.name is windows. + type: string + runAsGroup: + description: |- + The GID to run the entrypoint of the container process. + Uses runtime default if unset. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence + for that container. + Note that this field cannot be set when spec.os.name is windows. + type: integer + format: int64 + runAsNonRoot: + description: |- + Indicates that the container must run as a non-root user. + If true, the Kubelet will validate the image at runtime to ensure that it + does not run as UID 0 (root) and fail to start the container if it does. + If unset or false, no such validation will be performed. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: |- + The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence + for that container. + Note that this field cannot be set when spec.os.name is windows. + type: integer + format: int64 + seLinuxOptions: + description: |- + The SELinux context to be applied to all containers. + If unspecified, the container runtime will allocate a random SELinux context for each + container. May also be set in SecurityContext. If set in + both SecurityContext and PodSecurityContext, the value specified in SecurityContext + takes precedence for that container. + Note that this field cannot be set when spec.os.name is windows. + type: object + properties: + level: + description: Level is SELinux level label that applies to the container. + type: string + role: + description: Role is a SELinux role label that applies to the container. + type: string + type: + description: Type is a SELinux type label that applies to the container. + type: string + user: + description: User is a SELinux user label that applies to the container. + type: string + seccompProfile: + description: |- + The seccomp options to use by the containers in this pod. + Note that this field cannot be set when spec.os.name is windows. + type: object + required: + - type + properties: + localhostProfile: + description: |- + localhostProfile indicates a profile defined in a file on the node should be used. + The profile must be preconfigured on the node to work. + Must be a descending path, relative to the kubelet's configured seccomp profile location. + Must be set if type is "Localhost". Must NOT be set for any other type. + type: string + type: + description: |- + type indicates which kind of seccomp profile will be applied. + Valid options are: - Support: Core - type: string - maxLength: 253 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + Localhost - a profile defined in a file on the node should be used. + RuntimeDefault - the container runtime default profile should be used. + Unconfined - no profile should be applied. + type: string + supplementalGroups: + description: |- + A list of groups applied to the first process run in each container, in addition + to the container's primary GID, the fsGroup (if specified), and group memberships + defined in the container image for the uid of the container process. If unspecified, + no additional groups are added to any container. Note that group memberships + defined in the container image for the uid of the container process are still effective, + even if they are not included in this list. + Note that this field cannot be set when spec.os.name is windows. + type: array + items: + type: integer + format: int64 + sysctls: + description: |- + Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported + sysctls (by the container runtime) might fail to launch. + Note that this field cannot be set when spec.os.name is windows. + type: array + items: + description: Sysctl defines a kernel parameter to be set + type: object + required: + - name + - value + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + serviceAccountName: + description: If specified, the pod's service account + type: string + tolerations: + description: If specified, the pod's tolerations. + type: array + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + type: object + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + type: integer + format: int64 + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string serviceType: description: |- Optional service type for Kubernetes solver service. Supported values @@ -972,7 +2090,7 @@ spec: type: object properties: annotations: - description: Annotations that should be added to the create ACME HTTP01 solver pods. + description: Annotations that should be added to the created ACME HTTP01 solver pods. type: object additionalProperties: type: string @@ -1264,7 +2382,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1279,7 +2397,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1436,7 +2554,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1451,7 +2569,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1609,7 +2727,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1624,7 +2742,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1781,7 +2899,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1796,7 +2914,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). type: array items: type: string @@ -1884,9 +3002,7 @@ spec: This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. - TODO: Add other useful fields. apiVersion, kind, uid? More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896. type: string default: "" x-kubernetes-map-type: atomic @@ -1901,6 +3017,141 @@ spec: priorityClassName: description: If specified, the pod's priorityClassName. type: string + securityContext: + description: If specified, the pod's security context + type: object + properties: + fsGroup: + description: |- + A special supplemental group that applies to all containers in a pod. + Some volume types allow the Kubelet to change the ownership of that volume + to be owned by the pod: + + 1. The owning GID will be the FSGroup + 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) + 3. The permission bits are OR'd with rw-rw---- + + If unset, the Kubelet will not modify the ownership and permissions of any volume. + Note that this field cannot be set when spec.os.name is windows. + type: integer + format: int64 + fsGroupChangePolicy: + description: |- + fsGroupChangePolicy defines behavior of changing ownership and permission of the volume + before being exposed inside Pod. This field will only apply to + volume types which support fsGroup based ownership(and permissions). + It will have no effect on ephemeral volume types such as: secret, configmaps + and emptydir. + Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. + Note that this field cannot be set when spec.os.name is windows. + type: string + runAsGroup: + description: |- + The GID to run the entrypoint of the container process. + Uses runtime default if unset. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence + for that container. + Note that this field cannot be set when spec.os.name is windows. + type: integer + format: int64 + runAsNonRoot: + description: |- + Indicates that the container must run as a non-root user. + If true, the Kubelet will validate the image at runtime to ensure that it + does not run as UID 0 (root) and fail to start the container if it does. + If unset or false, no such validation will be performed. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: |- + The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence + for that container. + Note that this field cannot be set when spec.os.name is windows. + type: integer + format: int64 + seLinuxOptions: + description: |- + The SELinux context to be applied to all containers. + If unspecified, the container runtime will allocate a random SELinux context for each + container. May also be set in SecurityContext. If set in + both SecurityContext and PodSecurityContext, the value specified in SecurityContext + takes precedence for that container. + Note that this field cannot be set when spec.os.name is windows. + type: object + properties: + level: + description: Level is SELinux level label that applies to the container. + type: string + role: + description: Role is a SELinux role label that applies to the container. + type: string + type: + description: Type is a SELinux type label that applies to the container. + type: string + user: + description: User is a SELinux user label that applies to the container. + type: string + seccompProfile: + description: |- + The seccomp options to use by the containers in this pod. + Note that this field cannot be set when spec.os.name is windows. + type: object + required: + - type + properties: + localhostProfile: + description: |- + localhostProfile indicates a profile defined in a file on the node should be used. + The profile must be preconfigured on the node to work. + Must be a descending path, relative to the kubelet's configured seccomp profile location. + Must be set if type is "Localhost". Must NOT be set for any other type. + type: string + type: + description: |- + type indicates which kind of seccomp profile will be applied. + Valid options are: + + Localhost - a profile defined in a file on the node should be used. + RuntimeDefault - the container runtime default profile should be used. + Unconfined - no profile should be applied. + type: string + supplementalGroups: + description: |- + A list of groups applied to the first process run in each container, in addition + to the container's primary GID, the fsGroup (if specified), and group memberships + defined in the container image for the uid of the container process. If unspecified, + no additional groups are added to any container. Note that group memberships + defined in the container image for the uid of the container process are still effective, + even if they are not included in this list. + Note that this field cannot be set when spec.os.name is windows. + type: array + items: + type: integer + format: int64 + sysctls: + description: |- + Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported + sysctls (by the container runtime) might fail to launch. + Note that this field cannot be set when spec.os.name is windows. + type: array + items: + description: Sysctl defines a kernel parameter to be set + type: object + required: + - name + - value + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string serviceAccountName: description: If specified, the pod's service account type: string @@ -2099,6 +3350,31 @@ spec: Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string + clientCertificate: + description: |- + ClientCertificate authenticates with Vault by presenting a client + certificate during the request's TLS handshake. + Works only when using HTTPS protocol. + type: object + properties: + mountPath: + description: |- + The Vault mountPath here is the mount path to use when authenticating with + Vault. For example, setting a value to `/v1/auth/foo`, will use the path + `/v1/auth/foo/login` to authenticate with Vault. If unspecified, the + default value "/v1/auth/cert" will be used. + type: string + name: + description: |- + Name of the certificate role to authenticate against. + If not set, matching any certificate role, if available. + type: string + secretName: + description: |- + Reference to Kubernetes Secret of type "kubernetes.io/tls" (hence containing + tls.crt and tls.key) used to authenticate to Vault using TLS client + authentication. + type: string kubernetes: description: |- Kubernetes authenticates with Vault by passing the ServiceAccount @@ -2316,11 +3592,33 @@ spec: is used to validate the chain. type: string format: byte + caBundleSecretRef: + description: |- + Reference to a Secret containing a base64-encoded bundle of PEM CAs + which will be used to validate the certificate chain presented by the TPP server. + Only used if using HTTPS; ignored for HTTP. Mutually exclusive with CABundle. + If neither CABundle nor CABundleSecretRef is defined, the certificate bundle in + the cert-manager controller container is used to validate the TLS connection. + type: object + required: + - name + properties: + key: + description: |- + The key of the entry in the Secret resource's `data` field to be used. + Some instances of this field may be defaulted, in others it may be + required. + type: string + name: + description: |- + Name of the resource being referred to. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string credentialsRef: description: |- - CredentialsRef is a reference to a Secret containing the username and - password for the TPP server. - The secret must contain two keys, 'username' and 'password'. + CredentialsRef is a reference to a Secret containing the Venafi TPP API credentials. + The secret must contain the key 'access-token' for the Access Token Authentication, + or two keys, 'username' and 'password' for the API Keys Authentication. type: object required: - name diff --git a/design/20190708.certificate-request-crd.md b/design/20190708.certificate-request-crd.md index 1d960946b24..203d4706cde 100644 --- a/design/20190708.certificate-request-crd.md +++ b/design/20190708.certificate-request-crd.md @@ -243,14 +243,14 @@ rejected by the API server. Setting the Approved or Denied conditions are restricted by the approver having sufficient RBAC permissions. These permissions are based upon the request -itself- specifically the request's IssuerRef: +itself - specifically the request's IssuerRef: ```yaml apiGroups: ["cert-manager.io"] resources: ["signers"] verbs: ["approve"] resourceNames: - # namesapced signers + # namespaced signers - "./." # cluster scoped signers - "./" @@ -363,7 +363,7 @@ The webhook will keep a cache of the [Discovery API](https://github.com/kubernetes/client-go/blob/f6ce18ae578c8cca64d14ab9687824d9e1305a67/discovery/discovery_client.go#L55) which will be used to determine whether a referenced signer is namespaced or not. If it is namespaced, the `` will be populated with the -namesapce that the CertificateRequest resides in. If the scope of the resource +namespace that the CertificateRequest resides in. If the scope of the resource cannot be determined, the request will be rejected. diff --git a/design/20200326.extensible-certificate-controller.md b/design/20200326.extensible-certificate-controller.md index 41a781bf4cc..77ad82f9407 100644 --- a/design/20200326.extensible-certificate-controller.md +++ b/design/20200326.extensible-certificate-controller.md @@ -241,7 +241,7 @@ resources that are owned by Certificates. * Delete all owned Secret resources with the `cert-manager.io/next-private-key: "true"` * Ensure `status.nextPrivateKeySecretName` is unset - we may want to consider not doing this in case a user has manually specified this field - and pointed it at an 'un-owned' Secret. This depends whether we want to + and pointed it at an 'un-owned' Secret. This depends on whether we want to support this as a mode of operation. When creating a 'next private key' Secret resource, the diff --git a/design/20210209.certificates.k8s.io-adoption.md b/design/20210209.certificates.k8s.io-adoption.md index 1dcb3c092e7..33906ec97de 100644 --- a/design/20210209.certificates.k8s.io-adoption.md +++ b/design/20210209.certificates.k8s.io-adoption.md @@ -168,13 +168,13 @@ rules: [Until 1.22](https://github.com/kubernetes/kubernetes/pull/99494) `CertificateSigningRequests` did not include a `duration` field. To have parity with the `CertificateRequest` resource, the duration field will be moved to the -annotation `experimental.cert-manager.io/request-duration` who's value is a [Go +annotation `experimental.cert-manager.io/request-duration` whose value is a [Go time duration string](https://golang.org/pkg/time/#Duration.String). When 1.22 is released, cert-manager can optimistically read the `expirationSeconds` `CertificateSigningRequest` field to discover the requested duration. If this field hasn't been set or the user is using an older version of -Kubernetes, cert-manager can fallback to this annotation. +Kubernetes, cert-manager can fall back to this annotation. ### CA Field diff --git a/design/20220118.certificate-issuance-exponential-backoff.md b/design/20220118.certificate-issuance-exponential-backoff.md index aebb8a68907..bbb3e602813 100644 --- a/design/20220118.certificate-issuance-exponential-backoff.md +++ b/design/20220118.certificate-issuance-exponential-backoff.md @@ -46,7 +46,7 @@ created. ## Motivation -Currently failed issuances are retried once an hour without a backoff or time limit. This means that 1) continuous failures in large installations can overwhelm external services 2) rate limits can be easily hit in case of longer lasting issuance problems (see [Let'sEncrypt rate limts](https://letsencrypt.org/docs/rate-limits/)) +Currently failed issuances are retried once an hour without a backoff or time limit. This means that 1) continuous failures in large installations can overwhelm external services 2) rate limits can be easily hit in case of longer lasting issuance problems (see [Let'sEncrypt rate limits](https://letsencrypt.org/docs/rate-limits/)) ### Goals @@ -80,7 +80,7 @@ Similarly to [`status.LastFailureTime`](https://github.com/jetstack/cert-manager `IssuanceAttempts` will be set by [`certificates-issuing` controller](https://github.com/jetstack/cert-manager/tree/ce1424162ea4f363bdb7aa4f201432ec63da1145/pkg/controller/certificates/issuing) after a failed issuance by either bumping the already existing value by 1 or setting it to 1 (first failure). In case of a succeeded issuance, `certificates-issuing` controller will ensure that `status.IssuanceAttempts` is not set. -The delay till the next issuance will then be calculated by [`certificates-trigger` controller](https://github.com/jetstack/cert-manager/tree/ce1424162ea4f363bdb7aa4f201432ec63da1145/pkg/controller/certificates/trigger) using the formula `if status.LastFailureTime != nil then next_issuance_attempt_time = status.LastFailureTime + time.Hour x 2 ^ (status.IssuanceAttempts- 1)` (binary exponential- so the sequence will be 1h, 2h, 4h, 8h etc). This ensures that the first delay is 1 hour from the last failure time which is the current behaviour. In case of continuous failures, the delay should keep increasing up to a maximum backoff period of 32h, after which it should be retried every 32h whilst the failures persist. +The delay till the next issuance will then be calculated by [`certificates-trigger` controller](https://github.com/jetstack/cert-manager/tree/ce1424162ea4f363bdb7aa4f201432ec63da1145/pkg/controller/certificates/trigger) using the formula `if status.LastFailureTime != nil then next_issuance_attempt_time = status.LastFailureTime + time.Hour x 2 ^ (status.IssuanceAttempts - 1)` (binary exponential, so the sequence will be 1h, 2h, 4h, 8h etc). This ensures that the first delay is 1 hour from the last failure time which is the current behaviour. In case of continuous failures, the delay should keep increasing up to a maximum backoff period of 32h, after which it should be retried every 32h whilst the failures persist. ### API changes diff --git a/design/20220118.server-side-apply.md b/design/20220118.server-side-apply.md index f98f7d25bb5..0441f2d9344 100644 --- a/design/20220118.server-side-apply.md +++ b/design/20220118.server-side-apply.md @@ -170,11 +170,11 @@ Some fields, such as the Certificate Issuing Condition are managed by more than one controller (issuing and trigger Certificate controllers, and cmctl), and as such, will need to make use of the `force` parameter in their API calls. This option tells the API server to revoke management of that field from the previous -owner, overwrite the field, and change owner ship to the new client. Since some +owner, overwrite the field, and change ownership to the new client. Since some fields, such as the Issuing Condition, may have an undefined number of potential managers (both internal and external to the cert-manager controller), using the same manager for things is not a possibility. You can read more about the -`force` paramerter on the Kubernetes documentation on +`force` parameter on the Kubernetes documentation on [Server-Side Apply](https://kubernetes.io/docs/reference/using-api/server-side-apply/), and in particular the [Conflicts](https://kubernetes.io/docs/reference/using-api/server-side-apply/#conflicts) diff --git a/design/20220614-timeouts.md b/design/20220614-timeouts.md index 7d8505f7da7..8483865de53 100644 --- a/design/20220614-timeouts.md +++ b/design/20220614-timeouts.md @@ -128,7 +128,7 @@ The affected controllers appear to be those which have an `accounts.Getter`: - [acmeorders](https://github.com/cert-manager/cert-manager/blob/c16b3cca7b418ba0d0b2bf1066514b8762984517/pkg/controller/acmeorders/controller.go#L50) These timeouts have two issues. One is that the location they're added is unintuitive; the timeouts are added in -_logging_ middleware which which doesn't otherwise mention that it also introduces timeouts. +_logging_ middleware which doesn't otherwise mention that it also introduces timeouts. That's confusing; we might reasonably expect a timeout on writing the logs themselves (i.e. the actual operation of writing to a log) but this functionality doesn't manage that. @@ -214,7 +214,7 @@ The idea here is "if it's good enough for crossplane why should it not be good e The current cert-manager timeouts are arbitrary. Likely the crossplane timeouts are also arbitrary. We can at least have confidence that a big project with a tonne of controllers and CRDs is using longer timeouts and clearly not seeing -world-ending problems, and people want to _increase_ the timeouts from that base too, as envidenced by the above open +world-ending problems, and people want to _increase_ the timeouts from that base too, as evidenced by the above open issue. Another relevant timeout is certbot, which has a [45s](https://github.com/certbot/certbot/blob/295fc5e33a68c945d2f62e84ed8e6aaecfe93102/acme/acme/client.py#L46) diff --git a/design/20221205-memory-management.md b/design/20221205-memory-management.md index b6c64e0f51b..172328d5515 100644 --- a/design/20221205-memory-management.md +++ b/design/20221205-memory-management.md @@ -90,6 +90,22 @@ This proposal suggests a mechanism how to avoid caching cert-manager unrelated ` - use the same mechanism to improve memory consumption by cainjector. This proposal focuses on controller only as it is the more complex part however we need to fix this problem in cainjector too and it would be nice to be consistent + > 📖 Update: In [#7161: Reduce memory usage by only caching the metadata of Secret resources](https://github.com/cert-manager/cert-manager/pull/716199) + > we addressed the high startup memory usage of cainjector with metadata-only caching features of controller-runtime. + > We did not use the split cache design that was implemented for the + > controller, and this contradicts the goal above: "use the same mechanism to + > improve memory consumption by cainjector ... to be consistent". + > Why? Because the split cache mechanism is overkill for cainjector. + > The split cache design is designed to reduce memory use **and** minimize the + > ongoing load on the K8S API server; which is appropriate for the controller + > because it has multiple controller loops each reading Secret resources every + > time a Certificate is reconciled. + > It is not necessary for cainjector, because cainjector reads relatively few + > Secret resources, infrequently; `cainjector` only reads Secrets having the + > `cert-manager.io/allow-direct-injection` or Secrets created from + > Certificates having that annotation. And it only reads the Secret data once + > during while reconciling the target resource. + #### Must not - make our controllers less reliable (i.e by introducing edge cases where a cert-manager related event does not trigger a reconcile). Given the wide usage of cert-manager and the various different usage scenarios, any such edge case would be likely to occur for some users @@ -124,7 +140,7 @@ cert-manager needs to watch all `Secret`s in the cluster because some user creat - in some cases a missing `Secret` does not cause issuer reconcile ([such as a missing ACME EAB key where we explicitly rely on `Secret` events to retry issuer setup](https://github.com/cert-manager/cert-manager/blob/v1.10.1/pkg/issuer/acme/setup.go#L228)). In this case, it is more efficient as well as a better user experience to reconcile on `Secret` creation event as that way we avoid wasting CPU cycles whilst waiting for the user to create the `Secret` and when the `Secret` does get created, the issuer will be reconciled immediately. -The caching mechanim is required for ensuring quick issuance and not taking too much of kube apiserver's resources. `Secret`s with the issued X.509 certificates and with temporary private keys get retrieved a number of times during issuance and all the control loops involved in issuance need full `Secret` data. Currently the `Secret`s are retrieved from informers cache. Retrieving them from kube apiserver would mean a large number of additional calls to kube apiserver, which is undesirable. The default cert-manager installation uses a rate-limited client (20QPS with a burst of 50). There is also server-side [API Priority and Fairness system](https://kubernetes.io/docs/concepts/cluster-administration/flow-control/) that prevents rogue clients from overwhelming kube apiserver. Both these mechanisms mean that the result of a large number of additional calls will be slower issuance as cert-manager will get rate limited (either client-side or server-side). The rate limiting can be modified to allow higher throughput for cert-manager, but this would have an impact of kube apiserver's availability for other tenants - so in either case additional API calls would have a cost for the user. +The caching mechanism is required for ensuring quick issuance and not taking too much of kube apiserver's resources. `Secret`s with the issued X.509 certificates and with temporary private keys get retrieved a number of times during issuance and all the control loops involved in issuance need full `Secret` data. Currently the `Secret`s are retrieved from informers cache. Retrieving them from kube apiserver would mean a large number of additional calls to kube apiserver, which is undesirable. The default cert-manager installation uses a rate-limited client (20QPS with a burst of 50). There is also server-side [API Priority and Fairness system](https://kubernetes.io/docs/concepts/cluster-administration/flow-control/) that prevents rogue clients from overwhelming kube apiserver. Both these mechanisms mean that the result of a large number of additional calls will be slower issuance as cert-manager will get rate limited (either client-side or server-side). The rate limiting can be modified to allow higher throughput for cert-manager, but this would have an impact of kube apiserver's availability for other tenants, so in either case additional API calls would have a cost for the user. ### User Stories @@ -226,9 +242,9 @@ func (f *filteredSecretsInformer) Lister() corelisters.SecretLister { } func newFilteredSecretsInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - secretLabelSeclector, _ := knownCertManagerSecretLabelSelector() + secretLabelSelector, _ := knownCertManagerSecretLabelSelector() return coreinformers.NewFilteredSecretInformer(client, "", resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, func(listOptions *metav1.ListOptions) { - listOptions.LabelSelector = secretLabelSeclector + listOptions.LabelSelector = secretLabelSelector }) } @@ -299,7 +315,7 @@ The tests were run on a kind cluster. #### Cluster with large cert-manager unrelated secrets -Test the memory spike caused by the inital LIST-ing of `Secret`s, the size of cache after the inital LIST has been processed and a spike caused by changes to `Secret` resources. +Test the memory spike caused by the initial LIST-ing of `Secret`s, the size of cache after the initial LIST has been processed and a spike caused by changes to `Secret` resources. ##### cert-manager v1.11 @@ -311,11 +327,11 @@ Install cert-manager from [latest master with client-go metrics enabled](https:/ Wait for cert-manager to start and populate the caches. -Apply a label to all `Secret`s to initate cache resync: +Apply a label to all `Secret`s to initiate cache resync: ![alt text](/design/images/20221205-memory-management/labelsecret.png) -Observe that memory consumption spikes on controller startup when all `Secret`s are initally listed, there is a second smaller spike around the time the `Secret`s got labelled and that memory consumption remains high: +Observe that memory consumption spikes on controller startup when all `Secret`s are initially listed, there is a second smaller spike around the time the `Secret`s got labelled and that memory consumption remains high: ![alt text](/design/images/20221205-memory-management/latestmastersecrets.png) @@ -329,7 +345,7 @@ Deploy cert-manager from [partial metadata prototype](https://github.com/irbekrm Wait for cert-manager to start and populate the caches. -Apply a label to all `Secret`s to initate cache resync: +Apply a label to all `Secret`s to initiate cache resync: ![alt text](/design/images/20221205-memory-management/labelsecret.png) @@ -509,12 +525,12 @@ The configured `Secret` will be retrieved when the issuer is reconciled (events #### Upstream mechanisms There are a number of existing upstream mechanisms how to limit what gets stored in the cache. This section focuses on what is available for client-go informers which we use in cert-manager controllers, but there is a controller-runtime wrapper available for each of these mechanisms that should make it usable in cainjector as well. - + ##### Filtering Filtering which objects get watched using [label or field selectors](https://github.com/kubernetes/apimachinery/blob/v0.26.0/pkg/apis/meta/v1/types.go#L328-L332). These selectors allow to filter what resources are retrieved during the initial list call and watch calls to kube apiserver by informer's `ListerWatcher` component (and therefore will end up in the cache). client-go informer factory allows configuring individual informers with [list options](https://github.com/kubernetes/client-go/blob/v12.0.0/informers/factory.go#L78-L84) that will be used [for list and watch calls](https://github.com/kubernetes/client-go/blob/v12.0.0/informers/core/v1/secret.go#L59-L72). This mechanism is used by other projects that use client-go controllers, for example [istio](https://github.com/istio/istio/blob/1.16.0/pilot/pkg/status/distribution/state.go#L100-L103). -The same filtering mechanism is [also available for cert-manager.io resources](https://github.com/cert-manager/cert-manager/blob/v1.10.1/pkg/client/informers/externalversions/factory.go#L63-L69). We shouldn't need to filter what cert-manager.io resoruces we watch though. +The same filtering mechanism is [also available for cert-manager.io resources](https://github.com/cert-manager/cert-manager/blob/v1.10.1/pkg/client/informers/externalversions/factory.go#L63-L69). We shouldn't need to filter what cert-manager.io resources we watch though. This mechanism seems the most straightforward to use, but currently we don't have a way to identify all resources (secrets) we need to watch using a label or field selector, see [###Secrets]. ##### Partial object metadata @@ -600,15 +616,15 @@ This would need to start as an alpha feature and would require alpha/beta testin [Here](https://github.com/irbekrm/cert-manager/tree/experimental_transform_funcs) is a prototype of this solution. In the prototype [`Secrets Transformer` function](https://github.com/irbekrm/cert-manager/blob/d44d4ed2e27fb9b7695a74ae254113f3166aadb4/pkg/controller/util.go#L219-L238) -is the tranform that gets applied to all `Secret`s before they are cached. If a `Secret` does not have any known cert-manager labels or annotations it removes `data`, `metada.managedFields` and `metadata.Annotations` and applies a `cert-manager.io/metadata-only` label. -[`SecretGetter`](https://github.com/irbekrm/cert-manager/blob/d44d4ed2e27fb9b7695a74ae254113f3166aadb4/pkg/controller/util.go#L241-L261) is used by any control loop that needs to GET a `Secret`. It retrieves it from kube apiserver or cache dependign on whether `cert-manager.io/metadata-only` label was found. +is the transform that gets applied to all `Secret`s before they are cached. If a `Secret` does not have any known cert-manager labels or annotations it removes `data`, `metadata.managedFields` and `metadata.Annotations` and applies a `cert-manager.io/metadata-only` label. +[`SecretGetter`](https://github.com/irbekrm/cert-manager/blob/d44d4ed2e27fb9b7695a74ae254113f3166aadb4/pkg/controller/util.go#L241-L261) is used by any control loop that needs to GET a `Secret`. It retrieves it from kube apiserver or cache depending on whether `cert-manager.io/metadata-only` label was found. #### Drawbacks - All cluster `Secret`s are still listed - The transform functions only get run before the object is placed into informer's cache. The full object will be in controller's memory for a period of time before that (in DeltaFIFO store (?)). So the users will still see memory spikes when events related to cert-manager unrelated cluster `Secret`s occur. -See performance of the protototype: +See performance of the prototype: Create 300 cert-manager unrelated `Secret`s of size ~1Mb: @@ -620,7 +636,7 @@ Wait for cert-manager caches to sync, then run a command to label all `Secret`s ![alt text](/design/images/20221205-memory-management/labelsecret.png) -Observe that altough altogether memory consumption remains quite low, there is a spike corresponding to the initial listing of `Secret`s: +Observe that although altogether memory consumption remains quite low, there is a spike corresponding to the initial listing of `Secret`s: ![alt text](/design/images/20221205-memory-management/transformfunctionsgrafana.png) @@ -656,17 +672,17 @@ LIST calls to kube apiserver can be [paginated](https://kubernetes.io/docs/refer Perhaps not getting all objects at once on the initial LIST would limit the spike in memory when cert-manager controller starts up. However, currently it is not possible to paginate the initial LISTs made by client-go informers. -Although it is possible to set [page limit](https://github.com/kubernetes/apimachinery/blob/v0.26.0/pkg/apis/meta/v1/types.go#L371-L387) when creating a client-go informer factory or an individual informer, this will in practice not be used for the inital LIST. +Although it is possible to set [page limit](https://github.com/kubernetes/apimachinery/blob/v0.26.0/pkg/apis/meta/v1/types.go#L371-L387) when creating a client-go informer factory or an individual informer, this will in practice not be used for the initial LIST. LIST requests can be served either from etcd or [kube apiserver watch cache](https://github.com/kubernetes/apiserver/tree/v0.26.0/pkg/storage/cacher). Watch cache does not support pagination, so if a request is forwarded to the cache, the response will contain a full list. -Client-go makes the inital LIST request [with resource version 0](https://github.com/kubernetes/client-go/blob/v0.26.0/tools/cache/reflector.go#L592-L596) for performance reasons (to ensure that watch cache is used) and this results in [the response being served from kube apiserver watch cache](https://github.com/kubernetes/apiserver/blob/v0.26.0/pkg/storage/cacher/cacher.go#L621-L635). +Client-go makes the initial LIST request [with resource version 0](https://github.com/kubernetes/client-go/blob/v0.26.0/tools/cache/reflector.go#L592-L596) for performance reasons (to ensure that watch cache is used) and this results in [the response being served from kube apiserver watch cache](https://github.com/kubernetes/apiserver/blob/v0.26.0/pkg/storage/cacher/cacher.go#L621-L635). There is currently an open PR to implement pagination from watch cache https://github.com/kubernetes/kubernetes/pull/108392. ### Filter the Secrets to watch with a label Only watch `Secret`s with known `cert-manager.io` labels. Ensure that label gets applied to all `Secret`s we manage (such as `spec.secretName` `Secret` for `Certificate`). -We already ensure that all `spec.secretName` `Secret`s get annotated when synced- we can use the same mechanism to apply a label. +We already ensure that all `spec.secretName` `Secret`s get annotated when synced - we can use the same mechanism to apply a label. Users will have to ensure that `Secret`s they create are labelled. We can help them to discover which `Secret`s that are currently deployed to cluster and need labelling with a `cmctl` command. In terms of resource consumption and calls to apiserver, this would be the most efficient solution (only relevant `Secret`s are being listed/watched/cached and all relevant `Secret`s are cached in full). @@ -688,8 +704,8 @@ See an example flag implementation for cainjector in https://github.com/cert-man It might work well for cases where 'known' selectors need to be passed that we could event document such as `type!=helm.sh/release.v1`. #### Drawbacks - -- bad user experience- no straightforward way to tell if the selector actually does what was expected and an easy footgun especially when users attempt to specify which `Secret`s _should_ (rather than _shouldn't_) be watched + +- bad user experience - no straightforward way to tell if the selector actually does what was expected and an easy footgun especially when users attempt to specify which `Secret`s _should_ (rather than _shouldn't_) be watched - users should aim to use 'negative' selectors, but that be complicated if there is a large number of random `Secret`s in cluster that don't have a unifying selector diff --git a/design/20230302.gomod.md b/design/20230302.gomod.md index 43b507dea24..67006e0c961 100644 --- a/design/20230302.gomod.md +++ b/design/20230302.gomod.md @@ -78,7 +78,7 @@ Since we have one `go.mod` file for all of our built binaries, it's not possible either. If, say, only the `controller` component were to report as having a critical vulnerability, we'd have no way of fixing only that one vulnerability while leaving everything else untouched. -Essentially, our current project layout forces us to made difficult choices whenever we need to upgrade things. +Essentially, our current project layout forces us to make difficult choices whenever we need to upgrade things. ### Problem Example @@ -189,7 +189,7 @@ require ( ``` To be clear: using replace directives like this will break anyone who tries to import the `github.com/cert-manager/cert-manager/controller-binary` -module - or anyone who was previously importing `github.com/cert-manager/cert-manager/cmd/controller` before this proposal. +module or anyone who was previously importing `github.com/cert-manager/cert-manager/cmd/controller` before this proposal. ## Potential Issues @@ -219,7 +219,7 @@ This would mean that we create two PRs for a change; the first changes the core module to import the new core module version created by the previous PR. UPDATE: As we implemented this design, it was decided that we didn't want to break imports of `cmctl` because it was -used in several other cert-manager subprojects - so cmctl uses the approach described above. +used in several other cert-manager subprojects, so cmctl uses the approach described above. #### Potential Solution for Developer Experience: Dynamic `go.work` @@ -269,14 +269,14 @@ Since there are two types of code in `test/`, we can split it. There are [known external importers](https://pkg.go.dev/github.com/cert-manager/cert-manager@v1.11.0/test/unit/gen?tab=importedby) of `test/unit/` which means it's difficult to move that without breaking people. -As such, we could move test/e2e and test/integration - or we could make them both independent modules and keep them +As such, we could move test/e2e and test/integration or we could make them both independent modules and keep them where they are. The diff for the main repository `go.mod` after separating out the tests is presented in footnote [2]. ### Increased Time to Patch Everything -Having multiple go.mod files wil mean that when we share a dependency across many components (such as the Kubernetes +Having multiple go.mod files will mean that when we share a dependency across many components (such as the Kubernetes libraries) we'll have to update multiple files rather than just one. Alternatively, if we update a dependency for the core `go.mod` file we'll maybe want to also update every other go.mod which imports that one. diff --git a/design/20230601.gateway-route-hostnames.md b/design/20230601.gateway-route-hostnames.md index f40d31a4dde..546ac438749 100644 --- a/design/20230601.gateway-route-hostnames.md +++ b/design/20230601.gateway-route-hostnames.md @@ -44,7 +44,7 @@ This reduces configuration duplication, and allows the cluster owner to delegate Currently, the gateway-shim only looks at the `hostname` in [`Listener`](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.Listener). This field is optional, and its purpose is to filter which hostnames routes are allowed to match. This double-configuration allows the cluster owner to set allowed hostnames in `GatewaySpec`, while individual site owners update their `HTTPRouteSpec`. -In cases where this permission model is unnecessary (either because all hostnames are allowed, or because the cluster and site owners are the same team,) this leads to awkward duplication. +In cases where this permission model is unnecessary (either because all hostnames are allowed, or because the cluster and site owners are the same team), this leads to awkward duplication. As with any configuration duplication, it is easy to miss an update in one place, causing difficult-to-find bugs, and requiring teams to maintain more internal documentation. E.g. Envoy Gateway already supports running a `Gateway` without hostnames in the `Listener`. diff --git a/design/20240122.scarf.md b/design/20240122.scarf.md index aac569f12ba..a671e8abbf2 100644 --- a/design/20240122.scarf.md +++ b/design/20240122.scarf.md @@ -44,7 +44,7 @@ The open-source Scarf Gateway is the power behind the Scarf platform. The Scarf - Update helm charts referencing "jetstack" binary paths, replacing with the new download domain. - Update code referencing "jetstack" binary paths, replacing with the new download domain. - Add Scarf pixels to selective documentation pages, giving us insight into which pages are most useful or areas to focus on for improvement. -- Automate regular analytics gathering leveraging the Scarf API to publish relevant stats and info publically. E.g. +- Automate regular analytics gathering leveraging the Scarf API to publish relevant stats and info publicly. E.g. - Region - Operating System - Container Tags / Versions diff --git a/design/20240206.helm-resource-policy.md b/design/20240206.helm-resource-policy.md index a41e3a3feaf..053b544fbd3 100644 --- a/design/20240206.helm-resource-policy.md +++ b/design/20240206.helm-resource-policy.md @@ -1,5 +1,5 @@ # Proposal: add "helm.sh/resource-policy: keep" CRD annotation and uniformise CRD options. @@ -73,7 +73,7 @@ This is where we get down to the specifics of what the proposal actually is. What is the desired outcome and how do we measure success? This should have enough detail that reviewers can understand exactly what you're proposing, but should not include things like API designs or -implementation- those should go into "Design Details" below. +implementation - those should go into "Design Details" below. --> I would like to introduce the following options to all Helm charts that install CRDs (based on https://github.com/cert-manager/cert-manager/pull/5777): @@ -133,5 +133,5 @@ not need to be as detailed as the proposal, but should include enough information to express the idea and why it was not acceptable. --> -Install CRDs seperately (eg. using `kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.1/cert-manager.crds.yaml` or using a seperate Helm chart) and manage them seperately from the Helm chart. -This would require us to publish a seperate Helm chart for the CRDs or a static manifest for the CRDs. +Install CRDs separately (eg. using `kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.1/cert-manager.crds.yaml` or using a separate Helm chart) and manage them separately from the Helm chart. +This would require us to publish a separate Helm chart for the CRDs or a static manifest for the CRDs. diff --git a/design/20240518.push-to-multiple-registries.md b/design/20240518.push-to-multiple-registries.md new file mode 100644 index 00000000000..6a9cee1da00 --- /dev/null +++ b/design/20240518.push-to-multiple-registries.md @@ -0,0 +1,289 @@ + + +# Push image artifacts to multiple repositories + + + +- [Release Signoff Checklist](#release-signoff-checklist) +- [Summary](#summary) +- [Motivation](#motivation) + - [Goals](#goals) + - [Non-Goals](#non-goals) +- [Proposal](#proposal) + - [User Stories (Optional)](#user-stories-optional) + - [Story 1](#story-1) + - [Story 2](#story-2) + - [Notes/Constraints/Caveats (Optional)](#notesconstraintscaveats-optional) + - [Risks and Mitigations](#risks-and-mitigations) +- [Design Details](#design-details) + - [Test Plan](#test-plan) + - [Graduation Criteria](#graduation-criteria) + - [Upgrade / Downgrade Strategy](#upgrade--downgrade-strategy) + - [Supported Versions](#supported-versions) +- [Production Readiness](#production-readiness) +- [Drawbacks](#drawbacks) +- [Alternatives](#alternatives) + + +## Release Signoff Checklist + +This checklist contains actions which must be completed before a PR implementing this design can be merged. + + +- [ ] This design doc has been discussed and approved +- [ ] Test plan has been agreed upon and the tests implemented +- [ ] Feature gate status has been agreed upon (whether the new functionality will be placed behind a feature gate or not) +- [ ] Graduation criteria is in place if required (if the new functionality is placed behind a feature gate, how will it graduate between stages) +- [ ] User-facing documentation has been PR-ed against the release branch in [cert-manager/website] + + +## Summary + + +The cert-manager project, along with its sub-projects, currently utilizes the quay.io/jetstack registry for pushing OCI (Open Container Initiative) artifacts. This originates from the project's beginnings under Jetstack. However, to reflect the project's growth and establish a more neutral and independent identity, this proposal recommends adding a new OCI artifact registry location without the Jetstack branding. + +## Motivation + + +The primary motivation for this enhancement is to reinforce the independence and neutrality of the cert-manager project. Originally developed by Jetstack, cert-manager currently pushes OCI artifacts to the quay.io/jetstack registry. As the project has grown and evolved into a community-driven initiative, it is essential to establish a neutral artifact repository that better represents the project's diverse and independent nature. + +### Goals + + +- Decouple the cert-manager project from Jetstack’s branding to highlight its status as a community-driven project. +- Ensure all project documentation reflects the new registry to guide users appropriately without disrupting existing workflows. +- Continue pushing artifacts to the current quay.io/jetstack registry to avoid breaking changes for existing users while transitioning to the new registry. + +### Non-Goals + + +- This proposal does not aim to immediately deprecate the quay.io/jetstack registry but to introduce an additional registry. +- No changes to the functionality or features of cert-manager are included in this proposal. + +## Proposal + + + +### User Stories (Optional) + + + +#### Story 1 + +*As a* new user of cert-manager, *I want to* find clear documentation that directs me to the appropriate registry for downloading OCI artifacts, *so that* I can easily set up and use cert-manager in my environment without confusion about which registry to use. + +Details: + +- The updated documentation prominently lists the new neutral registry URL. +- The documentation includes notes that the artifacts are also available in the quay.io/jetstack registry for backward compatibility. + +#### Story 2 + +*As an* existing user of cert-manager, *I want to* continue receiving updates from the quay.io/jetstack registry while gradually transitioning to the new registry, *so that* my current setup remains functional without immediate changes, giving me time to update my configurations. + +Details: + +- Artifacts continue to be pushed to both the quay.io/jetstack and the new registry. +- A clear migration guide is provided, explaining how to switch to the new registry at a convenient time. + +### Notes/Constraints/Caveats (Optional) + + + +### Risks and Mitigations + + + +*Risk:* The new registry might introduce security vulnerabilities, such as unauthorized access to artifacts. + +*Mitigation:* +- Existing CI/CD will be used to publish images, this is proven and secure. +- The new registry should have the same access control restrictions as the current quay.io/jetstack registry - ensuring that only maintainers have write access. + +## Design Details + + +To implement the transition to a new OCI artifact registry, our existing CI/CD pipeline will be updated to push artifacts to both the existing quay.io/jetstack registry and the new registry. This dual-publishing approach ensures continuity and minimizes disruption for current users. We are considering multiple options for the new registry, with "ghcr.io/cert-manager" (GitHub Container Registry) and "quay.io/cert-manager" being the primary candidates. The final registry will be chosen based on community feedback on this proposal. Regardless of the registry, we will also need to update the CI pipeline to authenticate with the new registry, ensuring secure and seamless artifact uploads. + +Within projects using makefile modules we may need to make changes to the [OCI publish module](https://github.com/cert-manager/makefile-modules/tree/main/modules/oci-publish) to handle cases where we need different auth for different registries. After this, the pushing to multiple destinations is already supported by this module and would be a simple change to the config of each repos. + +A new E2E tests run should be performed by our nightly automation that runs the E2E suite against the new registry, to ensure that everything is working as expected. + +Once the images are being dual published, the official documentation and Helm chart will be updated to reflect the new repository. + +### Test Plan + + +By using existing automation that runs the E2E test suite each night we can add automated tests that will pull from the new registry. This tests multiple versions so is a good baseline that the image can be pulled. + +### Graduation Criteria + + +Since this proposal has no code changes, it does not have any feature flags. However its graduation should be managed. To accomplish this we should do the following: + +Alpha/Beta: +- Start publishing images to the new registry - we document the new registry but do not push it as the new default + +GA: +- Update the official Helm charts to use the new registry +- Update documentation to reflect that the new registry is the preferred one + +The criteria for graduation will be a based off maintainer confidence in the new registry, informed by the E2E test runs using the new registries and any feedback from early adopters. + +### Upgrade / Downgrade Strategy + + +Once we are happy to make this GA the Helm chart will be updated to use the new registry, this will mean that for users using the official Helm chart the change will be automatic. For other users nothing will break by them using the old registry, so they can update their deployment at their own convenience. Furthermore a user could choose to set the registry back to quay.io/jetstack in their Helm configuration if they so choose. + +### Supported Versions + + +N/A + +## Production Readiness + +N/A + +### How can this feature be enabled / disabled for an existing cert-manager installation? + + +N/A + +### Does this feature depend on any specific services running in the cluster? + + +N/A + +### Will enabling / using this feature result in new API calls (i.e to Kubernetes apiserver or external services)? + +N/A + +### Will enabling / using this feature result in increasing size or count of the existing API objects? + + +N/A + +### Will enabling / using this feature result in significant increase of resource usage? (CPU, RAM...) + + +N/A + +## Drawbacks + + +This proposal does not remove or break any functionality for users. For maintainers, pushing to multiple repositories would make gathering pull metrics more complex. + +## Alternatives + + +There are many competing container registries, the two currently in contention (ghcr and quay) were selected because we already have access and availability to push there. They also offer their services for free for open source projects such as ours. \ No newline at end of file diff --git a/design/20240625.push-charts-to-oci.md b/design/20240625.push-charts-to-oci.md new file mode 100644 index 00000000000..b25d91aa823 --- /dev/null +++ b/design/20240625.push-charts-to-oci.md @@ -0,0 +1,257 @@ + + +# Push cert-manager Helm Charts to an OCI Registry + + +- [Release Signoff Checklist](#release-signoff-checklist) +- [Summary](#summary) +- [Motivation](#motivation) + - [Goals](#goals) + - [Non-Goals](#non-goals) +- [Proposal](#proposal) + - [Risks and Mitigations](#risks-and-mitigations) +- [Design Details](#design-details) + - [Test Plan](#test-plan) + - [Graduation Criteria](#graduation-criteria) + - [Upgrade / Downgrade Strategy](#upgrade--downgrade-strategy) + - [Supported Versions](#supported-versions) +- [Production Readiness](#production-readiness) +- [Drawbacks](#drawbacks) +- [Alternatives](#alternatives) + + +## Release Signoff Checklist + +This checklist contains actions which must be completed before a PR implementing this design can be merged: + +- [ ] This design doc has been discussed and approved +- [ ] Test plan has been agreed upon and the tests implemented +- [ ] Feature gate status has been agreed upon (whether the new functionality will be placed behind a feature gate or not) +- [ ] Graduation criteria is in place if required (if the new functionality is placed behind a feature gate, how will it graduate between stages) +- [ ] User-facing documentation has been PR-ed against the release branch in [cert-manager/website] + +## Summary + + + +This design proposes to start pushing cert-manager's Helm charts to an OCI registry - `quay.io/jetstack`. + +It proposes no other changes - specifically, after this design is implemented charts would still be pushed to their current location +- `charts.jetstack.io` - for every release. + +## Motivation + + + +cert-manager's Helm charts are the primary way we encourage users to install the project. The same applies to sub-projects, each of which +has a Helm chart. + +All Helm charts for all projects are currently hosted in a Helm repository available at `https://charts.jetstack.io`. This is primarily +for simplicity and for historical reasons - that location was the easiest back when we started building charts and there's been no pressing +need to change. + +There is increasing pressure to change this. Firstly, there seems to be a movement away from Helm repositories in general. +There have been several [requests](https://github.com/cert-manager/cert-manager/issues/5566) for cert-manager to push charts to an OCI registry +and claims that certain tools no longer support Helm repositories. + +Secondly, we're conscious of trying to replace references to any one company in the cert-manager projects and the use of the Jetstack +domain name is obviously in tension with that. cert-manager seeks to be an entirely [vendor-neutral](https://contribute.cncf.io/maintainers/community/vendor-neutrality/) +project and the use of this domain for charts is one of the few remaining places where the cert-manager project still references Jetstack. + +While this proposal doesn't directly address this vendor-neutrality issue, it should make it simpler to address in the future as +migrating from one OCI registry to another should be simpler than migrating a repository. + +The use of the `jetstack.io` domain also implies that Jetstack (now part of Venafi) has some say over access to this repo and who can push to it. +The company could reasonably request that have non-Venafi maintainers not be given access to the chart repo. This hasn't been a problem in practice +but the risk is not ideal for a project which seeks to encourage contributors from any company. + +In addition, Venafi uses `charts.jetstack.io` for other, non-CNCF, charts. Access controls over who can push to the Helm repo are well +established and require code reviews, but given cert-manager's size and wide level of adoption it would be prudent to isolate it from +other unrelated projects. This mixing [has caused issues](https://github.com/cert-manager/cert-manager/issues/7117) for users. + +### Goals + + + +- Have charts be pullable from an OCI registry +- Force no change on users but give them the option to change to OCI registries + +### Non-Goals + + + +- Change anything about `charts.jetstack.io` +- Force anyone to change where they get their charts + +## Proposal + + + +### Risks and Mitigations + + + +### Risk 1 + +Since this proposal is only to add a new source for fetching Helm charts, there are few risks anticipated. + +One potential risk is that our current approach for signing Helm charts might need to be tweaked. We currently produce +"detached" `.prov` signature files for cert-manager which are served on `charts.jetstack.io` alongside the charts +themselves. + +Some experimentation may be required to work out how these detached signatures work with OCI registries. This isn't +urgent, as we'll continue to serve the signatures on our existing chart repository and there are other methods of +signing available with OCI registries - notably, using sigstore / cosign. Note that the detached signatures are only +relevant for cert-manager itself and not subprojects. + +### Risk 2 + +Changing cmrel will apply to future releases of cert-manager (v1.16.x) but also to past releases. Unless we make +efforts to tag a cmrel version which doesn't push charts to OCI registries, or otherwise disable the pushing of +charts for older cert-manager releases, we'll start pushing charts to OCI registries if we do a patch release of an +existing supported cert-manager version. + +This risk is minimal since - once again - the new registry won't be a default. + +## Design Details + + + +First, we'll create a new repository in quay.io, called `quay.io/jetstack/charts`. + +Next, add a new step to the release process which pushes Helm charts to an OCI registry. This would be a code change in cmrel. + +Once this publishing step is confirmed to work for new charts, we'll write a small one-off script which pushes all older versions +of the chart to the new registry, or else find some off-the-shelf script to do the same thing. + +### Test Plan + + + +Once the changes to cmrel are made, we should be able to do an alpha release of cert-manager v1.16.0 and install +cert-manager locally in a kind cluster using the chart from the OCI registry. + +### Graduation Criteria + +Obviously no feature gates will apply to this change. + +Once all cert-manager charts are pushed to the new registry and all older cert-manager charts are mirrored, +there'll be future work to publish subproject charts and the related mirroring of those charts. This design +does not attempt to solve that problem, and focuses on cert-manager first. + +### Upgrade / Downgrade Strategy + + + +N/A + +### Supported Versions + + + +N/A + +## Production Readiness + + +N/A + +### Does this feature depend on any specific services running in the cluster? + + + +N/A + +### Will enabling / using this feature result in new API calls (i.e to Kubernetes apiserver or external services)? + + + +N/A + +### Will enabling / using this feature result in increasing size or count of the existing API objects? + + + +N/A + +### Will enabling / using this feature result in significant increase of resource usage? (CPU, RAM...) + + + +N/A + +## Drawbacks + + + +This proposal does not remove or break any functionality for users. For maintainers, pushing to multiple repositories would make gathering pull metrics more complex. + +## Alternatives + + + +A reasonable alternative to using OCI registries would be for the cert-manager project to host its own +Helm chart repository (e.g. `charts.cert-manager.io`). + +This would require running additional infrastructure (similar to what `charts.jetstack.io` does), and would +not be satisfactory for those users who've been asking for an OCI registry for compatibility reasons. + +In short, running a repo seems to be more work for less gain than pushing to an OCI registry. diff --git a/design/acme-orders-challenges-crd.md b/design/acme-orders-challenges-crd.md index e80a6eaef73..35091383e42 100644 --- a/design/acme-orders-challenges-crd.md +++ b/design/acme-orders-challenges-crd.md @@ -174,7 +174,7 @@ const ( Processing State = "processing" // Invalid signifies that an ACME resource is invalid for some reason. - // If an Order is marked 'invalid', one of its validations be have invalid for some reason. + // If an Order is marked 'invalid', one of its validations must be invalid for some reason. // This is a final state. Invalid State = "invalid" diff --git a/design/template.md b/design/template.md index d77ac8e9f7a..de30de2eef0 100644 --- a/design/template.md +++ b/design/template.md @@ -80,7 +80,7 @@ This is where we get down to the specifics of what the proposal actually is. What is the desired outcome and how do we measure success? This should have enough detail that reviewers can understand exactly what you're proposing, but should not include things like API designs or -implementation- those should go into "Design Details" below. +implementation - those should go into "Design Details" below. --> ### User Stories (Optional) diff --git a/gcb/build_cert_manager.yaml b/gcb/build_cert_manager.yaml index 72fea374267..afac9108c63 100644 --- a/gcb/build_cert_manager.yaml +++ b/gcb/build_cert_manager.yaml @@ -22,7 +22,7 @@ steps: - | set -eu -o pipefail make vendor-go - make CMREL_KEY="${_KMS_KEY}" RELEASE_TARGET_BUCKET="${_RELEASE_TARGET_BUCKET}" -j16 upload-release + make CMREL_KEY="${_KMS_KEY}" RELEASE_TARGET_BUCKET="${_RELEASE_TARGET_BUCKET}" -j8 upload-release echo "Wrote to ${_RELEASE_TARGET_BUCKET}" tags: @@ -34,4 +34,6 @@ substitutions: _RELEASE_TARGET_BUCKET: "cert-manager-release" options: - machineType: N1_HIGHCPU_32 + # https://cloud.google.com/build/docs/optimize-builds/increase-vcpu-for-builds + # https://cloud.google.com/build/pricing + machineType: E2_HIGHCPU_32 diff --git a/go.mod b/go.mod index 39186e51382..2755bfae67d 100644 --- a/go.mod +++ b/go.mod @@ -6,97 +6,89 @@ go 1.22.0 // please place any replace statements here at the top for visibility and add a // comment to it as to when it can be removed -// In prometheus/common v0.47.0 and v0.48.0, breaking changes were introduced in the "github.com/prometheus/common/expfmt" -// package. Not all our dependencies have been upgraded to use the new API. Until then, compiling cert-manager -// with the newer versions of "github.com/prometheus/common/expfmt" and "github.com/prometheus/client_golang" -// fails. These replace statements can be removed once expfmt.FmtText is no longer used by any of the libraries -// we depend on. -replace github.com/prometheus/common => github.com/prometheus/common v0.46.0 - -replace github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.18.0 - // Can be removed once github.com/go-ldap/ldap/v3 releases a version that requires this version. replace github.com/go-asn1-ber/asn1-ber => github.com/go-asn1-ber/asn1-ber v1.5.6 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.12.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.6.0 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0 + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns v1.2.0 - github.com/Venafi/vcert/v5 v5.6.4 + github.com/Venafi/vcert/v5 v5.7.1 github.com/akamai/AkamaiOPEN-edgegrid-golang v1.2.2 - github.com/aws/aws-sdk-go-v2 v1.27.0 - github.com/aws/aws-sdk-go-v2/config v1.27.15 - github.com/aws/aws-sdk-go-v2/credentials v1.17.15 - github.com/aws/aws-sdk-go-v2/service/route53 v1.40.7 - github.com/aws/aws-sdk-go-v2/service/sts v1.28.9 - github.com/aws/smithy-go v1.20.2 + github.com/aws/aws-sdk-go-v2 v1.31.0 + github.com/aws/aws-sdk-go-v2/config v1.27.36 + github.com/aws/aws-sdk-go-v2/credentials v1.17.34 + github.com/aws/aws-sdk-go-v2/service/route53 v1.44.0 + github.com/aws/aws-sdk-go-v2/service/sts v1.31.0 + github.com/aws/smithy-go v1.21.0 github.com/cpu/goacmedns v0.1.1 - github.com/digitalocean/godo v1.116.0 + github.com/digitalocean/godo v1.125.0 github.com/go-ldap/ldap/v3 v3.4.8 - github.com/go-logr/logr v1.4.1 + github.com/go-logr/logr v1.4.2 github.com/google/gnostic-models v0.6.8 github.com/google/gofuzz v1.2.0 - github.com/hashicorp/vault/api v1.13.0 - github.com/hashicorp/vault/sdk v0.12.0 + github.com/hashicorp/vault/api v1.15.0 + github.com/hashicorp/vault/sdk v0.14.0 github.com/kr/pretty v0.3.1 - github.com/miekg/dns v1.1.59 + github.com/miekg/dns v1.1.62 github.com/pavlo-v-chernykh/keystore-go/v4 v4.5.0 - github.com/prometheus/client_golang v1.18.0 - github.com/spf13/cobra v1.8.0 + github.com/prometheus/client_golang v1.20.4 + github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.9.0 - golang.org/x/crypto v0.24.0 - golang.org/x/oauth2 v0.20.0 - golang.org/x/sync v0.7.0 - google.golang.org/api v0.181.0 - k8s.io/api v0.30.1 - k8s.io/apiextensions-apiserver v0.30.1 - k8s.io/apimachinery v0.30.1 - k8s.io/apiserver v0.30.1 - k8s.io/client-go v0.30.1 - k8s.io/component-base v0.30.1 - k8s.io/klog/v2 v2.120.1 - k8s.io/kube-aggregator v0.30.1 - k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f - k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 - sigs.k8s.io/controller-runtime v0.18.2 + golang.org/x/crypto v0.27.0 + golang.org/x/oauth2 v0.23.0 + golang.org/x/sync v0.8.0 + google.golang.org/api v0.198.0 + k8s.io/api v0.31.1 + k8s.io/apiextensions-apiserver v0.31.1 + k8s.io/apimachinery v0.31.1 + k8s.io/apiserver v0.31.1 + k8s.io/client-go v0.31.1 + k8s.io/component-base v0.31.1 + k8s.io/klog/v2 v2.130.1 + k8s.io/kube-aggregator v0.31.1 + k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 + k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 + sigs.k8s.io/controller-runtime v0.19.0 sigs.k8s.io/gateway-api v1.1.0 sigs.k8s.io/structured-merge-diff/v4 v4.4.1 - software.sslmate.com/src/go-pkcs12 v0.4.0 + software.sslmate.com/src/go-pkcs12 v0.5.0 ) require ( - cloud.google.com/go/auth v0.4.2 // indirect - cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect - cloud.google.com/go/compute/metadata v0.3.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.9.0 // indirect + cloud.google.com/go/auth v0.9.4 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect + cloud.google.com/go/compute/metadata v0.5.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect + github.com/Khan/genqlient v0.7.0 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect - github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect + github.com/antlr4-go/antlr/v4 v4.13.0 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.3 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.7 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.7 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.9 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.20.8 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.2 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.23.0 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/cenkalti/backoff/v3 v3.2.2 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/emicklei/go-restful/v3 v3.12.0 // indirect + github.com/emicklei/go-restful/v3 v3.12.1 // indirect github.com/evanphx/json-patch v5.9.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/frankban/quicktest v1.14.6 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/go-asn1-ber/asn1-ber v1.5.6 // indirect github.com/go-http-utils/headers v0.0.0-20181008091004-fed159eddc2a // indirect github.com/go-jose/go-jose/v4 v4.0.2 // indirect @@ -110,13 +102,14 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/cel-go v0.17.8 // indirect + github.com/google/cel-go v0.20.1 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-querystring v1.1.0 // indirect - github.com/google/s2a-go v0.1.7 // indirect + github.com/google/s2a-go v0.1.8 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.4 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect + github.com/googleapis/gax-go/v2 v2.13.0 // indirect + github.com/gorilla/websocket v1.5.1 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect @@ -133,6 +126,7 @@ require ( github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/kr/text v0.2.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect @@ -147,50 +141,52 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.46.0 // indirect - github.com/prometheus/procfs v0.15.0 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/sosodev/duration v1.3.1 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect github.com/stretchr/objx v0.5.2 // indirect + github.com/vektah/gqlparser/v2 v2.5.15 // indirect + github.com/x448/float16 v0.8.4 // indirect github.com/youmark/pkcs8 v0.0.0-20240424034433-3c2c7870ae76 // indirect - go.etcd.io/etcd/api/v3 v3.5.13 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.13 // indirect - go.etcd.io/etcd/client/v3 v3.5.13 // indirect + go.etcd.io/etcd/api/v3 v3.5.14 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.14 // indirect + go.etcd.io/etcd/client/v3 v3.5.14 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect - go.opentelemetry.io/otel/metric v1.26.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/trace v1.26.0 // indirect - go.opentelemetry.io/proto/otlp v1.2.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect + go.opentelemetry.io/otel v1.29.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.29.0 // indirect + go.opentelemetry.io/otel/sdk v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.29.0 // indirect + go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/term v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect + golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect + golang.org/x/mod v0.20.0 // indirect + golang.org/x/net v0.29.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.24.0 // indirect + golang.org/x/text v0.18.0 // indirect + golang.org/x/time v0.6.0 // indirect + golang.org/x/tools v0.24.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect - google.golang.org/grpc v1.64.1 // indirect - google.golang.org/protobuf v1.34.1 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/grpc v1.66.2 // indirect + google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/kms v0.30.1 // indirect + k8s.io/kms v0.31.1 // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/yaml v1.4.0 // indirect diff --git a/go.sum b/go.sum index 90f95f5a083..ee680ca311c 100644 --- a/go.sum +++ b/go.sum @@ -1,16 +1,16 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go/auth v0.4.2 h1:sb0eyLkhRtpq5jA+a8KWw0W70YcdVca7KJ8TM0AFYDg= -cloud.google.com/go/auth v0.4.2/go.mod h1:Kqvlz1cf1sNA0D+sYJnkPQOP+JMHkuHeIgVmCRtZOLc= -cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4= -cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q= -cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= -cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.12.0 h1:1nGuui+4POelzDwI7RG56yfQJHCnKvwfMoU7VsEp+Zg= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.12.0/go.mod h1:99EvauvlcJ1U06amZiksfYz/3aFGyIhWGHVyiZXtBAI= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.6.0 h1:U2rTu3Ef+7w9FHKIAXM6ZyqF3UOWJZ12zIm8zECAFfg= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.6.0/go.mod h1:9kIvujWAA58nmPmWB1m23fyWic1kYZMxD9CxaWn4Qpg= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.9.0 h1:H+U3Gk9zY56G3u872L82bk4thcsy2Gghb9ExT4Zvm1o= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.9.0/go.mod h1:mgrmMSgaLp9hmax62XQTd0N4aAqSE5E0DulSpVYK7vc= +cloud.google.com/go/auth v0.9.4 h1:DxF7imbEbiFu9+zdKC6cKBko1e8XeJnipNqIbWZ+kDI= +cloud.google.com/go/auth v0.9.4/go.mod h1:SHia8n6//Ya940F1rLimhJCjjx7KE17t0ctFEci3HkA= +cloud.google.com/go/auth/oauth2adapt v0.2.4 h1:0GWE/FUsXhf6C+jAkWgYm7X9tK8cuEIfy19DBn6B6bY= +cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= +cloud.google.com/go/compute/metadata v0.5.1 h1:NM6oZeZNlYjiwYje+sYFjEpP0Q0zCan1bmQW/KmIrGs= +cloud.google.com/go/compute/metadata v0.5.1/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0 h1:nyQWyZvwGTvunIMxi1Y9uXkcyr+I7TeNrr/foo4Kpk8= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0/go.mod h1:l38EPgmsp71HHLq9j7De57JcKOWPyhrsW1Awm1JS6K0= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 h1:tfLQ34V6F7tVSwoTf/4lH5sE0o6eCJuNDTmH09nDpbc= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0/go.mod h1:9kIvujWAA58nmPmWB1m23fyWic1kYZMxD9CxaWn4Qpg= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0/go.mod h1:iZDifYGJTIgIIkYRNWPENUnqx6bJ2xnSDFI2tjwZNuY= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns v1.2.0 h1:lpOxwrQ919lCZoNCd69rVt8u1eLZuMORrGXqy8sNf3c= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns v1.2.0/go.mod h1:fSvRkb8d26z9dbL40Uf/OO6Vo9iExtZK3D0ulRV+8M0= github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 h1:mFRzDkZVAjdal+s7s0MwaRv9igoPqLRdzOLzw/8Xvq8= @@ -18,52 +18,54 @@ github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358/go.mod h1:chxPXzS github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= +github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/Venafi/vcert/v5 v5.6.4 h1:7sAI5MwKa1KAX1HVP/GHeRLVX8QxjcwPgOFmNPRWrKo= -github.com/Venafi/vcert/v5 v5.6.4/go.mod h1:6NgXvi7m0MJzma4vNDmoMt0Pj12pGPKLPr293kcdyEA= +github.com/Venafi/vcert/v5 v5.7.1 h1:gUDbSuP6NE4yAslWp+D+ZoJlYOSRWhQora48oExuEN4= +github.com/Venafi/vcert/v5 v5.7.1/go.mod h1:UGI1A6IdZ7Sc4E3DQU70Qzaanot6fiY0ObIupcU2O94= github.com/akamai/AkamaiOPEN-edgegrid-golang v1.2.2 h1:F1j7z+/DKEsYqZNoxC6wvfmaiDneLsQOFQmuq9NADSY= github.com/akamai/AkamaiOPEN-edgegrid-golang v1.2.2/go.mod h1:QlXr/TrICfQ/ANa76sLeQyhAJyNR9sEcfNuZBkY9jgY= github.com/alexbrainman/sspi v0.0.0-20231016080023-1a75b4708caa h1:LHTHcTQiSGT7VVbI0o4wBRNQIgn917usHWOd6VAffYI= github.com/alexbrainman/sspi v0.0.0-20231016080023-1a75b4708caa/go.mod h1:cEWa1LVoE5KvSD9ONXsZrj0z6KqySlCCNKHlLzbqAt4= -github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= -github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= +github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go-v2 v1.27.0 h1:7bZWKoXhzI+mMR/HjdMx8ZCC5+6fY0lS5tr0bbgiLlo= -github.com/aws/aws-sdk-go-v2 v1.27.0/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= -github.com/aws/aws-sdk-go-v2/config v1.27.15 h1:uNnGLZ+DutuNEkuPh6fwqK7LpEiPmzb7MIMA1mNWEUc= -github.com/aws/aws-sdk-go-v2/config v1.27.15/go.mod h1:7j7Kxx9/7kTmL7z4LlhwQe63MYEE5vkVV6nWg4ZAI8M= -github.com/aws/aws-sdk-go-v2/credentials v1.17.15 h1:YDexlvDRCA8ems2T5IP1xkMtOZ1uLJOCJdTr0igs5zo= -github.com/aws/aws-sdk-go-v2/credentials v1.17.15/go.mod h1:vxHggqW6hFNaeNC0WyXS3VdyjcV0a4KMUY4dKJ96buU= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.3 h1:dQLK4TjtnlRGb0czOht2CevZ5l6RSyRWAnKeGd7VAFE= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.3/go.mod h1:TL79f2P6+8Q7dTsILpiVST+AL9lkF6PPGI167Ny0Cjw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.7 h1:lf/8VTF2cM+N4SLzaYJERKEWAXq8MOMpZfU6wEPWsPk= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.7/go.mod h1:4SjkU7QiqK2M9oozyMzfZ/23LmUY+h3oFqhdeP5OMiI= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.7 h1:4OYVp0705xu8yjdyoWix0r9wPIRXnIzzOoUpQVHIJ/g= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.7/go.mod h1:vd7ESTEvI76T2Na050gODNmNU7+OyKrIKroYTu4ABiI= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.9 h1:Wx0rlZoEJR7JwlSZcHnEa7CNjrSIyVxMFWGAaXy4fJY= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.9/go.mod h1:aVMHdE0aHO3v+f/iw01fmXV/5DbfQ3Bi9nN7nd9bE9Y= -github.com/aws/aws-sdk-go-v2/service/route53 v1.40.7 h1:dP8gy5fBzlwU5f4QFJtFFYfSHeuom1vuC8e2LJaEgS8= -github.com/aws/aws-sdk-go-v2/service/route53 v1.40.7/go.mod h1:CxB0DFnZHDkZZWurSFWDdgkKmjaAFtRIk85hoUy4XhI= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.8 h1:Kv1hwNG6jHC/sxMTe5saMjH6t6ZLkgfvVxyEjfWL1ks= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.8/go.mod h1:c1qtZUWtygI6ZdvKppzCSXsDOq5I4luJPZ0Ud3juFCA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.2 h1:nWBZ1xHCF+A7vv9sDzJOq4NWIdzFYm0kH7Pr4OjHYsQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.2/go.mod h1:9lmoVDVLz/yUZwLaQ676TK02fhCu4+PgRSmMaKR1ozk= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.9 h1:Qp6Boy0cGDloOE3zI6XhNLNZgjNS8YmiFQFHe71SaW0= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.9/go.mod h1:0Aqn1MnEuitqfsCNyKsdKLhDUOr4txD/g19EfiUqgws= -github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= -github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= +github.com/aws/aws-sdk-go-v2 v1.31.0 h1:3V05LbxTSItI5kUqNwhJrrrY1BAXxXt0sN0l72QmG5U= +github.com/aws/aws-sdk-go-v2 v1.31.0/go.mod h1:ztolYtaEUtdpf9Wftr31CJfLVjOnD/CVRkKOOYgF8hA= +github.com/aws/aws-sdk-go-v2/config v1.27.36 h1:4IlvHh6Olc7+61O1ktesh0jOcqmq/4WG6C2Aj5SKXy0= +github.com/aws/aws-sdk-go-v2/config v1.27.36/go.mod h1:IiBpC0HPAGq9Le0Xxb1wpAKzEfAQ3XlYgJLYKEVYcfw= +github.com/aws/aws-sdk-go-v2/credentials v1.17.34 h1:gmkk1l/cDGSowPRzkdxYi8edw+gN4HmVK151D/pqGNc= +github.com/aws/aws-sdk-go-v2/credentials v1.17.34/go.mod h1:4R9OEV3tgFMsok4ZeFpExn7zQaZRa9MRGFYnI/xC/vs= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 h1:C/d03NAmh8C4BZXhuRNboF/DqhBkBCeDiJDcaqIT5pA= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14/go.mod h1:7I0Ju7p9mCIdlrfS+JCgqcYD0VXz/N4yozsox+0o078= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 h1:kYQ3H1u0ANr9KEKlGs/jTLrBFPo8P8NaH/w7A01NeeM= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18/go.mod h1:r506HmK5JDUh9+Mw4CfGJGSSoqIiLCndAuqXuhbv67Y= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 h1:Z7IdFUONvTcvS7YuhtVxN99v2cCoHRXOS4mTr0B/pUc= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18/go.mod h1:DkKMmksZVVyat+Y+r1dEOgJEfUeA7UngIHWeKsi0yNc= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 h1:QFASJGfT8wMXtuP3D5CRmMjARHv9ZmzFUMJznHDOY3w= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5/go.mod h1:QdZ3OmoIjSX+8D1OPAzPxDfjXASbBMDsz9qvtyIhtik= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 h1:Xbwbmk44URTiHNx6PNo0ujDE6ERlsCKJD3u1zfnzAPg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20/go.mod h1:oAfOFzUB14ltPZj1rWwRc3d/6OgD76R8KlvU3EqM9Fg= +github.com/aws/aws-sdk-go-v2/service/route53 v1.44.0 h1:eDfF/a5X47PX+uGTUeGe8R+sfmDlP13lYnjHTW7sLPY= +github.com/aws/aws-sdk-go-v2/service/route53 v1.44.0/go.mod h1:l2ABSKg3AibEJeR/l60cfeGU54UqF3VTgd51pq+vYhU= +github.com/aws/aws-sdk-go-v2/service/sso v1.23.0 h1:fHySkG0IGj2nepgGJPmmhZYL9ndnsq1Tvc6MeuVQCaQ= +github.com/aws/aws-sdk-go-v2/service/sso v1.23.0/go.mod h1:XRlMvmad0ZNL+75C5FYdMvbbLkd6qiqz6foR1nA1PXY= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.0 h1:cU/OeQPNReyMj1JEBgjE29aclYZYtXcsPMXbTkVGMFk= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.0/go.mod h1:FnvDM4sfa+isJ3kDXIzAB9GAwVSzFzSy97uZ3IsHo4E= +github.com/aws/aws-sdk-go-v2/service/sts v1.31.0 h1:GNVxIHBTi2EgwCxpNiozhNasMOK+ROUA2Z3X+cSBX58= +github.com/aws/aws-sdk-go-v2/service/sts v1.31.0/go.mod h1:yMWe0F+XG0DkRZK5ODZhG7BEFYhLXi2dqGsv6tX0cgI= +github.com/aws/smithy-go v1.21.0 h1:H7L8dtDRk0P1Qm6y0ji7MCYMQObJ5R9CRpyPhRUkLYA= +github.com/aws/smithy-go v1.21.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/cenkalti/backoff/v3 v3.2.2 h1:cfUAAO3yvKMYKPrvhDuHSwQnhZNk/RMHKdZqKTxfm6M= -github.com/cenkalti/backoff/v3 v3.2.2/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -77,18 +79,18 @@ github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8 github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpu/goacmedns v0.1.1 h1:DM3H2NiN2oam7QljgGY5ygy4yDXhK5Z4JUnqaugs2C4= github.com/cpu/goacmedns v0.1.1/go.mod h1:MuaouqEhPAHxsbqjgnck5zeghuwBP1dLnPoobeGqugQ= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/digitalocean/godo v1.116.0 h1:SuF/Imd1/dE/nYrUFVkJ2itesQNnJQE1a/vmtHknxeE= -github.com/digitalocean/godo v1.116.0/go.mod h1:Vk0vpCot2HOAJwc5WE8wljZGtJ3ZtWIc8MQ8rF38sdo= +github.com/digitalocean/godo v1.125.0 h1:wGPBQRX9Wjo0qCF0o8d25mT3A84Iw8rfHnZOPyvHcMQ= +github.com/digitalocean/godo v1.125.0/go.mod h1:PU8JB6I1XYkQIdHFop8lLAY9ojp6M0XcU0TWaQSxbrc= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/emicklei/go-restful/v3 v3.12.0 h1:y2DdzBAURM29NFF94q6RaY4vjIH1rtwDapwQtU84iWk= -github.com/emicklei/go-restful/v3 v3.12.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= +github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -107,6 +109,8 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/go-asn1-ber/asn1-ber v1.5.6 h1:CYsqysemXfEaQbyrLJmdsCRuufHoLa3P/gGWGl5TDrM= github.com/go-asn1-ber/asn1-ber v1.5.6/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= github.com/go-http-utils/headers v0.0.0-20181008091004-fed159eddc2a h1:v6zMvHuY9yue4+QkG/HQ/W67wvtQmWJ4SDo9aK/GIno= @@ -116,8 +120,8 @@ github.com/go-jose/go-jose/v4 v4.0.2/go.mod h1:WVf9LFMHh/QVrmqrOfqun0C45tMe3RoiK github.com/go-ldap/ldap/v3 v3.4.8 h1:loKJyspcRezt2Q3ZRMq2p/0v8iOurlmeXDPw6fikSvQ= github.com/go-ldap/ldap/v3 v3.4.8/go.mod h1:qS3Sjlu76eHfHGpUdWkAXQTw4beih+cHsco2jXlIXrk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= @@ -128,7 +132,6 @@ github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= @@ -160,8 +163,8 @@ github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/cel-go v0.17.8 h1:j9m730pMZt1Fc4oKhCLUHfjj6527LuhYcYw0Rl8gqto= -github.com/google/cel-go v0.17.8/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= +github.com/google/cel-go v0.20.1 h1:nDx9r8S3L4pE61eDdt8igGj8rf5kjYR3ILxWIpWNi84= +github.com/google/cel-go v0.20.1/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -180,18 +183,18 @@ github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17 github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= -github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= -github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= +github.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM= +github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= -github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= -github.com/googleapis/gax-go/v2 v2.12.4 h1:9gWcmF85Wvq4ryPFvGFaOgPIs1AQX0d0bcbGw4Z96qg= -github.com/googleapis/gax-go/v2 v2.12.4/go.mod h1:KYEYLorsnIGDi/rPC8b5TdlB9kbKoFubselGIoBMCwI= +github.com/googleapis/enterprise-certificate-proxy v0.3.4 h1:XYIDZApgAnrN1c855gTgghdIA6Stxb52D5RnLI1SLyw= +github.com/googleapis/enterprise-certificate-proxy v0.3.4/go.mod h1:YKe7cfqYXjKGpGvmSg28/fFvhNzinZQm8DGnaburhGA= +github.com/googleapis/gax-go/v2 v2.13.0 h1:yitjD5f7jQHhyDsnhKEBU52NdvvdSeGzlAnDPT0hH1s= +github.com/googleapis/gax-go/v2 v2.13.0/go.mod h1:Z/fvTZXF8/uw7Xu5GuslPw+bplx6SS338j1Is2S+B7A= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= @@ -231,10 +234,10 @@ github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/C github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/hcl v1.0.1-vault-5 h1:kI3hhbbyzr4dldA8UdTb7ZlVVlI2DACdCfz31RPDgJM= github.com/hashicorp/hcl v1.0.1-vault-5/go.mod h1:XYhtn6ijBSAj6n4YqAaf7RBPS4I06AItNorpy+MoQNM= -github.com/hashicorp/vault/api v1.13.0 h1:RTCGpE2Rgkn9jyPcFlc7YmNocomda44k5ck8FKMH41Y= -github.com/hashicorp/vault/api v1.13.0/go.mod h1:0cb/uZUv1w2cVu9DIvuW1SMlXXC6qtATJt+LXJRx+kg= -github.com/hashicorp/vault/sdk v0.12.0 h1:c2WeMWtF08zKQmrJya7paM4IVnsXIXF5UlhQTBdwZwQ= -github.com/hashicorp/vault/sdk v0.12.0/go.mod h1:2kN1F5owc/Yh1OwL32GGnYrX9E3vFOIKA/cGJxCNQ30= +github.com/hashicorp/vault/api v1.15.0 h1:O24FYQCWwhwKnF7CuSqP30S51rTV7vz1iACXE/pj5DA= +github.com/hashicorp/vault/api v1.15.0/go.mod h1:+5YTO09JGn0u+b6ySD/LLVf8WkJCPLAL2Vkmrn2+CM8= +github.com/hashicorp/vault/sdk v0.14.0 h1:8vagjlpLurkFTnKT9aFSGs4U1XnK2IFytnWSxgFrDo0= +github.com/hashicorp/vault/sdk v0.14.0/go.mod h1:3hnGK5yjx3CW2hFyk+Dw1jDgKxdBvUvjyxMHhq0oUFc= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= @@ -264,6 +267,8 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -277,8 +282,8 @@ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxec github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/miekg/dns v1.1.59 h1:C9EXc/UToRwKLhK5wKU/I4QVsBUc8kE6MkHBkeypWZs= -github.com/miekg/dns v1.1.59/go.mod h1:nZpewl5p6IvctfgrckopVx2OlSEHPRO/U4SYkRklrEk= +github.com/miekg/dns v1.1.62 h1:cN8OuEF1/x5Rq6Np+h1epln8OiyPWV+lROx9LxcGgIQ= +github.com/miekg/dns v1.1.62/go.mod h1:mvDlcItzm+br7MToIKqkglaGhlFMHJ9DTNNWONWXbNQ= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= @@ -291,8 +296,8 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= -github.com/onsi/ginkgo/v2 v2.17.2 h1:7eMhcy3GimbsA3hEnVKdw/PQM9XN9krpKVXsZdph0/g= -github.com/onsi/ginkgo/v2 v2.17.2/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc= +github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= +github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= @@ -309,21 +314,23 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= -github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= +github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.46.0 h1:doXzt5ybi1HBKpsZOL0sSkaNHJJqkyfEWZGGqqScV0Y= -github.com/prometheus/common v0.46.0/go.mod h1:Tp0qkxpb9Jsg54QMe+EAmqXkSV7Evdy1BTn+g2pa/hQ= -github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= -github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= +github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= @@ -334,8 +341,8 @@ github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/sosodev/duration v1.3.1 h1:qtHBDMQ6lvMQsL15g4aopM4HEfOaYuhWBw3NPTtlqq4= github.com/sosodev/duration v1.3.1/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= @@ -357,6 +364,10 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= +github.com/vektah/gqlparser/v2 v2.5.15 h1:fYdnU8roQniJziV5TDiFPm/Ff7pE8xbVSOJqbsdl88A= +github.com/vektah/gqlparser/v2 v2.5.15/go.mod h1:WQQjFc+I1YIzoPvZBhUQX7waZgg3pMLi0r8KymvAE2w= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= @@ -367,42 +378,42 @@ github.com/youmark/pkcs8 v0.0.0-20240424034433-3c2c7870ae76/go.mod h1:SQliXeA7Dh github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.etcd.io/etcd/api/v3 v3.5.13 h1:8WXU2/NBge6AUF1K1gOexB6e07NgsN1hXK0rSTtgSp4= -go.etcd.io/etcd/api/v3 v3.5.13/go.mod h1:gBqlqkcMMZMVTMm4NDZloEVJzxQOQIls8splbqBDa0c= -go.etcd.io/etcd/client/pkg/v3 v3.5.13 h1:RVZSAnWWWiI5IrYAXjQorajncORbS0zI48LQlE2kQWg= -go.etcd.io/etcd/client/pkg/v3 v3.5.13/go.mod h1:XxHT4u1qU12E2+po+UVPrEeL94Um6zL58ppuJWXSAB8= -go.etcd.io/etcd/client/v2 v2.305.10 h1:MrmRktzv/XF8CvtQt+P6wLUlURaNpSDJHFZhe//2QE4= -go.etcd.io/etcd/client/v2 v2.305.10/go.mod h1:m3CKZi69HzilhVqtPDcjhSGp+kA1OmbNn0qamH80xjA= -go.etcd.io/etcd/client/v3 v3.5.13 h1:o0fHTNJLeO0MyVbc7I3fsCf6nrOqn5d+diSarKnB2js= -go.etcd.io/etcd/client/v3 v3.5.13/go.mod h1:cqiAeY8b5DEEcpxvgWKsbLIWNM/8Wy2xJSDMtioMcoI= -go.etcd.io/etcd/pkg/v3 v3.5.10 h1:WPR8K0e9kWl1gAhB5A7gEa5ZBTNkT9NdNWrR8Qpo1CM= -go.etcd.io/etcd/pkg/v3 v3.5.10/go.mod h1:TKTuCKKcF1zxmfKWDkfz5qqYaE3JncKKZPFf8c1nFUs= -go.etcd.io/etcd/raft/v3 v3.5.10 h1:cgNAYe7xrsrn/5kXMSaH8kM/Ky8mAdMqGOxyYwpP0LA= -go.etcd.io/etcd/raft/v3 v3.5.10/go.mod h1:odD6kr8XQXTy9oQnyMPBOr0TVe+gT0neQhElQ6jbGRc= -go.etcd.io/etcd/server/v3 v3.5.10 h1:4NOGyOwD5sUZ22PiWYKmfxqoeh72z6EhYjNosKGLmZg= -go.etcd.io/etcd/server/v3 v3.5.10/go.mod h1:gBplPHfs6YI0L+RpGkTQO7buDbHv5HJGG/Bst0/zIPo= +go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= +go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= +go.etcd.io/etcd/api/v3 v3.5.14 h1:vHObSCxyB9zlF60w7qzAdTcGaglbJOpSj1Xj9+WGxq0= +go.etcd.io/etcd/api/v3 v3.5.14/go.mod h1:BmtWcRlQvwa1h3G2jvKYwIQy4PkHlDej5t7uLMUdJUU= +go.etcd.io/etcd/client/pkg/v3 v3.5.14 h1:SaNH6Y+rVEdxfpA2Jr5wkEvN6Zykme5+YnbCkxvuWxQ= +go.etcd.io/etcd/client/pkg/v3 v3.5.14/go.mod h1:8uMgAokyG1czCtIdsq+AGyYQMvpIKnSvPjFMunkgeZI= +go.etcd.io/etcd/client/v2 v2.305.13 h1:RWfV1SX5jTU0lbCvpVQe3iPQeAHETWdOTb6pxhd77C8= +go.etcd.io/etcd/client/v2 v2.305.13/go.mod h1:iQnL7fepbiomdXMb3om1rHq96htNNGv2sJkEcZGDRRg= +go.etcd.io/etcd/client/v3 v3.5.14 h1:CWfRs4FDaDoSz81giL7zPpZH2Z35tbOrAJkkjMqOupg= +go.etcd.io/etcd/client/v3 v3.5.14/go.mod h1:k3XfdV/VIHy/97rqWjoUzrj9tk7GgJGH9J8L4dNXmAk= +go.etcd.io/etcd/pkg/v3 v3.5.13 h1:st9bDWNsKkBNpP4PR1MvM/9NqUPfvYZx/YXegsYEH8M= +go.etcd.io/etcd/pkg/v3 v3.5.13/go.mod h1:N+4PLrp7agI/Viy+dUYpX7iRtSPvKq+w8Y14d1vX+m0= +go.etcd.io/etcd/raft/v3 v3.5.13 h1:7r/NKAOups1YnKcfro2RvGGo2PTuizF/xh26Z2CTAzA= +go.etcd.io/etcd/raft/v3 v3.5.13/go.mod h1:uUFibGLn2Ksm2URMxN1fICGhk8Wu96EfDQyuLhAcAmw= +go.etcd.io/etcd/server/v3 v3.5.13 h1:V6KG+yMfMSqWt+lGnhFpP5z5dRUj1BDRJ5k1fQ9DFok= +go.etcd.io/etcd/server/v3 v3.5.13/go.mod h1:K/8nbsGupHqmr5MkgaZpLlH1QdX1pcNQLAkODy44XcQ= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 h1:A3SayB3rNyt+1S6qpI9mHPkeHTZbD7XILEqWnYZb2l0= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0/go.mod h1:27iA5uvhuRNmalO+iEUdVn5ZMj2qy10Mm+XRIpRmyuU= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 h1:Xs2Ncz0gNihqu9iosIZ5SkBbWo5T8JhhLJFMQL1qmLI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0/go.mod h1:vy+2G/6NvVMpwGX/NyLqcC41fxepnuKHk16E6IZUcJc= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 h1:Waw9Wfpo/IXzOI8bCB7DIk+0JZcqqsyn1JFnAc+iam8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0/go.mod h1:wnJIG4fOqyynOnnQF/eQb4/16VlX2EJAHhHgqIqWfAo= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= -go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= -go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 h1:r6I7RJCN86bpD/FQwedZ0vSixDpwuWREjW9oRMsmqDc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0/go.mod h1:B9yO6b04uB80CzjedvewuqDhxJxi11s7/GtiGa8bAjI= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= +go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= +go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= +go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= +go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= +go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= +go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= +go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= +go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -416,11 +427,11 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -428,8 +439,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= +golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -447,11 +458,11 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo= -golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -459,8 +470,8 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -476,26 +487,26 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -507,34 +518,34 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= +golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/api v0.181.0 h1:rPdjwnWgiPPOJx3IcSAQ2III5aX5tCer6wMpa/xmZi4= -google.golang.org/api v0.181.0/go.mod h1:MnQ+M0CFsfUwA5beZ+g/vCBCPXvtmZwRz2qzZk8ih1k= +google.golang.org/api v0.198.0 h1:OOH5fZatk57iN0A7tjJQzt6aPfYQ1JiWkt1yGseazks= +google.golang.org/api v0.198.0/go.mod h1:/Lblzl3/Xqqk9hw/yS97TImKTUwnf1bv89v7+OagJzc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda h1:wu/KJm9KJwpfHWhkkZGohVC6KRrc1oJNr4jwtQMOQXw= -google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda/go.mod h1:g2LLCvCeCSir/JJSWosk19BR4NVxGqHUC6rxIRsd7Aw= -google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291 h1:4HZJ3Xv1cmrJ+0aFo304Zn79ur1HMxptAE7aCPNLSqc= -google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 h1:AgADTJarZTBqgjiUzRgfaBchgYB3/WFTC80GPwsMcRI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 h1:BulPr26Jqjnd4eYDVe+YvyR7Yc2vJGkO5/0UxD0/jZU= +google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:hL97c3SYopEHblzpxRL4lSs523++l8DYxGM1FQiYmb4= +google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed h1:3RgNmBoI9MZhsj3QxC+AP/qQhNwpCLOvYDYYsFrhFt0= +google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= -google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= +google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo= +google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -544,11 +555,13 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/h2non/gock.v1 v1.0.15 h1:SzLqcIlb/fDfg7UvukMpNcWsu7sI5tWwL+KCATZqks0= gopkg.in/h2non/gock.v1 v1.0.15/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= @@ -567,32 +580,32 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.30.1 h1:kCm/6mADMdbAxmIh0LBjS54nQBE+U4KmbCfIkF5CpJY= -k8s.io/api v0.30.1/go.mod h1:ddbN2C0+0DIiPntan/bye3SW3PdwLa11/0yqwvuRrJM= -k8s.io/apiextensions-apiserver v0.30.1 h1:4fAJZ9985BmpJG6PkoxVRpXv9vmPUOVzl614xarePws= -k8s.io/apiextensions-apiserver v0.30.1/go.mod h1:R4GuSrlhgq43oRY9sF2IToFh7PVlF1JjfWdoG3pixk4= -k8s.io/apimachinery v0.30.1 h1:ZQStsEfo4n65yAdlGTfP/uSHMQSoYzU/oeEbkmF7P2U= -k8s.io/apimachinery v0.30.1/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= -k8s.io/apiserver v0.30.1 h1:BEWEe8bzS12nMtDKXzCF5Q5ovp6LjjYkSp8qOPk8LZ8= -k8s.io/apiserver v0.30.1/go.mod h1:i87ZnQ+/PGAmSbD/iEKM68bm1D5reX8fO4Ito4B01mo= -k8s.io/client-go v0.30.1 h1:uC/Ir6A3R46wdkgCV3vbLyNOYyCJ8oZnjtJGKfytl/Q= -k8s.io/client-go v0.30.1/go.mod h1:wrAqLNs2trwiCH/wxxmT/x3hKVH9PuV0GGW0oDoHVqc= -k8s.io/component-base v0.30.1 h1:bvAtlPh1UrdaZL20D9+sWxsJljMi0QZ3Lmw+kmZAaxQ= -k8s.io/component-base v0.30.1/go.mod h1:e/X9kDiOebwlI41AvBHuWdqFriSRrX50CdwA9TFaHLI= -k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= -k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kms v0.30.1 h1:gEIbEeCbFiaN2tNfp/EUhFdGr5/CSj8Eyq6Mkr7cCiY= -k8s.io/kms v0.30.1/go.mod h1:GrMurD0qk3G4yNgGcsCEmepqf9KyyIrTXYR2lyUOJC4= -k8s.io/kube-aggregator v0.30.1 h1:ymR2BsxDacTKwzKTuNhGZttuk009c+oZbSeD+IPX5q4= -k8s.io/kube-aggregator v0.30.1/go.mod h1:SFbqWsM6ea8dHd3mPLsZFzJHbjBOS5ykIgJh4znZ5iQ= -k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f h1:0LQagt0gDpKqvIkAMPaRGcXawNMouPECM1+F9BVxEaM= -k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f/go.mod h1:S9tOR0FxgyusSNR+MboCuiDpVWkAifZvaYI1Q2ubgro= -k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak= -k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU= +k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI= +k8s.io/apiextensions-apiserver v0.31.1 h1:L+hwULvXx+nvTYX/MKM3kKMZyei+UiSXQWciX/N6E40= +k8s.io/apiextensions-apiserver v0.31.1/go.mod h1:tWMPR3sgW+jsl2xm9v7lAyRF1rYEK71i9G5dRtkknoQ= +k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= +k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apiserver v0.31.1 h1:Sars5ejQDCRBY5f7R3QFHdqN3s61nhkpaX8/k1iEw1c= +k8s.io/apiserver v0.31.1/go.mod h1:lzDhpeToamVZJmmFlaLwdYZwd7zB+WYRYIboqA1kGxM= +k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= +k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= +k8s.io/component-base v0.31.1 h1:UpOepcrX3rQ3ab5NB6g5iP0tvsgJWzxTyAo20sgYSy8= +k8s.io/component-base v0.31.1/go.mod h1:WGeaw7t/kTsqpVTaCoVEtillbqAhF2/JgvO0LDOMa0w= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kms v0.31.1 h1:cGLyV3cIwb0ovpP/jtyIe2mEuQ/MkbhmeBF2IYCA9Io= +k8s.io/kms v0.31.1/go.mod h1:OZKwl1fan3n3N5FFxnW5C4V3ygrah/3YXeJWS3O6+94= +k8s.io/kube-aggregator v0.31.1 h1:vrYBTTs3xMrpiEsmBjsLETZE9uuX67oQ8B3i1BFfMPw= +k8s.io/kube-aggregator v0.31.1/go.mod h1:+aW4NX50uneozN+BtoCxI4g7ND922p8Wy3tWKFDiWVk= +k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 h1:1dWzkmJrrprYvjGwh9kEUxmcUV/CtNU8QM7h1FLWQOo= +k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38/go.mod h1:coRQXBK9NxO98XUv3ZD6AK3xzHCxV6+b7lrquKwaKzA= +k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 h1:MDF6h2H/h4tbzmtIKTuctcwZmY0tY9mD9fNT47QO6HI= +k8s.io/utils v0.0.0-20240921022957-49e7df575cb6/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 h1:2770sDpzrjjsAtVhSeUFseziht227YAWYHLGNM8QPwY= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= -sigs.k8s.io/controller-runtime v0.18.2 h1:RqVW6Kpeaji67CY5nPEfRz6ZfFMk0lWQlNrLqlNpx+Q= -sigs.k8s.io/controller-runtime v0.18.2/go.mod h1:tuAt1+wbVsXIT8lPtk5RURxqAnq7xkpv2Mhttslg7Hw= +sigs.k8s.io/controller-runtime v0.19.0 h1:nWVM7aq+Il2ABxwiCizrVDSlmDcshi9llbaFbC0ji/Q= +sigs.k8s.io/controller-runtime v0.19.0/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= sigs.k8s.io/gateway-api v1.1.0 h1:DsLDXCi6jR+Xz8/xd0Z1PYl2Pn0TyaFMOPPZIj4inDM= sigs.k8s.io/gateway-api v1.1.0/go.mod h1:ZH4lHrL2sDi0FHZ9jjneb8kKnGzFWyrTya35sWUTrRs= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= @@ -601,5 +614,5 @@ sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+s sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= -software.sslmate.com/src/go-pkcs12 v0.4.0 h1:H2g08FrTvSFKUj+D309j1DPfk5APnIdAQAB8aEykJ5k= -software.sslmate.com/src/go-pkcs12 v0.4.0/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI= +software.sslmate.com/src/go-pkcs12 v0.5.0 h1:EC6R394xgENTpZ4RltKydeDUjtlM5drOYIG9c6TVj2M= +software.sslmate.com/src/go-pkcs12 v0.5.0/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI= diff --git a/hack/k8s-codegen.sh b/hack/k8s-codegen.sh index 386b187b2c7..83e0919f581 100755 --- a/hack/k8s-codegen.sh +++ b/hack/k8s-codegen.sh @@ -32,14 +32,8 @@ module_name="github.com/cert-manager/cert-manager" # Generate deepcopy functions for all internal and external APIs deepcopy_inputs=( - internal/apis/certmanager/v1alpha2 \ - internal/apis/certmanager/v1alpha3 \ - internal/apis/certmanager/v1beta1 \ pkg/apis/certmanager/v1 \ internal/apis/certmanager \ - internal/apis/acme/v1alpha2 \ - internal/apis/acme/v1alpha3 \ - internal/apis/acme/v1beta1 \ pkg/apis/acme/v1 \ internal/apis/acme \ pkg/apis/config/cainjector/v1alpha1 \ @@ -65,13 +59,7 @@ client_inputs=( # Generate defaulting functions to be used by the mutating webhook defaulter_inputs=( - internal/apis/certmanager/v1alpha2 \ - internal/apis/certmanager/v1alpha3 \ - internal/apis/certmanager/v1beta1 \ internal/apis/certmanager/v1 \ - internal/apis/acme/v1alpha2 \ - internal/apis/acme/v1alpha3 \ - internal/apis/acme/v1beta1 \ internal/apis/acme/v1 \ internal/apis/config/shared/v1alpha1 \ internal/apis/config/cainjector/v1alpha1 \ @@ -82,13 +70,7 @@ defaulter_inputs=( # Generate conversion functions to be used by the conversion webhook conversion_inputs=( - internal/apis/certmanager/v1alpha2 \ - internal/apis/certmanager/v1alpha3 \ - internal/apis/certmanager/v1beta1 \ internal/apis/certmanager/v1 \ - internal/apis/acme/v1alpha2 \ - internal/apis/acme/v1alpha3 \ - internal/apis/acme/v1beta1 \ internal/apis/acme/v1 \ internal/apis/config/shared/v1alpha1 \ internal/apis/config/cainjector/v1alpha1 \ diff --git a/hack/latest-base-images.sh b/hack/latest-base-images.sh index 629c47c88f1..69c2f136160 100755 --- a/hack/latest-base-images.sh +++ b/hack/latest-base-images.sh @@ -19,7 +19,7 @@ set -eu -o pipefail # This script fetches the latest sha256 digest of each base image for each architecture we support on servers # and writes those hashes to Makefile-formatted variables for use in Makefiles. -# This in turn allows us to easily update all base images to their latest versions, while mantaining the use +# This in turn allows us to easily update all base images to their latest versions, while maintaining the use # of digests rather than tags when we refer to these base images. CRANE=crane diff --git a/hack/prune-junit-xml/prunexml.go b/hack/prune-junit-xml/prunexml.go index 20b7ee71f73..287dbe77e41 100644 --- a/hack/prune-junit-xml/prunexml.go +++ b/hack/prune-junit-xml/prunexml.go @@ -143,7 +143,6 @@ func pruneXML(logger *log.Logger, suites *JUnitTestSuites, maxBytes int) { filteredTestCases := []*JUnitTestCase{} fuzzTestCases := map[string]*JUnitTestCase{} for _, testcase := range suite.TestCases { - testcase := testcase matches := fuzzNameRegex.FindStringSubmatch(testcase.Name) if len(matches) > 1 { if ftc, ok := fuzzTestCases[matches[1]]; ok { diff --git a/hack/verify-upgrade.sh b/hack/verify-upgrade.sh index ee665e4bd91..8abd15b1f4c 100755 --- a/hack/verify-upgrade.sh +++ b/hack/verify-upgrade.sh @@ -96,7 +96,7 @@ $kubectl wait --for=condition=Ready cert/test1 --timeout=180s # 2. BUILD AND UPGRADE TO HELM CHART FROM THE CURRENT MASTER -# e2e-setup-certamanager both builds and deploys the latest available chart based on the current checkout +# e2e-setup-certmanager both builds and deploys the latest available chart based on the current checkout make e2e-setup-certmanager # Wait for the cert-manager api to be available diff --git a/internal/apis/acme/install/install.go b/internal/apis/acme/install/install.go index b852a7c182a..c3e1815a053 100644 --- a/internal/apis/acme/install/install.go +++ b/internal/apis/acme/install/install.go @@ -23,19 +23,15 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "github.com/cert-manager/cert-manager/internal/apis/acme" - cmapi "github.com/cert-manager/cert-manager/internal/apis/acme/v1" - "github.com/cert-manager/cert-manager/internal/apis/acme/v1alpha2" - "github.com/cert-manager/cert-manager/internal/apis/acme/v1alpha3" - "github.com/cert-manager/cert-manager/internal/apis/acme/v1beta1" + v1 "github.com/cert-manager/cert-manager/internal/apis/acme/v1" cmmetav1 "github.com/cert-manager/cert-manager/internal/apis/meta/v1" ) // Install registers the API group and adds types to a scheme func Install(scheme *runtime.Scheme) { utilruntime.Must(acme.AddToScheme(scheme)) - utilruntime.Must(v1alpha2.AddToScheme(scheme)) - utilruntime.Must(v1alpha3.AddToScheme(scheme)) - utilruntime.Must(v1beta1.AddToScheme(scheme)) - utilruntime.Must(cmapi.AddToScheme(scheme)) + // The first version in this list will be the default version used + utilruntime.Must(v1.AddToScheme(scheme)) + utilruntime.Must(cmmetav1.AddToScheme(scheme)) } diff --git a/internal/apis/acme/types_issuer.go b/internal/apis/acme/types_issuer.go index 5450407913a..d9bafe45d58 100644 --- a/internal/apis/acme/types_issuer.go +++ b/internal/apis/acme/types_issuer.go @@ -257,6 +257,10 @@ type ACMEChallengeSolverHTTP01GatewayHTTPRoute struct { // the HTTPRoute. Usually, the parentRef references a Gateway. See: // https://gateway-api.sigs.k8s.io/v1alpha2/api-types/httproute/#attaching-to-gateways ParentRefs []gwapi.ParentReference + + // Optional pod template used to configure the ACME challenge solver pods + // used for HTTP01 challenges + PodTemplate *ACMEChallengeSolverHTTP01IngressPodTemplate } type ACMEChallengeSolverHTTP01IngressPodTemplate struct { @@ -275,7 +279,7 @@ type ACMEChallengeSolverHTTP01IngressPodTemplate struct { } type ACMEChallengeSolverHTTP01IngressPodObjectMeta struct { - // Annotations that should be added to the create ACME HTTP01 solver pods. + // Annotations that should be added to the created ACME HTTP01 solver pods. Annotations map[string]string // Labels that should be added to the created ACME HTTP01 solver pods. @@ -304,6 +308,10 @@ type ACMEChallengeSolverHTTP01IngressPodSpec struct { // If specified, the pod's imagePullSecrets // +optional ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty" patchMergeKey:"name" patchStrategy:"merge"` + + // If specified, the pod's security context + // +optional + SecurityContext *ACMEChallengeSolverHTTP01IngressPodSecurityContext `json:"securityContext,omitempty"` } type ACMEChallengeSolverHTTP01IngressTemplate struct { @@ -361,6 +369,80 @@ type ACMEChallengeSolverDNS01 struct { Webhook *ACMEIssuerDNS01ProviderWebhook } +type ACMEChallengeSolverHTTP01IngressPodSecurityContext struct { + // The SELinux context to be applied to all containers. + // If unspecified, the container runtime will allocate a random SELinux context for each + // container. May also be set in SecurityContext. If set in + // both SecurityContext and PodSecurityContext, the value specified in SecurityContext + // takes precedence for that container. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + SELinuxOptions *corev1.SELinuxOptions `json:"seLinuxOptions,omitempty"` + // The UID to run the entrypoint of the container process. + // Defaults to user specified in image metadata if unspecified. + // May also be set in SecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence + // for that container. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + RunAsUser *int64 `json:"runAsUser,omitempty"` + // The GID to run the entrypoint of the container process. + // Uses runtime default if unset. + // May also be set in SecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence + // for that container. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + RunAsGroup *int64 `json:"runAsGroup,omitempty"` + // Indicates that the container must run as a non-root user. + // If true, the Kubelet will validate the image at runtime to ensure that it + // does not run as UID 0 (root) and fail to start the container if it does. + // If unset or false, no such validation will be performed. + // May also be set in SecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence. + // +optional + RunAsNonRoot *bool `json:"runAsNonRoot,omitempty"` + // A list of groups applied to the first process run in each container, in addition + // to the container's primary GID, the fsGroup (if specified), and group memberships + // defined in the container image for the uid of the container process. If unspecified, + // no additional groups are added to any container. Note that group memberships + // defined in the container image for the uid of the container process are still effective, + // even if they are not included in this list. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + SupplementalGroups []int64 `json:"supplementalGroups,omitempty"` + // A special supplemental group that applies to all containers in a pod. + // Some volume types allow the Kubelet to change the ownership of that volume + // to be owned by the pod: + // + // 1. The owning GID will be the FSGroup + // 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) + // 3. The permission bits are OR'd with rw-rw---- + // + // If unset, the Kubelet will not modify the ownership and permissions of any volume. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + FSGroup *int64 `json:"fsGroup,omitempty"` + // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported + // sysctls (by the container runtime) might fail to launch. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + Sysctls []corev1.Sysctl `json:"sysctls,omitempty"` + // fsGroupChangePolicy defines behavior of changing ownership and permission of the volume + // before being exposed inside Pod. This field will only apply to + // volume types which support fsGroup based ownership(and permissions). + // It will have no effect on ephemeral volume types such as: secret, configmaps + // and emptydir. + // Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + FSGroupChangePolicy *corev1.PodFSGroupChangePolicy `json:"fsGroupChangePolicy,omitempty"` + // The seccomp options to use by the containers in this pod. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + SeccompProfile *corev1.SeccompProfile `json:"seccompProfile,omitempty"` +} + // CNAMEStrategy configures how the DNS01 provider should handle CNAME records // when found in DNS zones. // By default, the None strategy will be applied (i.e. do not follow CNAMEs). @@ -449,7 +531,7 @@ type ACMEIssuerDNS01ProviderRoute53 struct { // or the inferred credentials from environment variables, shared credentials file or AWS Instance metadata Role string - // If set, the provider will manage only this zone in Route53 and will not do an lookup using the route53:ListHostedZonesByName api call. + // If set, the provider will manage only this zone in Route53 and will not do a lookup using the route53:ListHostedZonesByName api call. HostedZoneID string // Always set the region when using AccessKeyID and SecretAccessKey diff --git a/internal/apis/acme/types_order.go b/internal/apis/acme/types_order.go index f4cd996820b..07aa0b20ec3 100644 --- a/internal/apis/acme/types_order.go +++ b/internal/apis/acme/types_order.go @@ -204,7 +204,7 @@ const ( Processing State = "processing" // Invalid signifies that an ACME resource is invalid for some reason. - // If an Order is marked 'invalid', one of its validations be have invalid for some reason. + // If an Order is marked 'invalid', one of its validations must be invalid for some reason. // This is a final state. Invalid State = "invalid" diff --git a/internal/apis/acme/v1/zz_generated.conversion.go b/internal/apis/acme/v1/zz_generated.conversion.go index b49ce9928dd..15514052e66 100644 --- a/internal/apis/acme/v1/zz_generated.conversion.go +++ b/internal/apis/acme/v1/zz_generated.conversion.go @@ -134,6 +134,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*v1.ACMEChallengeSolverHTTP01IngressPodSecurityContext)(nil), (*acme.ACMEChallengeSolverHTTP01IngressPodSecurityContext)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ACMEChallengeSolverHTTP01IngressPodSecurityContext_To_acme_ACMEChallengeSolverHTTP01IngressPodSecurityContext(a.(*v1.ACMEChallengeSolverHTTP01IngressPodSecurityContext), b.(*acme.ACMEChallengeSolverHTTP01IngressPodSecurityContext), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01IngressPodSecurityContext)(nil), (*v1.ACMEChallengeSolverHTTP01IngressPodSecurityContext)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_acme_ACMEChallengeSolverHTTP01IngressPodSecurityContext_To_v1_ACMEChallengeSolverHTTP01IngressPodSecurityContext(a.(*acme.ACMEChallengeSolverHTTP01IngressPodSecurityContext), b.(*v1.ACMEChallengeSolverHTTP01IngressPodSecurityContext), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*v1.ACMEChallengeSolverHTTP01IngressPodSpec)(nil), (*acme.ACMEChallengeSolverHTTP01IngressPodSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_ACMEChallengeSolverHTTP01IngressPodSpec_To_acme_ACMEChallengeSolverHTTP01IngressPodSpec(a.(*v1.ACMEChallengeSolverHTTP01IngressPodSpec), b.(*acme.ACMEChallengeSolverHTTP01IngressPodSpec), scope) }); err != nil { @@ -701,6 +711,7 @@ func autoConvert_v1_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_acme_ACMEChalle out.ServiceType = corev1.ServiceType(in.ServiceType) out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) out.ParentRefs = *(*[]apisv1.ParentReference)(unsafe.Pointer(&in.ParentRefs)) + out.PodTemplate = (*acme.ACMEChallengeSolverHTTP01IngressPodTemplate)(unsafe.Pointer(in.PodTemplate)) return nil } @@ -713,6 +724,7 @@ func autoConvert_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_v1_ACMEChalle out.ServiceType = corev1.ServiceType(in.ServiceType) out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) out.ParentRefs = *(*[]apisv1.ParentReference)(unsafe.Pointer(&in.ParentRefs)) + out.PodTemplate = (*v1.ACMEChallengeSolverHTTP01IngressPodTemplate)(unsafe.Pointer(in.PodTemplate)) return nil } @@ -795,6 +807,42 @@ func Convert_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_v1_ACMEChalle return autoConvert_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_v1_ACMEChallengeSolverHTTP01IngressPodObjectMeta(in, out, s) } +func autoConvert_v1_ACMEChallengeSolverHTTP01IngressPodSecurityContext_To_acme_ACMEChallengeSolverHTTP01IngressPodSecurityContext(in *v1.ACMEChallengeSolverHTTP01IngressPodSecurityContext, out *acme.ACMEChallengeSolverHTTP01IngressPodSecurityContext, s conversion.Scope) error { + out.SELinuxOptions = (*corev1.SELinuxOptions)(unsafe.Pointer(in.SELinuxOptions)) + out.RunAsUser = (*int64)(unsafe.Pointer(in.RunAsUser)) + out.RunAsGroup = (*int64)(unsafe.Pointer(in.RunAsGroup)) + out.RunAsNonRoot = (*bool)(unsafe.Pointer(in.RunAsNonRoot)) + out.SupplementalGroups = *(*[]int64)(unsafe.Pointer(&in.SupplementalGroups)) + out.FSGroup = (*int64)(unsafe.Pointer(in.FSGroup)) + out.Sysctls = *(*[]corev1.Sysctl)(unsafe.Pointer(&in.Sysctls)) + out.FSGroupChangePolicy = (*corev1.PodFSGroupChangePolicy)(unsafe.Pointer(in.FSGroupChangePolicy)) + out.SeccompProfile = (*corev1.SeccompProfile)(unsafe.Pointer(in.SeccompProfile)) + return nil +} + +// Convert_v1_ACMEChallengeSolverHTTP01IngressPodSecurityContext_To_acme_ACMEChallengeSolverHTTP01IngressPodSecurityContext is an autogenerated conversion function. +func Convert_v1_ACMEChallengeSolverHTTP01IngressPodSecurityContext_To_acme_ACMEChallengeSolverHTTP01IngressPodSecurityContext(in *v1.ACMEChallengeSolverHTTP01IngressPodSecurityContext, out *acme.ACMEChallengeSolverHTTP01IngressPodSecurityContext, s conversion.Scope) error { + return autoConvert_v1_ACMEChallengeSolverHTTP01IngressPodSecurityContext_To_acme_ACMEChallengeSolverHTTP01IngressPodSecurityContext(in, out, s) +} + +func autoConvert_acme_ACMEChallengeSolverHTTP01IngressPodSecurityContext_To_v1_ACMEChallengeSolverHTTP01IngressPodSecurityContext(in *acme.ACMEChallengeSolverHTTP01IngressPodSecurityContext, out *v1.ACMEChallengeSolverHTTP01IngressPodSecurityContext, s conversion.Scope) error { + out.SELinuxOptions = (*corev1.SELinuxOptions)(unsafe.Pointer(in.SELinuxOptions)) + out.RunAsUser = (*int64)(unsafe.Pointer(in.RunAsUser)) + out.RunAsGroup = (*int64)(unsafe.Pointer(in.RunAsGroup)) + out.RunAsNonRoot = (*bool)(unsafe.Pointer(in.RunAsNonRoot)) + out.SupplementalGroups = *(*[]int64)(unsafe.Pointer(&in.SupplementalGroups)) + out.FSGroup = (*int64)(unsafe.Pointer(in.FSGroup)) + out.Sysctls = *(*[]corev1.Sysctl)(unsafe.Pointer(&in.Sysctls)) + out.FSGroupChangePolicy = (*corev1.PodFSGroupChangePolicy)(unsafe.Pointer(in.FSGroupChangePolicy)) + out.SeccompProfile = (*corev1.SeccompProfile)(unsafe.Pointer(in.SeccompProfile)) + return nil +} + +// Convert_acme_ACMEChallengeSolverHTTP01IngressPodSecurityContext_To_v1_ACMEChallengeSolverHTTP01IngressPodSecurityContext is an autogenerated conversion function. +func Convert_acme_ACMEChallengeSolverHTTP01IngressPodSecurityContext_To_v1_ACMEChallengeSolverHTTP01IngressPodSecurityContext(in *acme.ACMEChallengeSolverHTTP01IngressPodSecurityContext, out *v1.ACMEChallengeSolverHTTP01IngressPodSecurityContext, s conversion.Scope) error { + return autoConvert_acme_ACMEChallengeSolverHTTP01IngressPodSecurityContext_To_v1_ACMEChallengeSolverHTTP01IngressPodSecurityContext(in, out, s) +} + func autoConvert_v1_ACMEChallengeSolverHTTP01IngressPodSpec_To_acme_ACMEChallengeSolverHTTP01IngressPodSpec(in *v1.ACMEChallengeSolverHTTP01IngressPodSpec, out *acme.ACMEChallengeSolverHTTP01IngressPodSpec, s conversion.Scope) error { out.NodeSelector = *(*map[string]string)(unsafe.Pointer(&in.NodeSelector)) out.Affinity = (*corev1.Affinity)(unsafe.Pointer(in.Affinity)) @@ -802,6 +850,7 @@ func autoConvert_v1_ACMEChallengeSolverHTTP01IngressPodSpec_To_acme_ACMEChalleng out.PriorityClassName = in.PriorityClassName out.ServiceAccountName = in.ServiceAccountName out.ImagePullSecrets = *(*[]corev1.LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets)) + out.SecurityContext = (*acme.ACMEChallengeSolverHTTP01IngressPodSecurityContext)(unsafe.Pointer(in.SecurityContext)) return nil } @@ -817,6 +866,7 @@ func autoConvert_acme_ACMEChallengeSolverHTTP01IngressPodSpec_To_v1_ACMEChalleng out.PriorityClassName = in.PriorityClassName out.ServiceAccountName = in.ServiceAccountName out.ImagePullSecrets = *(*[]corev1.LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets)) + out.SecurityContext = (*v1.ACMEChallengeSolverHTTP01IngressPodSecurityContext)(unsafe.Pointer(in.SecurityContext)) return nil } diff --git a/internal/apis/acme/v1alpha2/const.go b/internal/apis/acme/v1alpha2/const.go deleted file mode 100644 index d0704721e7e..00000000000 --- a/internal/apis/acme/v1alpha2/const.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha2 - -const ( - ACMEFinalizer = "finalizer.acme.cert-manager.io" -) diff --git a/internal/apis/acme/v1alpha2/conversion.go b/internal/apis/acme/v1alpha2/conversion.go deleted file mode 100644 index b1bdd5d2add..00000000000 --- a/internal/apis/acme/v1alpha2/conversion.go +++ /dev/null @@ -1,95 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha2 - -import ( - "k8s.io/apimachinery/pkg/conversion" - - "github.com/cert-manager/cert-manager/internal/apis/acme" -) - -func Convert_v1alpha2_ChallengeSpec_To_acme_ChallengeSpec(in *ChallengeSpec, out *acme.ChallengeSpec, s conversion.Scope) error { - if err := autoConvert_v1alpha2_ChallengeSpec_To_acme_ChallengeSpec(in, out, s); err != nil { - return err - } - - out.AuthorizationURL = in.AuthzURL - - switch in.Type { - case ACMEChallengeTypeHTTP01: - out.Type = acme.ACMEChallengeTypeHTTP01 - case ACMEChallengeTypeDNS01: - out.Type = acme.ACMEChallengeTypeDNS01 - default: - // this case should never be hit due to validation - out.Type = acme.ACMEChallengeType(in.Type) - } - - return nil -} - -func Convert_acme_ChallengeSpec_To_v1alpha2_ChallengeSpec(in *acme.ChallengeSpec, out *ChallengeSpec, s conversion.Scope) error { - if err := autoConvert_acme_ChallengeSpec_To_v1alpha2_ChallengeSpec(in, out, s); err != nil { - return err - } - - out.AuthzURL = in.AuthorizationURL - - switch in.Type { - case acme.ACMEChallengeTypeHTTP01: - out.Type = ACMEChallengeTypeHTTP01 - case acme.ACMEChallengeTypeDNS01: - out.Type = ACMEChallengeTypeDNS01 - default: - // this case should never be hit due to validation - out.Type = ACMEChallengeType(in.Type) - } - - return nil -} - -func Convert_v1alpha2_OrderSpec_To_acme_OrderSpec(in *OrderSpec, out *acme.OrderSpec, s conversion.Scope) error { - if err := autoConvert_v1alpha2_OrderSpec_To_acme_OrderSpec(in, out, s); err != nil { - return err - } - - out.Request = in.CSR - - return nil -} - -func Convert_acme_OrderSpec_To_v1alpha2_OrderSpec(in *acme.OrderSpec, out *OrderSpec, s conversion.Scope) error { - if err := autoConvert_acme_OrderSpec_To_v1alpha2_OrderSpec(in, out, s); err != nil { - return err - } - - out.CSR = in.Request - - return nil -} - -// Convert_acme_ACMEIssuer_To_v1alpha2_ACMEIssuer is explicitly defined to avoid issues in conversion-gen -// when referencing types in other API groups. -func Convert_acme_ACMEIssuer_To_v1alpha2_ACMEIssuer(in *acme.ACMEIssuer, out *ACMEIssuer, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuer_To_v1alpha2_ACMEIssuer(in, out, s) -} - -// Convert_v1alpha2_ACMEIssuer_To_acme_ACMEIssuer is explicitly defined to avoid issues in conversion-gen -// when referencing types in other API groups. -func Convert_v1alpha2_ACMEIssuer_To_acme_ACMEIssuer(in *ACMEIssuer, out *acme.ACMEIssuer, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEIssuer_To_acme_ACMEIssuer(in, out, s) -} diff --git a/internal/apis/acme/v1alpha2/defaults.go b/internal/apis/acme/v1alpha2/defaults.go deleted file mode 100644 index 93ea5ff4f97..00000000000 --- a/internal/apis/acme/v1alpha2/defaults.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha2 - -import ( - "k8s.io/apimachinery/pkg/runtime" -) - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} diff --git a/internal/apis/acme/v1alpha2/doc.go b/internal/apis/acme/v1alpha2/doc.go deleted file mode 100644 index c7e251759ee..00000000000 --- a/internal/apis/acme/v1alpha2/doc.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2020 The cert-manager 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:conversion-gen=github.com/cert-manager/cert-manager/internal/apis/acme -// +k8s:conversion-gen-external-types=github.com/cert-manager/cert-manager/internal/apis/acme/v1alpha2 -// +k8s:defaulter-gen=TypeMeta -// +k8s:deepcopy-gen=package,register - -// +groupName=acme.cert-manager.io -package v1alpha2 diff --git a/internal/apis/acme/v1alpha2/register.go b/internal/apis/acme/v1alpha2/register.go deleted file mode 100644 index 180f5eb9449..00000000000 --- a/internal/apis/acme/v1alpha2/register.go +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - "github.com/cert-manager/cert-manager/pkg/apis/acme" -) - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: acme.GroupName, Version: "v1alpha2"} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addDefaultingFuncs) - - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes) -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &Order{}, - &OrderList{}, - &Challenge{}, - &ChallengeList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/internal/apis/acme/v1alpha2/types.go b/internal/apis/acme/v1alpha2/types.go deleted file mode 100644 index d724a1ae5ac..00000000000 --- a/internal/apis/acme/v1alpha2/types.go +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha2 - -const ( - // If this annotation is specified on a Certificate or Order resource when - // using the HTTP01 solver type, the ingress.name field of the HTTP01 - // solver's configuration will be set to the value given here. - // This is especially useful for users of Ingress controllers that maintain - // a 1:1 mapping between endpoint IP and Ingress resource. - ACMECertificateHTTP01IngressNameOverride = "acme.cert-manager.io/http01-override-ingress-name" - - // If this annotation is specified on a Certificate or Order resource when - // using the HTTP01 solver type, the ingress.class field of the HTTP01 - // solver's configuration will be set to the value given here. - // This is especially useful for users deploying many different ingress - // classes into a single cluster that want to be able to re-use a single - // solver for each ingress class. - ACMECertificateHTTP01IngressClassOverride = "acme.cert-manager.io/http01-override-ingress-class" - - // IngressEditInPlaceAnnotation is used to toggle the use of ingressClass instead - // of ingress on the created Certificate resource - IngressEditInPlaceAnnotationKey = "acme.cert-manager.io/http01-edit-in-place" -) diff --git a/internal/apis/acme/v1alpha2/types_challenge.go b/internal/apis/acme/v1alpha2/types_challenge.go deleted file mode 100644 index 16db715ba5d..00000000000 --- a/internal/apis/acme/v1alpha2/types_challenge.go +++ /dev/null @@ -1,145 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Challenge is a type to represent a Challenge request with an ACME server -// +k8s:openapi-gen=true -// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.state" -// +kubebuilder:printcolumn:name="Domain",type="string",JSONPath=".spec.dnsName" -// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.reason",description="",priority=1 -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC." -// +kubebuilder:subresource:status -// +kubebuilder:resource:path=challenges -type Challenge struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata"` - - Spec ChallengeSpec `json:"spec,omitempty"` - Status ChallengeStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ChallengeList is a list of Challenges -type ChallengeList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []Challenge `json:"items"` -} - -type ChallengeSpec struct { - // URL is the URL of the ACME Challenge resource for this challenge. - // This can be used to lookup details about the status of this challenge. - URL string `json:"url"` - - // AuthzURL is the URL to the ACME Authorization resource that this - // challenge is a part of. - AuthzURL string `json:"authzURL"` - - // DNSName is the identifier that this challenge is for, e.g. example.com. - // If the requested DNSName is a 'wildcard', this field MUST be set to the - // non-wildcard domain, e.g. for `*.example.com`, it must be `example.com`. - DNSName string `json:"dnsName"` - - // Wildcard will be true if this challenge is for a wildcard identifier, - // for example '*.example.com'. - // +optional - Wildcard bool `json:"wildcard"` - - // Type is the type of ACME challenge this resource represents. - // One of "http-01" or "dns-01". - Type ACMEChallengeType `json:"type"` - - // Token is the ACME challenge token for this challenge. - // This is the raw value returned from the ACME server. - Token string `json:"token"` - - // Key is the ACME challenge key for this challenge - // For HTTP01 challenges, this is the value that must be responded with to - // complete the HTTP01 challenge in the format: - // `.`. - // For DNS01 challenges, this is the base64 encoded SHA256 sum of the - // `.` - // text that must be set as the TXT record content. - Key string `json:"key"` - - // Solver contains the domain solving configuration that should be used to - // solve this challenge resource. - Solver ACMEChallengeSolver `json:"solver"` - - // IssuerRef references a properly configured ACME-type Issuer which should - // be used to create this Challenge. - // If the Issuer does not exist, processing will be retried. - // If the Issuer is not an 'ACME' Issuer, an error will be returned and the - // Challenge will be marked as failed. - IssuerRef cmmeta.ObjectReference `json:"issuerRef"` -} - -// The type of ACME challenge. Only http-01 and dns-01 are supported. -// +kubebuilder:validation:Enum=http-01;dns-01 -type ACMEChallengeType string - -const ( - // ACMEChallengeTypeHTTP01 denotes a Challenge is of type http-01 - // More info: https://letsencrypt.org/docs/challenge-types/#http-01-challenge - ACMEChallengeTypeHTTP01 ACMEChallengeType = "http-01" - - // ACMEChallengeTypeDNS01 denotes a Challenge is of type dns-01 - // More info: https://letsencrypt.org/docs/challenge-types/#dns-01-challenge - ACMEChallengeTypeDNS01 ACMEChallengeType = "dns-01" -) - -type ChallengeStatus struct { - // Processing is used to denote whether this challenge should be processed - // or not. - // This field will only be set to true by the 'scheduling' component. - // It will only be set to false by the 'challenges' controller, after the - // challenge has reached a final state or timed out. - // If this field is set to false, the challenge controller will not take - // any more action. - // +optional - Processing bool `json:"processing"` - - // Presented will be set to true if the challenge values for this challenge - // are currently 'presented'. - // This *does not* imply the self check is passing. Only that the values - // have been 'submitted' for the appropriate challenge mechanism (i.e. the - // DNS01 TXT record has been presented, or the HTTP01 configuration has been - // configured). - // +optional - Presented bool `json:"presented"` - - // Reason contains human readable information on why the Challenge is in the - // current state. - // +optional - Reason string `json:"reason,omitempty"` - - // State contains the current 'state' of the challenge. - // If not set, the state of the challenge is unknown. - // +optional - State State `json:"state,omitempty"` -} diff --git a/internal/apis/acme/v1alpha2/types_issuer.go b/internal/apis/acme/v1alpha2/types_issuer.go deleted file mode 100644 index 6c9459d5f42..00000000000 --- a/internal/apis/acme/v1alpha2/types_issuer.go +++ /dev/null @@ -1,671 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha2 - -import ( - corev1 "k8s.io/api/core/v1" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - gwapi "sigs.k8s.io/gateway-api/apis/v1" - - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" -) - -// ACMEIssuer contains the specification for an ACME issuer. -// This uses the RFC8555 specification to obtain certificates by completing -// 'challenges' to prove ownership of domain identifiers. -// Earlier draft versions of the ACME specification are not supported. -type ACMEIssuer struct { - // Email is the email address to be associated with the ACME account. - // This field is optional, but it is strongly recommended to be set. - // It will be used to contact you in case of issues with your account or - // certificates, including expiry notification emails. - // This field may be updated after the account is initially registered. - // +optional - Email string `json:"email,omitempty"` - - // Server is the URL used to access the ACME server's 'directory' endpoint. - // For example, for Let's Encrypt's staging endpoint, you would use: - // "https://acme-staging-v02.api.letsencrypt.org/directory". - // Only ACME v2 endpoints (i.e. RFC 8555) are supported. - Server string `json:"server"` - - // PreferredChain is the chain to use if the ACME server outputs multiple. - // PreferredChain is no guarantee that this one gets delivered by the ACME - // endpoint. - // For example, for Let's Encrypt's DST crosssign you would use: - // "DST Root CA X3" or "ISRG Root X1" for the newer Let's Encrypt root CA. - // This value picks the first certificate bundle in the ACME alternative - // chains that has a certificate with this value as its issuer's CN - // +optional - // +kubebuilder:validation:MaxLength=64 - PreferredChain string `json:"preferredChain"` - - // Base64-encoded bundle of PEM CAs which can be used to validate the certificate - // chain presented by the ACME server. - // Mutually exclusive with SkipTLSVerify; prefer using CABundle to prevent various - // kinds of security vulnerabilities. - // If CABundle and SkipTLSVerify are unset, the system certificate bundle inside - // the container is used to validate the TLS connection. - // +optional - CABundle []byte `json:"caBundle,omitempty"` - - // INSECURE: Enables or disables validation of the ACME server TLS certificate. - // If true, requests to the ACME server will not have the TLS certificate chain - // validated. - // Mutually exclusive with CABundle; prefer using CABundle to prevent various - // kinds of security vulnerabilities. - // Only enable this option in development environments. - // If CABundle and SkipTLSVerify are unset, the system certificate bundle inside - // the container is used to validate the TLS connection. - // Defaults to false. - // +optional - SkipTLSVerify bool `json:"skipTLSVerify,omitempty"` - - // ExternalAccountBinding is a reference to a CA external account of the ACME - // server. - // If set, upon registration cert-manager will attempt to associate the given - // external account credentials with the registered ACME account. - // +optional - ExternalAccountBinding *ACMEExternalAccountBinding `json:"externalAccountBinding,omitempty"` - - // PrivateKey is the name of a Kubernetes Secret resource that will be used to - // store the automatically generated ACME account private key. - // Optionally, a `key` may be specified to select a specific entry within - // the named Secret resource. - // If `key` is not specified, a default of `tls.key` will be used. - PrivateKey cmmeta.SecretKeySelector `json:"privateKeySecretRef"` - - // Solvers is a list of challenge solvers that will be used to solve - // ACME challenges for the matching domains. - // Solver configurations must be provided in order to obtain certificates - // from an ACME server. - // For more information, see: https://cert-manager.io/docs/configuration/acme/ - // +optional - Solvers []ACMEChallengeSolver `json:"solvers,omitempty"` - - // Enables or disables generating a new ACME account key. - // If true, the Issuer resource will *not* request a new account but will expect - // the account key to be supplied via an existing secret. - // If false, the cert-manager system will generate a new ACME account key - // for the Issuer. - // Defaults to false. - // +optional - DisableAccountKeyGeneration bool `json:"disableAccountKeyGeneration,omitempty"` - - // Enables requesting a Not After date on certificates that matches the - // duration of the certificate. This is not supported by all ACME servers - // like Let's Encrypt. If set to true when the ACME server does not support - // it, it will create an error on the Order. - // Defaults to false. - // +optional - EnableDurationFeature bool `json:"enableDurationFeature,omitempty"` -} - -// ACMEExternalAccountBinding is a reference to a CA external account of the ACME -// server. -type ACMEExternalAccountBinding struct { - // keyID is the ID of the CA key that the External Account is bound to. - KeyID string `json:"keyID"` - - // keySecretRef is a Secret Key Selector referencing a data item in a Kubernetes - // Secret which holds the symmetric MAC key of the External Account Binding. - // The `key` is the index string that is paired with the key data in the - // Secret and should not be confused with the key data itself, or indeed with - // the External Account Binding keyID above. - // The secret key stored in the Secret **must** be un-padded, base64 URL - // encoded data. - Key cmmeta.SecretKeySelector `json:"keySecretRef"` - - // Deprecated: keyAlgorithm field exists for historical compatibility - // reasons and should not be used. The algorithm is now hardcoded to HS256 - // in golang/x/crypto/acme. - // +optional - KeyAlgorithm HMACKeyAlgorithm `json:"keyAlgorithm,omitempty"` -} - -// HMACKeyAlgorithm is the name of a key algorithm used for HMAC encryption -// +kubebuilder:validation:Enum=HS256;HS384;HS512 -type HMACKeyAlgorithm string - -const ( - HS256 HMACKeyAlgorithm = "HS256" - HS384 HMACKeyAlgorithm = "HS384" - HS512 HMACKeyAlgorithm = "HS512" -) - -// Configures an issuer to solve challenges using the specified options. -// Only one of HTTP01 or DNS01 may be provided. -type ACMEChallengeSolver struct { - // Selector selects a set of DNSNames on the Certificate resource that - // should be solved using this challenge solver. - // If not specified, the solver will be treated as the 'default' solver - // with the lowest priority, i.e. if any other solver has a more specific - // match, it will be used instead. - // +optional - Selector *CertificateDNSNameSelector `json:"selector,omitempty"` - - // Configures cert-manager to attempt to complete authorizations by - // performing the HTTP01 challenge flow. - // It is not possible to obtain certificates for wildcard domain names - // (e.g. `*.example.com`) using the HTTP01 challenge mechanism. - // +optional - HTTP01 *ACMEChallengeSolverHTTP01 `json:"http01,omitempty"` - - // Configures cert-manager to attempt to complete authorizations by - // performing the DNS01 challenge flow. - // +optional - DNS01 *ACMEChallengeSolverDNS01 `json:"dns01,omitempty"` -} - -// CertificateDomainSelector selects certificates using a label selector, and -// can optionally select individual DNS names within those certificates. -// If both MatchLabels and DNSNames are empty, this selector will match all -// certificates and DNS names within them. -type CertificateDNSNameSelector struct { - // A label selector that is used to refine the set of certificate's that - // this challenge solver will apply to. - // +optional - MatchLabels map[string]string `json:"matchLabels,omitempty"` - - // List of DNSNames that this solver will be used to solve. - // If specified and a match is found, a dnsNames selector will take - // precedence over a dnsZones selector. - // If multiple solvers match with the same dnsNames value, the solver - // with the most matching labels in matchLabels will be selected. - // If neither has more matches, the solver defined earlier in the list - // will be selected. - // +optional - DNSNames []string `json:"dnsNames,omitempty"` - - // List of DNSZones that this solver will be used to solve. - // The most specific DNS zone match specified here will take precedence - // over other DNS zone matches, so a solver specifying sys.example.com - // will be selected over one specifying example.com for the domain - // www.sys.example.com. - // If multiple solvers match with the same dnsZones value, the solver - // with the most matching labels in matchLabels will be selected. - // If neither has more matches, the solver defined earlier in the list - // will be selected. - // +optional - DNSZones []string `json:"dnsZones,omitempty"` -} - -// ACMEChallengeSolverHTTP01 contains configuration detailing how to solve -// HTTP01 challenges within a Kubernetes cluster. -// Typically this is accomplished through creating 'routes' of some description -// that configure ingress controllers to direct traffic to 'solver pods', which -// are responsible for responding to the ACME server's HTTP requests. -// Only one of Ingress / Gateway can be specified. -type ACMEChallengeSolverHTTP01 struct { - // The ingress based HTTP01 challenge solver will solve challenges by - // creating or modifying Ingress resources in order to route requests for - // '/.well-known/acme-challenge/XYZ' to 'challenge solver' pods that are - // provisioned by cert-manager for each Challenge to be completed. - // +optional - Ingress *ACMEChallengeSolverHTTP01Ingress `json:"ingress,omitempty"` - - // The Gateway API is a sig-network community API that models service networking - // in Kubernetes (https://gateway-api.sigs.k8s.io/). The Gateway solver will - // create HTTPRoutes with the specified labels in the same namespace as the challenge. - // This solver is experimental, and fields / behaviour may change in the future. - // +optional - GatewayHTTPRoute *ACMEChallengeSolverHTTP01GatewayHTTPRoute `json:"gatewayHTTPRoute,omitempty"` -} - -type ACMEChallengeSolverHTTP01Ingress struct { - // Optional service type for Kubernetes solver service. Supported values - // are NodePort or ClusterIP. If unset, defaults to NodePort. - // +optional - ServiceType corev1.ServiceType `json:"serviceType,omitempty"` - - // This field configures the field `ingressClassName` on the created Ingress - // resources used to solve ACME challenges that use this challenge solver. - // This is the recommended way of configuring the ingress class. Only one of - // `class`, `name` or `ingressClassName` may be specified. - // +optional - IngressClassName *string `json:"ingressClassName,omitempty"` - - // This field configures the annotation `kubernetes.io/ingress.class` when - // creating Ingress resources to solve ACME challenges that use this - // challenge solver. Only one of `class`, `name` or `ingressClassName` may - // be specified. - // +optional - Class *string `json:"class,omitempty"` - - // The name of the ingress resource that should have ACME challenge solving - // routes inserted into it in order to solve HTTP01 challenges. - // This is typically used in conjunction with ingress controllers like - // ingress-gce, which maintains a 1:1 mapping between external IPs and - // ingress resources. Only one of `class`, `name` or `ingressClassName` may - // be specified. - // +optional - Name string `json:"name,omitempty"` - - // Optional pod template used to configure the ACME challenge solver pods - // used for HTTP01 challenges. - // +optional - PodTemplate *ACMEChallengeSolverHTTP01IngressPodTemplate `json:"podTemplate,omitempty"` - - // Optional ingress template used to configure the ACME challenge solver - // ingress used for HTTP01 challenges - // +optional - IngressTemplate *ACMEChallengeSolverHTTP01IngressTemplate `json:"ingressTemplate,omitempty"` -} - -type ACMEChallengeSolverHTTP01GatewayHTTPRoute struct { - // Optional service type for Kubernetes solver service. Supported values - // are NodePort or ClusterIP. If unset, defaults to NodePort. - // +optional - ServiceType corev1.ServiceType `json:"serviceType,omitempty"` - - // Custom labels that will be applied to HTTPRoutes created by cert-manager - // while solving HTTP-01 challenges. - // +optional - Labels map[string]string - - // When solving an HTTP-01 challenge, cert-manager creates an HTTPRoute. - // cert-manager needs to know which parentRefs should be used when creating - // the HTTPRoute. Usually, the parentRef references a Gateway. See: - // https://gateway-api.sigs.k8s.io/v1alpha2/api-types/httproute/#attaching-to-gateways - ParentRefs []gwapi.ParentReference -} - -type ACMEChallengeSolverHTTP01IngressPodTemplate struct { - // ObjectMeta overrides for the pod used to solve HTTP01 challenges. - // Only the 'labels' and 'annotations' fields may be set. - // If labels or annotations overlap with in-built values, the values here - // will override the in-built values. - // +optional - ACMEChallengeSolverHTTP01IngressPodObjectMeta `json:"metadata"` - - // PodSpec defines overrides for the HTTP01 challenge solver pod. - // Check ACMEChallengeSolverHTTP01IngressPodSpec to find out currently supported fields. - // All other fields will be ignored. - // +optional - Spec ACMEChallengeSolverHTTP01IngressPodSpec `json:"spec"` -} - -type ACMEChallengeSolverHTTP01IngressPodObjectMeta struct { - // Annotations that should be added to the create ACME HTTP01 solver pods. - // +optional - Annotations map[string]string `json:"annotations,omitempty"` - - // Labels that should be added to the created ACME HTTP01 solver pods. - // +optional - Labels map[string]string `json:"labels,omitempty"` -} - -type ACMEChallengeSolverHTTP01IngressPodSpec struct { - // NodeSelector is a selector which must be true for the pod to fit on a node. - // Selector which must match a node's labels for the pod to be scheduled on that node. - // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - // +optional - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - - // If specified, the pod's scheduling constraints - // +optional - Affinity *corev1.Affinity `json:"affinity,omitempty"` - - // If specified, the pod's tolerations. - // +optional - Tolerations []corev1.Toleration `json:"tolerations,omitempty"` - - // If specified, the pod's priorityClassName. - // +optional - PriorityClassName string `json:"priorityClassName,omitempty"` - - // If specified, the pod's service account - // +optional - ServiceAccountName string `json:"serviceAccountName,omitempty"` - - // If specified, the pod's imagePullSecrets - // +optional - ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty" patchMergeKey:"name" patchStrategy:"merge"` -} - -type ACMEChallengeSolverHTTP01IngressTemplate struct { - // ObjectMeta overrides for the ingress used to solve HTTP01 challenges. - // Only the 'labels' and 'annotations' fields may be set. - // If labels or annotations overlap with in-built values, the values here - // will override the in-built values. - // +optional - ACMEChallengeSolverHTTP01IngressObjectMeta `json:"metadata"` -} - -type ACMEChallengeSolverHTTP01IngressObjectMeta struct { - // Annotations that should be added to the created ACME HTTP01 solver ingress. - // +optional - Annotations map[string]string `json:"annotations,omitempty"` - - // Labels that should be added to the created ACME HTTP01 solver ingress. - // +optional - Labels map[string]string `json:"labels,omitempty"` -} - -// Used to configure a DNS01 challenge provider to be used when solving DNS01 -// challenges. -// Only one DNS provider may be configured per solver. -type ACMEChallengeSolverDNS01 struct { - // CNAMEStrategy configures how the DNS01 provider should handle CNAME - // records when found in DNS zones. - // +optional - CNAMEStrategy CNAMEStrategy `json:"cnameStrategy,omitempty"` - - // Use the Akamai DNS zone management API to manage DNS01 challenge records. - // +optional - Akamai *ACMEIssuerDNS01ProviderAkamai `json:"akamai,omitempty"` - - // Use the Google Cloud DNS API to manage DNS01 challenge records. - // +optional - CloudDNS *ACMEIssuerDNS01ProviderCloudDNS `json:"clouddns,omitempty"` - - // Use the Cloudflare API to manage DNS01 challenge records. - // +optional - Cloudflare *ACMEIssuerDNS01ProviderCloudflare `json:"cloudflare,omitempty"` - - // Use the AWS Route53 API to manage DNS01 challenge records. - // +optional - Route53 *ACMEIssuerDNS01ProviderRoute53 `json:"route53,omitempty"` - - // Use the Microsoft Azure DNS API to manage DNS01 challenge records. - // +optional - AzureDNS *ACMEIssuerDNS01ProviderAzureDNS `json:"azuredns,omitempty"` - - // Use the DigitalOcean DNS API to manage DNS01 challenge records. - // +optional - DigitalOcean *ACMEIssuerDNS01ProviderDigitalOcean `json:"digitalocean,omitempty"` - - // Use the 'ACME DNS' (https://github.com/joohoi/acme-dns) API to manage - // DNS01 challenge records. - // +optional - AcmeDNS *ACMEIssuerDNS01ProviderAcmeDNS `json:"acmedns,omitempty"` - - // Use RFC2136 ("Dynamic Updates in the Domain Name System") (https://datatracker.ietf.org/doc/rfc2136/) - // to manage DNS01 challenge records. - // +optional - RFC2136 *ACMEIssuerDNS01ProviderRFC2136 `json:"rfc2136,omitempty"` - - // Configure an external webhook based DNS01 challenge solver to manage - // DNS01 challenge records. - // +optional - Webhook *ACMEIssuerDNS01ProviderWebhook `json:"webhook,omitempty"` -} - -// CNAMEStrategy configures how the DNS01 provider should handle CNAME records -// when found in DNS zones. -// By default, the None strategy will be applied (i.e. do not follow CNAMEs). -// +kubebuilder:validation:Enum=None;Follow -type CNAMEStrategy string - -const ( - // NoneStrategy indicates that no CNAME resolution strategy should be used - // when determining which DNS zone to update during DNS01 challenges. - NoneStrategy = "None" - - // FollowStrategy will cause cert-manager to recurse through CNAMEs in - // order to determine which DNS zone to update during DNS01 challenges. - // This is useful if you do not want to grant cert-manager access to your - // root DNS zone, and instead delegate the _acme-challenge.example.com - // subdomain to some other, less privileged domain. - FollowStrategy = "Follow" -) - -// ACMEIssuerDNS01ProviderAkamai is a structure containing the DNS -// configuration for Akamai DNS—Zone Record Management API -type ACMEIssuerDNS01ProviderAkamai struct { - ServiceConsumerDomain string `json:"serviceConsumerDomain"` - ClientToken cmmeta.SecretKeySelector `json:"clientTokenSecretRef"` - ClientSecret cmmeta.SecretKeySelector `json:"clientSecretSecretRef"` - AccessToken cmmeta.SecretKeySelector `json:"accessTokenSecretRef"` -} - -// ACMEIssuerDNS01ProviderCloudDNS is a structure containing the DNS -// configuration for Google Cloud DNS -type ACMEIssuerDNS01ProviderCloudDNS struct { - // +optional - ServiceAccount *cmmeta.SecretKeySelector `json:"serviceAccountSecretRef,omitempty"` - Project string `json:"project"` - - // HostedZoneName is an optional field that tells cert-manager in which - // Cloud DNS zone the challenge record has to be created. - // If left empty cert-manager will automatically choose a zone. - // +optional - HostedZoneName string `json:"hostedZoneName,omitempty"` -} - -// ACMEIssuerDNS01ProviderCloudflare is a structure containing the DNS -// configuration for Cloudflare. -// One of `apiKeySecretRef` or `apiTokenSecretRef` must be provided. -type ACMEIssuerDNS01ProviderCloudflare struct { - // Email of the account, only required when using API key based authentication. - // +optional - Email string `json:"email,omitempty"` - - // API key to use to authenticate with Cloudflare. - // Note: using an API token to authenticate is now the recommended method - // as it allows greater control of permissions. - // +optional - APIKey *cmmeta.SecretKeySelector `json:"apiKeySecretRef,omitempty"` - - // API token used to authenticate with Cloudflare. - // +optional - APIToken *cmmeta.SecretKeySelector `json:"apiTokenSecretRef,omitempty"` -} - -// ACMEIssuerDNS01ProviderDigitalOcean is a structure containing the DNS -// configuration for DigitalOcean Domains -type ACMEIssuerDNS01ProviderDigitalOcean struct { - Token cmmeta.SecretKeySelector `json:"tokenSecretRef"` -} - -// ACMEIssuerDNS01ProviderRoute53 is a structure containing the Route 53 -// configuration for AWS -type ACMEIssuerDNS01ProviderRoute53 struct { - // Auth configures how cert-manager authenticates. - // +optional - Auth *Route53Auth `json:"auth,omitempty"` - - // The AccessKeyID is used for authentication. If not set we fall-back to using env vars, shared credentials file or AWS Instance metadata - // see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials - // +optional - AccessKeyID string `json:"accessKeyID,omitempty"` - - // If set, pull the AWS access key ID from a key within a kubernetes secret. - // see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials - // +optional - SecretAccessKeyID *cmmeta.SecretKeySelector `json:"accessKeyIDSecretRef,omitempty"` - - // The SecretAccessKey is used for authentication. If not set we fall-back to using env vars, shared credentials file or AWS Instance metadata - // https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials - // +optional - SecretAccessKey cmmeta.SecretKeySelector `json:"secretAccessKeySecretRef"` - - // Role is a Role ARN which the Route53 provider will assume using either the explicit credentials AccessKeyID/SecretAccessKey - // or the inferred credentials from environment variables, shared credentials file or AWS Instance metadata - // +optional - Role string `json:"role,omitempty"` - - // If set, the provider will manage only this zone in Route53 and will not do an lookup using the route53:ListHostedZonesByName api call. - // +optional - HostedZoneID string `json:"hostedZoneID,omitempty"` - - // Always set the region when using AccessKeyID and SecretAccessKey - Region string `json:"region"` -} - -// Route53Auth is configuration used to authenticate with a Route53. -type Route53Auth struct { - // Kubernetes authenticates with Route53 using AssumeRoleWithWebIdentity - // by passing a bound ServiceAccount token. - Kubernetes *Route53KubernetesAuth `json:"kubernetes"` -} - -// Route53KubernetesAuth is a configuration to authenticate against Route53 -// using a bound Kubernetes ServiceAccount token. -type Route53KubernetesAuth struct { - // A reference to a service account that will be used to request a bound - // token (also known as "projected token"). To use this field, you must - // configure an RBAC rule to let cert-manager request a token. - ServiceAccountRef *ServiceAccountRef `json:"serviceAccountRef"` -} - -// ServiceAccountRef is a service account used by cert-manager to request a -// token. The expiration of the token is also set by cert-manager to 10 minutes. -type ServiceAccountRef struct { - // Name of the ServiceAccount used to request a token. - Name string `json:"name"` - - // TokenAudiences is an optional list of audiences to include in the - // token passed to AWS. The default token consisting of the issuer's namespace - // and name is always included. - // If unset the audience defaults to `sts.amazonaws.com`. - // +optional - TokenAudiences []string `json:"audiences,omitempty"` -} - -// ACMEIssuerDNS01ProviderAzureDNS is a structure containing the -// configuration for Azure DNS -type ACMEIssuerDNS01ProviderAzureDNS struct { - // if both this and ClientSecret are left unset MSI will be used - // +optional - ClientID string `json:"clientID,omitempty"` - - // if both this and ClientID are left unset MSI will be used - // +optional - ClientSecret *cmmeta.SecretKeySelector `json:"clientSecretSecretRef,omitempty"` - - // ID of the Azure subscription - SubscriptionID string `json:"subscriptionID"` - - // when specifying ClientID and ClientSecret then this field is also needed - // +optional - TenantID string `json:"tenantID,omitempty"` - - // resource group the DNS zone is located in - ResourceGroupName string `json:"resourceGroupName"` - - // name of the DNS zone that should be used - // +optional - HostedZoneName string `json:"hostedZoneName,omitempty"` - - // name of the Azure environment (default AzurePublicCloud) - // +optional - Environment AzureDNSEnvironment `json:"environment,omitempty"` - - // managed identity configuration, can not be used at the same time as clientID, clientSecretSecretRef or tenantID - // +optional - ManagedIdentity *AzureManagedIdentity `json:"managedIdentity,omitempty"` -} - -type AzureManagedIdentity struct { - // client ID of the managed identity, can not be used at the same time as resourceID - // +optional - ClientID string `json:"clientID,omitempty"` - - // resource ID of the managed identity, can not be used at the same time as clientID - // +optional - ResourceID string `json:"resourceID,omitempty"` -} - -// +kubebuilder:validation:Enum=AzurePublicCloud;AzureChinaCloud;AzureGermanCloud;AzureUSGovernmentCloud -type AzureDNSEnvironment string - -const ( - AzurePublicCloud AzureDNSEnvironment = "AzurePublicCloud" - AzureChinaCloud AzureDNSEnvironment = "AzureChinaCloud" - AzureGermanCloud AzureDNSEnvironment = "AzureGermanCloud" - AzureUSGovernmentCloud AzureDNSEnvironment = "AzureUSGovernmentCloud" -) - -// ACMEIssuerDNS01ProviderAcmeDNS is a structure containing the -// configuration for ACME-DNS servers -type ACMEIssuerDNS01ProviderAcmeDNS struct { - Host string `json:"host"` - - AccountSecret cmmeta.SecretKeySelector `json:"accountSecretRef"` -} - -// ACMEIssuerDNS01ProviderRFC2136 is a structure containing the -// configuration for RFC2136 DNS -type ACMEIssuerDNS01ProviderRFC2136 struct { - // The IP address or hostname of an authoritative DNS server supporting - // RFC2136 in the form host:port. If the host is an IPv6 address it must be - // enclosed in square brackets (e.g [2001:db8::1]) ; port is optional. - // This field is required. - Nameserver string `json:"nameserver"` - - // The name of the secret containing the TSIG value. - // If ``tsigKeyName`` is defined, this field is required. - // +optional - TSIGSecret cmmeta.SecretKeySelector `json:"tsigSecretSecretRef,omitempty"` - - // The TSIG Key name configured in the DNS. - // If ``tsigSecretSecretRef`` is defined, this field is required. - // +optional - TSIGKeyName string `json:"tsigKeyName,omitempty"` - - // The TSIG Algorithm configured in the DNS supporting RFC2136. Used only - // when ``tsigSecretSecretRef`` and ``tsigKeyName`` are defined. - // Supported values are (case-insensitive): ``HMACMD5`` (default), - // ``HMACSHA1``, ``HMACSHA256`` or ``HMACSHA512``. - // +optional - TSIGAlgorithm string `json:"tsigAlgorithm,omitempty"` -} - -// ACMEIssuerDNS01ProviderWebhook specifies configuration for a webhook DNS01 -// provider, including where to POST ChallengePayload resources. -type ACMEIssuerDNS01ProviderWebhook struct { - // The API group name that should be used when POSTing ChallengePayload - // resources to the webhook apiserver. - // This should be the same as the GroupName specified in the webhook - // provider implementation. - GroupName string `json:"groupName"` - - // The name of the solver to use, as defined in the webhook provider - // implementation. - // This will typically be the name of the provider, e.g. 'cloudflare'. - SolverName string `json:"solverName"` - - // Additional configuration that should be passed to the webhook apiserver - // when challenges are processed. - // This can contain arbitrary JSON data. - // Secret values should not be specified in this stanza. - // If secret values are needed (e.g. credentials for a DNS service), you - // should use a SecretKeySelector to reference a Secret resource. - // For details on the schema of this field, consult the webhook provider - // implementation's documentation. - // +optional - Config *apiextensionsv1.JSON `json:"config,omitempty"` -} - -type ACMEIssuerStatus struct { - // URI is the unique account identifier, which can also be used to retrieve - // account details from the CA - // +optional - URI string `json:"uri,omitempty"` - - // LastRegisteredEmail is the email associated with the latest registered - // ACME account, in order to track changes made to registered account - // associated with the Issuer - // +optional - LastRegisteredEmail string `json:"lastRegisteredEmail,omitempty"` - - // LastPrivateKeyHash is a hash of the private key associated with the latest - // registered ACME account, in order to track changes made to registered account - // associated with the Issuer - LastPrivateKeyHash string `json:"lastPrivateKeyHash,omitempty"` -} diff --git a/internal/apis/acme/v1alpha2/types_order.go b/internal/apis/acme/v1alpha2/types_order.go deleted file mode 100644 index 8ea31cd0c39..00000000000 --- a/internal/apis/acme/v1alpha2/types_order.go +++ /dev/null @@ -1,238 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Order is a type to represent an Order with an ACME server -// +k8s:openapi-gen=true -type Order struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata"` - - Spec OrderSpec `json:"spec,omitempty"` - Status OrderStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// OrderList is a list of Orders -type OrderList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []Order `json:"items"` -} - -type OrderSpec struct { - // Certificate signing request bytes in DER encoding. - // This will be used when finalizing the order. - // This field must be set on the order. - CSR []byte `json:"csr"` - - // IssuerRef references a properly configured ACME-type Issuer which should - // be used to create this Order. - // If the Issuer does not exist, processing will be retried. - // If the Issuer is not an 'ACME' Issuer, an error will be returned and the - // Order will be marked as failed. - IssuerRef cmmeta.ObjectReference `json:"issuerRef"` - - // CommonName is the common name as specified on the DER encoded CSR. - // If specified, this value must also be present in `dnsNames` or `ipAddresses`. - // This field must match the corresponding field on the DER encoded CSR. - // +optional - CommonName string `json:"commonName,omitempty"` - - // DNSNames is a list of DNS names that should be included as part of the Order - // validation process. - // This field must match the corresponding field on the DER encoded CSR. - //+optional - DNSNames []string `json:"dnsNames,omitempty"` - - // IPAddresses is a list of IP addresses that should be included as part of the Order - // validation process. - // This field must match the corresponding field on the DER encoded CSR. - // +optional - IPAddresses []string `json:"ipAddresses,omitempty"` - - // Duration is the duration for the not after date for the requested certificate. - // this is set on order creation as pe the ACME spec. - // +optional - Duration *metav1.Duration `json:"duration,omitempty"` -} - -type OrderStatus struct { - // URL of the Order. - // This will initially be empty when the resource is first created. - // The Order controller will populate this field when the Order is first processed. - // This field will be immutable after it is initially set. - // +optional - URL string `json:"url,omitempty"` - - // FinalizeURL of the Order. - // This is used to obtain certificates for this order once it has been completed. - // +optional - FinalizeURL string `json:"finalizeURL,omitempty"` - - // Authorizations contains data returned from the ACME server on what - // authorizations must be completed in order to validate the DNS names - // specified on the Order. - // +optional - Authorizations []ACMEAuthorization `json:"authorizations,omitempty"` - - // Certificate is a copy of the PEM encoded certificate for this Order. - // This field will be populated after the order has been successfully - // finalized with the ACME server, and the order has transitioned to the - // 'valid' state. - // +optional - Certificate []byte `json:"certificate,omitempty"` - - // State contains the current state of this Order resource. - // States 'success' and 'expired' are 'final' - // +optional - State State `json:"state,omitempty"` - - // Reason optionally provides more information about a why the order is in - // the current state. - // +optional - Reason string `json:"reason,omitempty"` - - // FailureTime stores the time that this order failed. - // This is used to influence garbage collection and back-off. - // +optional - FailureTime *metav1.Time `json:"failureTime,omitempty"` -} - -// ACMEAuthorization contains data returned from the ACME server on an -// authorization that must be completed in order validate a DNS name on an ACME -// Order resource. -type ACMEAuthorization struct { - // URL is the URL of the Authorization that must be completed - URL string `json:"url"` - - // Identifier is the DNS name to be validated as part of this authorization - // +optional - Identifier string `json:"identifier,omitempty"` - - // Wildcard will be true if this authorization is for a wildcard DNS name. - // If this is true, the identifier will be the *non-wildcard* version of - // the DNS name. - // For example, if '*.example.com' is the DNS name being validated, this - // field will be 'true' and the 'identifier' field will be 'example.com'. - // +optional - Wildcard *bool `json:"wildcard,omitempty"` - - // InitialState is the initial state of the ACME authorization when first - // fetched from the ACME server. - // If an Authorization is already 'valid', the Order controller will not - // create a Challenge resource for the authorization. This will occur when - // working with an ACME server that enables 'authz reuse' (such as Let's - // Encrypt's production endpoint). - // If not set and 'identifier' is set, the state is assumed to be pending - // and a Challenge will be created. - // +optional - InitialState State `json:"initialState,omitempty"` - - // Challenges specifies the challenge types offered by the ACME server. - // One of these challenge types will be selected when validating the DNS - // name and an appropriate Challenge resource will be created to perform - // the ACME challenge process. - // +optional - Challenges []ACMEChallenge `json:"challenges,omitempty"` -} - -// Challenge specifies a challenge offered by the ACME server for an Order. -// An appropriate Challenge resource can be created to perform the ACME -// challenge process. -type ACMEChallenge struct { - // URL is the URL of this challenge. It can be used to retrieve additional - // metadata about the Challenge from the ACME server. - URL string `json:"url"` - - // Token is the token that must be presented for this challenge. - // This is used to compute the 'key' that must also be presented. - Token string `json:"token"` - - // Type is the type of challenge being offered, e.g. 'http-01', 'dns-01', - // 'tls-sni-01', etc. - // This is the raw value retrieved from the ACME server. - // Only 'http-01' and 'dns-01' are supported by cert-manager, other values - // will be ignored. - Type string `json:"type"` -} - -// State represents the state of an ACME resource, such as an Order. -// The possible options here map to the corresponding values in the -// ACME specification. -// Full details of these values can be found here: https://tools.ietf.org/html/draft-ietf-acme-acme-15#section-7.1.6 -// Clients utilising this type must also gracefully handle unknown -// values, as the contents of this enumeration may be added to over time. -// +kubebuilder:validation:Enum=valid;ready;pending;processing;invalid;expired;errored -type State string - -const ( - // Unknown is not a real state as part of the ACME spec. - // It is used to represent an unrecognised value. - Unknown State = "" - - // Valid signifies that an ACME resource is in a valid state. - // If an order is 'valid', it has been finalized with the ACME server and - // the certificate can be retrieved from the ACME server using the - // certificate URL stored in the Order's status subresource. - // This is a final state. - Valid State = "valid" - - // Ready signifies that an ACME resource is in a ready state. - // If an order is 'ready', all of its challenges have been completed - // successfully and the order is ready to be finalized. - // Once finalized, it will transition to the Valid state. - // This is a transient state. - Ready State = "ready" - - // Pending signifies that an ACME resource is still pending and is not yet ready. - // If an Order is marked 'Pending', the validations for that Order are still in progress. - // This is a transient state. - Pending State = "pending" - - // Processing signifies that an ACME resource is being processed by the server. - // If an Order is marked 'Processing', the validations for that Order are currently being processed. - // This is a transient state. - Processing State = "processing" - - // Invalid signifies that an ACME resource is invalid for some reason. - // If an Order is marked 'invalid', one of its validations be have invalid for some reason. - // This is a final state. - Invalid State = "invalid" - - // Expired signifies that an ACME resource has expired. - // If an Order is marked 'Expired', one of its validations may have expired or the Order itself. - // This is a final state. - Expired State = "expired" - - // Errored signifies that the ACME resource has errored for some reason. - // This is a catch-all state, and is used for marking internal cert-manager - // errors such as validation failures. - // This is a final state. - Errored State = "errored" -) diff --git a/internal/apis/acme/v1alpha2/zz_generated.conversion.go b/internal/apis/acme/v1alpha2/zz_generated.conversion.go deleted file mode 100644 index 22d2d583353..00000000000 --- a/internal/apis/acme/v1alpha2/zz_generated.conversion.go +++ /dev/null @@ -1,1711 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The cert-manager 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 conversion-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - unsafe "unsafe" - - acme "github.com/cert-manager/cert-manager/internal/apis/acme" - meta "github.com/cert-manager/cert-manager/internal/apis/meta" - metav1 "github.com/cert-manager/cert-manager/internal/apis/meta/v1" - apismetav1 "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" - v1 "k8s.io/api/core/v1" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - pkgapismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - apisv1 "sigs.k8s.io/gateway-api/apis/v1" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*ACMEAuthorization)(nil), (*acme.ACMEAuthorization)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEAuthorization_To_acme_ACMEAuthorization(a.(*ACMEAuthorization), b.(*acme.ACMEAuthorization), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEAuthorization)(nil), (*ACMEAuthorization)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEAuthorization_To_v1alpha2_ACMEAuthorization(a.(*acme.ACMEAuthorization), b.(*ACMEAuthorization), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallenge)(nil), (*acme.ACMEChallenge)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEChallenge_To_acme_ACMEChallenge(a.(*ACMEChallenge), b.(*acme.ACMEChallenge), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallenge)(nil), (*ACMEChallenge)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallenge_To_v1alpha2_ACMEChallenge(a.(*acme.ACMEChallenge), b.(*ACMEChallenge), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolver)(nil), (*acme.ACMEChallengeSolver)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEChallengeSolver_To_acme_ACMEChallengeSolver(a.(*ACMEChallengeSolver), b.(*acme.ACMEChallengeSolver), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolver)(nil), (*ACMEChallengeSolver)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolver_To_v1alpha2_ACMEChallengeSolver(a.(*acme.ACMEChallengeSolver), b.(*ACMEChallengeSolver), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverDNS01)(nil), (*acme.ACMEChallengeSolverDNS01)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEChallengeSolverDNS01_To_acme_ACMEChallengeSolverDNS01(a.(*ACMEChallengeSolverDNS01), b.(*acme.ACMEChallengeSolverDNS01), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverDNS01)(nil), (*ACMEChallengeSolverDNS01)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverDNS01_To_v1alpha2_ACMEChallengeSolverDNS01(a.(*acme.ACMEChallengeSolverDNS01), b.(*ACMEChallengeSolverDNS01), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01)(nil), (*acme.ACMEChallengeSolverHTTP01)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEChallengeSolverHTTP01_To_acme_ACMEChallengeSolverHTTP01(a.(*ACMEChallengeSolverHTTP01), b.(*acme.ACMEChallengeSolverHTTP01), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01)(nil), (*ACMEChallengeSolverHTTP01)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01_To_v1alpha2_ACMEChallengeSolverHTTP01(a.(*acme.ACMEChallengeSolverHTTP01), b.(*ACMEChallengeSolverHTTP01), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01GatewayHTTPRoute)(nil), (*acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute(a.(*ACMEChallengeSolverHTTP01GatewayHTTPRoute), b.(*acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute)(nil), (*ACMEChallengeSolverHTTP01GatewayHTTPRoute)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_v1alpha2_ACMEChallengeSolverHTTP01GatewayHTTPRoute(a.(*acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute), b.(*ACMEChallengeSolverHTTP01GatewayHTTPRoute), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01Ingress)(nil), (*acme.ACMEChallengeSolverHTTP01Ingress)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEChallengeSolverHTTP01Ingress_To_acme_ACMEChallengeSolverHTTP01Ingress(a.(*ACMEChallengeSolverHTTP01Ingress), b.(*acme.ACMEChallengeSolverHTTP01Ingress), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01Ingress)(nil), (*ACMEChallengeSolverHTTP01Ingress)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01Ingress_To_v1alpha2_ACMEChallengeSolverHTTP01Ingress(a.(*acme.ACMEChallengeSolverHTTP01Ingress), b.(*ACMEChallengeSolverHTTP01Ingress), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01IngressObjectMeta)(nil), (*acme.ACMEChallengeSolverHTTP01IngressObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEChallengeSolverHTTP01IngressObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressObjectMeta(a.(*ACMEChallengeSolverHTTP01IngressObjectMeta), b.(*acme.ACMEChallengeSolverHTTP01IngressObjectMeta), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01IngressObjectMeta)(nil), (*ACMEChallengeSolverHTTP01IngressObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01IngressObjectMeta_To_v1alpha2_ACMEChallengeSolverHTTP01IngressObjectMeta(a.(*acme.ACMEChallengeSolverHTTP01IngressObjectMeta), b.(*ACMEChallengeSolverHTTP01IngressObjectMeta), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01IngressPodObjectMeta)(nil), (*acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta(a.(*ACMEChallengeSolverHTTP01IngressPodObjectMeta), b.(*acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta)(nil), (*ACMEChallengeSolverHTTP01IngressPodObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_v1alpha2_ACMEChallengeSolverHTTP01IngressPodObjectMeta(a.(*acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta), b.(*ACMEChallengeSolverHTTP01IngressPodObjectMeta), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01IngressPodSpec)(nil), (*acme.ACMEChallengeSolverHTTP01IngressPodSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEChallengeSolverHTTP01IngressPodSpec_To_acme_ACMEChallengeSolverHTTP01IngressPodSpec(a.(*ACMEChallengeSolverHTTP01IngressPodSpec), b.(*acme.ACMEChallengeSolverHTTP01IngressPodSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01IngressPodSpec)(nil), (*ACMEChallengeSolverHTTP01IngressPodSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01IngressPodSpec_To_v1alpha2_ACMEChallengeSolverHTTP01IngressPodSpec(a.(*acme.ACMEChallengeSolverHTTP01IngressPodSpec), b.(*ACMEChallengeSolverHTTP01IngressPodSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01IngressPodTemplate)(nil), (*acme.ACMEChallengeSolverHTTP01IngressPodTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEChallengeSolverHTTP01IngressPodTemplate_To_acme_ACMEChallengeSolverHTTP01IngressPodTemplate(a.(*ACMEChallengeSolverHTTP01IngressPodTemplate), b.(*acme.ACMEChallengeSolverHTTP01IngressPodTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01IngressPodTemplate)(nil), (*ACMEChallengeSolverHTTP01IngressPodTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01IngressPodTemplate_To_v1alpha2_ACMEChallengeSolverHTTP01IngressPodTemplate(a.(*acme.ACMEChallengeSolverHTTP01IngressPodTemplate), b.(*ACMEChallengeSolverHTTP01IngressPodTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01IngressTemplate)(nil), (*acme.ACMEChallengeSolverHTTP01IngressTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEChallengeSolverHTTP01IngressTemplate_To_acme_ACMEChallengeSolverHTTP01IngressTemplate(a.(*ACMEChallengeSolverHTTP01IngressTemplate), b.(*acme.ACMEChallengeSolverHTTP01IngressTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01IngressTemplate)(nil), (*ACMEChallengeSolverHTTP01IngressTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01IngressTemplate_To_v1alpha2_ACMEChallengeSolverHTTP01IngressTemplate(a.(*acme.ACMEChallengeSolverHTTP01IngressTemplate), b.(*ACMEChallengeSolverHTTP01IngressTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEExternalAccountBinding)(nil), (*acme.ACMEExternalAccountBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEExternalAccountBinding_To_acme_ACMEExternalAccountBinding(a.(*ACMEExternalAccountBinding), b.(*acme.ACMEExternalAccountBinding), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEExternalAccountBinding)(nil), (*ACMEExternalAccountBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEExternalAccountBinding_To_v1alpha2_ACMEExternalAccountBinding(a.(*acme.ACMEExternalAccountBinding), b.(*ACMEExternalAccountBinding), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderAcmeDNS)(nil), (*acme.ACMEIssuerDNS01ProviderAcmeDNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEIssuerDNS01ProviderAcmeDNS_To_acme_ACMEIssuerDNS01ProviderAcmeDNS(a.(*ACMEIssuerDNS01ProviderAcmeDNS), b.(*acme.ACMEIssuerDNS01ProviderAcmeDNS), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderAcmeDNS)(nil), (*ACMEIssuerDNS01ProviderAcmeDNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderAcmeDNS_To_v1alpha2_ACMEIssuerDNS01ProviderAcmeDNS(a.(*acme.ACMEIssuerDNS01ProviderAcmeDNS), b.(*ACMEIssuerDNS01ProviderAcmeDNS), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderAkamai)(nil), (*acme.ACMEIssuerDNS01ProviderAkamai)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEIssuerDNS01ProviderAkamai_To_acme_ACMEIssuerDNS01ProviderAkamai(a.(*ACMEIssuerDNS01ProviderAkamai), b.(*acme.ACMEIssuerDNS01ProviderAkamai), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderAkamai)(nil), (*ACMEIssuerDNS01ProviderAkamai)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderAkamai_To_v1alpha2_ACMEIssuerDNS01ProviderAkamai(a.(*acme.ACMEIssuerDNS01ProviderAkamai), b.(*ACMEIssuerDNS01ProviderAkamai), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderAzureDNS)(nil), (*acme.ACMEIssuerDNS01ProviderAzureDNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEIssuerDNS01ProviderAzureDNS_To_acme_ACMEIssuerDNS01ProviderAzureDNS(a.(*ACMEIssuerDNS01ProviderAzureDNS), b.(*acme.ACMEIssuerDNS01ProviderAzureDNS), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderAzureDNS)(nil), (*ACMEIssuerDNS01ProviderAzureDNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderAzureDNS_To_v1alpha2_ACMEIssuerDNS01ProviderAzureDNS(a.(*acme.ACMEIssuerDNS01ProviderAzureDNS), b.(*ACMEIssuerDNS01ProviderAzureDNS), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderCloudDNS)(nil), (*acme.ACMEIssuerDNS01ProviderCloudDNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEIssuerDNS01ProviderCloudDNS_To_acme_ACMEIssuerDNS01ProviderCloudDNS(a.(*ACMEIssuerDNS01ProviderCloudDNS), b.(*acme.ACMEIssuerDNS01ProviderCloudDNS), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderCloudDNS)(nil), (*ACMEIssuerDNS01ProviderCloudDNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderCloudDNS_To_v1alpha2_ACMEIssuerDNS01ProviderCloudDNS(a.(*acme.ACMEIssuerDNS01ProviderCloudDNS), b.(*ACMEIssuerDNS01ProviderCloudDNS), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderCloudflare)(nil), (*acme.ACMEIssuerDNS01ProviderCloudflare)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEIssuerDNS01ProviderCloudflare_To_acme_ACMEIssuerDNS01ProviderCloudflare(a.(*ACMEIssuerDNS01ProviderCloudflare), b.(*acme.ACMEIssuerDNS01ProviderCloudflare), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderCloudflare)(nil), (*ACMEIssuerDNS01ProviderCloudflare)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderCloudflare_To_v1alpha2_ACMEIssuerDNS01ProviderCloudflare(a.(*acme.ACMEIssuerDNS01ProviderCloudflare), b.(*ACMEIssuerDNS01ProviderCloudflare), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderDigitalOcean)(nil), (*acme.ACMEIssuerDNS01ProviderDigitalOcean)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEIssuerDNS01ProviderDigitalOcean_To_acme_ACMEIssuerDNS01ProviderDigitalOcean(a.(*ACMEIssuerDNS01ProviderDigitalOcean), b.(*acme.ACMEIssuerDNS01ProviderDigitalOcean), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderDigitalOcean)(nil), (*ACMEIssuerDNS01ProviderDigitalOcean)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderDigitalOcean_To_v1alpha2_ACMEIssuerDNS01ProviderDigitalOcean(a.(*acme.ACMEIssuerDNS01ProviderDigitalOcean), b.(*ACMEIssuerDNS01ProviderDigitalOcean), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderRFC2136)(nil), (*acme.ACMEIssuerDNS01ProviderRFC2136)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEIssuerDNS01ProviderRFC2136_To_acme_ACMEIssuerDNS01ProviderRFC2136(a.(*ACMEIssuerDNS01ProviderRFC2136), b.(*acme.ACMEIssuerDNS01ProviderRFC2136), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderRFC2136)(nil), (*ACMEIssuerDNS01ProviderRFC2136)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderRFC2136_To_v1alpha2_ACMEIssuerDNS01ProviderRFC2136(a.(*acme.ACMEIssuerDNS01ProviderRFC2136), b.(*ACMEIssuerDNS01ProviderRFC2136), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderRoute53)(nil), (*acme.ACMEIssuerDNS01ProviderRoute53)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEIssuerDNS01ProviderRoute53_To_acme_ACMEIssuerDNS01ProviderRoute53(a.(*ACMEIssuerDNS01ProviderRoute53), b.(*acme.ACMEIssuerDNS01ProviderRoute53), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderRoute53)(nil), (*ACMEIssuerDNS01ProviderRoute53)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderRoute53_To_v1alpha2_ACMEIssuerDNS01ProviderRoute53(a.(*acme.ACMEIssuerDNS01ProviderRoute53), b.(*ACMEIssuerDNS01ProviderRoute53), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderWebhook)(nil), (*acme.ACMEIssuerDNS01ProviderWebhook)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEIssuerDNS01ProviderWebhook_To_acme_ACMEIssuerDNS01ProviderWebhook(a.(*ACMEIssuerDNS01ProviderWebhook), b.(*acme.ACMEIssuerDNS01ProviderWebhook), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderWebhook)(nil), (*ACMEIssuerDNS01ProviderWebhook)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderWebhook_To_v1alpha2_ACMEIssuerDNS01ProviderWebhook(a.(*acme.ACMEIssuerDNS01ProviderWebhook), b.(*ACMEIssuerDNS01ProviderWebhook), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerStatus)(nil), (*acme.ACMEIssuerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEIssuerStatus_To_acme_ACMEIssuerStatus(a.(*ACMEIssuerStatus), b.(*acme.ACMEIssuerStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerStatus)(nil), (*ACMEIssuerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerStatus_To_v1alpha2_ACMEIssuerStatus(a.(*acme.ACMEIssuerStatus), b.(*ACMEIssuerStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedIdentity)(nil), (*acme.AzureManagedIdentity)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_AzureManagedIdentity_To_acme_AzureManagedIdentity(a.(*AzureManagedIdentity), b.(*acme.AzureManagedIdentity), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.AzureManagedIdentity)(nil), (*AzureManagedIdentity)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_AzureManagedIdentity_To_v1alpha2_AzureManagedIdentity(a.(*acme.AzureManagedIdentity), b.(*AzureManagedIdentity), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateDNSNameSelector)(nil), (*acme.CertificateDNSNameSelector)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_CertificateDNSNameSelector_To_acme_CertificateDNSNameSelector(a.(*CertificateDNSNameSelector), b.(*acme.CertificateDNSNameSelector), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.CertificateDNSNameSelector)(nil), (*CertificateDNSNameSelector)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_CertificateDNSNameSelector_To_v1alpha2_CertificateDNSNameSelector(a.(*acme.CertificateDNSNameSelector), b.(*CertificateDNSNameSelector), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Challenge)(nil), (*acme.Challenge)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_Challenge_To_acme_Challenge(a.(*Challenge), b.(*acme.Challenge), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.Challenge)(nil), (*Challenge)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_Challenge_To_v1alpha2_Challenge(a.(*acme.Challenge), b.(*Challenge), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ChallengeList)(nil), (*acme.ChallengeList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ChallengeList_To_acme_ChallengeList(a.(*ChallengeList), b.(*acme.ChallengeList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ChallengeList)(nil), (*ChallengeList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ChallengeList_To_v1alpha2_ChallengeList(a.(*acme.ChallengeList), b.(*ChallengeList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ChallengeStatus)(nil), (*acme.ChallengeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ChallengeStatus_To_acme_ChallengeStatus(a.(*ChallengeStatus), b.(*acme.ChallengeStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ChallengeStatus)(nil), (*ChallengeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ChallengeStatus_To_v1alpha2_ChallengeStatus(a.(*acme.ChallengeStatus), b.(*ChallengeStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Order)(nil), (*acme.Order)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_Order_To_acme_Order(a.(*Order), b.(*acme.Order), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.Order)(nil), (*Order)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_Order_To_v1alpha2_Order(a.(*acme.Order), b.(*Order), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OrderList)(nil), (*acme.OrderList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_OrderList_To_acme_OrderList(a.(*OrderList), b.(*acme.OrderList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.OrderList)(nil), (*OrderList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_OrderList_To_v1alpha2_OrderList(a.(*acme.OrderList), b.(*OrderList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OrderStatus)(nil), (*acme.OrderStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_OrderStatus_To_acme_OrderStatus(a.(*OrderStatus), b.(*acme.OrderStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.OrderStatus)(nil), (*OrderStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_OrderStatus_To_v1alpha2_OrderStatus(a.(*acme.OrderStatus), b.(*OrderStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Route53Auth)(nil), (*acme.Route53Auth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_Route53Auth_To_acme_Route53Auth(a.(*Route53Auth), b.(*acme.Route53Auth), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.Route53Auth)(nil), (*Route53Auth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_Route53Auth_To_v1alpha2_Route53Auth(a.(*acme.Route53Auth), b.(*Route53Auth), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Route53KubernetesAuth)(nil), (*acme.Route53KubernetesAuth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_Route53KubernetesAuth_To_acme_Route53KubernetesAuth(a.(*Route53KubernetesAuth), b.(*acme.Route53KubernetesAuth), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.Route53KubernetesAuth)(nil), (*Route53KubernetesAuth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_Route53KubernetesAuth_To_v1alpha2_Route53KubernetesAuth(a.(*acme.Route53KubernetesAuth), b.(*Route53KubernetesAuth), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ServiceAccountRef)(nil), (*acme.ServiceAccountRef)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ServiceAccountRef_To_acme_ServiceAccountRef(a.(*ServiceAccountRef), b.(*acme.ServiceAccountRef), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ServiceAccountRef)(nil), (*ServiceAccountRef)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ServiceAccountRef_To_v1alpha2_ServiceAccountRef(a.(*acme.ServiceAccountRef), b.(*ServiceAccountRef), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*acme.ACMEIssuer)(nil), (*ACMEIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuer_To_v1alpha2_ACMEIssuer(a.(*acme.ACMEIssuer), b.(*ACMEIssuer), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*acme.ChallengeSpec)(nil), (*ChallengeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ChallengeSpec_To_v1alpha2_ChallengeSpec(a.(*acme.ChallengeSpec), b.(*ChallengeSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*acme.OrderSpec)(nil), (*OrderSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_OrderSpec_To_v1alpha2_OrderSpec(a.(*acme.OrderSpec), b.(*OrderSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*ACMEIssuer)(nil), (*acme.ACMEIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ACMEIssuer_To_acme_ACMEIssuer(a.(*ACMEIssuer), b.(*acme.ACMEIssuer), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*ChallengeSpec)(nil), (*acme.ChallengeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ChallengeSpec_To_acme_ChallengeSpec(a.(*ChallengeSpec), b.(*acme.ChallengeSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*OrderSpec)(nil), (*acme.OrderSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_OrderSpec_To_acme_OrderSpec(a.(*OrderSpec), b.(*acme.OrderSpec), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha2_ACMEAuthorization_To_acme_ACMEAuthorization(in *ACMEAuthorization, out *acme.ACMEAuthorization, s conversion.Scope) error { - out.URL = in.URL - out.Identifier = in.Identifier - out.Wildcard = (*bool)(unsafe.Pointer(in.Wildcard)) - out.InitialState = acme.State(in.InitialState) - out.Challenges = *(*[]acme.ACMEChallenge)(unsafe.Pointer(&in.Challenges)) - return nil -} - -// Convert_v1alpha2_ACMEAuthorization_To_acme_ACMEAuthorization is an autogenerated conversion function. -func Convert_v1alpha2_ACMEAuthorization_To_acme_ACMEAuthorization(in *ACMEAuthorization, out *acme.ACMEAuthorization, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEAuthorization_To_acme_ACMEAuthorization(in, out, s) -} - -func autoConvert_acme_ACMEAuthorization_To_v1alpha2_ACMEAuthorization(in *acme.ACMEAuthorization, out *ACMEAuthorization, s conversion.Scope) error { - out.URL = in.URL - out.Identifier = in.Identifier - out.Wildcard = (*bool)(unsafe.Pointer(in.Wildcard)) - out.InitialState = State(in.InitialState) - out.Challenges = *(*[]ACMEChallenge)(unsafe.Pointer(&in.Challenges)) - return nil -} - -// Convert_acme_ACMEAuthorization_To_v1alpha2_ACMEAuthorization is an autogenerated conversion function. -func Convert_acme_ACMEAuthorization_To_v1alpha2_ACMEAuthorization(in *acme.ACMEAuthorization, out *ACMEAuthorization, s conversion.Scope) error { - return autoConvert_acme_ACMEAuthorization_To_v1alpha2_ACMEAuthorization(in, out, s) -} - -func autoConvert_v1alpha2_ACMEChallenge_To_acme_ACMEChallenge(in *ACMEChallenge, out *acme.ACMEChallenge, s conversion.Scope) error { - out.URL = in.URL - out.Token = in.Token - out.Type = in.Type - return nil -} - -// Convert_v1alpha2_ACMEChallenge_To_acme_ACMEChallenge is an autogenerated conversion function. -func Convert_v1alpha2_ACMEChallenge_To_acme_ACMEChallenge(in *ACMEChallenge, out *acme.ACMEChallenge, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEChallenge_To_acme_ACMEChallenge(in, out, s) -} - -func autoConvert_acme_ACMEChallenge_To_v1alpha2_ACMEChallenge(in *acme.ACMEChallenge, out *ACMEChallenge, s conversion.Scope) error { - out.URL = in.URL - out.Token = in.Token - out.Type = in.Type - return nil -} - -// Convert_acme_ACMEChallenge_To_v1alpha2_ACMEChallenge is an autogenerated conversion function. -func Convert_acme_ACMEChallenge_To_v1alpha2_ACMEChallenge(in *acme.ACMEChallenge, out *ACMEChallenge, s conversion.Scope) error { - return autoConvert_acme_ACMEChallenge_To_v1alpha2_ACMEChallenge(in, out, s) -} - -func autoConvert_v1alpha2_ACMEChallengeSolver_To_acme_ACMEChallengeSolver(in *ACMEChallengeSolver, out *acme.ACMEChallengeSolver, s conversion.Scope) error { - out.Selector = (*acme.CertificateDNSNameSelector)(unsafe.Pointer(in.Selector)) - out.HTTP01 = (*acme.ACMEChallengeSolverHTTP01)(unsafe.Pointer(in.HTTP01)) - if in.DNS01 != nil { - in, out := &in.DNS01, &out.DNS01 - *out = new(acme.ACMEChallengeSolverDNS01) - if err := Convert_v1alpha2_ACMEChallengeSolverDNS01_To_acme_ACMEChallengeSolverDNS01(*in, *out, s); err != nil { - return err - } - } else { - out.DNS01 = nil - } - return nil -} - -// Convert_v1alpha2_ACMEChallengeSolver_To_acme_ACMEChallengeSolver is an autogenerated conversion function. -func Convert_v1alpha2_ACMEChallengeSolver_To_acme_ACMEChallengeSolver(in *ACMEChallengeSolver, out *acme.ACMEChallengeSolver, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEChallengeSolver_To_acme_ACMEChallengeSolver(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolver_To_v1alpha2_ACMEChallengeSolver(in *acme.ACMEChallengeSolver, out *ACMEChallengeSolver, s conversion.Scope) error { - out.Selector = (*CertificateDNSNameSelector)(unsafe.Pointer(in.Selector)) - out.HTTP01 = (*ACMEChallengeSolverHTTP01)(unsafe.Pointer(in.HTTP01)) - if in.DNS01 != nil { - in, out := &in.DNS01, &out.DNS01 - *out = new(ACMEChallengeSolverDNS01) - if err := Convert_acme_ACMEChallengeSolverDNS01_To_v1alpha2_ACMEChallengeSolverDNS01(*in, *out, s); err != nil { - return err - } - } else { - out.DNS01 = nil - } - return nil -} - -// Convert_acme_ACMEChallengeSolver_To_v1alpha2_ACMEChallengeSolver is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolver_To_v1alpha2_ACMEChallengeSolver(in *acme.ACMEChallengeSolver, out *ACMEChallengeSolver, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolver_To_v1alpha2_ACMEChallengeSolver(in, out, s) -} - -func autoConvert_v1alpha2_ACMEChallengeSolverDNS01_To_acme_ACMEChallengeSolverDNS01(in *ACMEChallengeSolverDNS01, out *acme.ACMEChallengeSolverDNS01, s conversion.Scope) error { - out.CNAMEStrategy = acme.CNAMEStrategy(in.CNAMEStrategy) - if in.Akamai != nil { - in, out := &in.Akamai, &out.Akamai - *out = new(acme.ACMEIssuerDNS01ProviderAkamai) - if err := Convert_v1alpha2_ACMEIssuerDNS01ProviderAkamai_To_acme_ACMEIssuerDNS01ProviderAkamai(*in, *out, s); err != nil { - return err - } - } else { - out.Akamai = nil - } - if in.CloudDNS != nil { - in, out := &in.CloudDNS, &out.CloudDNS - *out = new(acme.ACMEIssuerDNS01ProviderCloudDNS) - if err := Convert_v1alpha2_ACMEIssuerDNS01ProviderCloudDNS_To_acme_ACMEIssuerDNS01ProviderCloudDNS(*in, *out, s); err != nil { - return err - } - } else { - out.CloudDNS = nil - } - if in.Cloudflare != nil { - in, out := &in.Cloudflare, &out.Cloudflare - *out = new(acme.ACMEIssuerDNS01ProviderCloudflare) - if err := Convert_v1alpha2_ACMEIssuerDNS01ProviderCloudflare_To_acme_ACMEIssuerDNS01ProviderCloudflare(*in, *out, s); err != nil { - return err - } - } else { - out.Cloudflare = nil - } - if in.Route53 != nil { - in, out := &in.Route53, &out.Route53 - *out = new(acme.ACMEIssuerDNS01ProviderRoute53) - if err := Convert_v1alpha2_ACMEIssuerDNS01ProviderRoute53_To_acme_ACMEIssuerDNS01ProviderRoute53(*in, *out, s); err != nil { - return err - } - } else { - out.Route53 = nil - } - if in.AzureDNS != nil { - in, out := &in.AzureDNS, &out.AzureDNS - *out = new(acme.ACMEIssuerDNS01ProviderAzureDNS) - if err := Convert_v1alpha2_ACMEIssuerDNS01ProviderAzureDNS_To_acme_ACMEIssuerDNS01ProviderAzureDNS(*in, *out, s); err != nil { - return err - } - } else { - out.AzureDNS = nil - } - if in.DigitalOcean != nil { - in, out := &in.DigitalOcean, &out.DigitalOcean - *out = new(acme.ACMEIssuerDNS01ProviderDigitalOcean) - if err := Convert_v1alpha2_ACMEIssuerDNS01ProviderDigitalOcean_To_acme_ACMEIssuerDNS01ProviderDigitalOcean(*in, *out, s); err != nil { - return err - } - } else { - out.DigitalOcean = nil - } - if in.AcmeDNS != nil { - in, out := &in.AcmeDNS, &out.AcmeDNS - *out = new(acme.ACMEIssuerDNS01ProviderAcmeDNS) - if err := Convert_v1alpha2_ACMEIssuerDNS01ProviderAcmeDNS_To_acme_ACMEIssuerDNS01ProviderAcmeDNS(*in, *out, s); err != nil { - return err - } - } else { - out.AcmeDNS = nil - } - if in.RFC2136 != nil { - in, out := &in.RFC2136, &out.RFC2136 - *out = new(acme.ACMEIssuerDNS01ProviderRFC2136) - if err := Convert_v1alpha2_ACMEIssuerDNS01ProviderRFC2136_To_acme_ACMEIssuerDNS01ProviderRFC2136(*in, *out, s); err != nil { - return err - } - } else { - out.RFC2136 = nil - } - out.Webhook = (*acme.ACMEIssuerDNS01ProviderWebhook)(unsafe.Pointer(in.Webhook)) - return nil -} - -// Convert_v1alpha2_ACMEChallengeSolverDNS01_To_acme_ACMEChallengeSolverDNS01 is an autogenerated conversion function. -func Convert_v1alpha2_ACMEChallengeSolverDNS01_To_acme_ACMEChallengeSolverDNS01(in *ACMEChallengeSolverDNS01, out *acme.ACMEChallengeSolverDNS01, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEChallengeSolverDNS01_To_acme_ACMEChallengeSolverDNS01(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverDNS01_To_v1alpha2_ACMEChallengeSolverDNS01(in *acme.ACMEChallengeSolverDNS01, out *ACMEChallengeSolverDNS01, s conversion.Scope) error { - out.CNAMEStrategy = CNAMEStrategy(in.CNAMEStrategy) - if in.Akamai != nil { - in, out := &in.Akamai, &out.Akamai - *out = new(ACMEIssuerDNS01ProviderAkamai) - if err := Convert_acme_ACMEIssuerDNS01ProviderAkamai_To_v1alpha2_ACMEIssuerDNS01ProviderAkamai(*in, *out, s); err != nil { - return err - } - } else { - out.Akamai = nil - } - if in.CloudDNS != nil { - in, out := &in.CloudDNS, &out.CloudDNS - *out = new(ACMEIssuerDNS01ProviderCloudDNS) - if err := Convert_acme_ACMEIssuerDNS01ProviderCloudDNS_To_v1alpha2_ACMEIssuerDNS01ProviderCloudDNS(*in, *out, s); err != nil { - return err - } - } else { - out.CloudDNS = nil - } - if in.Cloudflare != nil { - in, out := &in.Cloudflare, &out.Cloudflare - *out = new(ACMEIssuerDNS01ProviderCloudflare) - if err := Convert_acme_ACMEIssuerDNS01ProviderCloudflare_To_v1alpha2_ACMEIssuerDNS01ProviderCloudflare(*in, *out, s); err != nil { - return err - } - } else { - out.Cloudflare = nil - } - if in.Route53 != nil { - in, out := &in.Route53, &out.Route53 - *out = new(ACMEIssuerDNS01ProviderRoute53) - if err := Convert_acme_ACMEIssuerDNS01ProviderRoute53_To_v1alpha2_ACMEIssuerDNS01ProviderRoute53(*in, *out, s); err != nil { - return err - } - } else { - out.Route53 = nil - } - if in.AzureDNS != nil { - in, out := &in.AzureDNS, &out.AzureDNS - *out = new(ACMEIssuerDNS01ProviderAzureDNS) - if err := Convert_acme_ACMEIssuerDNS01ProviderAzureDNS_To_v1alpha2_ACMEIssuerDNS01ProviderAzureDNS(*in, *out, s); err != nil { - return err - } - } else { - out.AzureDNS = nil - } - if in.DigitalOcean != nil { - in, out := &in.DigitalOcean, &out.DigitalOcean - *out = new(ACMEIssuerDNS01ProviderDigitalOcean) - if err := Convert_acme_ACMEIssuerDNS01ProviderDigitalOcean_To_v1alpha2_ACMEIssuerDNS01ProviderDigitalOcean(*in, *out, s); err != nil { - return err - } - } else { - out.DigitalOcean = nil - } - if in.AcmeDNS != nil { - in, out := &in.AcmeDNS, &out.AcmeDNS - *out = new(ACMEIssuerDNS01ProviderAcmeDNS) - if err := Convert_acme_ACMEIssuerDNS01ProviderAcmeDNS_To_v1alpha2_ACMEIssuerDNS01ProviderAcmeDNS(*in, *out, s); err != nil { - return err - } - } else { - out.AcmeDNS = nil - } - if in.RFC2136 != nil { - in, out := &in.RFC2136, &out.RFC2136 - *out = new(ACMEIssuerDNS01ProviderRFC2136) - if err := Convert_acme_ACMEIssuerDNS01ProviderRFC2136_To_v1alpha2_ACMEIssuerDNS01ProviderRFC2136(*in, *out, s); err != nil { - return err - } - } else { - out.RFC2136 = nil - } - out.Webhook = (*ACMEIssuerDNS01ProviderWebhook)(unsafe.Pointer(in.Webhook)) - return nil -} - -// Convert_acme_ACMEChallengeSolverDNS01_To_v1alpha2_ACMEChallengeSolverDNS01 is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverDNS01_To_v1alpha2_ACMEChallengeSolverDNS01(in *acme.ACMEChallengeSolverDNS01, out *ACMEChallengeSolverDNS01, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverDNS01_To_v1alpha2_ACMEChallengeSolverDNS01(in, out, s) -} - -func autoConvert_v1alpha2_ACMEChallengeSolverHTTP01_To_acme_ACMEChallengeSolverHTTP01(in *ACMEChallengeSolverHTTP01, out *acme.ACMEChallengeSolverHTTP01, s conversion.Scope) error { - out.Ingress = (*acme.ACMEChallengeSolverHTTP01Ingress)(unsafe.Pointer(in.Ingress)) - out.GatewayHTTPRoute = (*acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute)(unsafe.Pointer(in.GatewayHTTPRoute)) - return nil -} - -// Convert_v1alpha2_ACMEChallengeSolverHTTP01_To_acme_ACMEChallengeSolverHTTP01 is an autogenerated conversion function. -func Convert_v1alpha2_ACMEChallengeSolverHTTP01_To_acme_ACMEChallengeSolverHTTP01(in *ACMEChallengeSolverHTTP01, out *acme.ACMEChallengeSolverHTTP01, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEChallengeSolverHTTP01_To_acme_ACMEChallengeSolverHTTP01(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01_To_v1alpha2_ACMEChallengeSolverHTTP01(in *acme.ACMEChallengeSolverHTTP01, out *ACMEChallengeSolverHTTP01, s conversion.Scope) error { - out.Ingress = (*ACMEChallengeSolverHTTP01Ingress)(unsafe.Pointer(in.Ingress)) - out.GatewayHTTPRoute = (*ACMEChallengeSolverHTTP01GatewayHTTPRoute)(unsafe.Pointer(in.GatewayHTTPRoute)) - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01_To_v1alpha2_ACMEChallengeSolverHTTP01 is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01_To_v1alpha2_ACMEChallengeSolverHTTP01(in *acme.ACMEChallengeSolverHTTP01, out *ACMEChallengeSolverHTTP01, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01_To_v1alpha2_ACMEChallengeSolverHTTP01(in, out, s) -} - -func autoConvert_v1alpha2_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute(in *ACMEChallengeSolverHTTP01GatewayHTTPRoute, out *acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute, s conversion.Scope) error { - out.ServiceType = v1.ServiceType(in.ServiceType) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - out.ParentRefs = *(*[]apisv1.ParentReference)(unsafe.Pointer(&in.ParentRefs)) - return nil -} - -// Convert_v1alpha2_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute is an autogenerated conversion function. -func Convert_v1alpha2_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute(in *ACMEChallengeSolverHTTP01GatewayHTTPRoute, out *acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_v1alpha2_ACMEChallengeSolverHTTP01GatewayHTTPRoute(in *acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute, out *ACMEChallengeSolverHTTP01GatewayHTTPRoute, s conversion.Scope) error { - out.ServiceType = v1.ServiceType(in.ServiceType) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - out.ParentRefs = *(*[]apisv1.ParentReference)(unsafe.Pointer(&in.ParentRefs)) - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_v1alpha2_ACMEChallengeSolverHTTP01GatewayHTTPRoute is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_v1alpha2_ACMEChallengeSolverHTTP01GatewayHTTPRoute(in *acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute, out *ACMEChallengeSolverHTTP01GatewayHTTPRoute, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_v1alpha2_ACMEChallengeSolverHTTP01GatewayHTTPRoute(in, out, s) -} - -func autoConvert_v1alpha2_ACMEChallengeSolverHTTP01Ingress_To_acme_ACMEChallengeSolverHTTP01Ingress(in *ACMEChallengeSolverHTTP01Ingress, out *acme.ACMEChallengeSolverHTTP01Ingress, s conversion.Scope) error { - out.ServiceType = v1.ServiceType(in.ServiceType) - out.IngressClassName = (*string)(unsafe.Pointer(in.IngressClassName)) - out.Class = (*string)(unsafe.Pointer(in.Class)) - out.Name = in.Name - out.PodTemplate = (*acme.ACMEChallengeSolverHTTP01IngressPodTemplate)(unsafe.Pointer(in.PodTemplate)) - out.IngressTemplate = (*acme.ACMEChallengeSolverHTTP01IngressTemplate)(unsafe.Pointer(in.IngressTemplate)) - return nil -} - -// Convert_v1alpha2_ACMEChallengeSolverHTTP01Ingress_To_acme_ACMEChallengeSolverHTTP01Ingress is an autogenerated conversion function. -func Convert_v1alpha2_ACMEChallengeSolverHTTP01Ingress_To_acme_ACMEChallengeSolverHTTP01Ingress(in *ACMEChallengeSolverHTTP01Ingress, out *acme.ACMEChallengeSolverHTTP01Ingress, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEChallengeSolverHTTP01Ingress_To_acme_ACMEChallengeSolverHTTP01Ingress(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01Ingress_To_v1alpha2_ACMEChallengeSolverHTTP01Ingress(in *acme.ACMEChallengeSolverHTTP01Ingress, out *ACMEChallengeSolverHTTP01Ingress, s conversion.Scope) error { - out.ServiceType = v1.ServiceType(in.ServiceType) - out.IngressClassName = (*string)(unsafe.Pointer(in.IngressClassName)) - out.Class = (*string)(unsafe.Pointer(in.Class)) - out.Name = in.Name - out.PodTemplate = (*ACMEChallengeSolverHTTP01IngressPodTemplate)(unsafe.Pointer(in.PodTemplate)) - out.IngressTemplate = (*ACMEChallengeSolverHTTP01IngressTemplate)(unsafe.Pointer(in.IngressTemplate)) - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01Ingress_To_v1alpha2_ACMEChallengeSolverHTTP01Ingress is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01Ingress_To_v1alpha2_ACMEChallengeSolverHTTP01Ingress(in *acme.ACMEChallengeSolverHTTP01Ingress, out *ACMEChallengeSolverHTTP01Ingress, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01Ingress_To_v1alpha2_ACMEChallengeSolverHTTP01Ingress(in, out, s) -} - -func autoConvert_v1alpha2_ACMEChallengeSolverHTTP01IngressObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressObjectMeta(in *ACMEChallengeSolverHTTP01IngressObjectMeta, out *acme.ACMEChallengeSolverHTTP01IngressObjectMeta, s conversion.Scope) error { - out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - return nil -} - -// Convert_v1alpha2_ACMEChallengeSolverHTTP01IngressObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressObjectMeta is an autogenerated conversion function. -func Convert_v1alpha2_ACMEChallengeSolverHTTP01IngressObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressObjectMeta(in *ACMEChallengeSolverHTTP01IngressObjectMeta, out *acme.ACMEChallengeSolverHTTP01IngressObjectMeta, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEChallengeSolverHTTP01IngressObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressObjectMeta(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01IngressObjectMeta_To_v1alpha2_ACMEChallengeSolverHTTP01IngressObjectMeta(in *acme.ACMEChallengeSolverHTTP01IngressObjectMeta, out *ACMEChallengeSolverHTTP01IngressObjectMeta, s conversion.Scope) error { - out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01IngressObjectMeta_To_v1alpha2_ACMEChallengeSolverHTTP01IngressObjectMeta is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01IngressObjectMeta_To_v1alpha2_ACMEChallengeSolverHTTP01IngressObjectMeta(in *acme.ACMEChallengeSolverHTTP01IngressObjectMeta, out *ACMEChallengeSolverHTTP01IngressObjectMeta, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01IngressObjectMeta_To_v1alpha2_ACMEChallengeSolverHTTP01IngressObjectMeta(in, out, s) -} - -func autoConvert_v1alpha2_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta(in *ACMEChallengeSolverHTTP01IngressPodObjectMeta, out *acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta, s conversion.Scope) error { - out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - return nil -} - -// Convert_v1alpha2_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta is an autogenerated conversion function. -func Convert_v1alpha2_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta(in *ACMEChallengeSolverHTTP01IngressPodObjectMeta, out *acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_v1alpha2_ACMEChallengeSolverHTTP01IngressPodObjectMeta(in *acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta, out *ACMEChallengeSolverHTTP01IngressPodObjectMeta, s conversion.Scope) error { - out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_v1alpha2_ACMEChallengeSolverHTTP01IngressPodObjectMeta is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_v1alpha2_ACMEChallengeSolverHTTP01IngressPodObjectMeta(in *acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta, out *ACMEChallengeSolverHTTP01IngressPodObjectMeta, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_v1alpha2_ACMEChallengeSolverHTTP01IngressPodObjectMeta(in, out, s) -} - -func autoConvert_v1alpha2_ACMEChallengeSolverHTTP01IngressPodSpec_To_acme_ACMEChallengeSolverHTTP01IngressPodSpec(in *ACMEChallengeSolverHTTP01IngressPodSpec, out *acme.ACMEChallengeSolverHTTP01IngressPodSpec, s conversion.Scope) error { - out.NodeSelector = *(*map[string]string)(unsafe.Pointer(&in.NodeSelector)) - out.Affinity = (*v1.Affinity)(unsafe.Pointer(in.Affinity)) - out.Tolerations = *(*[]v1.Toleration)(unsafe.Pointer(&in.Tolerations)) - out.PriorityClassName = in.PriorityClassName - out.ServiceAccountName = in.ServiceAccountName - out.ImagePullSecrets = *(*[]v1.LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets)) - return nil -} - -// Convert_v1alpha2_ACMEChallengeSolverHTTP01IngressPodSpec_To_acme_ACMEChallengeSolverHTTP01IngressPodSpec is an autogenerated conversion function. -func Convert_v1alpha2_ACMEChallengeSolverHTTP01IngressPodSpec_To_acme_ACMEChallengeSolverHTTP01IngressPodSpec(in *ACMEChallengeSolverHTTP01IngressPodSpec, out *acme.ACMEChallengeSolverHTTP01IngressPodSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEChallengeSolverHTTP01IngressPodSpec_To_acme_ACMEChallengeSolverHTTP01IngressPodSpec(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01IngressPodSpec_To_v1alpha2_ACMEChallengeSolverHTTP01IngressPodSpec(in *acme.ACMEChallengeSolverHTTP01IngressPodSpec, out *ACMEChallengeSolverHTTP01IngressPodSpec, s conversion.Scope) error { - out.NodeSelector = *(*map[string]string)(unsafe.Pointer(&in.NodeSelector)) - out.Affinity = (*v1.Affinity)(unsafe.Pointer(in.Affinity)) - out.Tolerations = *(*[]v1.Toleration)(unsafe.Pointer(&in.Tolerations)) - out.PriorityClassName = in.PriorityClassName - out.ServiceAccountName = in.ServiceAccountName - out.ImagePullSecrets = *(*[]v1.LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets)) - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01IngressPodSpec_To_v1alpha2_ACMEChallengeSolverHTTP01IngressPodSpec is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01IngressPodSpec_To_v1alpha2_ACMEChallengeSolverHTTP01IngressPodSpec(in *acme.ACMEChallengeSolverHTTP01IngressPodSpec, out *ACMEChallengeSolverHTTP01IngressPodSpec, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01IngressPodSpec_To_v1alpha2_ACMEChallengeSolverHTTP01IngressPodSpec(in, out, s) -} - -func autoConvert_v1alpha2_ACMEChallengeSolverHTTP01IngressPodTemplate_To_acme_ACMEChallengeSolverHTTP01IngressPodTemplate(in *ACMEChallengeSolverHTTP01IngressPodTemplate, out *acme.ACMEChallengeSolverHTTP01IngressPodTemplate, s conversion.Scope) error { - if err := Convert_v1alpha2_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta(&in.ACMEChallengeSolverHTTP01IngressPodObjectMeta, &out.ACMEChallengeSolverHTTP01IngressPodObjectMeta, s); err != nil { - return err - } - if err := Convert_v1alpha2_ACMEChallengeSolverHTTP01IngressPodSpec_To_acme_ACMEChallengeSolverHTTP01IngressPodSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_ACMEChallengeSolverHTTP01IngressPodTemplate_To_acme_ACMEChallengeSolverHTTP01IngressPodTemplate is an autogenerated conversion function. -func Convert_v1alpha2_ACMEChallengeSolverHTTP01IngressPodTemplate_To_acme_ACMEChallengeSolverHTTP01IngressPodTemplate(in *ACMEChallengeSolverHTTP01IngressPodTemplate, out *acme.ACMEChallengeSolverHTTP01IngressPodTemplate, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEChallengeSolverHTTP01IngressPodTemplate_To_acme_ACMEChallengeSolverHTTP01IngressPodTemplate(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01IngressPodTemplate_To_v1alpha2_ACMEChallengeSolverHTTP01IngressPodTemplate(in *acme.ACMEChallengeSolverHTTP01IngressPodTemplate, out *ACMEChallengeSolverHTTP01IngressPodTemplate, s conversion.Scope) error { - if err := Convert_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_v1alpha2_ACMEChallengeSolverHTTP01IngressPodObjectMeta(&in.ACMEChallengeSolverHTTP01IngressPodObjectMeta, &out.ACMEChallengeSolverHTTP01IngressPodObjectMeta, s); err != nil { - return err - } - if err := Convert_acme_ACMEChallengeSolverHTTP01IngressPodSpec_To_v1alpha2_ACMEChallengeSolverHTTP01IngressPodSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01IngressPodTemplate_To_v1alpha2_ACMEChallengeSolverHTTP01IngressPodTemplate is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01IngressPodTemplate_To_v1alpha2_ACMEChallengeSolverHTTP01IngressPodTemplate(in *acme.ACMEChallengeSolverHTTP01IngressPodTemplate, out *ACMEChallengeSolverHTTP01IngressPodTemplate, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01IngressPodTemplate_To_v1alpha2_ACMEChallengeSolverHTTP01IngressPodTemplate(in, out, s) -} - -func autoConvert_v1alpha2_ACMEChallengeSolverHTTP01IngressTemplate_To_acme_ACMEChallengeSolverHTTP01IngressTemplate(in *ACMEChallengeSolverHTTP01IngressTemplate, out *acme.ACMEChallengeSolverHTTP01IngressTemplate, s conversion.Scope) error { - if err := Convert_v1alpha2_ACMEChallengeSolverHTTP01IngressObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressObjectMeta(&in.ACMEChallengeSolverHTTP01IngressObjectMeta, &out.ACMEChallengeSolverHTTP01IngressObjectMeta, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_ACMEChallengeSolverHTTP01IngressTemplate_To_acme_ACMEChallengeSolverHTTP01IngressTemplate is an autogenerated conversion function. -func Convert_v1alpha2_ACMEChallengeSolverHTTP01IngressTemplate_To_acme_ACMEChallengeSolverHTTP01IngressTemplate(in *ACMEChallengeSolverHTTP01IngressTemplate, out *acme.ACMEChallengeSolverHTTP01IngressTemplate, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEChallengeSolverHTTP01IngressTemplate_To_acme_ACMEChallengeSolverHTTP01IngressTemplate(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01IngressTemplate_To_v1alpha2_ACMEChallengeSolverHTTP01IngressTemplate(in *acme.ACMEChallengeSolverHTTP01IngressTemplate, out *ACMEChallengeSolverHTTP01IngressTemplate, s conversion.Scope) error { - if err := Convert_acme_ACMEChallengeSolverHTTP01IngressObjectMeta_To_v1alpha2_ACMEChallengeSolverHTTP01IngressObjectMeta(&in.ACMEChallengeSolverHTTP01IngressObjectMeta, &out.ACMEChallengeSolverHTTP01IngressObjectMeta, s); err != nil { - return err - } - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01IngressTemplate_To_v1alpha2_ACMEChallengeSolverHTTP01IngressTemplate is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01IngressTemplate_To_v1alpha2_ACMEChallengeSolverHTTP01IngressTemplate(in *acme.ACMEChallengeSolverHTTP01IngressTemplate, out *ACMEChallengeSolverHTTP01IngressTemplate, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01IngressTemplate_To_v1alpha2_ACMEChallengeSolverHTTP01IngressTemplate(in, out, s) -} - -func autoConvert_v1alpha2_ACMEExternalAccountBinding_To_acme_ACMEExternalAccountBinding(in *ACMEExternalAccountBinding, out *acme.ACMEExternalAccountBinding, s conversion.Scope) error { - out.KeyID = in.KeyID - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.Key, &out.Key, s); err != nil { - return err - } - out.KeyAlgorithm = acme.HMACKeyAlgorithm(in.KeyAlgorithm) - return nil -} - -// Convert_v1alpha2_ACMEExternalAccountBinding_To_acme_ACMEExternalAccountBinding is an autogenerated conversion function. -func Convert_v1alpha2_ACMEExternalAccountBinding_To_acme_ACMEExternalAccountBinding(in *ACMEExternalAccountBinding, out *acme.ACMEExternalAccountBinding, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEExternalAccountBinding_To_acme_ACMEExternalAccountBinding(in, out, s) -} - -func autoConvert_acme_ACMEExternalAccountBinding_To_v1alpha2_ACMEExternalAccountBinding(in *acme.ACMEExternalAccountBinding, out *ACMEExternalAccountBinding, s conversion.Scope) error { - out.KeyID = in.KeyID - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.Key, &out.Key, s); err != nil { - return err - } - out.KeyAlgorithm = HMACKeyAlgorithm(in.KeyAlgorithm) - return nil -} - -// Convert_acme_ACMEExternalAccountBinding_To_v1alpha2_ACMEExternalAccountBinding is an autogenerated conversion function. -func Convert_acme_ACMEExternalAccountBinding_To_v1alpha2_ACMEExternalAccountBinding(in *acme.ACMEExternalAccountBinding, out *ACMEExternalAccountBinding, s conversion.Scope) error { - return autoConvert_acme_ACMEExternalAccountBinding_To_v1alpha2_ACMEExternalAccountBinding(in, out, s) -} - -func autoConvert_v1alpha2_ACMEIssuer_To_acme_ACMEIssuer(in *ACMEIssuer, out *acme.ACMEIssuer, s conversion.Scope) error { - out.Email = in.Email - out.Server = in.Server - out.PreferredChain = in.PreferredChain - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - out.SkipTLSVerify = in.SkipTLSVerify - if in.ExternalAccountBinding != nil { - in, out := &in.ExternalAccountBinding, &out.ExternalAccountBinding - *out = new(acme.ACMEExternalAccountBinding) - if err := Convert_v1alpha2_ACMEExternalAccountBinding_To_acme_ACMEExternalAccountBinding(*in, *out, s); err != nil { - return err - } - } else { - out.ExternalAccountBinding = nil - } - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.PrivateKey, &out.PrivateKey, s); err != nil { - return err - } - if in.Solvers != nil { - in, out := &in.Solvers, &out.Solvers - *out = make([]acme.ACMEChallengeSolver, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_ACMEChallengeSolver_To_acme_ACMEChallengeSolver(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Solvers = nil - } - out.DisableAccountKeyGeneration = in.DisableAccountKeyGeneration - out.EnableDurationFeature = in.EnableDurationFeature - return nil -} - -func autoConvert_acme_ACMEIssuer_To_v1alpha2_ACMEIssuer(in *acme.ACMEIssuer, out *ACMEIssuer, s conversion.Scope) error { - out.Email = in.Email - out.Server = in.Server - out.PreferredChain = in.PreferredChain - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - out.SkipTLSVerify = in.SkipTLSVerify - if in.ExternalAccountBinding != nil { - in, out := &in.ExternalAccountBinding, &out.ExternalAccountBinding - *out = new(ACMEExternalAccountBinding) - if err := Convert_acme_ACMEExternalAccountBinding_To_v1alpha2_ACMEExternalAccountBinding(*in, *out, s); err != nil { - return err - } - } else { - out.ExternalAccountBinding = nil - } - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.PrivateKey, &out.PrivateKey, s); err != nil { - return err - } - if in.Solvers != nil { - in, out := &in.Solvers, &out.Solvers - *out = make([]ACMEChallengeSolver, len(*in)) - for i := range *in { - if err := Convert_acme_ACMEChallengeSolver_To_v1alpha2_ACMEChallengeSolver(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Solvers = nil - } - out.DisableAccountKeyGeneration = in.DisableAccountKeyGeneration - out.EnableDurationFeature = in.EnableDurationFeature - return nil -} - -func autoConvert_v1alpha2_ACMEIssuerDNS01ProviderAcmeDNS_To_acme_ACMEIssuerDNS01ProviderAcmeDNS(in *ACMEIssuerDNS01ProviderAcmeDNS, out *acme.ACMEIssuerDNS01ProviderAcmeDNS, s conversion.Scope) error { - out.Host = in.Host - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.AccountSecret, &out.AccountSecret, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_ACMEIssuerDNS01ProviderAcmeDNS_To_acme_ACMEIssuerDNS01ProviderAcmeDNS is an autogenerated conversion function. -func Convert_v1alpha2_ACMEIssuerDNS01ProviderAcmeDNS_To_acme_ACMEIssuerDNS01ProviderAcmeDNS(in *ACMEIssuerDNS01ProviderAcmeDNS, out *acme.ACMEIssuerDNS01ProviderAcmeDNS, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEIssuerDNS01ProviderAcmeDNS_To_acme_ACMEIssuerDNS01ProviderAcmeDNS(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderAcmeDNS_To_v1alpha2_ACMEIssuerDNS01ProviderAcmeDNS(in *acme.ACMEIssuerDNS01ProviderAcmeDNS, out *ACMEIssuerDNS01ProviderAcmeDNS, s conversion.Scope) error { - out.Host = in.Host - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.AccountSecret, &out.AccountSecret, s); err != nil { - return err - } - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderAcmeDNS_To_v1alpha2_ACMEIssuerDNS01ProviderAcmeDNS is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderAcmeDNS_To_v1alpha2_ACMEIssuerDNS01ProviderAcmeDNS(in *acme.ACMEIssuerDNS01ProviderAcmeDNS, out *ACMEIssuerDNS01ProviderAcmeDNS, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderAcmeDNS_To_v1alpha2_ACMEIssuerDNS01ProviderAcmeDNS(in, out, s) -} - -func autoConvert_v1alpha2_ACMEIssuerDNS01ProviderAkamai_To_acme_ACMEIssuerDNS01ProviderAkamai(in *ACMEIssuerDNS01ProviderAkamai, out *acme.ACMEIssuerDNS01ProviderAkamai, s conversion.Scope) error { - out.ServiceConsumerDomain = in.ServiceConsumerDomain - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.ClientToken, &out.ClientToken, s); err != nil { - return err - } - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.ClientSecret, &out.ClientSecret, s); err != nil { - return err - } - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.AccessToken, &out.AccessToken, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_ACMEIssuerDNS01ProviderAkamai_To_acme_ACMEIssuerDNS01ProviderAkamai is an autogenerated conversion function. -func Convert_v1alpha2_ACMEIssuerDNS01ProviderAkamai_To_acme_ACMEIssuerDNS01ProviderAkamai(in *ACMEIssuerDNS01ProviderAkamai, out *acme.ACMEIssuerDNS01ProviderAkamai, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEIssuerDNS01ProviderAkamai_To_acme_ACMEIssuerDNS01ProviderAkamai(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderAkamai_To_v1alpha2_ACMEIssuerDNS01ProviderAkamai(in *acme.ACMEIssuerDNS01ProviderAkamai, out *ACMEIssuerDNS01ProviderAkamai, s conversion.Scope) error { - out.ServiceConsumerDomain = in.ServiceConsumerDomain - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.ClientToken, &out.ClientToken, s); err != nil { - return err - } - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.ClientSecret, &out.ClientSecret, s); err != nil { - return err - } - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.AccessToken, &out.AccessToken, s); err != nil { - return err - } - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderAkamai_To_v1alpha2_ACMEIssuerDNS01ProviderAkamai is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderAkamai_To_v1alpha2_ACMEIssuerDNS01ProviderAkamai(in *acme.ACMEIssuerDNS01ProviderAkamai, out *ACMEIssuerDNS01ProviderAkamai, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderAkamai_To_v1alpha2_ACMEIssuerDNS01ProviderAkamai(in, out, s) -} - -func autoConvert_v1alpha2_ACMEIssuerDNS01ProviderAzureDNS_To_acme_ACMEIssuerDNS01ProviderAzureDNS(in *ACMEIssuerDNS01ProviderAzureDNS, out *acme.ACMEIssuerDNS01ProviderAzureDNS, s conversion.Scope) error { - out.ClientID = in.ClientID - if in.ClientSecret != nil { - in, out := &in.ClientSecret, &out.ClientSecret - *out = new(meta.SecretKeySelector) - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ClientSecret = nil - } - out.SubscriptionID = in.SubscriptionID - out.TenantID = in.TenantID - out.ResourceGroupName = in.ResourceGroupName - out.HostedZoneName = in.HostedZoneName - out.Environment = acme.AzureDNSEnvironment(in.Environment) - out.ManagedIdentity = (*acme.AzureManagedIdentity)(unsafe.Pointer(in.ManagedIdentity)) - return nil -} - -// Convert_v1alpha2_ACMEIssuerDNS01ProviderAzureDNS_To_acme_ACMEIssuerDNS01ProviderAzureDNS is an autogenerated conversion function. -func Convert_v1alpha2_ACMEIssuerDNS01ProviderAzureDNS_To_acme_ACMEIssuerDNS01ProviderAzureDNS(in *ACMEIssuerDNS01ProviderAzureDNS, out *acme.ACMEIssuerDNS01ProviderAzureDNS, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEIssuerDNS01ProviderAzureDNS_To_acme_ACMEIssuerDNS01ProviderAzureDNS(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderAzureDNS_To_v1alpha2_ACMEIssuerDNS01ProviderAzureDNS(in *acme.ACMEIssuerDNS01ProviderAzureDNS, out *ACMEIssuerDNS01ProviderAzureDNS, s conversion.Scope) error { - out.ClientID = in.ClientID - if in.ClientSecret != nil { - in, out := &in.ClientSecret, &out.ClientSecret - *out = new(apismetav1.SecretKeySelector) - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ClientSecret = nil - } - out.SubscriptionID = in.SubscriptionID - out.TenantID = in.TenantID - out.ResourceGroupName = in.ResourceGroupName - out.HostedZoneName = in.HostedZoneName - out.Environment = AzureDNSEnvironment(in.Environment) - out.ManagedIdentity = (*AzureManagedIdentity)(unsafe.Pointer(in.ManagedIdentity)) - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderAzureDNS_To_v1alpha2_ACMEIssuerDNS01ProviderAzureDNS is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderAzureDNS_To_v1alpha2_ACMEIssuerDNS01ProviderAzureDNS(in *acme.ACMEIssuerDNS01ProviderAzureDNS, out *ACMEIssuerDNS01ProviderAzureDNS, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderAzureDNS_To_v1alpha2_ACMEIssuerDNS01ProviderAzureDNS(in, out, s) -} - -func autoConvert_v1alpha2_ACMEIssuerDNS01ProviderCloudDNS_To_acme_ACMEIssuerDNS01ProviderCloudDNS(in *ACMEIssuerDNS01ProviderCloudDNS, out *acme.ACMEIssuerDNS01ProviderCloudDNS, s conversion.Scope) error { - if in.ServiceAccount != nil { - in, out := &in.ServiceAccount, &out.ServiceAccount - *out = new(meta.SecretKeySelector) - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ServiceAccount = nil - } - out.Project = in.Project - out.HostedZoneName = in.HostedZoneName - return nil -} - -// Convert_v1alpha2_ACMEIssuerDNS01ProviderCloudDNS_To_acme_ACMEIssuerDNS01ProviderCloudDNS is an autogenerated conversion function. -func Convert_v1alpha2_ACMEIssuerDNS01ProviderCloudDNS_To_acme_ACMEIssuerDNS01ProviderCloudDNS(in *ACMEIssuerDNS01ProviderCloudDNS, out *acme.ACMEIssuerDNS01ProviderCloudDNS, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEIssuerDNS01ProviderCloudDNS_To_acme_ACMEIssuerDNS01ProviderCloudDNS(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderCloudDNS_To_v1alpha2_ACMEIssuerDNS01ProviderCloudDNS(in *acme.ACMEIssuerDNS01ProviderCloudDNS, out *ACMEIssuerDNS01ProviderCloudDNS, s conversion.Scope) error { - if in.ServiceAccount != nil { - in, out := &in.ServiceAccount, &out.ServiceAccount - *out = new(apismetav1.SecretKeySelector) - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ServiceAccount = nil - } - out.Project = in.Project - out.HostedZoneName = in.HostedZoneName - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderCloudDNS_To_v1alpha2_ACMEIssuerDNS01ProviderCloudDNS is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderCloudDNS_To_v1alpha2_ACMEIssuerDNS01ProviderCloudDNS(in *acme.ACMEIssuerDNS01ProviderCloudDNS, out *ACMEIssuerDNS01ProviderCloudDNS, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderCloudDNS_To_v1alpha2_ACMEIssuerDNS01ProviderCloudDNS(in, out, s) -} - -func autoConvert_v1alpha2_ACMEIssuerDNS01ProviderCloudflare_To_acme_ACMEIssuerDNS01ProviderCloudflare(in *ACMEIssuerDNS01ProviderCloudflare, out *acme.ACMEIssuerDNS01ProviderCloudflare, s conversion.Scope) error { - out.Email = in.Email - if in.APIKey != nil { - in, out := &in.APIKey, &out.APIKey - *out = new(meta.SecretKeySelector) - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.APIKey = nil - } - if in.APIToken != nil { - in, out := &in.APIToken, &out.APIToken - *out = new(meta.SecretKeySelector) - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.APIToken = nil - } - return nil -} - -// Convert_v1alpha2_ACMEIssuerDNS01ProviderCloudflare_To_acme_ACMEIssuerDNS01ProviderCloudflare is an autogenerated conversion function. -func Convert_v1alpha2_ACMEIssuerDNS01ProviderCloudflare_To_acme_ACMEIssuerDNS01ProviderCloudflare(in *ACMEIssuerDNS01ProviderCloudflare, out *acme.ACMEIssuerDNS01ProviderCloudflare, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEIssuerDNS01ProviderCloudflare_To_acme_ACMEIssuerDNS01ProviderCloudflare(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderCloudflare_To_v1alpha2_ACMEIssuerDNS01ProviderCloudflare(in *acme.ACMEIssuerDNS01ProviderCloudflare, out *ACMEIssuerDNS01ProviderCloudflare, s conversion.Scope) error { - out.Email = in.Email - if in.APIKey != nil { - in, out := &in.APIKey, &out.APIKey - *out = new(apismetav1.SecretKeySelector) - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.APIKey = nil - } - if in.APIToken != nil { - in, out := &in.APIToken, &out.APIToken - *out = new(apismetav1.SecretKeySelector) - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.APIToken = nil - } - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderCloudflare_To_v1alpha2_ACMEIssuerDNS01ProviderCloudflare is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderCloudflare_To_v1alpha2_ACMEIssuerDNS01ProviderCloudflare(in *acme.ACMEIssuerDNS01ProviderCloudflare, out *ACMEIssuerDNS01ProviderCloudflare, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderCloudflare_To_v1alpha2_ACMEIssuerDNS01ProviderCloudflare(in, out, s) -} - -func autoConvert_v1alpha2_ACMEIssuerDNS01ProviderDigitalOcean_To_acme_ACMEIssuerDNS01ProviderDigitalOcean(in *ACMEIssuerDNS01ProviderDigitalOcean, out *acme.ACMEIssuerDNS01ProviderDigitalOcean, s conversion.Scope) error { - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.Token, &out.Token, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_ACMEIssuerDNS01ProviderDigitalOcean_To_acme_ACMEIssuerDNS01ProviderDigitalOcean is an autogenerated conversion function. -func Convert_v1alpha2_ACMEIssuerDNS01ProviderDigitalOcean_To_acme_ACMEIssuerDNS01ProviderDigitalOcean(in *ACMEIssuerDNS01ProviderDigitalOcean, out *acme.ACMEIssuerDNS01ProviderDigitalOcean, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEIssuerDNS01ProviderDigitalOcean_To_acme_ACMEIssuerDNS01ProviderDigitalOcean(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderDigitalOcean_To_v1alpha2_ACMEIssuerDNS01ProviderDigitalOcean(in *acme.ACMEIssuerDNS01ProviderDigitalOcean, out *ACMEIssuerDNS01ProviderDigitalOcean, s conversion.Scope) error { - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.Token, &out.Token, s); err != nil { - return err - } - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderDigitalOcean_To_v1alpha2_ACMEIssuerDNS01ProviderDigitalOcean is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderDigitalOcean_To_v1alpha2_ACMEIssuerDNS01ProviderDigitalOcean(in *acme.ACMEIssuerDNS01ProviderDigitalOcean, out *ACMEIssuerDNS01ProviderDigitalOcean, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderDigitalOcean_To_v1alpha2_ACMEIssuerDNS01ProviderDigitalOcean(in, out, s) -} - -func autoConvert_v1alpha2_ACMEIssuerDNS01ProviderRFC2136_To_acme_ACMEIssuerDNS01ProviderRFC2136(in *ACMEIssuerDNS01ProviderRFC2136, out *acme.ACMEIssuerDNS01ProviderRFC2136, s conversion.Scope) error { - out.Nameserver = in.Nameserver - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.TSIGSecret, &out.TSIGSecret, s); err != nil { - return err - } - out.TSIGKeyName = in.TSIGKeyName - out.TSIGAlgorithm = in.TSIGAlgorithm - return nil -} - -// Convert_v1alpha2_ACMEIssuerDNS01ProviderRFC2136_To_acme_ACMEIssuerDNS01ProviderRFC2136 is an autogenerated conversion function. -func Convert_v1alpha2_ACMEIssuerDNS01ProviderRFC2136_To_acme_ACMEIssuerDNS01ProviderRFC2136(in *ACMEIssuerDNS01ProviderRFC2136, out *acme.ACMEIssuerDNS01ProviderRFC2136, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEIssuerDNS01ProviderRFC2136_To_acme_ACMEIssuerDNS01ProviderRFC2136(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderRFC2136_To_v1alpha2_ACMEIssuerDNS01ProviderRFC2136(in *acme.ACMEIssuerDNS01ProviderRFC2136, out *ACMEIssuerDNS01ProviderRFC2136, s conversion.Scope) error { - out.Nameserver = in.Nameserver - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.TSIGSecret, &out.TSIGSecret, s); err != nil { - return err - } - out.TSIGKeyName = in.TSIGKeyName - out.TSIGAlgorithm = in.TSIGAlgorithm - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderRFC2136_To_v1alpha2_ACMEIssuerDNS01ProviderRFC2136 is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderRFC2136_To_v1alpha2_ACMEIssuerDNS01ProviderRFC2136(in *acme.ACMEIssuerDNS01ProviderRFC2136, out *ACMEIssuerDNS01ProviderRFC2136, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderRFC2136_To_v1alpha2_ACMEIssuerDNS01ProviderRFC2136(in, out, s) -} - -func autoConvert_v1alpha2_ACMEIssuerDNS01ProviderRoute53_To_acme_ACMEIssuerDNS01ProviderRoute53(in *ACMEIssuerDNS01ProviderRoute53, out *acme.ACMEIssuerDNS01ProviderRoute53, s conversion.Scope) error { - out.Auth = (*acme.Route53Auth)(unsafe.Pointer(in.Auth)) - out.AccessKeyID = in.AccessKeyID - if in.SecretAccessKeyID != nil { - in, out := &in.SecretAccessKeyID, &out.SecretAccessKeyID - *out = new(meta.SecretKeySelector) - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.SecretAccessKeyID = nil - } - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.SecretAccessKey, &out.SecretAccessKey, s); err != nil { - return err - } - out.Role = in.Role - out.HostedZoneID = in.HostedZoneID - out.Region = in.Region - return nil -} - -// Convert_v1alpha2_ACMEIssuerDNS01ProviderRoute53_To_acme_ACMEIssuerDNS01ProviderRoute53 is an autogenerated conversion function. -func Convert_v1alpha2_ACMEIssuerDNS01ProviderRoute53_To_acme_ACMEIssuerDNS01ProviderRoute53(in *ACMEIssuerDNS01ProviderRoute53, out *acme.ACMEIssuerDNS01ProviderRoute53, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEIssuerDNS01ProviderRoute53_To_acme_ACMEIssuerDNS01ProviderRoute53(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderRoute53_To_v1alpha2_ACMEIssuerDNS01ProviderRoute53(in *acme.ACMEIssuerDNS01ProviderRoute53, out *ACMEIssuerDNS01ProviderRoute53, s conversion.Scope) error { - out.Auth = (*Route53Auth)(unsafe.Pointer(in.Auth)) - out.AccessKeyID = in.AccessKeyID - if in.SecretAccessKeyID != nil { - in, out := &in.SecretAccessKeyID, &out.SecretAccessKeyID - *out = new(apismetav1.SecretKeySelector) - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.SecretAccessKeyID = nil - } - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.SecretAccessKey, &out.SecretAccessKey, s); err != nil { - return err - } - out.Role = in.Role - out.HostedZoneID = in.HostedZoneID - out.Region = in.Region - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderRoute53_To_v1alpha2_ACMEIssuerDNS01ProviderRoute53 is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderRoute53_To_v1alpha2_ACMEIssuerDNS01ProviderRoute53(in *acme.ACMEIssuerDNS01ProviderRoute53, out *ACMEIssuerDNS01ProviderRoute53, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderRoute53_To_v1alpha2_ACMEIssuerDNS01ProviderRoute53(in, out, s) -} - -func autoConvert_v1alpha2_ACMEIssuerDNS01ProviderWebhook_To_acme_ACMEIssuerDNS01ProviderWebhook(in *ACMEIssuerDNS01ProviderWebhook, out *acme.ACMEIssuerDNS01ProviderWebhook, s conversion.Scope) error { - out.GroupName = in.GroupName - out.SolverName = in.SolverName - out.Config = (*apiextensionsv1.JSON)(unsafe.Pointer(in.Config)) - return nil -} - -// Convert_v1alpha2_ACMEIssuerDNS01ProviderWebhook_To_acme_ACMEIssuerDNS01ProviderWebhook is an autogenerated conversion function. -func Convert_v1alpha2_ACMEIssuerDNS01ProviderWebhook_To_acme_ACMEIssuerDNS01ProviderWebhook(in *ACMEIssuerDNS01ProviderWebhook, out *acme.ACMEIssuerDNS01ProviderWebhook, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEIssuerDNS01ProviderWebhook_To_acme_ACMEIssuerDNS01ProviderWebhook(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderWebhook_To_v1alpha2_ACMEIssuerDNS01ProviderWebhook(in *acme.ACMEIssuerDNS01ProviderWebhook, out *ACMEIssuerDNS01ProviderWebhook, s conversion.Scope) error { - out.GroupName = in.GroupName - out.SolverName = in.SolverName - out.Config = (*apiextensionsv1.JSON)(unsafe.Pointer(in.Config)) - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderWebhook_To_v1alpha2_ACMEIssuerDNS01ProviderWebhook is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderWebhook_To_v1alpha2_ACMEIssuerDNS01ProviderWebhook(in *acme.ACMEIssuerDNS01ProviderWebhook, out *ACMEIssuerDNS01ProviderWebhook, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderWebhook_To_v1alpha2_ACMEIssuerDNS01ProviderWebhook(in, out, s) -} - -func autoConvert_v1alpha2_ACMEIssuerStatus_To_acme_ACMEIssuerStatus(in *ACMEIssuerStatus, out *acme.ACMEIssuerStatus, s conversion.Scope) error { - out.URI = in.URI - out.LastRegisteredEmail = in.LastRegisteredEmail - out.LastPrivateKeyHash = in.LastPrivateKeyHash - return nil -} - -// Convert_v1alpha2_ACMEIssuerStatus_To_acme_ACMEIssuerStatus is an autogenerated conversion function. -func Convert_v1alpha2_ACMEIssuerStatus_To_acme_ACMEIssuerStatus(in *ACMEIssuerStatus, out *acme.ACMEIssuerStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_ACMEIssuerStatus_To_acme_ACMEIssuerStatus(in, out, s) -} - -func autoConvert_acme_ACMEIssuerStatus_To_v1alpha2_ACMEIssuerStatus(in *acme.ACMEIssuerStatus, out *ACMEIssuerStatus, s conversion.Scope) error { - out.URI = in.URI - out.LastRegisteredEmail = in.LastRegisteredEmail - out.LastPrivateKeyHash = in.LastPrivateKeyHash - return nil -} - -// Convert_acme_ACMEIssuerStatus_To_v1alpha2_ACMEIssuerStatus is an autogenerated conversion function. -func Convert_acme_ACMEIssuerStatus_To_v1alpha2_ACMEIssuerStatus(in *acme.ACMEIssuerStatus, out *ACMEIssuerStatus, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerStatus_To_v1alpha2_ACMEIssuerStatus(in, out, s) -} - -func autoConvert_v1alpha2_AzureManagedIdentity_To_acme_AzureManagedIdentity(in *AzureManagedIdentity, out *acme.AzureManagedIdentity, s conversion.Scope) error { - out.ClientID = in.ClientID - out.ResourceID = in.ResourceID - return nil -} - -// Convert_v1alpha2_AzureManagedIdentity_To_acme_AzureManagedIdentity is an autogenerated conversion function. -func Convert_v1alpha2_AzureManagedIdentity_To_acme_AzureManagedIdentity(in *AzureManagedIdentity, out *acme.AzureManagedIdentity, s conversion.Scope) error { - return autoConvert_v1alpha2_AzureManagedIdentity_To_acme_AzureManagedIdentity(in, out, s) -} - -func autoConvert_acme_AzureManagedIdentity_To_v1alpha2_AzureManagedIdentity(in *acme.AzureManagedIdentity, out *AzureManagedIdentity, s conversion.Scope) error { - out.ClientID = in.ClientID - out.ResourceID = in.ResourceID - return nil -} - -// Convert_acme_AzureManagedIdentity_To_v1alpha2_AzureManagedIdentity is an autogenerated conversion function. -func Convert_acme_AzureManagedIdentity_To_v1alpha2_AzureManagedIdentity(in *acme.AzureManagedIdentity, out *AzureManagedIdentity, s conversion.Scope) error { - return autoConvert_acme_AzureManagedIdentity_To_v1alpha2_AzureManagedIdentity(in, out, s) -} - -func autoConvert_v1alpha2_CertificateDNSNameSelector_To_acme_CertificateDNSNameSelector(in *CertificateDNSNameSelector, out *acme.CertificateDNSNameSelector, s conversion.Scope) error { - out.MatchLabels = *(*map[string]string)(unsafe.Pointer(&in.MatchLabels)) - out.DNSNames = *(*[]string)(unsafe.Pointer(&in.DNSNames)) - out.DNSZones = *(*[]string)(unsafe.Pointer(&in.DNSZones)) - return nil -} - -// Convert_v1alpha2_CertificateDNSNameSelector_To_acme_CertificateDNSNameSelector is an autogenerated conversion function. -func Convert_v1alpha2_CertificateDNSNameSelector_To_acme_CertificateDNSNameSelector(in *CertificateDNSNameSelector, out *acme.CertificateDNSNameSelector, s conversion.Scope) error { - return autoConvert_v1alpha2_CertificateDNSNameSelector_To_acme_CertificateDNSNameSelector(in, out, s) -} - -func autoConvert_acme_CertificateDNSNameSelector_To_v1alpha2_CertificateDNSNameSelector(in *acme.CertificateDNSNameSelector, out *CertificateDNSNameSelector, s conversion.Scope) error { - out.MatchLabels = *(*map[string]string)(unsafe.Pointer(&in.MatchLabels)) - out.DNSNames = *(*[]string)(unsafe.Pointer(&in.DNSNames)) - out.DNSZones = *(*[]string)(unsafe.Pointer(&in.DNSZones)) - return nil -} - -// Convert_acme_CertificateDNSNameSelector_To_v1alpha2_CertificateDNSNameSelector is an autogenerated conversion function. -func Convert_acme_CertificateDNSNameSelector_To_v1alpha2_CertificateDNSNameSelector(in *acme.CertificateDNSNameSelector, out *CertificateDNSNameSelector, s conversion.Scope) error { - return autoConvert_acme_CertificateDNSNameSelector_To_v1alpha2_CertificateDNSNameSelector(in, out, s) -} - -func autoConvert_v1alpha2_Challenge_To_acme_Challenge(in *Challenge, out *acme.Challenge, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_ChallengeSpec_To_acme_ChallengeSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha2_ChallengeStatus_To_acme_ChallengeStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_Challenge_To_acme_Challenge is an autogenerated conversion function. -func Convert_v1alpha2_Challenge_To_acme_Challenge(in *Challenge, out *acme.Challenge, s conversion.Scope) error { - return autoConvert_v1alpha2_Challenge_To_acme_Challenge(in, out, s) -} - -func autoConvert_acme_Challenge_To_v1alpha2_Challenge(in *acme.Challenge, out *Challenge, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_acme_ChallengeSpec_To_v1alpha2_ChallengeSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_acme_ChallengeStatus_To_v1alpha2_ChallengeStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_acme_Challenge_To_v1alpha2_Challenge is an autogenerated conversion function. -func Convert_acme_Challenge_To_v1alpha2_Challenge(in *acme.Challenge, out *Challenge, s conversion.Scope) error { - return autoConvert_acme_Challenge_To_v1alpha2_Challenge(in, out, s) -} - -func autoConvert_v1alpha2_ChallengeList_To_acme_ChallengeList(in *ChallengeList, out *acme.ChallengeList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]acme.Challenge, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_Challenge_To_acme_Challenge(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha2_ChallengeList_To_acme_ChallengeList is an autogenerated conversion function. -func Convert_v1alpha2_ChallengeList_To_acme_ChallengeList(in *ChallengeList, out *acme.ChallengeList, s conversion.Scope) error { - return autoConvert_v1alpha2_ChallengeList_To_acme_ChallengeList(in, out, s) -} - -func autoConvert_acme_ChallengeList_To_v1alpha2_ChallengeList(in *acme.ChallengeList, out *ChallengeList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Challenge, len(*in)) - for i := range *in { - if err := Convert_acme_Challenge_To_v1alpha2_Challenge(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_acme_ChallengeList_To_v1alpha2_ChallengeList is an autogenerated conversion function. -func Convert_acme_ChallengeList_To_v1alpha2_ChallengeList(in *acme.ChallengeList, out *ChallengeList, s conversion.Scope) error { - return autoConvert_acme_ChallengeList_To_v1alpha2_ChallengeList(in, out, s) -} - -func autoConvert_v1alpha2_ChallengeSpec_To_acme_ChallengeSpec(in *ChallengeSpec, out *acme.ChallengeSpec, s conversion.Scope) error { - out.URL = in.URL - // WARNING: in.AuthzURL requires manual conversion: does not exist in peer-type - out.DNSName = in.DNSName - out.Wildcard = in.Wildcard - out.Type = acme.ACMEChallengeType(in.Type) - out.Token = in.Token - out.Key = in.Key - if err := Convert_v1alpha2_ACMEChallengeSolver_To_acme_ACMEChallengeSolver(&in.Solver, &out.Solver, s); err != nil { - return err - } - if err := metav1.Convert_v1_ObjectReference_To_meta_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - return nil -} - -func autoConvert_acme_ChallengeSpec_To_v1alpha2_ChallengeSpec(in *acme.ChallengeSpec, out *ChallengeSpec, s conversion.Scope) error { - out.URL = in.URL - // WARNING: in.AuthorizationURL requires manual conversion: does not exist in peer-type - out.DNSName = in.DNSName - out.Wildcard = in.Wildcard - out.Type = ACMEChallengeType(in.Type) - out.Token = in.Token - out.Key = in.Key - if err := Convert_acme_ACMEChallengeSolver_To_v1alpha2_ACMEChallengeSolver(&in.Solver, &out.Solver, s); err != nil { - return err - } - if err := metav1.Convert_meta_ObjectReference_To_v1_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha2_ChallengeStatus_To_acme_ChallengeStatus(in *ChallengeStatus, out *acme.ChallengeStatus, s conversion.Scope) error { - out.Processing = in.Processing - out.Presented = in.Presented - out.Reason = in.Reason - out.State = acme.State(in.State) - return nil -} - -// Convert_v1alpha2_ChallengeStatus_To_acme_ChallengeStatus is an autogenerated conversion function. -func Convert_v1alpha2_ChallengeStatus_To_acme_ChallengeStatus(in *ChallengeStatus, out *acme.ChallengeStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_ChallengeStatus_To_acme_ChallengeStatus(in, out, s) -} - -func autoConvert_acme_ChallengeStatus_To_v1alpha2_ChallengeStatus(in *acme.ChallengeStatus, out *ChallengeStatus, s conversion.Scope) error { - out.Processing = in.Processing - out.Presented = in.Presented - out.Reason = in.Reason - out.State = State(in.State) - return nil -} - -// Convert_acme_ChallengeStatus_To_v1alpha2_ChallengeStatus is an autogenerated conversion function. -func Convert_acme_ChallengeStatus_To_v1alpha2_ChallengeStatus(in *acme.ChallengeStatus, out *ChallengeStatus, s conversion.Scope) error { - return autoConvert_acme_ChallengeStatus_To_v1alpha2_ChallengeStatus(in, out, s) -} - -func autoConvert_v1alpha2_Order_To_acme_Order(in *Order, out *acme.Order, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_OrderSpec_To_acme_OrderSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha2_OrderStatus_To_acme_OrderStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_Order_To_acme_Order is an autogenerated conversion function. -func Convert_v1alpha2_Order_To_acme_Order(in *Order, out *acme.Order, s conversion.Scope) error { - return autoConvert_v1alpha2_Order_To_acme_Order(in, out, s) -} - -func autoConvert_acme_Order_To_v1alpha2_Order(in *acme.Order, out *Order, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_acme_OrderSpec_To_v1alpha2_OrderSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_acme_OrderStatus_To_v1alpha2_OrderStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_acme_Order_To_v1alpha2_Order is an autogenerated conversion function. -func Convert_acme_Order_To_v1alpha2_Order(in *acme.Order, out *Order, s conversion.Scope) error { - return autoConvert_acme_Order_To_v1alpha2_Order(in, out, s) -} - -func autoConvert_v1alpha2_OrderList_To_acme_OrderList(in *OrderList, out *acme.OrderList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]acme.Order, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_Order_To_acme_Order(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha2_OrderList_To_acme_OrderList is an autogenerated conversion function. -func Convert_v1alpha2_OrderList_To_acme_OrderList(in *OrderList, out *acme.OrderList, s conversion.Scope) error { - return autoConvert_v1alpha2_OrderList_To_acme_OrderList(in, out, s) -} - -func autoConvert_acme_OrderList_To_v1alpha2_OrderList(in *acme.OrderList, out *OrderList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Order, len(*in)) - for i := range *in { - if err := Convert_acme_Order_To_v1alpha2_Order(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_acme_OrderList_To_v1alpha2_OrderList is an autogenerated conversion function. -func Convert_acme_OrderList_To_v1alpha2_OrderList(in *acme.OrderList, out *OrderList, s conversion.Scope) error { - return autoConvert_acme_OrderList_To_v1alpha2_OrderList(in, out, s) -} - -func autoConvert_v1alpha2_OrderSpec_To_acme_OrderSpec(in *OrderSpec, out *acme.OrderSpec, s conversion.Scope) error { - // WARNING: in.CSR requires manual conversion: does not exist in peer-type - if err := metav1.Convert_v1_ObjectReference_To_meta_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - out.CommonName = in.CommonName - out.DNSNames = *(*[]string)(unsafe.Pointer(&in.DNSNames)) - out.IPAddresses = *(*[]string)(unsafe.Pointer(&in.IPAddresses)) - out.Duration = (*pkgapismetav1.Duration)(unsafe.Pointer(in.Duration)) - return nil -} - -func autoConvert_acme_OrderSpec_To_v1alpha2_OrderSpec(in *acme.OrderSpec, out *OrderSpec, s conversion.Scope) error { - // WARNING: in.Request requires manual conversion: does not exist in peer-type - if err := metav1.Convert_meta_ObjectReference_To_v1_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - out.CommonName = in.CommonName - out.DNSNames = *(*[]string)(unsafe.Pointer(&in.DNSNames)) - out.IPAddresses = *(*[]string)(unsafe.Pointer(&in.IPAddresses)) - out.Duration = (*pkgapismetav1.Duration)(unsafe.Pointer(in.Duration)) - return nil -} - -func autoConvert_v1alpha2_OrderStatus_To_acme_OrderStatus(in *OrderStatus, out *acme.OrderStatus, s conversion.Scope) error { - out.URL = in.URL - out.FinalizeURL = in.FinalizeURL - out.Authorizations = *(*[]acme.ACMEAuthorization)(unsafe.Pointer(&in.Authorizations)) - out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) - out.State = acme.State(in.State) - out.Reason = in.Reason - out.FailureTime = (*pkgapismetav1.Time)(unsafe.Pointer(in.FailureTime)) - return nil -} - -// Convert_v1alpha2_OrderStatus_To_acme_OrderStatus is an autogenerated conversion function. -func Convert_v1alpha2_OrderStatus_To_acme_OrderStatus(in *OrderStatus, out *acme.OrderStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_OrderStatus_To_acme_OrderStatus(in, out, s) -} - -func autoConvert_acme_OrderStatus_To_v1alpha2_OrderStatus(in *acme.OrderStatus, out *OrderStatus, s conversion.Scope) error { - out.URL = in.URL - out.FinalizeURL = in.FinalizeURL - out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) - out.State = State(in.State) - out.Reason = in.Reason - out.Authorizations = *(*[]ACMEAuthorization)(unsafe.Pointer(&in.Authorizations)) - out.FailureTime = (*pkgapismetav1.Time)(unsafe.Pointer(in.FailureTime)) - return nil -} - -// Convert_acme_OrderStatus_To_v1alpha2_OrderStatus is an autogenerated conversion function. -func Convert_acme_OrderStatus_To_v1alpha2_OrderStatus(in *acme.OrderStatus, out *OrderStatus, s conversion.Scope) error { - return autoConvert_acme_OrderStatus_To_v1alpha2_OrderStatus(in, out, s) -} - -func autoConvert_v1alpha2_Route53Auth_To_acme_Route53Auth(in *Route53Auth, out *acme.Route53Auth, s conversion.Scope) error { - out.Kubernetes = (*acme.Route53KubernetesAuth)(unsafe.Pointer(in.Kubernetes)) - return nil -} - -// Convert_v1alpha2_Route53Auth_To_acme_Route53Auth is an autogenerated conversion function. -func Convert_v1alpha2_Route53Auth_To_acme_Route53Auth(in *Route53Auth, out *acme.Route53Auth, s conversion.Scope) error { - return autoConvert_v1alpha2_Route53Auth_To_acme_Route53Auth(in, out, s) -} - -func autoConvert_acme_Route53Auth_To_v1alpha2_Route53Auth(in *acme.Route53Auth, out *Route53Auth, s conversion.Scope) error { - out.Kubernetes = (*Route53KubernetesAuth)(unsafe.Pointer(in.Kubernetes)) - return nil -} - -// Convert_acme_Route53Auth_To_v1alpha2_Route53Auth is an autogenerated conversion function. -func Convert_acme_Route53Auth_To_v1alpha2_Route53Auth(in *acme.Route53Auth, out *Route53Auth, s conversion.Scope) error { - return autoConvert_acme_Route53Auth_To_v1alpha2_Route53Auth(in, out, s) -} - -func autoConvert_v1alpha2_Route53KubernetesAuth_To_acme_Route53KubernetesAuth(in *Route53KubernetesAuth, out *acme.Route53KubernetesAuth, s conversion.Scope) error { - out.ServiceAccountRef = (*acme.ServiceAccountRef)(unsafe.Pointer(in.ServiceAccountRef)) - return nil -} - -// Convert_v1alpha2_Route53KubernetesAuth_To_acme_Route53KubernetesAuth is an autogenerated conversion function. -func Convert_v1alpha2_Route53KubernetesAuth_To_acme_Route53KubernetesAuth(in *Route53KubernetesAuth, out *acme.Route53KubernetesAuth, s conversion.Scope) error { - return autoConvert_v1alpha2_Route53KubernetesAuth_To_acme_Route53KubernetesAuth(in, out, s) -} - -func autoConvert_acme_Route53KubernetesAuth_To_v1alpha2_Route53KubernetesAuth(in *acme.Route53KubernetesAuth, out *Route53KubernetesAuth, s conversion.Scope) error { - out.ServiceAccountRef = (*ServiceAccountRef)(unsafe.Pointer(in.ServiceAccountRef)) - return nil -} - -// Convert_acme_Route53KubernetesAuth_To_v1alpha2_Route53KubernetesAuth is an autogenerated conversion function. -func Convert_acme_Route53KubernetesAuth_To_v1alpha2_Route53KubernetesAuth(in *acme.Route53KubernetesAuth, out *Route53KubernetesAuth, s conversion.Scope) error { - return autoConvert_acme_Route53KubernetesAuth_To_v1alpha2_Route53KubernetesAuth(in, out, s) -} - -func autoConvert_v1alpha2_ServiceAccountRef_To_acme_ServiceAccountRef(in *ServiceAccountRef, out *acme.ServiceAccountRef, s conversion.Scope) error { - out.Name = in.Name - out.TokenAudiences = *(*[]string)(unsafe.Pointer(&in.TokenAudiences)) - return nil -} - -// Convert_v1alpha2_ServiceAccountRef_To_acme_ServiceAccountRef is an autogenerated conversion function. -func Convert_v1alpha2_ServiceAccountRef_To_acme_ServiceAccountRef(in *ServiceAccountRef, out *acme.ServiceAccountRef, s conversion.Scope) error { - return autoConvert_v1alpha2_ServiceAccountRef_To_acme_ServiceAccountRef(in, out, s) -} - -func autoConvert_acme_ServiceAccountRef_To_v1alpha2_ServiceAccountRef(in *acme.ServiceAccountRef, out *ServiceAccountRef, s conversion.Scope) error { - out.Name = in.Name - out.TokenAudiences = *(*[]string)(unsafe.Pointer(&in.TokenAudiences)) - return nil -} - -// Convert_acme_ServiceAccountRef_To_v1alpha2_ServiceAccountRef is an autogenerated conversion function. -func Convert_acme_ServiceAccountRef_To_v1alpha2_ServiceAccountRef(in *acme.ServiceAccountRef, out *ServiceAccountRef, s conversion.Scope) error { - return autoConvert_acme_ServiceAccountRef_To_v1alpha2_ServiceAccountRef(in, out, s) -} diff --git a/internal/apis/acme/v1alpha2/zz_generated.deepcopy.go b/internal/apis/acme/v1alpha2/zz_generated.deepcopy.go deleted file mode 100644 index da7fcb70235..00000000000 --- a/internal/apis/acme/v1alpha2/zz_generated.deepcopy.go +++ /dev/null @@ -1,987 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The cert-manager 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 v1alpha2 - -import ( - metav1 "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" - corev1 "k8s.io/api/core/v1" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - v1 "sigs.k8s.io/gateway-api/apis/v1" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEAuthorization) DeepCopyInto(out *ACMEAuthorization) { - *out = *in - if in.Wildcard != nil { - in, out := &in.Wildcard, &out.Wildcard - *out = new(bool) - **out = **in - } - if in.Challenges != nil { - in, out := &in.Challenges, &out.Challenges - *out = make([]ACMEChallenge, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEAuthorization. -func (in *ACMEAuthorization) DeepCopy() *ACMEAuthorization { - if in == nil { - return nil - } - out := new(ACMEAuthorization) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallenge) DeepCopyInto(out *ACMEChallenge) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallenge. -func (in *ACMEChallenge) DeepCopy() *ACMEChallenge { - if in == nil { - return nil - } - out := new(ACMEChallenge) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolver) DeepCopyInto(out *ACMEChallengeSolver) { - *out = *in - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(CertificateDNSNameSelector) - (*in).DeepCopyInto(*out) - } - if in.HTTP01 != nil { - in, out := &in.HTTP01, &out.HTTP01 - *out = new(ACMEChallengeSolverHTTP01) - (*in).DeepCopyInto(*out) - } - if in.DNS01 != nil { - in, out := &in.DNS01, &out.DNS01 - *out = new(ACMEChallengeSolverDNS01) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolver. -func (in *ACMEChallengeSolver) DeepCopy() *ACMEChallengeSolver { - if in == nil { - return nil - } - out := new(ACMEChallengeSolver) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverDNS01) DeepCopyInto(out *ACMEChallengeSolverDNS01) { - *out = *in - if in.Akamai != nil { - in, out := &in.Akamai, &out.Akamai - *out = new(ACMEIssuerDNS01ProviderAkamai) - **out = **in - } - if in.CloudDNS != nil { - in, out := &in.CloudDNS, &out.CloudDNS - *out = new(ACMEIssuerDNS01ProviderCloudDNS) - (*in).DeepCopyInto(*out) - } - if in.Cloudflare != nil { - in, out := &in.Cloudflare, &out.Cloudflare - *out = new(ACMEIssuerDNS01ProviderCloudflare) - (*in).DeepCopyInto(*out) - } - if in.Route53 != nil { - in, out := &in.Route53, &out.Route53 - *out = new(ACMEIssuerDNS01ProviderRoute53) - (*in).DeepCopyInto(*out) - } - if in.AzureDNS != nil { - in, out := &in.AzureDNS, &out.AzureDNS - *out = new(ACMEIssuerDNS01ProviderAzureDNS) - (*in).DeepCopyInto(*out) - } - if in.DigitalOcean != nil { - in, out := &in.DigitalOcean, &out.DigitalOcean - *out = new(ACMEIssuerDNS01ProviderDigitalOcean) - **out = **in - } - if in.AcmeDNS != nil { - in, out := &in.AcmeDNS, &out.AcmeDNS - *out = new(ACMEIssuerDNS01ProviderAcmeDNS) - **out = **in - } - if in.RFC2136 != nil { - in, out := &in.RFC2136, &out.RFC2136 - *out = new(ACMEIssuerDNS01ProviderRFC2136) - **out = **in - } - if in.Webhook != nil { - in, out := &in.Webhook, &out.Webhook - *out = new(ACMEIssuerDNS01ProviderWebhook) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverDNS01. -func (in *ACMEChallengeSolverDNS01) DeepCopy() *ACMEChallengeSolverDNS01 { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverDNS01) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01) DeepCopyInto(out *ACMEChallengeSolverHTTP01) { - *out = *in - if in.Ingress != nil { - in, out := &in.Ingress, &out.Ingress - *out = new(ACMEChallengeSolverHTTP01Ingress) - (*in).DeepCopyInto(*out) - } - if in.GatewayHTTPRoute != nil { - in, out := &in.GatewayHTTPRoute, &out.GatewayHTTPRoute - *out = new(ACMEChallengeSolverHTTP01GatewayHTTPRoute) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01. -func (in *ACMEChallengeSolverHTTP01) DeepCopy() *ACMEChallengeSolverHTTP01 { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01GatewayHTTPRoute) DeepCopyInto(out *ACMEChallengeSolverHTTP01GatewayHTTPRoute) { - *out = *in - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.ParentRefs != nil { - in, out := &in.ParentRefs, &out.ParentRefs - *out = make([]v1.ParentReference, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01GatewayHTTPRoute. -func (in *ACMEChallengeSolverHTTP01GatewayHTTPRoute) DeepCopy() *ACMEChallengeSolverHTTP01GatewayHTTPRoute { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01GatewayHTTPRoute) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01Ingress) DeepCopyInto(out *ACMEChallengeSolverHTTP01Ingress) { - *out = *in - if in.IngressClassName != nil { - in, out := &in.IngressClassName, &out.IngressClassName - *out = new(string) - **out = **in - } - if in.Class != nil { - in, out := &in.Class, &out.Class - *out = new(string) - **out = **in - } - if in.PodTemplate != nil { - in, out := &in.PodTemplate, &out.PodTemplate - *out = new(ACMEChallengeSolverHTTP01IngressPodTemplate) - (*in).DeepCopyInto(*out) - } - if in.IngressTemplate != nil { - in, out := &in.IngressTemplate, &out.IngressTemplate - *out = new(ACMEChallengeSolverHTTP01IngressTemplate) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01Ingress. -func (in *ACMEChallengeSolverHTTP01Ingress) DeepCopy() *ACMEChallengeSolverHTTP01Ingress { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01Ingress) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01IngressObjectMeta) DeepCopyInto(out *ACMEChallengeSolverHTTP01IngressObjectMeta) { - *out = *in - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01IngressObjectMeta. -func (in *ACMEChallengeSolverHTTP01IngressObjectMeta) DeepCopy() *ACMEChallengeSolverHTTP01IngressObjectMeta { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01IngressObjectMeta) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01IngressPodObjectMeta) DeepCopyInto(out *ACMEChallengeSolverHTTP01IngressPodObjectMeta) { - *out = *in - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01IngressPodObjectMeta. -func (in *ACMEChallengeSolverHTTP01IngressPodObjectMeta) DeepCopy() *ACMEChallengeSolverHTTP01IngressPodObjectMeta { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01IngressPodObjectMeta) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01IngressPodSpec) DeepCopyInto(out *ACMEChallengeSolverHTTP01IngressPodSpec) { - *out = *in - if in.NodeSelector != nil { - in, out := &in.NodeSelector, &out.NodeSelector - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Affinity != nil { - in, out := &in.Affinity, &out.Affinity - *out = new(corev1.Affinity) - (*in).DeepCopyInto(*out) - } - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = make([]corev1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ImagePullSecrets != nil { - in, out := &in.ImagePullSecrets, &out.ImagePullSecrets - *out = make([]corev1.LocalObjectReference, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01IngressPodSpec. -func (in *ACMEChallengeSolverHTTP01IngressPodSpec) DeepCopy() *ACMEChallengeSolverHTTP01IngressPodSpec { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01IngressPodSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01IngressPodTemplate) DeepCopyInto(out *ACMEChallengeSolverHTTP01IngressPodTemplate) { - *out = *in - in.ACMEChallengeSolverHTTP01IngressPodObjectMeta.DeepCopyInto(&out.ACMEChallengeSolverHTTP01IngressPodObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01IngressPodTemplate. -func (in *ACMEChallengeSolverHTTP01IngressPodTemplate) DeepCopy() *ACMEChallengeSolverHTTP01IngressPodTemplate { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01IngressPodTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01IngressTemplate) DeepCopyInto(out *ACMEChallengeSolverHTTP01IngressTemplate) { - *out = *in - in.ACMEChallengeSolverHTTP01IngressObjectMeta.DeepCopyInto(&out.ACMEChallengeSolverHTTP01IngressObjectMeta) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01IngressTemplate. -func (in *ACMEChallengeSolverHTTP01IngressTemplate) DeepCopy() *ACMEChallengeSolverHTTP01IngressTemplate { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01IngressTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEExternalAccountBinding) DeepCopyInto(out *ACMEExternalAccountBinding) { - *out = *in - out.Key = in.Key - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEExternalAccountBinding. -func (in *ACMEExternalAccountBinding) DeepCopy() *ACMEExternalAccountBinding { - if in == nil { - return nil - } - out := new(ACMEExternalAccountBinding) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuer) DeepCopyInto(out *ACMEIssuer) { - *out = *in - if in.CABundle != nil { - in, out := &in.CABundle, &out.CABundle - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.ExternalAccountBinding != nil { - in, out := &in.ExternalAccountBinding, &out.ExternalAccountBinding - *out = new(ACMEExternalAccountBinding) - **out = **in - } - out.PrivateKey = in.PrivateKey - if in.Solvers != nil { - in, out := &in.Solvers, &out.Solvers - *out = make([]ACMEChallengeSolver, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuer. -func (in *ACMEIssuer) DeepCopy() *ACMEIssuer { - if in == nil { - return nil - } - out := new(ACMEIssuer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderAcmeDNS) DeepCopyInto(out *ACMEIssuerDNS01ProviderAcmeDNS) { - *out = *in - out.AccountSecret = in.AccountSecret - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderAcmeDNS. -func (in *ACMEIssuerDNS01ProviderAcmeDNS) DeepCopy() *ACMEIssuerDNS01ProviderAcmeDNS { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderAcmeDNS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderAkamai) DeepCopyInto(out *ACMEIssuerDNS01ProviderAkamai) { - *out = *in - out.ClientToken = in.ClientToken - out.ClientSecret = in.ClientSecret - out.AccessToken = in.AccessToken - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderAkamai. -func (in *ACMEIssuerDNS01ProviderAkamai) DeepCopy() *ACMEIssuerDNS01ProviderAkamai { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderAkamai) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderAzureDNS) DeepCopyInto(out *ACMEIssuerDNS01ProviderAzureDNS) { - *out = *in - if in.ClientSecret != nil { - in, out := &in.ClientSecret, &out.ClientSecret - *out = new(metav1.SecretKeySelector) - **out = **in - } - if in.ManagedIdentity != nil { - in, out := &in.ManagedIdentity, &out.ManagedIdentity - *out = new(AzureManagedIdentity) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderAzureDNS. -func (in *ACMEIssuerDNS01ProviderAzureDNS) DeepCopy() *ACMEIssuerDNS01ProviderAzureDNS { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderAzureDNS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderCloudDNS) DeepCopyInto(out *ACMEIssuerDNS01ProviderCloudDNS) { - *out = *in - if in.ServiceAccount != nil { - in, out := &in.ServiceAccount, &out.ServiceAccount - *out = new(metav1.SecretKeySelector) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderCloudDNS. -func (in *ACMEIssuerDNS01ProviderCloudDNS) DeepCopy() *ACMEIssuerDNS01ProviderCloudDNS { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderCloudDNS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderCloudflare) DeepCopyInto(out *ACMEIssuerDNS01ProviderCloudflare) { - *out = *in - if in.APIKey != nil { - in, out := &in.APIKey, &out.APIKey - *out = new(metav1.SecretKeySelector) - **out = **in - } - if in.APIToken != nil { - in, out := &in.APIToken, &out.APIToken - *out = new(metav1.SecretKeySelector) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderCloudflare. -func (in *ACMEIssuerDNS01ProviderCloudflare) DeepCopy() *ACMEIssuerDNS01ProviderCloudflare { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderCloudflare) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderDigitalOcean) DeepCopyInto(out *ACMEIssuerDNS01ProviderDigitalOcean) { - *out = *in - out.Token = in.Token - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderDigitalOcean. -func (in *ACMEIssuerDNS01ProviderDigitalOcean) DeepCopy() *ACMEIssuerDNS01ProviderDigitalOcean { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderDigitalOcean) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderRFC2136) DeepCopyInto(out *ACMEIssuerDNS01ProviderRFC2136) { - *out = *in - out.TSIGSecret = in.TSIGSecret - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderRFC2136. -func (in *ACMEIssuerDNS01ProviderRFC2136) DeepCopy() *ACMEIssuerDNS01ProviderRFC2136 { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderRFC2136) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderRoute53) DeepCopyInto(out *ACMEIssuerDNS01ProviderRoute53) { - *out = *in - if in.Auth != nil { - in, out := &in.Auth, &out.Auth - *out = new(Route53Auth) - (*in).DeepCopyInto(*out) - } - if in.SecretAccessKeyID != nil { - in, out := &in.SecretAccessKeyID, &out.SecretAccessKeyID - *out = new(metav1.SecretKeySelector) - **out = **in - } - out.SecretAccessKey = in.SecretAccessKey - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderRoute53. -func (in *ACMEIssuerDNS01ProviderRoute53) DeepCopy() *ACMEIssuerDNS01ProviderRoute53 { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderRoute53) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderWebhook) DeepCopyInto(out *ACMEIssuerDNS01ProviderWebhook) { - *out = *in - if in.Config != nil { - in, out := &in.Config, &out.Config - *out = new(apiextensionsv1.JSON) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderWebhook. -func (in *ACMEIssuerDNS01ProviderWebhook) DeepCopy() *ACMEIssuerDNS01ProviderWebhook { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderWebhook) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerStatus) DeepCopyInto(out *ACMEIssuerStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerStatus. -func (in *ACMEIssuerStatus) DeepCopy() *ACMEIssuerStatus { - if in == nil { - return nil - } - out := new(ACMEIssuerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureManagedIdentity) DeepCopyInto(out *AzureManagedIdentity) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedIdentity. -func (in *AzureManagedIdentity) DeepCopy() *AzureManagedIdentity { - if in == nil { - return nil - } - out := new(AzureManagedIdentity) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateDNSNameSelector) DeepCopyInto(out *CertificateDNSNameSelector) { - *out = *in - if in.MatchLabels != nil { - in, out := &in.MatchLabels, &out.MatchLabels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.DNSNames != nil { - in, out := &in.DNSNames, &out.DNSNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.DNSZones != nil { - in, out := &in.DNSZones, &out.DNSZones - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateDNSNameSelector. -func (in *CertificateDNSNameSelector) DeepCopy() *CertificateDNSNameSelector { - if in == nil { - return nil - } - out := new(CertificateDNSNameSelector) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Challenge) DeepCopyInto(out *Challenge) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Challenge. -func (in *Challenge) DeepCopy() *Challenge { - if in == nil { - return nil - } - out := new(Challenge) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Challenge) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChallengeList) DeepCopyInto(out *ChallengeList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Challenge, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChallengeList. -func (in *ChallengeList) DeepCopy() *ChallengeList { - if in == nil { - return nil - } - out := new(ChallengeList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ChallengeList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChallengeSpec) DeepCopyInto(out *ChallengeSpec) { - *out = *in - in.Solver.DeepCopyInto(&out.Solver) - out.IssuerRef = in.IssuerRef - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChallengeSpec. -func (in *ChallengeSpec) DeepCopy() *ChallengeSpec { - if in == nil { - return nil - } - out := new(ChallengeSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChallengeStatus) DeepCopyInto(out *ChallengeStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChallengeStatus. -func (in *ChallengeStatus) DeepCopy() *ChallengeStatus { - if in == nil { - return nil - } - out := new(ChallengeStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Order) DeepCopyInto(out *Order) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Order. -func (in *Order) DeepCopy() *Order { - if in == nil { - return nil - } - out := new(Order) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Order) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrderList) DeepCopyInto(out *OrderList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Order, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrderList. -func (in *OrderList) DeepCopy() *OrderList { - if in == nil { - return nil - } - out := new(OrderList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OrderList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrderSpec) DeepCopyInto(out *OrderSpec) { - *out = *in - if in.CSR != nil { - in, out := &in.CSR, &out.CSR - *out = make([]byte, len(*in)) - copy(*out, *in) - } - out.IssuerRef = in.IssuerRef - if in.DNSNames != nil { - in, out := &in.DNSNames, &out.DNSNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.IPAddresses != nil { - in, out := &in.IPAddresses, &out.IPAddresses - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Duration != nil { - in, out := &in.Duration, &out.Duration - *out = new(apismetav1.Duration) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrderSpec. -func (in *OrderSpec) DeepCopy() *OrderSpec { - if in == nil { - return nil - } - out := new(OrderSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrderStatus) DeepCopyInto(out *OrderStatus) { - *out = *in - if in.Authorizations != nil { - in, out := &in.Authorizations, &out.Authorizations - *out = make([]ACMEAuthorization, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Certificate != nil { - in, out := &in.Certificate, &out.Certificate - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.FailureTime != nil { - in, out := &in.FailureTime, &out.FailureTime - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrderStatus. -func (in *OrderStatus) DeepCopy() *OrderStatus { - if in == nil { - return nil - } - out := new(OrderStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Route53Auth) DeepCopyInto(out *Route53Auth) { - *out = *in - if in.Kubernetes != nil { - in, out := &in.Kubernetes, &out.Kubernetes - *out = new(Route53KubernetesAuth) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route53Auth. -func (in *Route53Auth) DeepCopy() *Route53Auth { - if in == nil { - return nil - } - out := new(Route53Auth) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Route53KubernetesAuth) DeepCopyInto(out *Route53KubernetesAuth) { - *out = *in - if in.ServiceAccountRef != nil { - in, out := &in.ServiceAccountRef, &out.ServiceAccountRef - *out = new(ServiceAccountRef) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route53KubernetesAuth. -func (in *Route53KubernetesAuth) DeepCopy() *Route53KubernetesAuth { - if in == nil { - return nil - } - out := new(Route53KubernetesAuth) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceAccountRef) DeepCopyInto(out *ServiceAccountRef) { - *out = *in - if in.TokenAudiences != nil { - in, out := &in.TokenAudiences, &out.TokenAudiences - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountRef. -func (in *ServiceAccountRef) DeepCopy() *ServiceAccountRef { - if in == nil { - return nil - } - out := new(ServiceAccountRef) - in.DeepCopyInto(out) - return out -} diff --git a/internal/apis/acme/v1alpha2/zz_generated.defaults.go b/internal/apis/acme/v1alpha2/zz_generated.defaults.go deleted file mode 100644 index 10b31a62682..00000000000 --- a/internal/apis/acme/v1alpha2/zz_generated.defaults.go +++ /dev/null @@ -1,33 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The cert-manager 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 defaulter-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - return nil -} diff --git a/internal/apis/acme/v1alpha3/const.go b/internal/apis/acme/v1alpha3/const.go deleted file mode 100644 index 6998e44345d..00000000000 --- a/internal/apis/acme/v1alpha3/const.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha3 - -const ( - ACMEFinalizer = "finalizer.acme.cert-manager.io" -) diff --git a/internal/apis/acme/v1alpha3/conversion.go b/internal/apis/acme/v1alpha3/conversion.go deleted file mode 100644 index 0dda212b73e..00000000000 --- a/internal/apis/acme/v1alpha3/conversion.go +++ /dev/null @@ -1,95 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha3 - -import ( - "k8s.io/apimachinery/pkg/conversion" - - "github.com/cert-manager/cert-manager/internal/apis/acme" -) - -func Convert_v1alpha3_ChallengeSpec_To_acme_ChallengeSpec(in *ChallengeSpec, out *acme.ChallengeSpec, s conversion.Scope) error { - if err := autoConvert_v1alpha3_ChallengeSpec_To_acme_ChallengeSpec(in, out, s); err != nil { - return err - } - - out.AuthorizationURL = in.AuthzURL - - switch in.Type { - case ACMEChallengeTypeHTTP01: - out.Type = acme.ACMEChallengeTypeHTTP01 - case ACMEChallengeTypeDNS01: - out.Type = acme.ACMEChallengeTypeDNS01 - default: - // this case should never be hit due to validation - out.Type = acme.ACMEChallengeType(in.Type) - } - - return nil -} - -func Convert_acme_ChallengeSpec_To_v1alpha3_ChallengeSpec(in *acme.ChallengeSpec, out *ChallengeSpec, s conversion.Scope) error { - if err := autoConvert_acme_ChallengeSpec_To_v1alpha3_ChallengeSpec(in, out, s); err != nil { - return err - } - - out.AuthzURL = in.AuthorizationURL - - switch in.Type { - case acme.ACMEChallengeTypeHTTP01: - out.Type = ACMEChallengeTypeHTTP01 - case acme.ACMEChallengeTypeDNS01: - out.Type = ACMEChallengeTypeDNS01 - default: - // this case should never be hit due to validation - out.Type = ACMEChallengeType(in.Type) - } - - return nil -} - -func Convert_v1alpha3_OrderSpec_To_acme_OrderSpec(in *OrderSpec, out *acme.OrderSpec, s conversion.Scope) error { - if err := autoConvert_v1alpha3_OrderSpec_To_acme_OrderSpec(in, out, s); err != nil { - return err - } - - out.Request = in.CSR - - return nil -} - -func Convert_acme_OrderSpec_To_v1alpha3_OrderSpec(in *acme.OrderSpec, out *OrderSpec, s conversion.Scope) error { - if err := autoConvert_acme_OrderSpec_To_v1alpha3_OrderSpec(in, out, s); err != nil { - return err - } - - out.CSR = in.Request - - return nil -} - -// Convert_acme_ACMEIssuer_To_v1alpha3_ACMEIssuer is explicitly defined to avoid issues in conversion-gen -// when referencing types in other API groups. -func Convert_acme_ACMEIssuer_To_v1alpha3_ACMEIssuer(in *acme.ACMEIssuer, out *ACMEIssuer, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuer_To_v1alpha3_ACMEIssuer(in, out, s) -} - -// Convert_v1alpha3_ACMEIssuer_To_acme_ACMEIssuer is explicitly defined to avoid issues in conversion-gen -// when referencing types in other API groups. -func Convert_v1alpha3_ACMEIssuer_To_acme_ACMEIssuer(in *ACMEIssuer, out *acme.ACMEIssuer, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEIssuer_To_acme_ACMEIssuer(in, out, s) -} diff --git a/internal/apis/acme/v1alpha3/defaults.go b/internal/apis/acme/v1alpha3/defaults.go deleted file mode 100644 index 23beb3dd257..00000000000 --- a/internal/apis/acme/v1alpha3/defaults.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha3 - -import ( - "k8s.io/apimachinery/pkg/runtime" -) - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} diff --git a/internal/apis/acme/v1alpha3/doc.go b/internal/apis/acme/v1alpha3/doc.go deleted file mode 100644 index f832fe514ab..00000000000 --- a/internal/apis/acme/v1alpha3/doc.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2020 The cert-manager 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:conversion-gen=github.com/cert-manager/cert-manager/internal/apis/acme -// +k8s:conversion-gen-external-types=github.com/cert-manager/cert-manager/internal/apis/acme/v1alpha3 -// +k8s:defaulter-gen=TypeMeta -// +k8s:deepcopy-gen=package,register - -// +groupName=acme.cert-manager.io -package v1alpha3 diff --git a/internal/apis/acme/v1alpha3/register.go b/internal/apis/acme/v1alpha3/register.go deleted file mode 100644 index e4ba55415cf..00000000000 --- a/internal/apis/acme/v1alpha3/register.go +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha3 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - "github.com/cert-manager/cert-manager/pkg/apis/acme" -) - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: acme.GroupName, Version: "v1alpha3"} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addDefaultingFuncs) - - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes) -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &Order{}, - &OrderList{}, - &Challenge{}, - &ChallengeList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/internal/apis/acme/v1alpha3/types.go b/internal/apis/acme/v1alpha3/types.go deleted file mode 100644 index 11a671c7354..00000000000 --- a/internal/apis/acme/v1alpha3/types.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha3 - -const ( - // If this annotation is specified on a Certificate or Order resource when - // using the HTTP01 solver type, the ingress.name field of the HTTP01 - // solver's configuration will be set to the value given here. - // This is especially useful for users of Ingress controllers that maintain - // a 1:1 mapping between endpoint IP and Ingress resource. - ACMECertificateHTTP01IngressNameOverride = "acme.cert-manager.io/http01-override-ingress-name" - - // If this annotation is specified on a Certificate or Order resource when - // using the HTTP01 solver type, the ingress.class field of the HTTP01 - // solver's configuration will be set to the value given here. - // This is especially useful for users deploying many different ingress - // classes into a single cluster that want to be able to re-use a single - // solver for each ingress class. - ACMECertificateHTTP01IngressClassOverride = "acme.cert-manager.io/http01-override-ingress-class" - - // IngressEditInPlaceAnnotation is used to toggle the use of ingressClass instead - // of ingress on the created Certificate resource - IngressEditInPlaceAnnotationKey = "acme.cert-manager.io/http01-edit-in-place" -) - -const ( - OrderKind = "Order" - ChallengeKind = "Challenge" -) diff --git a/internal/apis/acme/v1alpha3/types_challenge.go b/internal/apis/acme/v1alpha3/types_challenge.go deleted file mode 100644 index 63c1765d15b..00000000000 --- a/internal/apis/acme/v1alpha3/types_challenge.go +++ /dev/null @@ -1,145 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha3 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Challenge is a type to represent a Challenge request with an ACME server -// +k8s:openapi-gen=true -// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.state" -// +kubebuilder:printcolumn:name="Domain",type="string",JSONPath=".spec.dnsName" -// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.reason",description="",priority=1 -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC." -// +kubebuilder:subresource:status -// +kubebuilder:resource:path=challenges -type Challenge struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata"` - - Spec ChallengeSpec `json:"spec,omitempty"` - Status ChallengeStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ChallengeList is a list of Challenges -type ChallengeList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []Challenge `json:"items"` -} - -type ChallengeSpec struct { - // URL is the URL of the ACME Challenge resource for this challenge. - // This can be used to lookup details about the status of this challenge. - URL string `json:"url"` - - // AuthzURL is the URL to the ACME Authorization resource that this - // challenge is a part of. - AuthzURL string `json:"authzURL"` - - // DNSName is the identifier that this challenge is for, e.g. example.com. - // If the requested DNSName is a 'wildcard', this field MUST be set to the - // non-wildcard domain, e.g. for `*.example.com`, it must be `example.com`. - DNSName string `json:"dnsName"` - - // Wildcard will be true if this challenge is for a wildcard identifier, - // for example '*.example.com'. - // +optional - Wildcard bool `json:"wildcard"` - - // Type is the type of ACME challenge this resource represents. - // One of "http-01" or "dns-01". - Type ACMEChallengeType `json:"type"` - - // Token is the ACME challenge token for this challenge. - // This is the raw value returned from the ACME server. - Token string `json:"token"` - - // Key is the ACME challenge key for this challenge - // For HTTP01 challenges, this is the value that must be responded with to - // complete the HTTP01 challenge in the format: - // `.`. - // For DNS01 challenges, this is the base64 encoded SHA256 sum of the - // `.` - // text that must be set as the TXT record content. - Key string `json:"key"` - - // Solver contains the domain solving configuration that should be used to - // solve this challenge resource. - Solver ACMEChallengeSolver `json:"solver"` - - // IssuerRef references a properly configured ACME-type Issuer which should - // be used to create this Challenge. - // If the Issuer does not exist, processing will be retried. - // If the Issuer is not an 'ACME' Issuer, an error will be returned and the - // Challenge will be marked as failed. - IssuerRef cmmeta.ObjectReference `json:"issuerRef"` -} - -// The type of ACME challenge. Only http-01 and dns-01 are supported. -// +kubebuilder:validation:Enum=http-01;dns-01 -type ACMEChallengeType string - -const ( - // ACMEChallengeTypeHTTP01 denotes a Challenge is of type http-01 - // More info: https://letsencrypt.org/docs/challenge-types/#http-01-challenge - ACMEChallengeTypeHTTP01 ACMEChallengeType = "http-01" - - // ACMEChallengeTypeDNS01 denotes a Challenge is of type dns-01 - // More info: https://letsencrypt.org/docs/challenge-types/#dns-01-challenge - ACMEChallengeTypeDNS01 ACMEChallengeType = "dns-01" -) - -type ChallengeStatus struct { - // Processing is used to denote whether this challenge should be processed - // or not. - // This field will only be set to true by the 'scheduling' component. - // It will only be set to false by the 'challenges' controller, after the - // challenge has reached a final state or timed out. - // If this field is set to false, the challenge controller will not take - // any more action. - // +optional - Processing bool `json:"processing"` - - // Presented will be set to true if the challenge values for this challenge - // are currently 'presented'. - // This *does not* imply the self check is passing. Only that the values - // have been 'submitted' for the appropriate challenge mechanism (i.e. the - // DNS01 TXT record has been presented, or the HTTP01 configuration has been - // configured). - // +optional - Presented bool `json:"presented"` - - // Reason contains human readable information on why the Challenge is in the - // current state. - // +optional - Reason string `json:"reason,omitempty"` - - // State contains the current 'state' of the challenge. - // If not set, the state of the challenge is unknown. - // +optional - State State `json:"state,omitempty"` -} diff --git a/internal/apis/acme/v1alpha3/types_issuer.go b/internal/apis/acme/v1alpha3/types_issuer.go deleted file mode 100644 index b92222e2744..00000000000 --- a/internal/apis/acme/v1alpha3/types_issuer.go +++ /dev/null @@ -1,671 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha3 - -import ( - corev1 "k8s.io/api/core/v1" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - gwapi "sigs.k8s.io/gateway-api/apis/v1" - - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" -) - -// ACMEIssuer contains the specification for an ACME issuer. -// This uses the RFC8555 specification to obtain certificates by completing -// 'challenges' to prove ownership of domain identifiers. -// Earlier draft versions of the ACME specification are not supported. -type ACMEIssuer struct { - // Email is the email address to be associated with the ACME account. - // This field is optional, but it is strongly recommended to be set. - // It will be used to contact you in case of issues with your account or - // certificates, including expiry notification emails. - // This field may be updated after the account is initially registered. - // +optional - Email string `json:"email,omitempty"` - - // Server is the URL used to access the ACME server's 'directory' endpoint. - // For example, for Let's Encrypt's staging endpoint, you would use: - // "https://acme-staging-v02.api.letsencrypt.org/directory". - // Only ACME v2 endpoints (i.e. RFC 8555) are supported. - Server string `json:"server"` - - // PreferredChain is the chain to use if the ACME server outputs multiple. - // PreferredChain is no guarantee that this one gets delivered by the ACME - // endpoint. - // For example, for Let's Encrypt's DST crosssign you would use: - // "DST Root CA X3" or "ISRG Root X1" for the newer Let's Encrypt root CA. - // This value picks the first certificate bundle in the ACME alternative - // chains that has a certificate with this value as its issuer's CN - // +optional - // +kubebuilder:validation:MaxLength=64 - PreferredChain string `json:"preferredChain"` - - // Base64-encoded bundle of PEM CAs which can be used to validate the certificate - // chain presented by the ACME server. - // Mutually exclusive with SkipTLSVerify; prefer using CABundle to prevent various - // kinds of security vulnerabilities. - // If CABundle and SkipTLSVerify are unset, the system certificate bundle inside - // the container is used to validate the TLS connection. - // +optional - CABundle []byte `json:"caBundle,omitempty"` - - // INSECURE: Enables or disables validation of the ACME server TLS certificate. - // If true, requests to the ACME server will not have the TLS certificate chain - // validated. - // Mutually exclusive with CABundle; prefer using CABundle to prevent various - // kinds of security vulnerabilities. - // Only enable this option in development environments. - // If CABundle and SkipTLSVerify are unset, the system certificate bundle inside - // the container is used to validate the TLS connection. - // Defaults to false. - // +optional - SkipTLSVerify bool `json:"skipTLSVerify,omitempty"` - - // ExternalAccountBinding is a reference to a CA external account of the ACME - // server. - // If set, upon registration cert-manager will attempt to associate the given - // external account credentials with the registered ACME account. - // +optional - ExternalAccountBinding *ACMEExternalAccountBinding `json:"externalAccountBinding,omitempty"` - - // PrivateKey is the name of a Kubernetes Secret resource that will be used to - // store the automatically generated ACME account private key. - // Optionally, a `key` may be specified to select a specific entry within - // the named Secret resource. - // If `key` is not specified, a default of `tls.key` will be used. - PrivateKey cmmeta.SecretKeySelector `json:"privateKeySecretRef"` - - // Solvers is a list of challenge solvers that will be used to solve - // ACME challenges for the matching domains. - // Solver configurations must be provided in order to obtain certificates - // from an ACME server. - // For more information, see: https://cert-manager.io/docs/configuration/acme/ - // +optional - Solvers []ACMEChallengeSolver `json:"solvers,omitempty"` - - // Enables or disables generating a new ACME account key. - // If true, the Issuer resource will *not* request a new account but will expect - // the account key to be supplied via an existing secret. - // If false, the cert-manager system will generate a new ACME account key - // for the Issuer. - // Defaults to false. - // +optional - DisableAccountKeyGeneration bool `json:"disableAccountKeyGeneration,omitempty"` - - // Enables requesting a Not After date on certificates that matches the - // duration of the certificate. This is not supported by all ACME servers - // like Let's Encrypt. If set to true when the ACME server does not support - // it, it will create an error on the Order. - // Defaults to false. - // +optional - EnableDurationFeature bool `json:"enableDurationFeature,omitempty"` -} - -// ACMEExternalAccountBinding is a reference to a CA external account of the ACME -// server. -type ACMEExternalAccountBinding struct { - // keyID is the ID of the CA key that the External Account is bound to. - KeyID string `json:"keyID"` - - // keySecretRef is a Secret Key Selector referencing a data item in a Kubernetes - // Secret which holds the symmetric MAC key of the External Account Binding. - // The `key` is the index string that is paired with the key data in the - // Secret and should not be confused with the key data itself, or indeed with - // the External Account Binding keyID above. - // The secret key stored in the Secret **must** be un-padded, base64 URL - // encoded data. - Key cmmeta.SecretKeySelector `json:"keySecretRef"` - - // Deprecated: keyAlgorithm field exists for historical compatibility - // reasons and should not be used. The algorithm is now hardcoded to HS256 - // in golang/x/crypto/acme. - // +optional - KeyAlgorithm HMACKeyAlgorithm `json:"keyAlgorithm,omitempty"` -} - -// HMACKeyAlgorithm is the name of a key algorithm used for HMAC encryption -// +kubebuilder:validation:Enum=HS256;HS384;HS512 -type HMACKeyAlgorithm string - -const ( - HS256 HMACKeyAlgorithm = "HS256" - HS384 HMACKeyAlgorithm = "HS384" - HS512 HMACKeyAlgorithm = "HS512" -) - -// Configures an issuer to solve challenges using the specified options. -// Only one of HTTP01 or DNS01 may be provided. -type ACMEChallengeSolver struct { - // Selector selects a set of DNSNames on the Certificate resource that - // should be solved using this challenge solver. - // If not specified, the solver will be treated as the 'default' solver - // with the lowest priority, i.e. if any other solver has a more specific - // match, it will be used instead. - // +optional - Selector *CertificateDNSNameSelector `json:"selector,omitempty"` - - // Configures cert-manager to attempt to complete authorizations by - // performing the HTTP01 challenge flow. - // It is not possible to obtain certificates for wildcard domain names - // (e.g. `*.example.com`) using the HTTP01 challenge mechanism. - // +optional - HTTP01 *ACMEChallengeSolverHTTP01 `json:"http01,omitempty"` - - // Configures cert-manager to attempt to complete authorizations by - // performing the DNS01 challenge flow. - // +optional - DNS01 *ACMEChallengeSolverDNS01 `json:"dns01,omitempty"` -} - -// CertificateDomainSelector selects certificates using a label selector, and -// can optionally select individual DNS names within those certificates. -// If both MatchLabels and DNSNames are empty, this selector will match all -// certificates and DNS names within them. -type CertificateDNSNameSelector struct { - // A label selector that is used to refine the set of certificate's that - // this challenge solver will apply to. - // +optional - MatchLabels map[string]string `json:"matchLabels,omitempty"` - - // List of DNSNames that this solver will be used to solve. - // If specified and a match is found, a dnsNames selector will take - // precedence over a dnsZones selector. - // If multiple solvers match with the same dnsNames value, the solver - // with the most matching labels in matchLabels will be selected. - // If neither has more matches, the solver defined earlier in the list - // will be selected. - // +optional - DNSNames []string `json:"dnsNames,omitempty"` - - // List of DNSZones that this solver will be used to solve. - // The most specific DNS zone match specified here will take precedence - // over other DNS zone matches, so a solver specifying sys.example.com - // will be selected over one specifying example.com for the domain - // www.sys.example.com. - // If multiple solvers match with the same dnsZones value, the solver - // with the most matching labels in matchLabels will be selected. - // If neither has more matches, the solver defined earlier in the list - // will be selected. - // +optional - DNSZones []string `json:"dnsZones,omitempty"` -} - -// ACMEChallengeSolverHTTP01 contains configuration detailing how to solve -// HTTP01 challenges within a Kubernetes cluster. -// Typically this is accomplished through creating 'routes' of some description -// that configure ingress controllers to direct traffic to 'solver pods', which -// are responsible for responding to the ACME server's HTTP requests. -// Only one of Ingress / Gateway can be specified. -type ACMEChallengeSolverHTTP01 struct { - // The ingress based HTTP01 challenge solver will solve challenges by - // creating or modifying Ingress resources in order to route requests for - // '/.well-known/acme-challenge/XYZ' to 'challenge solver' pods that are - // provisioned by cert-manager for each Challenge to be completed. - // +optional - Ingress *ACMEChallengeSolverHTTP01Ingress `json:"ingress,omitempty"` - - // The Gateway API is a sig-network community API that models service networking - // in Kubernetes (https://gateway-api.sigs.k8s.io/). The Gateway solver will - // create HTTPRoutes with the specified labels in the same namespace as the challenge. - // This solver is experimental, and fields / behaviour may change in the future. - // +optional - GatewayHTTPRoute *ACMEChallengeSolverHTTP01GatewayHTTPRoute `json:"gatewayHTTPRoute,omitempty"` -} - -type ACMEChallengeSolverHTTP01Ingress struct { - // Optional service type for Kubernetes solver service. Supported values - // are NodePort or ClusterIP. If unset, defaults to NodePort. - // +optional - ServiceType corev1.ServiceType `json:"serviceType,omitempty"` - - // This field configures the field `ingressClassName` on the created Ingress - // resources used to solve ACME challenges that use this challenge solver. - // This is the recommended way of configuring the ingress class. Only one of - // `class`, `name` or `ingressClassName` may be specified. - // +optional - IngressClassName *string `json:"ingressClassName,omitempty"` - - // This field configures the annotation `kubernetes.io/ingress.class` when - // creating Ingress resources to solve ACME challenges that use this - // challenge solver. Only one of `class`, `name` or `ingressClassName` may - // be specified. - // +optional - Class *string `json:"class,omitempty"` - - // The name of the ingress resource that should have ACME challenge solving - // routes inserted into it in order to solve HTTP01 challenges. - // This is typically used in conjunction with ingress controllers like - // ingress-gce, which maintains a 1:1 mapping between external IPs and - // ingress resources. Only one of `class`, `name` or `ingressClassName` may - // be specified. - // +optional - Name string `json:"name,omitempty"` - - // Optional pod template used to configure the ACME challenge solver pods - // used for HTTP01 challenges. - // +optional - PodTemplate *ACMEChallengeSolverHTTP01IngressPodTemplate `json:"podTemplate,omitempty"` - - // Optional ingress template used to configure the ACME challenge solver - // ingress used for HTTP01 challenges - // +optional - IngressTemplate *ACMEChallengeSolverHTTP01IngressTemplate `json:"ingressTemplate,omitempty"` -} - -type ACMEChallengeSolverHTTP01GatewayHTTPRoute struct { - // Optional service type for Kubernetes solver service. Supported values - // are NodePort or ClusterIP. If unset, defaults to NodePort. - // +optional - ServiceType corev1.ServiceType `json:"serviceType,omitempty"` - - // Custom labels that will be applied to HTTPRoutes created by cert-manager - // while solving HTTP-01 challenges. - // +optional - Labels map[string]string - - // When solving an HTTP-01 challenge, cert-manager creates an HTTPRoute. - // cert-manager needs to know which parentRefs should be used when creating - // the HTTPRoute. Usually, the parentRef references a Gateway. See: - // https://gateway-api.sigs.k8s.io/v1alpha2/api-types/httproute/#attaching-to-gateways - ParentRefs []gwapi.ParentReference -} - -type ACMEChallengeSolverHTTP01IngressPodTemplate struct { - // ObjectMeta overrides for the pod used to solve HTTP01 challenges. - // Only the 'labels' and 'annotations' fields may be set. - // If labels or annotations overlap with in-built values, the values here - // will override the in-built values. - // +optional - ACMEChallengeSolverHTTP01IngressPodObjectMeta `json:"metadata"` - - // PodSpec defines overrides for the HTTP01 challenge solver pod. - // Check ACMEChallengeSolverHTTP01IngressPodSpec to find out currently supported fields. - // All other fields will be ignored. - // +optional - Spec ACMEChallengeSolverHTTP01IngressPodSpec `json:"spec"` -} - -type ACMEChallengeSolverHTTP01IngressPodObjectMeta struct { - // Annotations that should be added to the create ACME HTTP01 solver pods. - // +optional - Annotations map[string]string `json:"annotations,omitempty"` - - // Labels that should be added to the created ACME HTTP01 solver pods. - // +optional - Labels map[string]string `json:"labels,omitempty"` -} - -type ACMEChallengeSolverHTTP01IngressPodSpec struct { - // NodeSelector is a selector which must be true for the pod to fit on a node. - // Selector which must match a node's labels for the pod to be scheduled on that node. - // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - // +optional - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - - // If specified, the pod's scheduling constraints - // +optional - Affinity *corev1.Affinity `json:"affinity,omitempty"` - - // If specified, the pod's tolerations. - // +optional - Tolerations []corev1.Toleration `json:"tolerations,omitempty"` - - // If specified, the pod's priorityClassName. - // +optional - PriorityClassName string `json:"priorityClassName,omitempty"` - - // If specified, the pod's service account - // +optional - ServiceAccountName string `json:"serviceAccountName,omitempty"` - - // If specified, the pod's imagePullSecrets - // +optional - ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty" patchMergeKey:"name" patchStrategy:"merge"` -} - -type ACMEChallengeSolverHTTP01IngressTemplate struct { - // ObjectMeta overrides for the ingress used to solve HTTP01 challenges. - // Only the 'labels' and 'annotations' fields may be set. - // If labels or annotations overlap with in-built values, the values here - // will override the in-built values. - // +optional - ACMEChallengeSolverHTTP01IngressObjectMeta `json:"metadata"` -} - -type ACMEChallengeSolverHTTP01IngressObjectMeta struct { - // Annotations that should be added to the created ACME HTTP01 solver ingress. - // +optional - Annotations map[string]string `json:"annotations,omitempty"` - - // Labels that should be added to the created ACME HTTP01 solver ingress. - // +optional - Labels map[string]string `json:"labels,omitempty"` -} - -// Used to configure a DNS01 challenge provider to be used when solving DNS01 -// challenges. -// Only one DNS provider may be configured per solver. -type ACMEChallengeSolverDNS01 struct { - // CNAMEStrategy configures how the DNS01 provider should handle CNAME - // records when found in DNS zones. - // +optional - CNAMEStrategy CNAMEStrategy `json:"cnameStrategy,omitempty"` - - // Use the Akamai DNS zone management API to manage DNS01 challenge records. - // +optional - Akamai *ACMEIssuerDNS01ProviderAkamai `json:"akamai,omitempty"` - - // Use the Google Cloud DNS API to manage DNS01 challenge records. - // +optional - CloudDNS *ACMEIssuerDNS01ProviderCloudDNS `json:"clouddns,omitempty"` - - // Use the Cloudflare API to manage DNS01 challenge records. - // +optional - Cloudflare *ACMEIssuerDNS01ProviderCloudflare `json:"cloudflare,omitempty"` - - // Use the AWS Route53 API to manage DNS01 challenge records. - // +optional - Route53 *ACMEIssuerDNS01ProviderRoute53 `json:"route53,omitempty"` - - // Use the Microsoft Azure DNS API to manage DNS01 challenge records. - // +optional - AzureDNS *ACMEIssuerDNS01ProviderAzureDNS `json:"azuredns,omitempty"` - - // Use the DigitalOcean DNS API to manage DNS01 challenge records. - // +optional - DigitalOcean *ACMEIssuerDNS01ProviderDigitalOcean `json:"digitalocean,omitempty"` - - // Use the 'ACME DNS' (https://github.com/joohoi/acme-dns) API to manage - // DNS01 challenge records. - // +optional - AcmeDNS *ACMEIssuerDNS01ProviderAcmeDNS `json:"acmedns,omitempty"` - - // Use RFC2136 ("Dynamic Updates in the Domain Name System") (https://datatracker.ietf.org/doc/rfc2136/) - // to manage DNS01 challenge records. - // +optional - RFC2136 *ACMEIssuerDNS01ProviderRFC2136 `json:"rfc2136,omitempty"` - - // Configure an external webhook based DNS01 challenge solver to manage - // DNS01 challenge records. - // +optional - Webhook *ACMEIssuerDNS01ProviderWebhook `json:"webhook,omitempty"` -} - -// CNAMEStrategy configures how the DNS01 provider should handle CNAME records -// when found in DNS zones. -// By default, the None strategy will be applied (i.e. do not follow CNAMEs). -// +kubebuilder:validation:Enum=None;Follow -type CNAMEStrategy string - -const ( - // NoneStrategy indicates that no CNAME resolution strategy should be used - // when determining which DNS zone to update during DNS01 challenges. - NoneStrategy = "None" - - // FollowStrategy will cause cert-manager to recurse through CNAMEs in - // order to determine which DNS zone to update during DNS01 challenges. - // This is useful if you do not want to grant cert-manager access to your - // root DNS zone, and instead delegate the _acme-challenge.example.com - // subdomain to some other, less privileged domain. - FollowStrategy = "Follow" -) - -// ACMEIssuerDNS01ProviderAkamai is a structure containing the DNS -// configuration for Akamai DNS—Zone Record Management API -type ACMEIssuerDNS01ProviderAkamai struct { - ServiceConsumerDomain string `json:"serviceConsumerDomain"` - ClientToken cmmeta.SecretKeySelector `json:"clientTokenSecretRef"` - ClientSecret cmmeta.SecretKeySelector `json:"clientSecretSecretRef"` - AccessToken cmmeta.SecretKeySelector `json:"accessTokenSecretRef"` -} - -// ACMEIssuerDNS01ProviderCloudDNS is a structure containing the DNS -// configuration for Google Cloud DNS -type ACMEIssuerDNS01ProviderCloudDNS struct { - // +optional - ServiceAccount *cmmeta.SecretKeySelector `json:"serviceAccountSecretRef,omitempty"` - Project string `json:"project"` - - // HostedZoneName is an optional field that tells cert-manager in which - // Cloud DNS zone the challenge record has to be created. - // If left empty cert-manager will automatically choose a zone. - // +optional - HostedZoneName string `json:"hostedZoneName,omitempty"` -} - -// ACMEIssuerDNS01ProviderCloudflare is a structure containing the DNS -// configuration for Cloudflare. -// One of `apiKeySecretRef` or `apiTokenSecretRef` must be provided. -type ACMEIssuerDNS01ProviderCloudflare struct { - // Email of the account, only required when using API key based authentication. - // +optional - Email string `json:"email,omitempty"` - - // API key to use to authenticate with Cloudflare. - // Note: using an API token to authenticate is now the recommended method - // as it allows greater control of permissions. - // +optional - APIKey *cmmeta.SecretKeySelector `json:"apiKeySecretRef,omitempty"` - - // API token used to authenticate with Cloudflare. - // +optional - APIToken *cmmeta.SecretKeySelector `json:"apiTokenSecretRef,omitempty"` -} - -// ACMEIssuerDNS01ProviderDigitalOcean is a structure containing the DNS -// configuration for DigitalOcean Domains -type ACMEIssuerDNS01ProviderDigitalOcean struct { - Token cmmeta.SecretKeySelector `json:"tokenSecretRef"` -} - -// ACMEIssuerDNS01ProviderRoute53 is a structure containing the Route 53 -// configuration for AWS -type ACMEIssuerDNS01ProviderRoute53 struct { - // Auth configures how cert-manager authenticates. - // +optional - Auth *Route53Auth `json:"auth,omitempty"` - - // The AccessKeyID is used for authentication. If not set we fall-back to using env vars, shared credentials file or AWS Instance metadata - // see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials - // +optional - AccessKeyID string `json:"accessKeyID,omitempty"` - - // If set, pull the AWS access key ID from a key within a kubernetes secret. - // see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials - // +optional - SecretAccessKeyID *cmmeta.SecretKeySelector `json:"accessKeyIDSecretRef,omitempty"` - - // The SecretAccessKey is used for authentication. If not set we fall-back to using env vars, shared credentials file or AWS Instance metadata - // https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials - // +optional - SecretAccessKey cmmeta.SecretKeySelector `json:"secretAccessKeySecretRef"` - - // Role is a Role ARN which the Route53 provider will assume using either the explicit credentials AccessKeyID/SecretAccessKey - // or the inferred credentials from environment variables, shared credentials file or AWS Instance metadata - // +optional - Role string `json:"role,omitempty"` - - // If set, the provider will manage only this zone in Route53 and will not do an lookup using the route53:ListHostedZonesByName api call. - // +optional - HostedZoneID string `json:"hostedZoneID,omitempty"` - - // Always set the region when using AccessKeyID and SecretAccessKey - Region string `json:"region"` -} - -// Route53Auth is configuration used to authenticate with a Route53. -type Route53Auth struct { - // Kubernetes authenticates with Route53 using AssumeRoleWithWebIdentity - // by passing a bound ServiceAccount token. - Kubernetes *Route53KubernetesAuth `json:"kubernetes"` -} - -// Route53KubernetesAuth is a configuration to authenticate against Route53 -// using a bound Kubernetes ServiceAccount token. -type Route53KubernetesAuth struct { - // A reference to a service account that will be used to request a bound - // token (also known as "projected token"). To use this field, you must - // configure an RBAC rule to let cert-manager request a token. - ServiceAccountRef *ServiceAccountRef `json:"serviceAccountRef"` -} - -// ServiceAccountRef is a service account used by cert-manager to request a -// token. The expiration of the token is also set by cert-manager to 10 minutes. -type ServiceAccountRef struct { - // Name of the ServiceAccount used to request a token. - Name string `json:"name"` - - // TokenAudiences is an optional list of audiences to include in the - // token passed to AWS. The default token consisting of the issuer's namespace - // and name is always included. - // If unset the audience defaults to `sts.amazonaws.com`. - // +optional - TokenAudiences []string `json:"audiences,omitempty"` -} - -// ACMEIssuerDNS01ProviderAzureDNS is a structure containing the -// configuration for Azure DNS -type ACMEIssuerDNS01ProviderAzureDNS struct { - // if both this and ClientSecret are left unset MSI will be used - // +optional - ClientID string `json:"clientID,omitempty"` - - // if both this and ClientID are left unset MSI will be used - // +optional - ClientSecret *cmmeta.SecretKeySelector `json:"clientSecretSecretRef,omitempty"` - - // ID of the Azure subscription - SubscriptionID string `json:"subscriptionID"` - - // when specifying ClientID and ClientSecret then this field is also needed - // +optional - TenantID string `json:"tenantID,omitempty"` - - // resource group the DNS zone is located in - ResourceGroupName string `json:"resourceGroupName"` - - // name of the DNS zone that should be used - // +optional - HostedZoneName string `json:"hostedZoneName,omitempty"` - - // name of the Azure environment (default AzurePublicCloud) - // +optional - Environment AzureDNSEnvironment `json:"environment,omitempty"` - - // managed identity configuration, can not be used at the same time as clientID, clientSecretSecretRef or tenantID - // +optional - ManagedIdentity *AzureManagedIdentity `json:"managedIdentity,omitempty"` -} - -type AzureManagedIdentity struct { - // client ID of the managed identity, can not be used at the same time as resourceID - // +optional - ClientID string `json:"clientID,omitempty"` - - // resource ID of the managed identity, can not be used at the same time as clientID - // +optional - ResourceID string `json:"resourceID,omitempty"` -} - -// +kubebuilder:validation:Enum=AzurePublicCloud;AzureChinaCloud;AzureGermanCloud;AzureUSGovernmentCloud -type AzureDNSEnvironment string - -const ( - AzurePublicCloud AzureDNSEnvironment = "AzurePublicCloud" - AzureChinaCloud AzureDNSEnvironment = "AzureChinaCloud" - AzureGermanCloud AzureDNSEnvironment = "AzureGermanCloud" - AzureUSGovernmentCloud AzureDNSEnvironment = "AzureUSGovernmentCloud" -) - -// ACMEIssuerDNS01ProviderAcmeDNS is a structure containing the -// configuration for ACME-DNS servers -type ACMEIssuerDNS01ProviderAcmeDNS struct { - Host string `json:"host"` - - AccountSecret cmmeta.SecretKeySelector `json:"accountSecretRef"` -} - -// ACMEIssuerDNS01ProviderRFC2136 is a structure containing the -// configuration for RFC2136 DNS -type ACMEIssuerDNS01ProviderRFC2136 struct { - // The IP address or hostname of an authoritative DNS server supporting - // RFC2136 in the form host:port. If the host is an IPv6 address it must be - // enclosed in square brackets (e.g [2001:db8::1]) ; port is optional. - // This field is required. - Nameserver string `json:"nameserver"` - - // The name of the secret containing the TSIG value. - // If ``tsigKeyName`` is defined, this field is required. - // +optional - TSIGSecret cmmeta.SecretKeySelector `json:"tsigSecretSecretRef,omitempty"` - - // The TSIG Key name configured in the DNS. - // If ``tsigSecretSecretRef`` is defined, this field is required. - // +optional - TSIGKeyName string `json:"tsigKeyName,omitempty"` - - // The TSIG Algorithm configured in the DNS supporting RFC2136. Used only - // when ``tsigSecretSecretRef`` and ``tsigKeyName`` are defined. - // Supported values are (case-insensitive): ``HMACMD5`` (default), - // ``HMACSHA1``, ``HMACSHA256`` or ``HMACSHA512``. - // +optional - TSIGAlgorithm string `json:"tsigAlgorithm,omitempty"` -} - -// ACMEIssuerDNS01ProviderWebhook specifies configuration for a webhook DNS01 -// provider, including where to POST ChallengePayload resources. -type ACMEIssuerDNS01ProviderWebhook struct { - // The API group name that should be used when POSTing ChallengePayload - // resources to the webhook apiserver. - // This should be the same as the GroupName specified in the webhook - // provider implementation. - GroupName string `json:"groupName"` - - // The name of the solver to use, as defined in the webhook provider - // implementation. - // This will typically be the name of the provider, e.g. 'cloudflare'. - SolverName string `json:"solverName"` - - // Additional configuration that should be passed to the webhook apiserver - // when challenges are processed. - // This can contain arbitrary JSON data. - // Secret values should not be specified in this stanza. - // If secret values are needed (e.g. credentials for a DNS service), you - // should use a SecretKeySelector to reference a Secret resource. - // For details on the schema of this field, consult the webhook provider - // implementation's documentation. - // +optional - Config *apiextensionsv1.JSON `json:"config,omitempty"` -} - -type ACMEIssuerStatus struct { - // URI is the unique account identifier, which can also be used to retrieve - // account details from the CA - // +optional - URI string `json:"uri,omitempty"` - - // LastRegisteredEmail is the email associated with the latest registered - // ACME account, in order to track changes made to registered account - // associated with the Issuer - // +optional - LastRegisteredEmail string `json:"lastRegisteredEmail,omitempty"` - - // LastPrivateKeyHash is a hash of the private key associated with the latest - // registered ACME account, in order to track changes made to registered account - // associated with the Issuer - LastPrivateKeyHash string `json:"lastPrivateKeyHash,omitempty"` -} diff --git a/internal/apis/acme/v1alpha3/types_order.go b/internal/apis/acme/v1alpha3/types_order.go deleted file mode 100644 index 4f50ca46763..00000000000 --- a/internal/apis/acme/v1alpha3/types_order.go +++ /dev/null @@ -1,238 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha3 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Order is a type to represent an Order with an ACME server -// +k8s:openapi-gen=true -type Order struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata"` - - Spec OrderSpec `json:"spec,omitempty"` - Status OrderStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// OrderList is a list of Orders -type OrderList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []Order `json:"items"` -} - -type OrderSpec struct { - // Certificate signing request bytes in DER encoding. - // This will be used when finalizing the order. - // This field must be set on the order. - CSR []byte `json:"csr"` - - // IssuerRef references a properly configured ACME-type Issuer which should - // be used to create this Order. - // If the Issuer does not exist, processing will be retried. - // If the Issuer is not an 'ACME' Issuer, an error will be returned and the - // Order will be marked as failed. - IssuerRef cmmeta.ObjectReference `json:"issuerRef"` - - // CommonName is the common name as specified on the DER encoded CSR. - // If specified, this value must also be present in `dnsNames` or `ipAddresses`. - // This field must match the corresponding field on the DER encoded CSR. - // +optional - CommonName string `json:"commonName,omitempty"` - - // DNSNames is a list of DNS names that should be included as part of the Order - // validation process. - // This field must match the corresponding field on the DER encoded CSR. - //+optional - DNSNames []string `json:"dnsNames,omitempty"` - - // IPAddresses is a list of IP addresses that should be included as part of the Order - // validation process. - // This field must match the corresponding field on the DER encoded CSR. - // +optional - IPAddresses []string `json:"ipAddresses,omitempty"` - - // Duration is the duration for the not after date for the requested certificate. - // this is set on order creation as pe the ACME spec. - // +optional - Duration *metav1.Duration `json:"duration,omitempty"` -} - -type OrderStatus struct { - // URL of the Order. - // This will initially be empty when the resource is first created. - // The Order controller will populate this field when the Order is first processed. - // This field will be immutable after it is initially set. - // +optional - URL string `json:"url,omitempty"` - - // FinalizeURL of the Order. - // This is used to obtain certificates for this order once it has been completed. - // +optional - FinalizeURL string `json:"finalizeURL,omitempty"` - - // Authorizations contains data returned from the ACME server on what - // authorizations must be completed in order to validate the DNS names - // specified on the Order. - // +optional - Authorizations []ACMEAuthorization `json:"authorizations,omitempty"` - - // Certificate is a copy of the PEM encoded certificate for this Order. - // This field will be populated after the order has been successfully - // finalized with the ACME server, and the order has transitioned to the - // 'valid' state. - // +optional - Certificate []byte `json:"certificate,omitempty"` - - // State contains the current state of this Order resource. - // States 'success' and 'expired' are 'final' - // +optional - State State `json:"state,omitempty"` - - // Reason optionally provides more information about a why the order is in - // the current state. - // +optional - Reason string `json:"reason,omitempty"` - - // FailureTime stores the time that this order failed. - // This is used to influence garbage collection and back-off. - // +optional - FailureTime *metav1.Time `json:"failureTime,omitempty"` -} - -// ACMEAuthorization contains data returned from the ACME server on an -// authorization that must be completed in order validate a DNS name on an ACME -// Order resource. -type ACMEAuthorization struct { - // URL is the URL of the Authorization that must be completed - URL string `json:"url"` - - // Identifier is the DNS name to be validated as part of this authorization - // +optional - Identifier string `json:"identifier,omitempty"` - - // Wildcard will be true if this authorization is for a wildcard DNS name. - // If this is true, the identifier will be the *non-wildcard* version of - // the DNS name. - // For example, if '*.example.com' is the DNS name being validated, this - // field will be 'true' and the 'identifier' field will be 'example.com'. - // +optional - Wildcard *bool `json:"wildcard,omitempty"` - - // InitialState is the initial state of the ACME authorization when first - // fetched from the ACME server. - // If an Authorization is already 'valid', the Order controller will not - // create a Challenge resource for the authorization. This will occur when - // working with an ACME server that enables 'authz reuse' (such as Let's - // Encrypt's production endpoint). - // If not set and 'identifier' is set, the state is assumed to be pending - // and a Challenge will be created. - // +optional - InitialState State `json:"initialState,omitempty"` - - // Challenges specifies the challenge types offered by the ACME server. - // One of these challenge types will be selected when validating the DNS - // name and an appropriate Challenge resource will be created to perform - // the ACME challenge process. - // +optional - Challenges []ACMEChallenge `json:"challenges,omitempty"` -} - -// Challenge specifies a challenge offered by the ACME server for an Order. -// An appropriate Challenge resource can be created to perform the ACME -// challenge process. -type ACMEChallenge struct { - // URL is the URL of this challenge. It can be used to retrieve additional - // metadata about the Challenge from the ACME server. - URL string `json:"url"` - - // Token is the token that must be presented for this challenge. - // This is used to compute the 'key' that must also be presented. - Token string `json:"token"` - - // Type is the type of challenge being offered, e.g. 'http-01', 'dns-01', - // 'tls-sni-01', etc. - // This is the raw value retrieved from the ACME server. - // Only 'http-01' and 'dns-01' are supported by cert-manager, other values - // will be ignored. - Type string `json:"type"` -} - -// State represents the state of an ACME resource, such as an Order. -// The possible options here map to the corresponding values in the -// ACME specification. -// Full details of these values can be found here: https://tools.ietf.org/html/draft-ietf-acme-acme-15#section-7.1.6 -// Clients utilising this type must also gracefully handle unknown -// values, as the contents of this enumeration may be added to over time. -// +kubebuilder:validation:Enum=valid;ready;pending;processing;invalid;expired;errored -type State string - -const ( - // Unknown is not a real state as part of the ACME spec. - // It is used to represent an unrecognised value. - Unknown State = "" - - // Valid signifies that an ACME resource is in a valid state. - // If an order is 'valid', it has been finalized with the ACME server and - // the certificate can be retrieved from the ACME server using the - // certificate URL stored in the Order's status subresource. - // This is a final state. - Valid State = "valid" - - // Ready signifies that an ACME resource is in a ready state. - // If an order is 'ready', all of its challenges have been completed - // successfully and the order is ready to be finalized. - // Once finalized, it will transition to the Valid state. - // This is a transient state. - Ready State = "ready" - - // Pending signifies that an ACME resource is still pending and is not yet ready. - // If an Order is marked 'Pending', the validations for that Order are still in progress. - // This is a transient state. - Pending State = "pending" - - // Processing signifies that an ACME resource is being processed by the server. - // If an Order is marked 'Processing', the validations for that Order are currently being processed. - // This is a transient state. - Processing State = "processing" - - // Invalid signifies that an ACME resource is invalid for some reason. - // If an Order is marked 'invalid', one of its validations be have invalid for some reason. - // This is a final state. - Invalid State = "invalid" - - // Expired signifies that an ACME resource has expired. - // If an Order is marked 'Expired', one of its validations may have expired or the Order itself. - // This is a final state. - Expired State = "expired" - - // Errored signifies that the ACME resource has errored for some reason. - // This is a catch-all state, and is used for marking internal cert-manager - // errors such as validation failures. - // This is a final state. - Errored State = "errored" -) diff --git a/internal/apis/acme/v1alpha3/zz_generated.conversion.go b/internal/apis/acme/v1alpha3/zz_generated.conversion.go deleted file mode 100644 index e3525c8a987..00000000000 --- a/internal/apis/acme/v1alpha3/zz_generated.conversion.go +++ /dev/null @@ -1,1711 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The cert-manager 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 conversion-gen. DO NOT EDIT. - -package v1alpha3 - -import ( - unsafe "unsafe" - - acme "github.com/cert-manager/cert-manager/internal/apis/acme" - meta "github.com/cert-manager/cert-manager/internal/apis/meta" - metav1 "github.com/cert-manager/cert-manager/internal/apis/meta/v1" - apismetav1 "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" - v1 "k8s.io/api/core/v1" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - pkgapismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - apisv1 "sigs.k8s.io/gateway-api/apis/v1" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*ACMEAuthorization)(nil), (*acme.ACMEAuthorization)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEAuthorization_To_acme_ACMEAuthorization(a.(*ACMEAuthorization), b.(*acme.ACMEAuthorization), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEAuthorization)(nil), (*ACMEAuthorization)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEAuthorization_To_v1alpha3_ACMEAuthorization(a.(*acme.ACMEAuthorization), b.(*ACMEAuthorization), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallenge)(nil), (*acme.ACMEChallenge)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEChallenge_To_acme_ACMEChallenge(a.(*ACMEChallenge), b.(*acme.ACMEChallenge), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallenge)(nil), (*ACMEChallenge)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallenge_To_v1alpha3_ACMEChallenge(a.(*acme.ACMEChallenge), b.(*ACMEChallenge), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolver)(nil), (*acme.ACMEChallengeSolver)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEChallengeSolver_To_acme_ACMEChallengeSolver(a.(*ACMEChallengeSolver), b.(*acme.ACMEChallengeSolver), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolver)(nil), (*ACMEChallengeSolver)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolver_To_v1alpha3_ACMEChallengeSolver(a.(*acme.ACMEChallengeSolver), b.(*ACMEChallengeSolver), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverDNS01)(nil), (*acme.ACMEChallengeSolverDNS01)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEChallengeSolverDNS01_To_acme_ACMEChallengeSolverDNS01(a.(*ACMEChallengeSolverDNS01), b.(*acme.ACMEChallengeSolverDNS01), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverDNS01)(nil), (*ACMEChallengeSolverDNS01)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverDNS01_To_v1alpha3_ACMEChallengeSolverDNS01(a.(*acme.ACMEChallengeSolverDNS01), b.(*ACMEChallengeSolverDNS01), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01)(nil), (*acme.ACMEChallengeSolverHTTP01)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEChallengeSolverHTTP01_To_acme_ACMEChallengeSolverHTTP01(a.(*ACMEChallengeSolverHTTP01), b.(*acme.ACMEChallengeSolverHTTP01), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01)(nil), (*ACMEChallengeSolverHTTP01)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01_To_v1alpha3_ACMEChallengeSolverHTTP01(a.(*acme.ACMEChallengeSolverHTTP01), b.(*ACMEChallengeSolverHTTP01), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01GatewayHTTPRoute)(nil), (*acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute(a.(*ACMEChallengeSolverHTTP01GatewayHTTPRoute), b.(*acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute)(nil), (*ACMEChallengeSolverHTTP01GatewayHTTPRoute)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_v1alpha3_ACMEChallengeSolverHTTP01GatewayHTTPRoute(a.(*acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute), b.(*ACMEChallengeSolverHTTP01GatewayHTTPRoute), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01Ingress)(nil), (*acme.ACMEChallengeSolverHTTP01Ingress)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEChallengeSolverHTTP01Ingress_To_acme_ACMEChallengeSolverHTTP01Ingress(a.(*ACMEChallengeSolverHTTP01Ingress), b.(*acme.ACMEChallengeSolverHTTP01Ingress), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01Ingress)(nil), (*ACMEChallengeSolverHTTP01Ingress)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01Ingress_To_v1alpha3_ACMEChallengeSolverHTTP01Ingress(a.(*acme.ACMEChallengeSolverHTTP01Ingress), b.(*ACMEChallengeSolverHTTP01Ingress), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01IngressObjectMeta)(nil), (*acme.ACMEChallengeSolverHTTP01IngressObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEChallengeSolverHTTP01IngressObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressObjectMeta(a.(*ACMEChallengeSolverHTTP01IngressObjectMeta), b.(*acme.ACMEChallengeSolverHTTP01IngressObjectMeta), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01IngressObjectMeta)(nil), (*ACMEChallengeSolverHTTP01IngressObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01IngressObjectMeta_To_v1alpha3_ACMEChallengeSolverHTTP01IngressObjectMeta(a.(*acme.ACMEChallengeSolverHTTP01IngressObjectMeta), b.(*ACMEChallengeSolverHTTP01IngressObjectMeta), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01IngressPodObjectMeta)(nil), (*acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta(a.(*ACMEChallengeSolverHTTP01IngressPodObjectMeta), b.(*acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta)(nil), (*ACMEChallengeSolverHTTP01IngressPodObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_v1alpha3_ACMEChallengeSolverHTTP01IngressPodObjectMeta(a.(*acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta), b.(*ACMEChallengeSolverHTTP01IngressPodObjectMeta), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01IngressPodSpec)(nil), (*acme.ACMEChallengeSolverHTTP01IngressPodSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEChallengeSolverHTTP01IngressPodSpec_To_acme_ACMEChallengeSolverHTTP01IngressPodSpec(a.(*ACMEChallengeSolverHTTP01IngressPodSpec), b.(*acme.ACMEChallengeSolverHTTP01IngressPodSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01IngressPodSpec)(nil), (*ACMEChallengeSolverHTTP01IngressPodSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01IngressPodSpec_To_v1alpha3_ACMEChallengeSolverHTTP01IngressPodSpec(a.(*acme.ACMEChallengeSolverHTTP01IngressPodSpec), b.(*ACMEChallengeSolverHTTP01IngressPodSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01IngressPodTemplate)(nil), (*acme.ACMEChallengeSolverHTTP01IngressPodTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEChallengeSolverHTTP01IngressPodTemplate_To_acme_ACMEChallengeSolverHTTP01IngressPodTemplate(a.(*ACMEChallengeSolverHTTP01IngressPodTemplate), b.(*acme.ACMEChallengeSolverHTTP01IngressPodTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01IngressPodTemplate)(nil), (*ACMEChallengeSolverHTTP01IngressPodTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01IngressPodTemplate_To_v1alpha3_ACMEChallengeSolverHTTP01IngressPodTemplate(a.(*acme.ACMEChallengeSolverHTTP01IngressPodTemplate), b.(*ACMEChallengeSolverHTTP01IngressPodTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01IngressTemplate)(nil), (*acme.ACMEChallengeSolverHTTP01IngressTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEChallengeSolverHTTP01IngressTemplate_To_acme_ACMEChallengeSolverHTTP01IngressTemplate(a.(*ACMEChallengeSolverHTTP01IngressTemplate), b.(*acme.ACMEChallengeSolverHTTP01IngressTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01IngressTemplate)(nil), (*ACMEChallengeSolverHTTP01IngressTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01IngressTemplate_To_v1alpha3_ACMEChallengeSolverHTTP01IngressTemplate(a.(*acme.ACMEChallengeSolverHTTP01IngressTemplate), b.(*ACMEChallengeSolverHTTP01IngressTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEExternalAccountBinding)(nil), (*acme.ACMEExternalAccountBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEExternalAccountBinding_To_acme_ACMEExternalAccountBinding(a.(*ACMEExternalAccountBinding), b.(*acme.ACMEExternalAccountBinding), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEExternalAccountBinding)(nil), (*ACMEExternalAccountBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEExternalAccountBinding_To_v1alpha3_ACMEExternalAccountBinding(a.(*acme.ACMEExternalAccountBinding), b.(*ACMEExternalAccountBinding), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderAcmeDNS)(nil), (*acme.ACMEIssuerDNS01ProviderAcmeDNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEIssuerDNS01ProviderAcmeDNS_To_acme_ACMEIssuerDNS01ProviderAcmeDNS(a.(*ACMEIssuerDNS01ProviderAcmeDNS), b.(*acme.ACMEIssuerDNS01ProviderAcmeDNS), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderAcmeDNS)(nil), (*ACMEIssuerDNS01ProviderAcmeDNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderAcmeDNS_To_v1alpha3_ACMEIssuerDNS01ProviderAcmeDNS(a.(*acme.ACMEIssuerDNS01ProviderAcmeDNS), b.(*ACMEIssuerDNS01ProviderAcmeDNS), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderAkamai)(nil), (*acme.ACMEIssuerDNS01ProviderAkamai)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEIssuerDNS01ProviderAkamai_To_acme_ACMEIssuerDNS01ProviderAkamai(a.(*ACMEIssuerDNS01ProviderAkamai), b.(*acme.ACMEIssuerDNS01ProviderAkamai), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderAkamai)(nil), (*ACMEIssuerDNS01ProviderAkamai)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderAkamai_To_v1alpha3_ACMEIssuerDNS01ProviderAkamai(a.(*acme.ACMEIssuerDNS01ProviderAkamai), b.(*ACMEIssuerDNS01ProviderAkamai), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderAzureDNS)(nil), (*acme.ACMEIssuerDNS01ProviderAzureDNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEIssuerDNS01ProviderAzureDNS_To_acme_ACMEIssuerDNS01ProviderAzureDNS(a.(*ACMEIssuerDNS01ProviderAzureDNS), b.(*acme.ACMEIssuerDNS01ProviderAzureDNS), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderAzureDNS)(nil), (*ACMEIssuerDNS01ProviderAzureDNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderAzureDNS_To_v1alpha3_ACMEIssuerDNS01ProviderAzureDNS(a.(*acme.ACMEIssuerDNS01ProviderAzureDNS), b.(*ACMEIssuerDNS01ProviderAzureDNS), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderCloudDNS)(nil), (*acme.ACMEIssuerDNS01ProviderCloudDNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEIssuerDNS01ProviderCloudDNS_To_acme_ACMEIssuerDNS01ProviderCloudDNS(a.(*ACMEIssuerDNS01ProviderCloudDNS), b.(*acme.ACMEIssuerDNS01ProviderCloudDNS), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderCloudDNS)(nil), (*ACMEIssuerDNS01ProviderCloudDNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderCloudDNS_To_v1alpha3_ACMEIssuerDNS01ProviderCloudDNS(a.(*acme.ACMEIssuerDNS01ProviderCloudDNS), b.(*ACMEIssuerDNS01ProviderCloudDNS), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderCloudflare)(nil), (*acme.ACMEIssuerDNS01ProviderCloudflare)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEIssuerDNS01ProviderCloudflare_To_acme_ACMEIssuerDNS01ProviderCloudflare(a.(*ACMEIssuerDNS01ProviderCloudflare), b.(*acme.ACMEIssuerDNS01ProviderCloudflare), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderCloudflare)(nil), (*ACMEIssuerDNS01ProviderCloudflare)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderCloudflare_To_v1alpha3_ACMEIssuerDNS01ProviderCloudflare(a.(*acme.ACMEIssuerDNS01ProviderCloudflare), b.(*ACMEIssuerDNS01ProviderCloudflare), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderDigitalOcean)(nil), (*acme.ACMEIssuerDNS01ProviderDigitalOcean)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEIssuerDNS01ProviderDigitalOcean_To_acme_ACMEIssuerDNS01ProviderDigitalOcean(a.(*ACMEIssuerDNS01ProviderDigitalOcean), b.(*acme.ACMEIssuerDNS01ProviderDigitalOcean), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderDigitalOcean)(nil), (*ACMEIssuerDNS01ProviderDigitalOcean)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderDigitalOcean_To_v1alpha3_ACMEIssuerDNS01ProviderDigitalOcean(a.(*acme.ACMEIssuerDNS01ProviderDigitalOcean), b.(*ACMEIssuerDNS01ProviderDigitalOcean), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderRFC2136)(nil), (*acme.ACMEIssuerDNS01ProviderRFC2136)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEIssuerDNS01ProviderRFC2136_To_acme_ACMEIssuerDNS01ProviderRFC2136(a.(*ACMEIssuerDNS01ProviderRFC2136), b.(*acme.ACMEIssuerDNS01ProviderRFC2136), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderRFC2136)(nil), (*ACMEIssuerDNS01ProviderRFC2136)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderRFC2136_To_v1alpha3_ACMEIssuerDNS01ProviderRFC2136(a.(*acme.ACMEIssuerDNS01ProviderRFC2136), b.(*ACMEIssuerDNS01ProviderRFC2136), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderRoute53)(nil), (*acme.ACMEIssuerDNS01ProviderRoute53)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEIssuerDNS01ProviderRoute53_To_acme_ACMEIssuerDNS01ProviderRoute53(a.(*ACMEIssuerDNS01ProviderRoute53), b.(*acme.ACMEIssuerDNS01ProviderRoute53), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderRoute53)(nil), (*ACMEIssuerDNS01ProviderRoute53)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderRoute53_To_v1alpha3_ACMEIssuerDNS01ProviderRoute53(a.(*acme.ACMEIssuerDNS01ProviderRoute53), b.(*ACMEIssuerDNS01ProviderRoute53), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderWebhook)(nil), (*acme.ACMEIssuerDNS01ProviderWebhook)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEIssuerDNS01ProviderWebhook_To_acme_ACMEIssuerDNS01ProviderWebhook(a.(*ACMEIssuerDNS01ProviderWebhook), b.(*acme.ACMEIssuerDNS01ProviderWebhook), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderWebhook)(nil), (*ACMEIssuerDNS01ProviderWebhook)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderWebhook_To_v1alpha3_ACMEIssuerDNS01ProviderWebhook(a.(*acme.ACMEIssuerDNS01ProviderWebhook), b.(*ACMEIssuerDNS01ProviderWebhook), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerStatus)(nil), (*acme.ACMEIssuerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEIssuerStatus_To_acme_ACMEIssuerStatus(a.(*ACMEIssuerStatus), b.(*acme.ACMEIssuerStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerStatus)(nil), (*ACMEIssuerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerStatus_To_v1alpha3_ACMEIssuerStatus(a.(*acme.ACMEIssuerStatus), b.(*ACMEIssuerStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedIdentity)(nil), (*acme.AzureManagedIdentity)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureManagedIdentity_To_acme_AzureManagedIdentity(a.(*AzureManagedIdentity), b.(*acme.AzureManagedIdentity), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.AzureManagedIdentity)(nil), (*AzureManagedIdentity)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_AzureManagedIdentity_To_v1alpha3_AzureManagedIdentity(a.(*acme.AzureManagedIdentity), b.(*AzureManagedIdentity), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateDNSNameSelector)(nil), (*acme.CertificateDNSNameSelector)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_CertificateDNSNameSelector_To_acme_CertificateDNSNameSelector(a.(*CertificateDNSNameSelector), b.(*acme.CertificateDNSNameSelector), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.CertificateDNSNameSelector)(nil), (*CertificateDNSNameSelector)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_CertificateDNSNameSelector_To_v1alpha3_CertificateDNSNameSelector(a.(*acme.CertificateDNSNameSelector), b.(*CertificateDNSNameSelector), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Challenge)(nil), (*acme.Challenge)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_Challenge_To_acme_Challenge(a.(*Challenge), b.(*acme.Challenge), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.Challenge)(nil), (*Challenge)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_Challenge_To_v1alpha3_Challenge(a.(*acme.Challenge), b.(*Challenge), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ChallengeList)(nil), (*acme.ChallengeList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ChallengeList_To_acme_ChallengeList(a.(*ChallengeList), b.(*acme.ChallengeList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ChallengeList)(nil), (*ChallengeList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ChallengeList_To_v1alpha3_ChallengeList(a.(*acme.ChallengeList), b.(*ChallengeList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ChallengeStatus)(nil), (*acme.ChallengeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ChallengeStatus_To_acme_ChallengeStatus(a.(*ChallengeStatus), b.(*acme.ChallengeStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ChallengeStatus)(nil), (*ChallengeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ChallengeStatus_To_v1alpha3_ChallengeStatus(a.(*acme.ChallengeStatus), b.(*ChallengeStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Order)(nil), (*acme.Order)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_Order_To_acme_Order(a.(*Order), b.(*acme.Order), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.Order)(nil), (*Order)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_Order_To_v1alpha3_Order(a.(*acme.Order), b.(*Order), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OrderList)(nil), (*acme.OrderList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_OrderList_To_acme_OrderList(a.(*OrderList), b.(*acme.OrderList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.OrderList)(nil), (*OrderList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_OrderList_To_v1alpha3_OrderList(a.(*acme.OrderList), b.(*OrderList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OrderStatus)(nil), (*acme.OrderStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_OrderStatus_To_acme_OrderStatus(a.(*OrderStatus), b.(*acme.OrderStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.OrderStatus)(nil), (*OrderStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_OrderStatus_To_v1alpha3_OrderStatus(a.(*acme.OrderStatus), b.(*OrderStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Route53Auth)(nil), (*acme.Route53Auth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_Route53Auth_To_acme_Route53Auth(a.(*Route53Auth), b.(*acme.Route53Auth), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.Route53Auth)(nil), (*Route53Auth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_Route53Auth_To_v1alpha3_Route53Auth(a.(*acme.Route53Auth), b.(*Route53Auth), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Route53KubernetesAuth)(nil), (*acme.Route53KubernetesAuth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_Route53KubernetesAuth_To_acme_Route53KubernetesAuth(a.(*Route53KubernetesAuth), b.(*acme.Route53KubernetesAuth), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.Route53KubernetesAuth)(nil), (*Route53KubernetesAuth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_Route53KubernetesAuth_To_v1alpha3_Route53KubernetesAuth(a.(*acme.Route53KubernetesAuth), b.(*Route53KubernetesAuth), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ServiceAccountRef)(nil), (*acme.ServiceAccountRef)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ServiceAccountRef_To_acme_ServiceAccountRef(a.(*ServiceAccountRef), b.(*acme.ServiceAccountRef), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ServiceAccountRef)(nil), (*ServiceAccountRef)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ServiceAccountRef_To_v1alpha3_ServiceAccountRef(a.(*acme.ServiceAccountRef), b.(*ServiceAccountRef), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*acme.ACMEIssuer)(nil), (*ACMEIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuer_To_v1alpha3_ACMEIssuer(a.(*acme.ACMEIssuer), b.(*ACMEIssuer), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*acme.ChallengeSpec)(nil), (*ChallengeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ChallengeSpec_To_v1alpha3_ChallengeSpec(a.(*acme.ChallengeSpec), b.(*ChallengeSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*acme.OrderSpec)(nil), (*OrderSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_OrderSpec_To_v1alpha3_OrderSpec(a.(*acme.OrderSpec), b.(*OrderSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*ACMEIssuer)(nil), (*acme.ACMEIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ACMEIssuer_To_acme_ACMEIssuer(a.(*ACMEIssuer), b.(*acme.ACMEIssuer), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*ChallengeSpec)(nil), (*acme.ChallengeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ChallengeSpec_To_acme_ChallengeSpec(a.(*ChallengeSpec), b.(*acme.ChallengeSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*OrderSpec)(nil), (*acme.OrderSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_OrderSpec_To_acme_OrderSpec(a.(*OrderSpec), b.(*acme.OrderSpec), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha3_ACMEAuthorization_To_acme_ACMEAuthorization(in *ACMEAuthorization, out *acme.ACMEAuthorization, s conversion.Scope) error { - out.URL = in.URL - out.Identifier = in.Identifier - out.Wildcard = (*bool)(unsafe.Pointer(in.Wildcard)) - out.InitialState = acme.State(in.InitialState) - out.Challenges = *(*[]acme.ACMEChallenge)(unsafe.Pointer(&in.Challenges)) - return nil -} - -// Convert_v1alpha3_ACMEAuthorization_To_acme_ACMEAuthorization is an autogenerated conversion function. -func Convert_v1alpha3_ACMEAuthorization_To_acme_ACMEAuthorization(in *ACMEAuthorization, out *acme.ACMEAuthorization, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEAuthorization_To_acme_ACMEAuthorization(in, out, s) -} - -func autoConvert_acme_ACMEAuthorization_To_v1alpha3_ACMEAuthorization(in *acme.ACMEAuthorization, out *ACMEAuthorization, s conversion.Scope) error { - out.URL = in.URL - out.Identifier = in.Identifier - out.Wildcard = (*bool)(unsafe.Pointer(in.Wildcard)) - out.InitialState = State(in.InitialState) - out.Challenges = *(*[]ACMEChallenge)(unsafe.Pointer(&in.Challenges)) - return nil -} - -// Convert_acme_ACMEAuthorization_To_v1alpha3_ACMEAuthorization is an autogenerated conversion function. -func Convert_acme_ACMEAuthorization_To_v1alpha3_ACMEAuthorization(in *acme.ACMEAuthorization, out *ACMEAuthorization, s conversion.Scope) error { - return autoConvert_acme_ACMEAuthorization_To_v1alpha3_ACMEAuthorization(in, out, s) -} - -func autoConvert_v1alpha3_ACMEChallenge_To_acme_ACMEChallenge(in *ACMEChallenge, out *acme.ACMEChallenge, s conversion.Scope) error { - out.URL = in.URL - out.Token = in.Token - out.Type = in.Type - return nil -} - -// Convert_v1alpha3_ACMEChallenge_To_acme_ACMEChallenge is an autogenerated conversion function. -func Convert_v1alpha3_ACMEChallenge_To_acme_ACMEChallenge(in *ACMEChallenge, out *acme.ACMEChallenge, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEChallenge_To_acme_ACMEChallenge(in, out, s) -} - -func autoConvert_acme_ACMEChallenge_To_v1alpha3_ACMEChallenge(in *acme.ACMEChallenge, out *ACMEChallenge, s conversion.Scope) error { - out.URL = in.URL - out.Token = in.Token - out.Type = in.Type - return nil -} - -// Convert_acme_ACMEChallenge_To_v1alpha3_ACMEChallenge is an autogenerated conversion function. -func Convert_acme_ACMEChallenge_To_v1alpha3_ACMEChallenge(in *acme.ACMEChallenge, out *ACMEChallenge, s conversion.Scope) error { - return autoConvert_acme_ACMEChallenge_To_v1alpha3_ACMEChallenge(in, out, s) -} - -func autoConvert_v1alpha3_ACMEChallengeSolver_To_acme_ACMEChallengeSolver(in *ACMEChallengeSolver, out *acme.ACMEChallengeSolver, s conversion.Scope) error { - out.Selector = (*acme.CertificateDNSNameSelector)(unsafe.Pointer(in.Selector)) - out.HTTP01 = (*acme.ACMEChallengeSolverHTTP01)(unsafe.Pointer(in.HTTP01)) - if in.DNS01 != nil { - in, out := &in.DNS01, &out.DNS01 - *out = new(acme.ACMEChallengeSolverDNS01) - if err := Convert_v1alpha3_ACMEChallengeSolverDNS01_To_acme_ACMEChallengeSolverDNS01(*in, *out, s); err != nil { - return err - } - } else { - out.DNS01 = nil - } - return nil -} - -// Convert_v1alpha3_ACMEChallengeSolver_To_acme_ACMEChallengeSolver is an autogenerated conversion function. -func Convert_v1alpha3_ACMEChallengeSolver_To_acme_ACMEChallengeSolver(in *ACMEChallengeSolver, out *acme.ACMEChallengeSolver, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEChallengeSolver_To_acme_ACMEChallengeSolver(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolver_To_v1alpha3_ACMEChallengeSolver(in *acme.ACMEChallengeSolver, out *ACMEChallengeSolver, s conversion.Scope) error { - out.Selector = (*CertificateDNSNameSelector)(unsafe.Pointer(in.Selector)) - out.HTTP01 = (*ACMEChallengeSolverHTTP01)(unsafe.Pointer(in.HTTP01)) - if in.DNS01 != nil { - in, out := &in.DNS01, &out.DNS01 - *out = new(ACMEChallengeSolverDNS01) - if err := Convert_acme_ACMEChallengeSolverDNS01_To_v1alpha3_ACMEChallengeSolverDNS01(*in, *out, s); err != nil { - return err - } - } else { - out.DNS01 = nil - } - return nil -} - -// Convert_acme_ACMEChallengeSolver_To_v1alpha3_ACMEChallengeSolver is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolver_To_v1alpha3_ACMEChallengeSolver(in *acme.ACMEChallengeSolver, out *ACMEChallengeSolver, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolver_To_v1alpha3_ACMEChallengeSolver(in, out, s) -} - -func autoConvert_v1alpha3_ACMEChallengeSolverDNS01_To_acme_ACMEChallengeSolverDNS01(in *ACMEChallengeSolverDNS01, out *acme.ACMEChallengeSolverDNS01, s conversion.Scope) error { - out.CNAMEStrategy = acme.CNAMEStrategy(in.CNAMEStrategy) - if in.Akamai != nil { - in, out := &in.Akamai, &out.Akamai - *out = new(acme.ACMEIssuerDNS01ProviderAkamai) - if err := Convert_v1alpha3_ACMEIssuerDNS01ProviderAkamai_To_acme_ACMEIssuerDNS01ProviderAkamai(*in, *out, s); err != nil { - return err - } - } else { - out.Akamai = nil - } - if in.CloudDNS != nil { - in, out := &in.CloudDNS, &out.CloudDNS - *out = new(acme.ACMEIssuerDNS01ProviderCloudDNS) - if err := Convert_v1alpha3_ACMEIssuerDNS01ProviderCloudDNS_To_acme_ACMEIssuerDNS01ProviderCloudDNS(*in, *out, s); err != nil { - return err - } - } else { - out.CloudDNS = nil - } - if in.Cloudflare != nil { - in, out := &in.Cloudflare, &out.Cloudflare - *out = new(acme.ACMEIssuerDNS01ProviderCloudflare) - if err := Convert_v1alpha3_ACMEIssuerDNS01ProviderCloudflare_To_acme_ACMEIssuerDNS01ProviderCloudflare(*in, *out, s); err != nil { - return err - } - } else { - out.Cloudflare = nil - } - if in.Route53 != nil { - in, out := &in.Route53, &out.Route53 - *out = new(acme.ACMEIssuerDNS01ProviderRoute53) - if err := Convert_v1alpha3_ACMEIssuerDNS01ProviderRoute53_To_acme_ACMEIssuerDNS01ProviderRoute53(*in, *out, s); err != nil { - return err - } - } else { - out.Route53 = nil - } - if in.AzureDNS != nil { - in, out := &in.AzureDNS, &out.AzureDNS - *out = new(acme.ACMEIssuerDNS01ProviderAzureDNS) - if err := Convert_v1alpha3_ACMEIssuerDNS01ProviderAzureDNS_To_acme_ACMEIssuerDNS01ProviderAzureDNS(*in, *out, s); err != nil { - return err - } - } else { - out.AzureDNS = nil - } - if in.DigitalOcean != nil { - in, out := &in.DigitalOcean, &out.DigitalOcean - *out = new(acme.ACMEIssuerDNS01ProviderDigitalOcean) - if err := Convert_v1alpha3_ACMEIssuerDNS01ProviderDigitalOcean_To_acme_ACMEIssuerDNS01ProviderDigitalOcean(*in, *out, s); err != nil { - return err - } - } else { - out.DigitalOcean = nil - } - if in.AcmeDNS != nil { - in, out := &in.AcmeDNS, &out.AcmeDNS - *out = new(acme.ACMEIssuerDNS01ProviderAcmeDNS) - if err := Convert_v1alpha3_ACMEIssuerDNS01ProviderAcmeDNS_To_acme_ACMEIssuerDNS01ProviderAcmeDNS(*in, *out, s); err != nil { - return err - } - } else { - out.AcmeDNS = nil - } - if in.RFC2136 != nil { - in, out := &in.RFC2136, &out.RFC2136 - *out = new(acme.ACMEIssuerDNS01ProviderRFC2136) - if err := Convert_v1alpha3_ACMEIssuerDNS01ProviderRFC2136_To_acme_ACMEIssuerDNS01ProviderRFC2136(*in, *out, s); err != nil { - return err - } - } else { - out.RFC2136 = nil - } - out.Webhook = (*acme.ACMEIssuerDNS01ProviderWebhook)(unsafe.Pointer(in.Webhook)) - return nil -} - -// Convert_v1alpha3_ACMEChallengeSolverDNS01_To_acme_ACMEChallengeSolverDNS01 is an autogenerated conversion function. -func Convert_v1alpha3_ACMEChallengeSolverDNS01_To_acme_ACMEChallengeSolverDNS01(in *ACMEChallengeSolverDNS01, out *acme.ACMEChallengeSolverDNS01, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEChallengeSolverDNS01_To_acme_ACMEChallengeSolverDNS01(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverDNS01_To_v1alpha3_ACMEChallengeSolverDNS01(in *acme.ACMEChallengeSolverDNS01, out *ACMEChallengeSolverDNS01, s conversion.Scope) error { - out.CNAMEStrategy = CNAMEStrategy(in.CNAMEStrategy) - if in.Akamai != nil { - in, out := &in.Akamai, &out.Akamai - *out = new(ACMEIssuerDNS01ProviderAkamai) - if err := Convert_acme_ACMEIssuerDNS01ProviderAkamai_To_v1alpha3_ACMEIssuerDNS01ProviderAkamai(*in, *out, s); err != nil { - return err - } - } else { - out.Akamai = nil - } - if in.CloudDNS != nil { - in, out := &in.CloudDNS, &out.CloudDNS - *out = new(ACMEIssuerDNS01ProviderCloudDNS) - if err := Convert_acme_ACMEIssuerDNS01ProviderCloudDNS_To_v1alpha3_ACMEIssuerDNS01ProviderCloudDNS(*in, *out, s); err != nil { - return err - } - } else { - out.CloudDNS = nil - } - if in.Cloudflare != nil { - in, out := &in.Cloudflare, &out.Cloudflare - *out = new(ACMEIssuerDNS01ProviderCloudflare) - if err := Convert_acme_ACMEIssuerDNS01ProviderCloudflare_To_v1alpha3_ACMEIssuerDNS01ProviderCloudflare(*in, *out, s); err != nil { - return err - } - } else { - out.Cloudflare = nil - } - if in.Route53 != nil { - in, out := &in.Route53, &out.Route53 - *out = new(ACMEIssuerDNS01ProviderRoute53) - if err := Convert_acme_ACMEIssuerDNS01ProviderRoute53_To_v1alpha3_ACMEIssuerDNS01ProviderRoute53(*in, *out, s); err != nil { - return err - } - } else { - out.Route53 = nil - } - if in.AzureDNS != nil { - in, out := &in.AzureDNS, &out.AzureDNS - *out = new(ACMEIssuerDNS01ProviderAzureDNS) - if err := Convert_acme_ACMEIssuerDNS01ProviderAzureDNS_To_v1alpha3_ACMEIssuerDNS01ProviderAzureDNS(*in, *out, s); err != nil { - return err - } - } else { - out.AzureDNS = nil - } - if in.DigitalOcean != nil { - in, out := &in.DigitalOcean, &out.DigitalOcean - *out = new(ACMEIssuerDNS01ProviderDigitalOcean) - if err := Convert_acme_ACMEIssuerDNS01ProviderDigitalOcean_To_v1alpha3_ACMEIssuerDNS01ProviderDigitalOcean(*in, *out, s); err != nil { - return err - } - } else { - out.DigitalOcean = nil - } - if in.AcmeDNS != nil { - in, out := &in.AcmeDNS, &out.AcmeDNS - *out = new(ACMEIssuerDNS01ProviderAcmeDNS) - if err := Convert_acme_ACMEIssuerDNS01ProviderAcmeDNS_To_v1alpha3_ACMEIssuerDNS01ProviderAcmeDNS(*in, *out, s); err != nil { - return err - } - } else { - out.AcmeDNS = nil - } - if in.RFC2136 != nil { - in, out := &in.RFC2136, &out.RFC2136 - *out = new(ACMEIssuerDNS01ProviderRFC2136) - if err := Convert_acme_ACMEIssuerDNS01ProviderRFC2136_To_v1alpha3_ACMEIssuerDNS01ProviderRFC2136(*in, *out, s); err != nil { - return err - } - } else { - out.RFC2136 = nil - } - out.Webhook = (*ACMEIssuerDNS01ProviderWebhook)(unsafe.Pointer(in.Webhook)) - return nil -} - -// Convert_acme_ACMEChallengeSolverDNS01_To_v1alpha3_ACMEChallengeSolverDNS01 is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverDNS01_To_v1alpha3_ACMEChallengeSolverDNS01(in *acme.ACMEChallengeSolverDNS01, out *ACMEChallengeSolverDNS01, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverDNS01_To_v1alpha3_ACMEChallengeSolverDNS01(in, out, s) -} - -func autoConvert_v1alpha3_ACMEChallengeSolverHTTP01_To_acme_ACMEChallengeSolverHTTP01(in *ACMEChallengeSolverHTTP01, out *acme.ACMEChallengeSolverHTTP01, s conversion.Scope) error { - out.Ingress = (*acme.ACMEChallengeSolverHTTP01Ingress)(unsafe.Pointer(in.Ingress)) - out.GatewayHTTPRoute = (*acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute)(unsafe.Pointer(in.GatewayHTTPRoute)) - return nil -} - -// Convert_v1alpha3_ACMEChallengeSolverHTTP01_To_acme_ACMEChallengeSolverHTTP01 is an autogenerated conversion function. -func Convert_v1alpha3_ACMEChallengeSolverHTTP01_To_acme_ACMEChallengeSolverHTTP01(in *ACMEChallengeSolverHTTP01, out *acme.ACMEChallengeSolverHTTP01, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEChallengeSolverHTTP01_To_acme_ACMEChallengeSolverHTTP01(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01_To_v1alpha3_ACMEChallengeSolverHTTP01(in *acme.ACMEChallengeSolverHTTP01, out *ACMEChallengeSolverHTTP01, s conversion.Scope) error { - out.Ingress = (*ACMEChallengeSolverHTTP01Ingress)(unsafe.Pointer(in.Ingress)) - out.GatewayHTTPRoute = (*ACMEChallengeSolverHTTP01GatewayHTTPRoute)(unsafe.Pointer(in.GatewayHTTPRoute)) - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01_To_v1alpha3_ACMEChallengeSolverHTTP01 is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01_To_v1alpha3_ACMEChallengeSolverHTTP01(in *acme.ACMEChallengeSolverHTTP01, out *ACMEChallengeSolverHTTP01, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01_To_v1alpha3_ACMEChallengeSolverHTTP01(in, out, s) -} - -func autoConvert_v1alpha3_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute(in *ACMEChallengeSolverHTTP01GatewayHTTPRoute, out *acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute, s conversion.Scope) error { - out.ServiceType = v1.ServiceType(in.ServiceType) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - out.ParentRefs = *(*[]apisv1.ParentReference)(unsafe.Pointer(&in.ParentRefs)) - return nil -} - -// Convert_v1alpha3_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute is an autogenerated conversion function. -func Convert_v1alpha3_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute(in *ACMEChallengeSolverHTTP01GatewayHTTPRoute, out *acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_v1alpha3_ACMEChallengeSolverHTTP01GatewayHTTPRoute(in *acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute, out *ACMEChallengeSolverHTTP01GatewayHTTPRoute, s conversion.Scope) error { - out.ServiceType = v1.ServiceType(in.ServiceType) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - out.ParentRefs = *(*[]apisv1.ParentReference)(unsafe.Pointer(&in.ParentRefs)) - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_v1alpha3_ACMEChallengeSolverHTTP01GatewayHTTPRoute is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_v1alpha3_ACMEChallengeSolverHTTP01GatewayHTTPRoute(in *acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute, out *ACMEChallengeSolverHTTP01GatewayHTTPRoute, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_v1alpha3_ACMEChallengeSolverHTTP01GatewayHTTPRoute(in, out, s) -} - -func autoConvert_v1alpha3_ACMEChallengeSolverHTTP01Ingress_To_acme_ACMEChallengeSolverHTTP01Ingress(in *ACMEChallengeSolverHTTP01Ingress, out *acme.ACMEChallengeSolverHTTP01Ingress, s conversion.Scope) error { - out.ServiceType = v1.ServiceType(in.ServiceType) - out.IngressClassName = (*string)(unsafe.Pointer(in.IngressClassName)) - out.Class = (*string)(unsafe.Pointer(in.Class)) - out.Name = in.Name - out.PodTemplate = (*acme.ACMEChallengeSolverHTTP01IngressPodTemplate)(unsafe.Pointer(in.PodTemplate)) - out.IngressTemplate = (*acme.ACMEChallengeSolverHTTP01IngressTemplate)(unsafe.Pointer(in.IngressTemplate)) - return nil -} - -// Convert_v1alpha3_ACMEChallengeSolverHTTP01Ingress_To_acme_ACMEChallengeSolverHTTP01Ingress is an autogenerated conversion function. -func Convert_v1alpha3_ACMEChallengeSolverHTTP01Ingress_To_acme_ACMEChallengeSolverHTTP01Ingress(in *ACMEChallengeSolverHTTP01Ingress, out *acme.ACMEChallengeSolverHTTP01Ingress, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEChallengeSolverHTTP01Ingress_To_acme_ACMEChallengeSolverHTTP01Ingress(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01Ingress_To_v1alpha3_ACMEChallengeSolverHTTP01Ingress(in *acme.ACMEChallengeSolverHTTP01Ingress, out *ACMEChallengeSolverHTTP01Ingress, s conversion.Scope) error { - out.ServiceType = v1.ServiceType(in.ServiceType) - out.IngressClassName = (*string)(unsafe.Pointer(in.IngressClassName)) - out.Class = (*string)(unsafe.Pointer(in.Class)) - out.Name = in.Name - out.PodTemplate = (*ACMEChallengeSolverHTTP01IngressPodTemplate)(unsafe.Pointer(in.PodTemplate)) - out.IngressTemplate = (*ACMEChallengeSolverHTTP01IngressTemplate)(unsafe.Pointer(in.IngressTemplate)) - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01Ingress_To_v1alpha3_ACMEChallengeSolverHTTP01Ingress is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01Ingress_To_v1alpha3_ACMEChallengeSolverHTTP01Ingress(in *acme.ACMEChallengeSolverHTTP01Ingress, out *ACMEChallengeSolverHTTP01Ingress, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01Ingress_To_v1alpha3_ACMEChallengeSolverHTTP01Ingress(in, out, s) -} - -func autoConvert_v1alpha3_ACMEChallengeSolverHTTP01IngressObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressObjectMeta(in *ACMEChallengeSolverHTTP01IngressObjectMeta, out *acme.ACMEChallengeSolverHTTP01IngressObjectMeta, s conversion.Scope) error { - out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - return nil -} - -// Convert_v1alpha3_ACMEChallengeSolverHTTP01IngressObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressObjectMeta is an autogenerated conversion function. -func Convert_v1alpha3_ACMEChallengeSolverHTTP01IngressObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressObjectMeta(in *ACMEChallengeSolverHTTP01IngressObjectMeta, out *acme.ACMEChallengeSolverHTTP01IngressObjectMeta, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEChallengeSolverHTTP01IngressObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressObjectMeta(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01IngressObjectMeta_To_v1alpha3_ACMEChallengeSolverHTTP01IngressObjectMeta(in *acme.ACMEChallengeSolverHTTP01IngressObjectMeta, out *ACMEChallengeSolverHTTP01IngressObjectMeta, s conversion.Scope) error { - out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01IngressObjectMeta_To_v1alpha3_ACMEChallengeSolverHTTP01IngressObjectMeta is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01IngressObjectMeta_To_v1alpha3_ACMEChallengeSolverHTTP01IngressObjectMeta(in *acme.ACMEChallengeSolverHTTP01IngressObjectMeta, out *ACMEChallengeSolverHTTP01IngressObjectMeta, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01IngressObjectMeta_To_v1alpha3_ACMEChallengeSolverHTTP01IngressObjectMeta(in, out, s) -} - -func autoConvert_v1alpha3_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta(in *ACMEChallengeSolverHTTP01IngressPodObjectMeta, out *acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta, s conversion.Scope) error { - out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - return nil -} - -// Convert_v1alpha3_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta is an autogenerated conversion function. -func Convert_v1alpha3_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta(in *ACMEChallengeSolverHTTP01IngressPodObjectMeta, out *acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_v1alpha3_ACMEChallengeSolverHTTP01IngressPodObjectMeta(in *acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta, out *ACMEChallengeSolverHTTP01IngressPodObjectMeta, s conversion.Scope) error { - out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_v1alpha3_ACMEChallengeSolverHTTP01IngressPodObjectMeta is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_v1alpha3_ACMEChallengeSolverHTTP01IngressPodObjectMeta(in *acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta, out *ACMEChallengeSolverHTTP01IngressPodObjectMeta, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_v1alpha3_ACMEChallengeSolverHTTP01IngressPodObjectMeta(in, out, s) -} - -func autoConvert_v1alpha3_ACMEChallengeSolverHTTP01IngressPodSpec_To_acme_ACMEChallengeSolverHTTP01IngressPodSpec(in *ACMEChallengeSolverHTTP01IngressPodSpec, out *acme.ACMEChallengeSolverHTTP01IngressPodSpec, s conversion.Scope) error { - out.NodeSelector = *(*map[string]string)(unsafe.Pointer(&in.NodeSelector)) - out.Affinity = (*v1.Affinity)(unsafe.Pointer(in.Affinity)) - out.Tolerations = *(*[]v1.Toleration)(unsafe.Pointer(&in.Tolerations)) - out.PriorityClassName = in.PriorityClassName - out.ServiceAccountName = in.ServiceAccountName - out.ImagePullSecrets = *(*[]v1.LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets)) - return nil -} - -// Convert_v1alpha3_ACMEChallengeSolverHTTP01IngressPodSpec_To_acme_ACMEChallengeSolverHTTP01IngressPodSpec is an autogenerated conversion function. -func Convert_v1alpha3_ACMEChallengeSolverHTTP01IngressPodSpec_To_acme_ACMEChallengeSolverHTTP01IngressPodSpec(in *ACMEChallengeSolverHTTP01IngressPodSpec, out *acme.ACMEChallengeSolverHTTP01IngressPodSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEChallengeSolverHTTP01IngressPodSpec_To_acme_ACMEChallengeSolverHTTP01IngressPodSpec(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01IngressPodSpec_To_v1alpha3_ACMEChallengeSolverHTTP01IngressPodSpec(in *acme.ACMEChallengeSolverHTTP01IngressPodSpec, out *ACMEChallengeSolverHTTP01IngressPodSpec, s conversion.Scope) error { - out.NodeSelector = *(*map[string]string)(unsafe.Pointer(&in.NodeSelector)) - out.Affinity = (*v1.Affinity)(unsafe.Pointer(in.Affinity)) - out.Tolerations = *(*[]v1.Toleration)(unsafe.Pointer(&in.Tolerations)) - out.PriorityClassName = in.PriorityClassName - out.ServiceAccountName = in.ServiceAccountName - out.ImagePullSecrets = *(*[]v1.LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets)) - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01IngressPodSpec_To_v1alpha3_ACMEChallengeSolverHTTP01IngressPodSpec is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01IngressPodSpec_To_v1alpha3_ACMEChallengeSolverHTTP01IngressPodSpec(in *acme.ACMEChallengeSolverHTTP01IngressPodSpec, out *ACMEChallengeSolverHTTP01IngressPodSpec, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01IngressPodSpec_To_v1alpha3_ACMEChallengeSolverHTTP01IngressPodSpec(in, out, s) -} - -func autoConvert_v1alpha3_ACMEChallengeSolverHTTP01IngressPodTemplate_To_acme_ACMEChallengeSolverHTTP01IngressPodTemplate(in *ACMEChallengeSolverHTTP01IngressPodTemplate, out *acme.ACMEChallengeSolverHTTP01IngressPodTemplate, s conversion.Scope) error { - if err := Convert_v1alpha3_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta(&in.ACMEChallengeSolverHTTP01IngressPodObjectMeta, &out.ACMEChallengeSolverHTTP01IngressPodObjectMeta, s); err != nil { - return err - } - if err := Convert_v1alpha3_ACMEChallengeSolverHTTP01IngressPodSpec_To_acme_ACMEChallengeSolverHTTP01IngressPodSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_ACMEChallengeSolverHTTP01IngressPodTemplate_To_acme_ACMEChallengeSolverHTTP01IngressPodTemplate is an autogenerated conversion function. -func Convert_v1alpha3_ACMEChallengeSolverHTTP01IngressPodTemplate_To_acme_ACMEChallengeSolverHTTP01IngressPodTemplate(in *ACMEChallengeSolverHTTP01IngressPodTemplate, out *acme.ACMEChallengeSolverHTTP01IngressPodTemplate, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEChallengeSolverHTTP01IngressPodTemplate_To_acme_ACMEChallengeSolverHTTP01IngressPodTemplate(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01IngressPodTemplate_To_v1alpha3_ACMEChallengeSolverHTTP01IngressPodTemplate(in *acme.ACMEChallengeSolverHTTP01IngressPodTemplate, out *ACMEChallengeSolverHTTP01IngressPodTemplate, s conversion.Scope) error { - if err := Convert_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_v1alpha3_ACMEChallengeSolverHTTP01IngressPodObjectMeta(&in.ACMEChallengeSolverHTTP01IngressPodObjectMeta, &out.ACMEChallengeSolverHTTP01IngressPodObjectMeta, s); err != nil { - return err - } - if err := Convert_acme_ACMEChallengeSolverHTTP01IngressPodSpec_To_v1alpha3_ACMEChallengeSolverHTTP01IngressPodSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01IngressPodTemplate_To_v1alpha3_ACMEChallengeSolverHTTP01IngressPodTemplate is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01IngressPodTemplate_To_v1alpha3_ACMEChallengeSolverHTTP01IngressPodTemplate(in *acme.ACMEChallengeSolverHTTP01IngressPodTemplate, out *ACMEChallengeSolverHTTP01IngressPodTemplate, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01IngressPodTemplate_To_v1alpha3_ACMEChallengeSolverHTTP01IngressPodTemplate(in, out, s) -} - -func autoConvert_v1alpha3_ACMEChallengeSolverHTTP01IngressTemplate_To_acme_ACMEChallengeSolverHTTP01IngressTemplate(in *ACMEChallengeSolverHTTP01IngressTemplate, out *acme.ACMEChallengeSolverHTTP01IngressTemplate, s conversion.Scope) error { - if err := Convert_v1alpha3_ACMEChallengeSolverHTTP01IngressObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressObjectMeta(&in.ACMEChallengeSolverHTTP01IngressObjectMeta, &out.ACMEChallengeSolverHTTP01IngressObjectMeta, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_ACMEChallengeSolverHTTP01IngressTemplate_To_acme_ACMEChallengeSolverHTTP01IngressTemplate is an autogenerated conversion function. -func Convert_v1alpha3_ACMEChallengeSolverHTTP01IngressTemplate_To_acme_ACMEChallengeSolverHTTP01IngressTemplate(in *ACMEChallengeSolverHTTP01IngressTemplate, out *acme.ACMEChallengeSolverHTTP01IngressTemplate, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEChallengeSolverHTTP01IngressTemplate_To_acme_ACMEChallengeSolverHTTP01IngressTemplate(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01IngressTemplate_To_v1alpha3_ACMEChallengeSolverHTTP01IngressTemplate(in *acme.ACMEChallengeSolverHTTP01IngressTemplate, out *ACMEChallengeSolverHTTP01IngressTemplate, s conversion.Scope) error { - if err := Convert_acme_ACMEChallengeSolverHTTP01IngressObjectMeta_To_v1alpha3_ACMEChallengeSolverHTTP01IngressObjectMeta(&in.ACMEChallengeSolverHTTP01IngressObjectMeta, &out.ACMEChallengeSolverHTTP01IngressObjectMeta, s); err != nil { - return err - } - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01IngressTemplate_To_v1alpha3_ACMEChallengeSolverHTTP01IngressTemplate is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01IngressTemplate_To_v1alpha3_ACMEChallengeSolverHTTP01IngressTemplate(in *acme.ACMEChallengeSolverHTTP01IngressTemplate, out *ACMEChallengeSolverHTTP01IngressTemplate, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01IngressTemplate_To_v1alpha3_ACMEChallengeSolverHTTP01IngressTemplate(in, out, s) -} - -func autoConvert_v1alpha3_ACMEExternalAccountBinding_To_acme_ACMEExternalAccountBinding(in *ACMEExternalAccountBinding, out *acme.ACMEExternalAccountBinding, s conversion.Scope) error { - out.KeyID = in.KeyID - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.Key, &out.Key, s); err != nil { - return err - } - out.KeyAlgorithm = acme.HMACKeyAlgorithm(in.KeyAlgorithm) - return nil -} - -// Convert_v1alpha3_ACMEExternalAccountBinding_To_acme_ACMEExternalAccountBinding is an autogenerated conversion function. -func Convert_v1alpha3_ACMEExternalAccountBinding_To_acme_ACMEExternalAccountBinding(in *ACMEExternalAccountBinding, out *acme.ACMEExternalAccountBinding, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEExternalAccountBinding_To_acme_ACMEExternalAccountBinding(in, out, s) -} - -func autoConvert_acme_ACMEExternalAccountBinding_To_v1alpha3_ACMEExternalAccountBinding(in *acme.ACMEExternalAccountBinding, out *ACMEExternalAccountBinding, s conversion.Scope) error { - out.KeyID = in.KeyID - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.Key, &out.Key, s); err != nil { - return err - } - out.KeyAlgorithm = HMACKeyAlgorithm(in.KeyAlgorithm) - return nil -} - -// Convert_acme_ACMEExternalAccountBinding_To_v1alpha3_ACMEExternalAccountBinding is an autogenerated conversion function. -func Convert_acme_ACMEExternalAccountBinding_To_v1alpha3_ACMEExternalAccountBinding(in *acme.ACMEExternalAccountBinding, out *ACMEExternalAccountBinding, s conversion.Scope) error { - return autoConvert_acme_ACMEExternalAccountBinding_To_v1alpha3_ACMEExternalAccountBinding(in, out, s) -} - -func autoConvert_v1alpha3_ACMEIssuer_To_acme_ACMEIssuer(in *ACMEIssuer, out *acme.ACMEIssuer, s conversion.Scope) error { - out.Email = in.Email - out.Server = in.Server - out.PreferredChain = in.PreferredChain - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - out.SkipTLSVerify = in.SkipTLSVerify - if in.ExternalAccountBinding != nil { - in, out := &in.ExternalAccountBinding, &out.ExternalAccountBinding - *out = new(acme.ACMEExternalAccountBinding) - if err := Convert_v1alpha3_ACMEExternalAccountBinding_To_acme_ACMEExternalAccountBinding(*in, *out, s); err != nil { - return err - } - } else { - out.ExternalAccountBinding = nil - } - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.PrivateKey, &out.PrivateKey, s); err != nil { - return err - } - if in.Solvers != nil { - in, out := &in.Solvers, &out.Solvers - *out = make([]acme.ACMEChallengeSolver, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_ACMEChallengeSolver_To_acme_ACMEChallengeSolver(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Solvers = nil - } - out.DisableAccountKeyGeneration = in.DisableAccountKeyGeneration - out.EnableDurationFeature = in.EnableDurationFeature - return nil -} - -func autoConvert_acme_ACMEIssuer_To_v1alpha3_ACMEIssuer(in *acme.ACMEIssuer, out *ACMEIssuer, s conversion.Scope) error { - out.Email = in.Email - out.Server = in.Server - out.PreferredChain = in.PreferredChain - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - out.SkipTLSVerify = in.SkipTLSVerify - if in.ExternalAccountBinding != nil { - in, out := &in.ExternalAccountBinding, &out.ExternalAccountBinding - *out = new(ACMEExternalAccountBinding) - if err := Convert_acme_ACMEExternalAccountBinding_To_v1alpha3_ACMEExternalAccountBinding(*in, *out, s); err != nil { - return err - } - } else { - out.ExternalAccountBinding = nil - } - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.PrivateKey, &out.PrivateKey, s); err != nil { - return err - } - if in.Solvers != nil { - in, out := &in.Solvers, &out.Solvers - *out = make([]ACMEChallengeSolver, len(*in)) - for i := range *in { - if err := Convert_acme_ACMEChallengeSolver_To_v1alpha3_ACMEChallengeSolver(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Solvers = nil - } - out.DisableAccountKeyGeneration = in.DisableAccountKeyGeneration - out.EnableDurationFeature = in.EnableDurationFeature - return nil -} - -func autoConvert_v1alpha3_ACMEIssuerDNS01ProviderAcmeDNS_To_acme_ACMEIssuerDNS01ProviderAcmeDNS(in *ACMEIssuerDNS01ProviderAcmeDNS, out *acme.ACMEIssuerDNS01ProviderAcmeDNS, s conversion.Scope) error { - out.Host = in.Host - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.AccountSecret, &out.AccountSecret, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_ACMEIssuerDNS01ProviderAcmeDNS_To_acme_ACMEIssuerDNS01ProviderAcmeDNS is an autogenerated conversion function. -func Convert_v1alpha3_ACMEIssuerDNS01ProviderAcmeDNS_To_acme_ACMEIssuerDNS01ProviderAcmeDNS(in *ACMEIssuerDNS01ProviderAcmeDNS, out *acme.ACMEIssuerDNS01ProviderAcmeDNS, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEIssuerDNS01ProviderAcmeDNS_To_acme_ACMEIssuerDNS01ProviderAcmeDNS(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderAcmeDNS_To_v1alpha3_ACMEIssuerDNS01ProviderAcmeDNS(in *acme.ACMEIssuerDNS01ProviderAcmeDNS, out *ACMEIssuerDNS01ProviderAcmeDNS, s conversion.Scope) error { - out.Host = in.Host - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.AccountSecret, &out.AccountSecret, s); err != nil { - return err - } - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderAcmeDNS_To_v1alpha3_ACMEIssuerDNS01ProviderAcmeDNS is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderAcmeDNS_To_v1alpha3_ACMEIssuerDNS01ProviderAcmeDNS(in *acme.ACMEIssuerDNS01ProviderAcmeDNS, out *ACMEIssuerDNS01ProviderAcmeDNS, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderAcmeDNS_To_v1alpha3_ACMEIssuerDNS01ProviderAcmeDNS(in, out, s) -} - -func autoConvert_v1alpha3_ACMEIssuerDNS01ProviderAkamai_To_acme_ACMEIssuerDNS01ProviderAkamai(in *ACMEIssuerDNS01ProviderAkamai, out *acme.ACMEIssuerDNS01ProviderAkamai, s conversion.Scope) error { - out.ServiceConsumerDomain = in.ServiceConsumerDomain - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.ClientToken, &out.ClientToken, s); err != nil { - return err - } - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.ClientSecret, &out.ClientSecret, s); err != nil { - return err - } - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.AccessToken, &out.AccessToken, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_ACMEIssuerDNS01ProviderAkamai_To_acme_ACMEIssuerDNS01ProviderAkamai is an autogenerated conversion function. -func Convert_v1alpha3_ACMEIssuerDNS01ProviderAkamai_To_acme_ACMEIssuerDNS01ProviderAkamai(in *ACMEIssuerDNS01ProviderAkamai, out *acme.ACMEIssuerDNS01ProviderAkamai, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEIssuerDNS01ProviderAkamai_To_acme_ACMEIssuerDNS01ProviderAkamai(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderAkamai_To_v1alpha3_ACMEIssuerDNS01ProviderAkamai(in *acme.ACMEIssuerDNS01ProviderAkamai, out *ACMEIssuerDNS01ProviderAkamai, s conversion.Scope) error { - out.ServiceConsumerDomain = in.ServiceConsumerDomain - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.ClientToken, &out.ClientToken, s); err != nil { - return err - } - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.ClientSecret, &out.ClientSecret, s); err != nil { - return err - } - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.AccessToken, &out.AccessToken, s); err != nil { - return err - } - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderAkamai_To_v1alpha3_ACMEIssuerDNS01ProviderAkamai is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderAkamai_To_v1alpha3_ACMEIssuerDNS01ProviderAkamai(in *acme.ACMEIssuerDNS01ProviderAkamai, out *ACMEIssuerDNS01ProviderAkamai, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderAkamai_To_v1alpha3_ACMEIssuerDNS01ProviderAkamai(in, out, s) -} - -func autoConvert_v1alpha3_ACMEIssuerDNS01ProviderAzureDNS_To_acme_ACMEIssuerDNS01ProviderAzureDNS(in *ACMEIssuerDNS01ProviderAzureDNS, out *acme.ACMEIssuerDNS01ProviderAzureDNS, s conversion.Scope) error { - out.ClientID = in.ClientID - if in.ClientSecret != nil { - in, out := &in.ClientSecret, &out.ClientSecret - *out = new(meta.SecretKeySelector) - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ClientSecret = nil - } - out.SubscriptionID = in.SubscriptionID - out.TenantID = in.TenantID - out.ResourceGroupName = in.ResourceGroupName - out.HostedZoneName = in.HostedZoneName - out.Environment = acme.AzureDNSEnvironment(in.Environment) - out.ManagedIdentity = (*acme.AzureManagedIdentity)(unsafe.Pointer(in.ManagedIdentity)) - return nil -} - -// Convert_v1alpha3_ACMEIssuerDNS01ProviderAzureDNS_To_acme_ACMEIssuerDNS01ProviderAzureDNS is an autogenerated conversion function. -func Convert_v1alpha3_ACMEIssuerDNS01ProviderAzureDNS_To_acme_ACMEIssuerDNS01ProviderAzureDNS(in *ACMEIssuerDNS01ProviderAzureDNS, out *acme.ACMEIssuerDNS01ProviderAzureDNS, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEIssuerDNS01ProviderAzureDNS_To_acme_ACMEIssuerDNS01ProviderAzureDNS(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderAzureDNS_To_v1alpha3_ACMEIssuerDNS01ProviderAzureDNS(in *acme.ACMEIssuerDNS01ProviderAzureDNS, out *ACMEIssuerDNS01ProviderAzureDNS, s conversion.Scope) error { - out.ClientID = in.ClientID - if in.ClientSecret != nil { - in, out := &in.ClientSecret, &out.ClientSecret - *out = new(apismetav1.SecretKeySelector) - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ClientSecret = nil - } - out.SubscriptionID = in.SubscriptionID - out.TenantID = in.TenantID - out.ResourceGroupName = in.ResourceGroupName - out.HostedZoneName = in.HostedZoneName - out.Environment = AzureDNSEnvironment(in.Environment) - out.ManagedIdentity = (*AzureManagedIdentity)(unsafe.Pointer(in.ManagedIdentity)) - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderAzureDNS_To_v1alpha3_ACMEIssuerDNS01ProviderAzureDNS is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderAzureDNS_To_v1alpha3_ACMEIssuerDNS01ProviderAzureDNS(in *acme.ACMEIssuerDNS01ProviderAzureDNS, out *ACMEIssuerDNS01ProviderAzureDNS, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderAzureDNS_To_v1alpha3_ACMEIssuerDNS01ProviderAzureDNS(in, out, s) -} - -func autoConvert_v1alpha3_ACMEIssuerDNS01ProviderCloudDNS_To_acme_ACMEIssuerDNS01ProviderCloudDNS(in *ACMEIssuerDNS01ProviderCloudDNS, out *acme.ACMEIssuerDNS01ProviderCloudDNS, s conversion.Scope) error { - if in.ServiceAccount != nil { - in, out := &in.ServiceAccount, &out.ServiceAccount - *out = new(meta.SecretKeySelector) - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ServiceAccount = nil - } - out.Project = in.Project - out.HostedZoneName = in.HostedZoneName - return nil -} - -// Convert_v1alpha3_ACMEIssuerDNS01ProviderCloudDNS_To_acme_ACMEIssuerDNS01ProviderCloudDNS is an autogenerated conversion function. -func Convert_v1alpha3_ACMEIssuerDNS01ProviderCloudDNS_To_acme_ACMEIssuerDNS01ProviderCloudDNS(in *ACMEIssuerDNS01ProviderCloudDNS, out *acme.ACMEIssuerDNS01ProviderCloudDNS, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEIssuerDNS01ProviderCloudDNS_To_acme_ACMEIssuerDNS01ProviderCloudDNS(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderCloudDNS_To_v1alpha3_ACMEIssuerDNS01ProviderCloudDNS(in *acme.ACMEIssuerDNS01ProviderCloudDNS, out *ACMEIssuerDNS01ProviderCloudDNS, s conversion.Scope) error { - if in.ServiceAccount != nil { - in, out := &in.ServiceAccount, &out.ServiceAccount - *out = new(apismetav1.SecretKeySelector) - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ServiceAccount = nil - } - out.Project = in.Project - out.HostedZoneName = in.HostedZoneName - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderCloudDNS_To_v1alpha3_ACMEIssuerDNS01ProviderCloudDNS is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderCloudDNS_To_v1alpha3_ACMEIssuerDNS01ProviderCloudDNS(in *acme.ACMEIssuerDNS01ProviderCloudDNS, out *ACMEIssuerDNS01ProviderCloudDNS, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderCloudDNS_To_v1alpha3_ACMEIssuerDNS01ProviderCloudDNS(in, out, s) -} - -func autoConvert_v1alpha3_ACMEIssuerDNS01ProviderCloudflare_To_acme_ACMEIssuerDNS01ProviderCloudflare(in *ACMEIssuerDNS01ProviderCloudflare, out *acme.ACMEIssuerDNS01ProviderCloudflare, s conversion.Scope) error { - out.Email = in.Email - if in.APIKey != nil { - in, out := &in.APIKey, &out.APIKey - *out = new(meta.SecretKeySelector) - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.APIKey = nil - } - if in.APIToken != nil { - in, out := &in.APIToken, &out.APIToken - *out = new(meta.SecretKeySelector) - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.APIToken = nil - } - return nil -} - -// Convert_v1alpha3_ACMEIssuerDNS01ProviderCloudflare_To_acme_ACMEIssuerDNS01ProviderCloudflare is an autogenerated conversion function. -func Convert_v1alpha3_ACMEIssuerDNS01ProviderCloudflare_To_acme_ACMEIssuerDNS01ProviderCloudflare(in *ACMEIssuerDNS01ProviderCloudflare, out *acme.ACMEIssuerDNS01ProviderCloudflare, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEIssuerDNS01ProviderCloudflare_To_acme_ACMEIssuerDNS01ProviderCloudflare(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderCloudflare_To_v1alpha3_ACMEIssuerDNS01ProviderCloudflare(in *acme.ACMEIssuerDNS01ProviderCloudflare, out *ACMEIssuerDNS01ProviderCloudflare, s conversion.Scope) error { - out.Email = in.Email - if in.APIKey != nil { - in, out := &in.APIKey, &out.APIKey - *out = new(apismetav1.SecretKeySelector) - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.APIKey = nil - } - if in.APIToken != nil { - in, out := &in.APIToken, &out.APIToken - *out = new(apismetav1.SecretKeySelector) - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.APIToken = nil - } - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderCloudflare_To_v1alpha3_ACMEIssuerDNS01ProviderCloudflare is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderCloudflare_To_v1alpha3_ACMEIssuerDNS01ProviderCloudflare(in *acme.ACMEIssuerDNS01ProviderCloudflare, out *ACMEIssuerDNS01ProviderCloudflare, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderCloudflare_To_v1alpha3_ACMEIssuerDNS01ProviderCloudflare(in, out, s) -} - -func autoConvert_v1alpha3_ACMEIssuerDNS01ProviderDigitalOcean_To_acme_ACMEIssuerDNS01ProviderDigitalOcean(in *ACMEIssuerDNS01ProviderDigitalOcean, out *acme.ACMEIssuerDNS01ProviderDigitalOcean, s conversion.Scope) error { - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.Token, &out.Token, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_ACMEIssuerDNS01ProviderDigitalOcean_To_acme_ACMEIssuerDNS01ProviderDigitalOcean is an autogenerated conversion function. -func Convert_v1alpha3_ACMEIssuerDNS01ProviderDigitalOcean_To_acme_ACMEIssuerDNS01ProviderDigitalOcean(in *ACMEIssuerDNS01ProviderDigitalOcean, out *acme.ACMEIssuerDNS01ProviderDigitalOcean, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEIssuerDNS01ProviderDigitalOcean_To_acme_ACMEIssuerDNS01ProviderDigitalOcean(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderDigitalOcean_To_v1alpha3_ACMEIssuerDNS01ProviderDigitalOcean(in *acme.ACMEIssuerDNS01ProviderDigitalOcean, out *ACMEIssuerDNS01ProviderDigitalOcean, s conversion.Scope) error { - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.Token, &out.Token, s); err != nil { - return err - } - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderDigitalOcean_To_v1alpha3_ACMEIssuerDNS01ProviderDigitalOcean is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderDigitalOcean_To_v1alpha3_ACMEIssuerDNS01ProviderDigitalOcean(in *acme.ACMEIssuerDNS01ProviderDigitalOcean, out *ACMEIssuerDNS01ProviderDigitalOcean, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderDigitalOcean_To_v1alpha3_ACMEIssuerDNS01ProviderDigitalOcean(in, out, s) -} - -func autoConvert_v1alpha3_ACMEIssuerDNS01ProviderRFC2136_To_acme_ACMEIssuerDNS01ProviderRFC2136(in *ACMEIssuerDNS01ProviderRFC2136, out *acme.ACMEIssuerDNS01ProviderRFC2136, s conversion.Scope) error { - out.Nameserver = in.Nameserver - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.TSIGSecret, &out.TSIGSecret, s); err != nil { - return err - } - out.TSIGKeyName = in.TSIGKeyName - out.TSIGAlgorithm = in.TSIGAlgorithm - return nil -} - -// Convert_v1alpha3_ACMEIssuerDNS01ProviderRFC2136_To_acme_ACMEIssuerDNS01ProviderRFC2136 is an autogenerated conversion function. -func Convert_v1alpha3_ACMEIssuerDNS01ProviderRFC2136_To_acme_ACMEIssuerDNS01ProviderRFC2136(in *ACMEIssuerDNS01ProviderRFC2136, out *acme.ACMEIssuerDNS01ProviderRFC2136, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEIssuerDNS01ProviderRFC2136_To_acme_ACMEIssuerDNS01ProviderRFC2136(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderRFC2136_To_v1alpha3_ACMEIssuerDNS01ProviderRFC2136(in *acme.ACMEIssuerDNS01ProviderRFC2136, out *ACMEIssuerDNS01ProviderRFC2136, s conversion.Scope) error { - out.Nameserver = in.Nameserver - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.TSIGSecret, &out.TSIGSecret, s); err != nil { - return err - } - out.TSIGKeyName = in.TSIGKeyName - out.TSIGAlgorithm = in.TSIGAlgorithm - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderRFC2136_To_v1alpha3_ACMEIssuerDNS01ProviderRFC2136 is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderRFC2136_To_v1alpha3_ACMEIssuerDNS01ProviderRFC2136(in *acme.ACMEIssuerDNS01ProviderRFC2136, out *ACMEIssuerDNS01ProviderRFC2136, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderRFC2136_To_v1alpha3_ACMEIssuerDNS01ProviderRFC2136(in, out, s) -} - -func autoConvert_v1alpha3_ACMEIssuerDNS01ProviderRoute53_To_acme_ACMEIssuerDNS01ProviderRoute53(in *ACMEIssuerDNS01ProviderRoute53, out *acme.ACMEIssuerDNS01ProviderRoute53, s conversion.Scope) error { - out.Auth = (*acme.Route53Auth)(unsafe.Pointer(in.Auth)) - out.AccessKeyID = in.AccessKeyID - if in.SecretAccessKeyID != nil { - in, out := &in.SecretAccessKeyID, &out.SecretAccessKeyID - *out = new(meta.SecretKeySelector) - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.SecretAccessKeyID = nil - } - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.SecretAccessKey, &out.SecretAccessKey, s); err != nil { - return err - } - out.Role = in.Role - out.HostedZoneID = in.HostedZoneID - out.Region = in.Region - return nil -} - -// Convert_v1alpha3_ACMEIssuerDNS01ProviderRoute53_To_acme_ACMEIssuerDNS01ProviderRoute53 is an autogenerated conversion function. -func Convert_v1alpha3_ACMEIssuerDNS01ProviderRoute53_To_acme_ACMEIssuerDNS01ProviderRoute53(in *ACMEIssuerDNS01ProviderRoute53, out *acme.ACMEIssuerDNS01ProviderRoute53, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEIssuerDNS01ProviderRoute53_To_acme_ACMEIssuerDNS01ProviderRoute53(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderRoute53_To_v1alpha3_ACMEIssuerDNS01ProviderRoute53(in *acme.ACMEIssuerDNS01ProviderRoute53, out *ACMEIssuerDNS01ProviderRoute53, s conversion.Scope) error { - out.Auth = (*Route53Auth)(unsafe.Pointer(in.Auth)) - out.AccessKeyID = in.AccessKeyID - if in.SecretAccessKeyID != nil { - in, out := &in.SecretAccessKeyID, &out.SecretAccessKeyID - *out = new(apismetav1.SecretKeySelector) - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.SecretAccessKeyID = nil - } - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.SecretAccessKey, &out.SecretAccessKey, s); err != nil { - return err - } - out.Role = in.Role - out.HostedZoneID = in.HostedZoneID - out.Region = in.Region - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderRoute53_To_v1alpha3_ACMEIssuerDNS01ProviderRoute53 is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderRoute53_To_v1alpha3_ACMEIssuerDNS01ProviderRoute53(in *acme.ACMEIssuerDNS01ProviderRoute53, out *ACMEIssuerDNS01ProviderRoute53, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderRoute53_To_v1alpha3_ACMEIssuerDNS01ProviderRoute53(in, out, s) -} - -func autoConvert_v1alpha3_ACMEIssuerDNS01ProviderWebhook_To_acme_ACMEIssuerDNS01ProviderWebhook(in *ACMEIssuerDNS01ProviderWebhook, out *acme.ACMEIssuerDNS01ProviderWebhook, s conversion.Scope) error { - out.GroupName = in.GroupName - out.SolverName = in.SolverName - out.Config = (*apiextensionsv1.JSON)(unsafe.Pointer(in.Config)) - return nil -} - -// Convert_v1alpha3_ACMEIssuerDNS01ProviderWebhook_To_acme_ACMEIssuerDNS01ProviderWebhook is an autogenerated conversion function. -func Convert_v1alpha3_ACMEIssuerDNS01ProviderWebhook_To_acme_ACMEIssuerDNS01ProviderWebhook(in *ACMEIssuerDNS01ProviderWebhook, out *acme.ACMEIssuerDNS01ProviderWebhook, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEIssuerDNS01ProviderWebhook_To_acme_ACMEIssuerDNS01ProviderWebhook(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderWebhook_To_v1alpha3_ACMEIssuerDNS01ProviderWebhook(in *acme.ACMEIssuerDNS01ProviderWebhook, out *ACMEIssuerDNS01ProviderWebhook, s conversion.Scope) error { - out.GroupName = in.GroupName - out.SolverName = in.SolverName - out.Config = (*apiextensionsv1.JSON)(unsafe.Pointer(in.Config)) - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderWebhook_To_v1alpha3_ACMEIssuerDNS01ProviderWebhook is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderWebhook_To_v1alpha3_ACMEIssuerDNS01ProviderWebhook(in *acme.ACMEIssuerDNS01ProviderWebhook, out *ACMEIssuerDNS01ProviderWebhook, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderWebhook_To_v1alpha3_ACMEIssuerDNS01ProviderWebhook(in, out, s) -} - -func autoConvert_v1alpha3_ACMEIssuerStatus_To_acme_ACMEIssuerStatus(in *ACMEIssuerStatus, out *acme.ACMEIssuerStatus, s conversion.Scope) error { - out.URI = in.URI - out.LastRegisteredEmail = in.LastRegisteredEmail - out.LastPrivateKeyHash = in.LastPrivateKeyHash - return nil -} - -// Convert_v1alpha3_ACMEIssuerStatus_To_acme_ACMEIssuerStatus is an autogenerated conversion function. -func Convert_v1alpha3_ACMEIssuerStatus_To_acme_ACMEIssuerStatus(in *ACMEIssuerStatus, out *acme.ACMEIssuerStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_ACMEIssuerStatus_To_acme_ACMEIssuerStatus(in, out, s) -} - -func autoConvert_acme_ACMEIssuerStatus_To_v1alpha3_ACMEIssuerStatus(in *acme.ACMEIssuerStatus, out *ACMEIssuerStatus, s conversion.Scope) error { - out.URI = in.URI - out.LastRegisteredEmail = in.LastRegisteredEmail - out.LastPrivateKeyHash = in.LastPrivateKeyHash - return nil -} - -// Convert_acme_ACMEIssuerStatus_To_v1alpha3_ACMEIssuerStatus is an autogenerated conversion function. -func Convert_acme_ACMEIssuerStatus_To_v1alpha3_ACMEIssuerStatus(in *acme.ACMEIssuerStatus, out *ACMEIssuerStatus, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerStatus_To_v1alpha3_ACMEIssuerStatus(in, out, s) -} - -func autoConvert_v1alpha3_AzureManagedIdentity_To_acme_AzureManagedIdentity(in *AzureManagedIdentity, out *acme.AzureManagedIdentity, s conversion.Scope) error { - out.ClientID = in.ClientID - out.ResourceID = in.ResourceID - return nil -} - -// Convert_v1alpha3_AzureManagedIdentity_To_acme_AzureManagedIdentity is an autogenerated conversion function. -func Convert_v1alpha3_AzureManagedIdentity_To_acme_AzureManagedIdentity(in *AzureManagedIdentity, out *acme.AzureManagedIdentity, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureManagedIdentity_To_acme_AzureManagedIdentity(in, out, s) -} - -func autoConvert_acme_AzureManagedIdentity_To_v1alpha3_AzureManagedIdentity(in *acme.AzureManagedIdentity, out *AzureManagedIdentity, s conversion.Scope) error { - out.ClientID = in.ClientID - out.ResourceID = in.ResourceID - return nil -} - -// Convert_acme_AzureManagedIdentity_To_v1alpha3_AzureManagedIdentity is an autogenerated conversion function. -func Convert_acme_AzureManagedIdentity_To_v1alpha3_AzureManagedIdentity(in *acme.AzureManagedIdentity, out *AzureManagedIdentity, s conversion.Scope) error { - return autoConvert_acme_AzureManagedIdentity_To_v1alpha3_AzureManagedIdentity(in, out, s) -} - -func autoConvert_v1alpha3_CertificateDNSNameSelector_To_acme_CertificateDNSNameSelector(in *CertificateDNSNameSelector, out *acme.CertificateDNSNameSelector, s conversion.Scope) error { - out.MatchLabels = *(*map[string]string)(unsafe.Pointer(&in.MatchLabels)) - out.DNSNames = *(*[]string)(unsafe.Pointer(&in.DNSNames)) - out.DNSZones = *(*[]string)(unsafe.Pointer(&in.DNSZones)) - return nil -} - -// Convert_v1alpha3_CertificateDNSNameSelector_To_acme_CertificateDNSNameSelector is an autogenerated conversion function. -func Convert_v1alpha3_CertificateDNSNameSelector_To_acme_CertificateDNSNameSelector(in *CertificateDNSNameSelector, out *acme.CertificateDNSNameSelector, s conversion.Scope) error { - return autoConvert_v1alpha3_CertificateDNSNameSelector_To_acme_CertificateDNSNameSelector(in, out, s) -} - -func autoConvert_acme_CertificateDNSNameSelector_To_v1alpha3_CertificateDNSNameSelector(in *acme.CertificateDNSNameSelector, out *CertificateDNSNameSelector, s conversion.Scope) error { - out.MatchLabels = *(*map[string]string)(unsafe.Pointer(&in.MatchLabels)) - out.DNSNames = *(*[]string)(unsafe.Pointer(&in.DNSNames)) - out.DNSZones = *(*[]string)(unsafe.Pointer(&in.DNSZones)) - return nil -} - -// Convert_acme_CertificateDNSNameSelector_To_v1alpha3_CertificateDNSNameSelector is an autogenerated conversion function. -func Convert_acme_CertificateDNSNameSelector_To_v1alpha3_CertificateDNSNameSelector(in *acme.CertificateDNSNameSelector, out *CertificateDNSNameSelector, s conversion.Scope) error { - return autoConvert_acme_CertificateDNSNameSelector_To_v1alpha3_CertificateDNSNameSelector(in, out, s) -} - -func autoConvert_v1alpha3_Challenge_To_acme_Challenge(in *Challenge, out *acme.Challenge, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_ChallengeSpec_To_acme_ChallengeSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_ChallengeStatus_To_acme_ChallengeStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_Challenge_To_acme_Challenge is an autogenerated conversion function. -func Convert_v1alpha3_Challenge_To_acme_Challenge(in *Challenge, out *acme.Challenge, s conversion.Scope) error { - return autoConvert_v1alpha3_Challenge_To_acme_Challenge(in, out, s) -} - -func autoConvert_acme_Challenge_To_v1alpha3_Challenge(in *acme.Challenge, out *Challenge, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_acme_ChallengeSpec_To_v1alpha3_ChallengeSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_acme_ChallengeStatus_To_v1alpha3_ChallengeStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_acme_Challenge_To_v1alpha3_Challenge is an autogenerated conversion function. -func Convert_acme_Challenge_To_v1alpha3_Challenge(in *acme.Challenge, out *Challenge, s conversion.Scope) error { - return autoConvert_acme_Challenge_To_v1alpha3_Challenge(in, out, s) -} - -func autoConvert_v1alpha3_ChallengeList_To_acme_ChallengeList(in *ChallengeList, out *acme.ChallengeList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]acme.Challenge, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_Challenge_To_acme_Challenge(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_ChallengeList_To_acme_ChallengeList is an autogenerated conversion function. -func Convert_v1alpha3_ChallengeList_To_acme_ChallengeList(in *ChallengeList, out *acme.ChallengeList, s conversion.Scope) error { - return autoConvert_v1alpha3_ChallengeList_To_acme_ChallengeList(in, out, s) -} - -func autoConvert_acme_ChallengeList_To_v1alpha3_ChallengeList(in *acme.ChallengeList, out *ChallengeList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Challenge, len(*in)) - for i := range *in { - if err := Convert_acme_Challenge_To_v1alpha3_Challenge(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_acme_ChallengeList_To_v1alpha3_ChallengeList is an autogenerated conversion function. -func Convert_acme_ChallengeList_To_v1alpha3_ChallengeList(in *acme.ChallengeList, out *ChallengeList, s conversion.Scope) error { - return autoConvert_acme_ChallengeList_To_v1alpha3_ChallengeList(in, out, s) -} - -func autoConvert_v1alpha3_ChallengeSpec_To_acme_ChallengeSpec(in *ChallengeSpec, out *acme.ChallengeSpec, s conversion.Scope) error { - out.URL = in.URL - // WARNING: in.AuthzURL requires manual conversion: does not exist in peer-type - out.DNSName = in.DNSName - out.Wildcard = in.Wildcard - out.Type = acme.ACMEChallengeType(in.Type) - out.Token = in.Token - out.Key = in.Key - if err := Convert_v1alpha3_ACMEChallengeSolver_To_acme_ACMEChallengeSolver(&in.Solver, &out.Solver, s); err != nil { - return err - } - if err := metav1.Convert_v1_ObjectReference_To_meta_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - return nil -} - -func autoConvert_acme_ChallengeSpec_To_v1alpha3_ChallengeSpec(in *acme.ChallengeSpec, out *ChallengeSpec, s conversion.Scope) error { - out.URL = in.URL - // WARNING: in.AuthorizationURL requires manual conversion: does not exist in peer-type - out.DNSName = in.DNSName - out.Wildcard = in.Wildcard - out.Type = ACMEChallengeType(in.Type) - out.Token = in.Token - out.Key = in.Key - if err := Convert_acme_ACMEChallengeSolver_To_v1alpha3_ACMEChallengeSolver(&in.Solver, &out.Solver, s); err != nil { - return err - } - if err := metav1.Convert_meta_ObjectReference_To_v1_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha3_ChallengeStatus_To_acme_ChallengeStatus(in *ChallengeStatus, out *acme.ChallengeStatus, s conversion.Scope) error { - out.Processing = in.Processing - out.Presented = in.Presented - out.Reason = in.Reason - out.State = acme.State(in.State) - return nil -} - -// Convert_v1alpha3_ChallengeStatus_To_acme_ChallengeStatus is an autogenerated conversion function. -func Convert_v1alpha3_ChallengeStatus_To_acme_ChallengeStatus(in *ChallengeStatus, out *acme.ChallengeStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_ChallengeStatus_To_acme_ChallengeStatus(in, out, s) -} - -func autoConvert_acme_ChallengeStatus_To_v1alpha3_ChallengeStatus(in *acme.ChallengeStatus, out *ChallengeStatus, s conversion.Scope) error { - out.Processing = in.Processing - out.Presented = in.Presented - out.Reason = in.Reason - out.State = State(in.State) - return nil -} - -// Convert_acme_ChallengeStatus_To_v1alpha3_ChallengeStatus is an autogenerated conversion function. -func Convert_acme_ChallengeStatus_To_v1alpha3_ChallengeStatus(in *acme.ChallengeStatus, out *ChallengeStatus, s conversion.Scope) error { - return autoConvert_acme_ChallengeStatus_To_v1alpha3_ChallengeStatus(in, out, s) -} - -func autoConvert_v1alpha3_Order_To_acme_Order(in *Order, out *acme.Order, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_OrderSpec_To_acme_OrderSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_OrderStatus_To_acme_OrderStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_Order_To_acme_Order is an autogenerated conversion function. -func Convert_v1alpha3_Order_To_acme_Order(in *Order, out *acme.Order, s conversion.Scope) error { - return autoConvert_v1alpha3_Order_To_acme_Order(in, out, s) -} - -func autoConvert_acme_Order_To_v1alpha3_Order(in *acme.Order, out *Order, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_acme_OrderSpec_To_v1alpha3_OrderSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_acme_OrderStatus_To_v1alpha3_OrderStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_acme_Order_To_v1alpha3_Order is an autogenerated conversion function. -func Convert_acme_Order_To_v1alpha3_Order(in *acme.Order, out *Order, s conversion.Scope) error { - return autoConvert_acme_Order_To_v1alpha3_Order(in, out, s) -} - -func autoConvert_v1alpha3_OrderList_To_acme_OrderList(in *OrderList, out *acme.OrderList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]acme.Order, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_Order_To_acme_Order(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_OrderList_To_acme_OrderList is an autogenerated conversion function. -func Convert_v1alpha3_OrderList_To_acme_OrderList(in *OrderList, out *acme.OrderList, s conversion.Scope) error { - return autoConvert_v1alpha3_OrderList_To_acme_OrderList(in, out, s) -} - -func autoConvert_acme_OrderList_To_v1alpha3_OrderList(in *acme.OrderList, out *OrderList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Order, len(*in)) - for i := range *in { - if err := Convert_acme_Order_To_v1alpha3_Order(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_acme_OrderList_To_v1alpha3_OrderList is an autogenerated conversion function. -func Convert_acme_OrderList_To_v1alpha3_OrderList(in *acme.OrderList, out *OrderList, s conversion.Scope) error { - return autoConvert_acme_OrderList_To_v1alpha3_OrderList(in, out, s) -} - -func autoConvert_v1alpha3_OrderSpec_To_acme_OrderSpec(in *OrderSpec, out *acme.OrderSpec, s conversion.Scope) error { - // WARNING: in.CSR requires manual conversion: does not exist in peer-type - if err := metav1.Convert_v1_ObjectReference_To_meta_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - out.CommonName = in.CommonName - out.DNSNames = *(*[]string)(unsafe.Pointer(&in.DNSNames)) - out.IPAddresses = *(*[]string)(unsafe.Pointer(&in.IPAddresses)) - out.Duration = (*pkgapismetav1.Duration)(unsafe.Pointer(in.Duration)) - return nil -} - -func autoConvert_acme_OrderSpec_To_v1alpha3_OrderSpec(in *acme.OrderSpec, out *OrderSpec, s conversion.Scope) error { - // WARNING: in.Request requires manual conversion: does not exist in peer-type - if err := metav1.Convert_meta_ObjectReference_To_v1_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - out.CommonName = in.CommonName - out.DNSNames = *(*[]string)(unsafe.Pointer(&in.DNSNames)) - out.IPAddresses = *(*[]string)(unsafe.Pointer(&in.IPAddresses)) - out.Duration = (*pkgapismetav1.Duration)(unsafe.Pointer(in.Duration)) - return nil -} - -func autoConvert_v1alpha3_OrderStatus_To_acme_OrderStatus(in *OrderStatus, out *acme.OrderStatus, s conversion.Scope) error { - out.URL = in.URL - out.FinalizeURL = in.FinalizeURL - out.Authorizations = *(*[]acme.ACMEAuthorization)(unsafe.Pointer(&in.Authorizations)) - out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) - out.State = acme.State(in.State) - out.Reason = in.Reason - out.FailureTime = (*pkgapismetav1.Time)(unsafe.Pointer(in.FailureTime)) - return nil -} - -// Convert_v1alpha3_OrderStatus_To_acme_OrderStatus is an autogenerated conversion function. -func Convert_v1alpha3_OrderStatus_To_acme_OrderStatus(in *OrderStatus, out *acme.OrderStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_OrderStatus_To_acme_OrderStatus(in, out, s) -} - -func autoConvert_acme_OrderStatus_To_v1alpha3_OrderStatus(in *acme.OrderStatus, out *OrderStatus, s conversion.Scope) error { - out.URL = in.URL - out.FinalizeURL = in.FinalizeURL - out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) - out.State = State(in.State) - out.Reason = in.Reason - out.Authorizations = *(*[]ACMEAuthorization)(unsafe.Pointer(&in.Authorizations)) - out.FailureTime = (*pkgapismetav1.Time)(unsafe.Pointer(in.FailureTime)) - return nil -} - -// Convert_acme_OrderStatus_To_v1alpha3_OrderStatus is an autogenerated conversion function. -func Convert_acme_OrderStatus_To_v1alpha3_OrderStatus(in *acme.OrderStatus, out *OrderStatus, s conversion.Scope) error { - return autoConvert_acme_OrderStatus_To_v1alpha3_OrderStatus(in, out, s) -} - -func autoConvert_v1alpha3_Route53Auth_To_acme_Route53Auth(in *Route53Auth, out *acme.Route53Auth, s conversion.Scope) error { - out.Kubernetes = (*acme.Route53KubernetesAuth)(unsafe.Pointer(in.Kubernetes)) - return nil -} - -// Convert_v1alpha3_Route53Auth_To_acme_Route53Auth is an autogenerated conversion function. -func Convert_v1alpha3_Route53Auth_To_acme_Route53Auth(in *Route53Auth, out *acme.Route53Auth, s conversion.Scope) error { - return autoConvert_v1alpha3_Route53Auth_To_acme_Route53Auth(in, out, s) -} - -func autoConvert_acme_Route53Auth_To_v1alpha3_Route53Auth(in *acme.Route53Auth, out *Route53Auth, s conversion.Scope) error { - out.Kubernetes = (*Route53KubernetesAuth)(unsafe.Pointer(in.Kubernetes)) - return nil -} - -// Convert_acme_Route53Auth_To_v1alpha3_Route53Auth is an autogenerated conversion function. -func Convert_acme_Route53Auth_To_v1alpha3_Route53Auth(in *acme.Route53Auth, out *Route53Auth, s conversion.Scope) error { - return autoConvert_acme_Route53Auth_To_v1alpha3_Route53Auth(in, out, s) -} - -func autoConvert_v1alpha3_Route53KubernetesAuth_To_acme_Route53KubernetesAuth(in *Route53KubernetesAuth, out *acme.Route53KubernetesAuth, s conversion.Scope) error { - out.ServiceAccountRef = (*acme.ServiceAccountRef)(unsafe.Pointer(in.ServiceAccountRef)) - return nil -} - -// Convert_v1alpha3_Route53KubernetesAuth_To_acme_Route53KubernetesAuth is an autogenerated conversion function. -func Convert_v1alpha3_Route53KubernetesAuth_To_acme_Route53KubernetesAuth(in *Route53KubernetesAuth, out *acme.Route53KubernetesAuth, s conversion.Scope) error { - return autoConvert_v1alpha3_Route53KubernetesAuth_To_acme_Route53KubernetesAuth(in, out, s) -} - -func autoConvert_acme_Route53KubernetesAuth_To_v1alpha3_Route53KubernetesAuth(in *acme.Route53KubernetesAuth, out *Route53KubernetesAuth, s conversion.Scope) error { - out.ServiceAccountRef = (*ServiceAccountRef)(unsafe.Pointer(in.ServiceAccountRef)) - return nil -} - -// Convert_acme_Route53KubernetesAuth_To_v1alpha3_Route53KubernetesAuth is an autogenerated conversion function. -func Convert_acme_Route53KubernetesAuth_To_v1alpha3_Route53KubernetesAuth(in *acme.Route53KubernetesAuth, out *Route53KubernetesAuth, s conversion.Scope) error { - return autoConvert_acme_Route53KubernetesAuth_To_v1alpha3_Route53KubernetesAuth(in, out, s) -} - -func autoConvert_v1alpha3_ServiceAccountRef_To_acme_ServiceAccountRef(in *ServiceAccountRef, out *acme.ServiceAccountRef, s conversion.Scope) error { - out.Name = in.Name - out.TokenAudiences = *(*[]string)(unsafe.Pointer(&in.TokenAudiences)) - return nil -} - -// Convert_v1alpha3_ServiceAccountRef_To_acme_ServiceAccountRef is an autogenerated conversion function. -func Convert_v1alpha3_ServiceAccountRef_To_acme_ServiceAccountRef(in *ServiceAccountRef, out *acme.ServiceAccountRef, s conversion.Scope) error { - return autoConvert_v1alpha3_ServiceAccountRef_To_acme_ServiceAccountRef(in, out, s) -} - -func autoConvert_acme_ServiceAccountRef_To_v1alpha3_ServiceAccountRef(in *acme.ServiceAccountRef, out *ServiceAccountRef, s conversion.Scope) error { - out.Name = in.Name - out.TokenAudiences = *(*[]string)(unsafe.Pointer(&in.TokenAudiences)) - return nil -} - -// Convert_acme_ServiceAccountRef_To_v1alpha3_ServiceAccountRef is an autogenerated conversion function. -func Convert_acme_ServiceAccountRef_To_v1alpha3_ServiceAccountRef(in *acme.ServiceAccountRef, out *ServiceAccountRef, s conversion.Scope) error { - return autoConvert_acme_ServiceAccountRef_To_v1alpha3_ServiceAccountRef(in, out, s) -} diff --git a/internal/apis/acme/v1alpha3/zz_generated.deepcopy.go b/internal/apis/acme/v1alpha3/zz_generated.deepcopy.go deleted file mode 100644 index 80ef90d6743..00000000000 --- a/internal/apis/acme/v1alpha3/zz_generated.deepcopy.go +++ /dev/null @@ -1,987 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The cert-manager 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 v1alpha3 - -import ( - metav1 "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" - corev1 "k8s.io/api/core/v1" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - v1 "sigs.k8s.io/gateway-api/apis/v1" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEAuthorization) DeepCopyInto(out *ACMEAuthorization) { - *out = *in - if in.Wildcard != nil { - in, out := &in.Wildcard, &out.Wildcard - *out = new(bool) - **out = **in - } - if in.Challenges != nil { - in, out := &in.Challenges, &out.Challenges - *out = make([]ACMEChallenge, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEAuthorization. -func (in *ACMEAuthorization) DeepCopy() *ACMEAuthorization { - if in == nil { - return nil - } - out := new(ACMEAuthorization) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallenge) DeepCopyInto(out *ACMEChallenge) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallenge. -func (in *ACMEChallenge) DeepCopy() *ACMEChallenge { - if in == nil { - return nil - } - out := new(ACMEChallenge) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolver) DeepCopyInto(out *ACMEChallengeSolver) { - *out = *in - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(CertificateDNSNameSelector) - (*in).DeepCopyInto(*out) - } - if in.HTTP01 != nil { - in, out := &in.HTTP01, &out.HTTP01 - *out = new(ACMEChallengeSolverHTTP01) - (*in).DeepCopyInto(*out) - } - if in.DNS01 != nil { - in, out := &in.DNS01, &out.DNS01 - *out = new(ACMEChallengeSolverDNS01) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolver. -func (in *ACMEChallengeSolver) DeepCopy() *ACMEChallengeSolver { - if in == nil { - return nil - } - out := new(ACMEChallengeSolver) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverDNS01) DeepCopyInto(out *ACMEChallengeSolverDNS01) { - *out = *in - if in.Akamai != nil { - in, out := &in.Akamai, &out.Akamai - *out = new(ACMEIssuerDNS01ProviderAkamai) - **out = **in - } - if in.CloudDNS != nil { - in, out := &in.CloudDNS, &out.CloudDNS - *out = new(ACMEIssuerDNS01ProviderCloudDNS) - (*in).DeepCopyInto(*out) - } - if in.Cloudflare != nil { - in, out := &in.Cloudflare, &out.Cloudflare - *out = new(ACMEIssuerDNS01ProviderCloudflare) - (*in).DeepCopyInto(*out) - } - if in.Route53 != nil { - in, out := &in.Route53, &out.Route53 - *out = new(ACMEIssuerDNS01ProviderRoute53) - (*in).DeepCopyInto(*out) - } - if in.AzureDNS != nil { - in, out := &in.AzureDNS, &out.AzureDNS - *out = new(ACMEIssuerDNS01ProviderAzureDNS) - (*in).DeepCopyInto(*out) - } - if in.DigitalOcean != nil { - in, out := &in.DigitalOcean, &out.DigitalOcean - *out = new(ACMEIssuerDNS01ProviderDigitalOcean) - **out = **in - } - if in.AcmeDNS != nil { - in, out := &in.AcmeDNS, &out.AcmeDNS - *out = new(ACMEIssuerDNS01ProviderAcmeDNS) - **out = **in - } - if in.RFC2136 != nil { - in, out := &in.RFC2136, &out.RFC2136 - *out = new(ACMEIssuerDNS01ProviderRFC2136) - **out = **in - } - if in.Webhook != nil { - in, out := &in.Webhook, &out.Webhook - *out = new(ACMEIssuerDNS01ProviderWebhook) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverDNS01. -func (in *ACMEChallengeSolverDNS01) DeepCopy() *ACMEChallengeSolverDNS01 { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverDNS01) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01) DeepCopyInto(out *ACMEChallengeSolverHTTP01) { - *out = *in - if in.Ingress != nil { - in, out := &in.Ingress, &out.Ingress - *out = new(ACMEChallengeSolverHTTP01Ingress) - (*in).DeepCopyInto(*out) - } - if in.GatewayHTTPRoute != nil { - in, out := &in.GatewayHTTPRoute, &out.GatewayHTTPRoute - *out = new(ACMEChallengeSolverHTTP01GatewayHTTPRoute) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01. -func (in *ACMEChallengeSolverHTTP01) DeepCopy() *ACMEChallengeSolverHTTP01 { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01GatewayHTTPRoute) DeepCopyInto(out *ACMEChallengeSolverHTTP01GatewayHTTPRoute) { - *out = *in - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.ParentRefs != nil { - in, out := &in.ParentRefs, &out.ParentRefs - *out = make([]v1.ParentReference, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01GatewayHTTPRoute. -func (in *ACMEChallengeSolverHTTP01GatewayHTTPRoute) DeepCopy() *ACMEChallengeSolverHTTP01GatewayHTTPRoute { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01GatewayHTTPRoute) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01Ingress) DeepCopyInto(out *ACMEChallengeSolverHTTP01Ingress) { - *out = *in - if in.IngressClassName != nil { - in, out := &in.IngressClassName, &out.IngressClassName - *out = new(string) - **out = **in - } - if in.Class != nil { - in, out := &in.Class, &out.Class - *out = new(string) - **out = **in - } - if in.PodTemplate != nil { - in, out := &in.PodTemplate, &out.PodTemplate - *out = new(ACMEChallengeSolverHTTP01IngressPodTemplate) - (*in).DeepCopyInto(*out) - } - if in.IngressTemplate != nil { - in, out := &in.IngressTemplate, &out.IngressTemplate - *out = new(ACMEChallengeSolverHTTP01IngressTemplate) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01Ingress. -func (in *ACMEChallengeSolverHTTP01Ingress) DeepCopy() *ACMEChallengeSolverHTTP01Ingress { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01Ingress) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01IngressObjectMeta) DeepCopyInto(out *ACMEChallengeSolverHTTP01IngressObjectMeta) { - *out = *in - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01IngressObjectMeta. -func (in *ACMEChallengeSolverHTTP01IngressObjectMeta) DeepCopy() *ACMEChallengeSolverHTTP01IngressObjectMeta { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01IngressObjectMeta) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01IngressPodObjectMeta) DeepCopyInto(out *ACMEChallengeSolverHTTP01IngressPodObjectMeta) { - *out = *in - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01IngressPodObjectMeta. -func (in *ACMEChallengeSolverHTTP01IngressPodObjectMeta) DeepCopy() *ACMEChallengeSolverHTTP01IngressPodObjectMeta { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01IngressPodObjectMeta) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01IngressPodSpec) DeepCopyInto(out *ACMEChallengeSolverHTTP01IngressPodSpec) { - *out = *in - if in.NodeSelector != nil { - in, out := &in.NodeSelector, &out.NodeSelector - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Affinity != nil { - in, out := &in.Affinity, &out.Affinity - *out = new(corev1.Affinity) - (*in).DeepCopyInto(*out) - } - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = make([]corev1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ImagePullSecrets != nil { - in, out := &in.ImagePullSecrets, &out.ImagePullSecrets - *out = make([]corev1.LocalObjectReference, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01IngressPodSpec. -func (in *ACMEChallengeSolverHTTP01IngressPodSpec) DeepCopy() *ACMEChallengeSolverHTTP01IngressPodSpec { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01IngressPodSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01IngressPodTemplate) DeepCopyInto(out *ACMEChallengeSolverHTTP01IngressPodTemplate) { - *out = *in - in.ACMEChallengeSolverHTTP01IngressPodObjectMeta.DeepCopyInto(&out.ACMEChallengeSolverHTTP01IngressPodObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01IngressPodTemplate. -func (in *ACMEChallengeSolverHTTP01IngressPodTemplate) DeepCopy() *ACMEChallengeSolverHTTP01IngressPodTemplate { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01IngressPodTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01IngressTemplate) DeepCopyInto(out *ACMEChallengeSolverHTTP01IngressTemplate) { - *out = *in - in.ACMEChallengeSolverHTTP01IngressObjectMeta.DeepCopyInto(&out.ACMEChallengeSolverHTTP01IngressObjectMeta) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01IngressTemplate. -func (in *ACMEChallengeSolverHTTP01IngressTemplate) DeepCopy() *ACMEChallengeSolverHTTP01IngressTemplate { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01IngressTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEExternalAccountBinding) DeepCopyInto(out *ACMEExternalAccountBinding) { - *out = *in - out.Key = in.Key - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEExternalAccountBinding. -func (in *ACMEExternalAccountBinding) DeepCopy() *ACMEExternalAccountBinding { - if in == nil { - return nil - } - out := new(ACMEExternalAccountBinding) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuer) DeepCopyInto(out *ACMEIssuer) { - *out = *in - if in.CABundle != nil { - in, out := &in.CABundle, &out.CABundle - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.ExternalAccountBinding != nil { - in, out := &in.ExternalAccountBinding, &out.ExternalAccountBinding - *out = new(ACMEExternalAccountBinding) - **out = **in - } - out.PrivateKey = in.PrivateKey - if in.Solvers != nil { - in, out := &in.Solvers, &out.Solvers - *out = make([]ACMEChallengeSolver, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuer. -func (in *ACMEIssuer) DeepCopy() *ACMEIssuer { - if in == nil { - return nil - } - out := new(ACMEIssuer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderAcmeDNS) DeepCopyInto(out *ACMEIssuerDNS01ProviderAcmeDNS) { - *out = *in - out.AccountSecret = in.AccountSecret - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderAcmeDNS. -func (in *ACMEIssuerDNS01ProviderAcmeDNS) DeepCopy() *ACMEIssuerDNS01ProviderAcmeDNS { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderAcmeDNS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderAkamai) DeepCopyInto(out *ACMEIssuerDNS01ProviderAkamai) { - *out = *in - out.ClientToken = in.ClientToken - out.ClientSecret = in.ClientSecret - out.AccessToken = in.AccessToken - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderAkamai. -func (in *ACMEIssuerDNS01ProviderAkamai) DeepCopy() *ACMEIssuerDNS01ProviderAkamai { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderAkamai) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderAzureDNS) DeepCopyInto(out *ACMEIssuerDNS01ProviderAzureDNS) { - *out = *in - if in.ClientSecret != nil { - in, out := &in.ClientSecret, &out.ClientSecret - *out = new(metav1.SecretKeySelector) - **out = **in - } - if in.ManagedIdentity != nil { - in, out := &in.ManagedIdentity, &out.ManagedIdentity - *out = new(AzureManagedIdentity) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderAzureDNS. -func (in *ACMEIssuerDNS01ProviderAzureDNS) DeepCopy() *ACMEIssuerDNS01ProviderAzureDNS { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderAzureDNS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderCloudDNS) DeepCopyInto(out *ACMEIssuerDNS01ProviderCloudDNS) { - *out = *in - if in.ServiceAccount != nil { - in, out := &in.ServiceAccount, &out.ServiceAccount - *out = new(metav1.SecretKeySelector) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderCloudDNS. -func (in *ACMEIssuerDNS01ProviderCloudDNS) DeepCopy() *ACMEIssuerDNS01ProviderCloudDNS { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderCloudDNS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderCloudflare) DeepCopyInto(out *ACMEIssuerDNS01ProviderCloudflare) { - *out = *in - if in.APIKey != nil { - in, out := &in.APIKey, &out.APIKey - *out = new(metav1.SecretKeySelector) - **out = **in - } - if in.APIToken != nil { - in, out := &in.APIToken, &out.APIToken - *out = new(metav1.SecretKeySelector) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderCloudflare. -func (in *ACMEIssuerDNS01ProviderCloudflare) DeepCopy() *ACMEIssuerDNS01ProviderCloudflare { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderCloudflare) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderDigitalOcean) DeepCopyInto(out *ACMEIssuerDNS01ProviderDigitalOcean) { - *out = *in - out.Token = in.Token - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderDigitalOcean. -func (in *ACMEIssuerDNS01ProviderDigitalOcean) DeepCopy() *ACMEIssuerDNS01ProviderDigitalOcean { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderDigitalOcean) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderRFC2136) DeepCopyInto(out *ACMEIssuerDNS01ProviderRFC2136) { - *out = *in - out.TSIGSecret = in.TSIGSecret - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderRFC2136. -func (in *ACMEIssuerDNS01ProviderRFC2136) DeepCopy() *ACMEIssuerDNS01ProviderRFC2136 { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderRFC2136) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderRoute53) DeepCopyInto(out *ACMEIssuerDNS01ProviderRoute53) { - *out = *in - if in.Auth != nil { - in, out := &in.Auth, &out.Auth - *out = new(Route53Auth) - (*in).DeepCopyInto(*out) - } - if in.SecretAccessKeyID != nil { - in, out := &in.SecretAccessKeyID, &out.SecretAccessKeyID - *out = new(metav1.SecretKeySelector) - **out = **in - } - out.SecretAccessKey = in.SecretAccessKey - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderRoute53. -func (in *ACMEIssuerDNS01ProviderRoute53) DeepCopy() *ACMEIssuerDNS01ProviderRoute53 { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderRoute53) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderWebhook) DeepCopyInto(out *ACMEIssuerDNS01ProviderWebhook) { - *out = *in - if in.Config != nil { - in, out := &in.Config, &out.Config - *out = new(apiextensionsv1.JSON) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderWebhook. -func (in *ACMEIssuerDNS01ProviderWebhook) DeepCopy() *ACMEIssuerDNS01ProviderWebhook { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderWebhook) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerStatus) DeepCopyInto(out *ACMEIssuerStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerStatus. -func (in *ACMEIssuerStatus) DeepCopy() *ACMEIssuerStatus { - if in == nil { - return nil - } - out := new(ACMEIssuerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureManagedIdentity) DeepCopyInto(out *AzureManagedIdentity) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedIdentity. -func (in *AzureManagedIdentity) DeepCopy() *AzureManagedIdentity { - if in == nil { - return nil - } - out := new(AzureManagedIdentity) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateDNSNameSelector) DeepCopyInto(out *CertificateDNSNameSelector) { - *out = *in - if in.MatchLabels != nil { - in, out := &in.MatchLabels, &out.MatchLabels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.DNSNames != nil { - in, out := &in.DNSNames, &out.DNSNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.DNSZones != nil { - in, out := &in.DNSZones, &out.DNSZones - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateDNSNameSelector. -func (in *CertificateDNSNameSelector) DeepCopy() *CertificateDNSNameSelector { - if in == nil { - return nil - } - out := new(CertificateDNSNameSelector) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Challenge) DeepCopyInto(out *Challenge) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Challenge. -func (in *Challenge) DeepCopy() *Challenge { - if in == nil { - return nil - } - out := new(Challenge) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Challenge) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChallengeList) DeepCopyInto(out *ChallengeList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Challenge, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChallengeList. -func (in *ChallengeList) DeepCopy() *ChallengeList { - if in == nil { - return nil - } - out := new(ChallengeList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ChallengeList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChallengeSpec) DeepCopyInto(out *ChallengeSpec) { - *out = *in - in.Solver.DeepCopyInto(&out.Solver) - out.IssuerRef = in.IssuerRef - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChallengeSpec. -func (in *ChallengeSpec) DeepCopy() *ChallengeSpec { - if in == nil { - return nil - } - out := new(ChallengeSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChallengeStatus) DeepCopyInto(out *ChallengeStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChallengeStatus. -func (in *ChallengeStatus) DeepCopy() *ChallengeStatus { - if in == nil { - return nil - } - out := new(ChallengeStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Order) DeepCopyInto(out *Order) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Order. -func (in *Order) DeepCopy() *Order { - if in == nil { - return nil - } - out := new(Order) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Order) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrderList) DeepCopyInto(out *OrderList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Order, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrderList. -func (in *OrderList) DeepCopy() *OrderList { - if in == nil { - return nil - } - out := new(OrderList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OrderList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrderSpec) DeepCopyInto(out *OrderSpec) { - *out = *in - if in.CSR != nil { - in, out := &in.CSR, &out.CSR - *out = make([]byte, len(*in)) - copy(*out, *in) - } - out.IssuerRef = in.IssuerRef - if in.DNSNames != nil { - in, out := &in.DNSNames, &out.DNSNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.IPAddresses != nil { - in, out := &in.IPAddresses, &out.IPAddresses - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Duration != nil { - in, out := &in.Duration, &out.Duration - *out = new(apismetav1.Duration) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrderSpec. -func (in *OrderSpec) DeepCopy() *OrderSpec { - if in == nil { - return nil - } - out := new(OrderSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrderStatus) DeepCopyInto(out *OrderStatus) { - *out = *in - if in.Authorizations != nil { - in, out := &in.Authorizations, &out.Authorizations - *out = make([]ACMEAuthorization, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Certificate != nil { - in, out := &in.Certificate, &out.Certificate - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.FailureTime != nil { - in, out := &in.FailureTime, &out.FailureTime - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrderStatus. -func (in *OrderStatus) DeepCopy() *OrderStatus { - if in == nil { - return nil - } - out := new(OrderStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Route53Auth) DeepCopyInto(out *Route53Auth) { - *out = *in - if in.Kubernetes != nil { - in, out := &in.Kubernetes, &out.Kubernetes - *out = new(Route53KubernetesAuth) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route53Auth. -func (in *Route53Auth) DeepCopy() *Route53Auth { - if in == nil { - return nil - } - out := new(Route53Auth) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Route53KubernetesAuth) DeepCopyInto(out *Route53KubernetesAuth) { - *out = *in - if in.ServiceAccountRef != nil { - in, out := &in.ServiceAccountRef, &out.ServiceAccountRef - *out = new(ServiceAccountRef) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route53KubernetesAuth. -func (in *Route53KubernetesAuth) DeepCopy() *Route53KubernetesAuth { - if in == nil { - return nil - } - out := new(Route53KubernetesAuth) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceAccountRef) DeepCopyInto(out *ServiceAccountRef) { - *out = *in - if in.TokenAudiences != nil { - in, out := &in.TokenAudiences, &out.TokenAudiences - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountRef. -func (in *ServiceAccountRef) DeepCopy() *ServiceAccountRef { - if in == nil { - return nil - } - out := new(ServiceAccountRef) - in.DeepCopyInto(out) - return out -} diff --git a/internal/apis/acme/v1alpha3/zz_generated.defaults.go b/internal/apis/acme/v1alpha3/zz_generated.defaults.go deleted file mode 100644 index 17fd22729d1..00000000000 --- a/internal/apis/acme/v1alpha3/zz_generated.defaults.go +++ /dev/null @@ -1,33 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The cert-manager 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 defaulter-gen. DO NOT EDIT. - -package v1alpha3 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - return nil -} diff --git a/internal/apis/acme/v1beta1/const.go b/internal/apis/acme/v1beta1/const.go deleted file mode 100644 index ec9ad4dc222..00000000000 --- a/internal/apis/acme/v1beta1/const.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1beta1 - -const ( - ACMEFinalizer = "finalizer.acme.cert-manager.io" -) diff --git a/internal/apis/acme/v1beta1/conversion.go b/internal/apis/acme/v1beta1/conversion.go deleted file mode 100644 index 795423e132f..00000000000 --- a/internal/apis/acme/v1beta1/conversion.go +++ /dev/null @@ -1,35 +0,0 @@ -/* -Copyright 2021 The cert-manager 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 v1beta1 - -import ( - "k8s.io/apimachinery/pkg/conversion" - - "github.com/cert-manager/cert-manager/internal/apis/acme" -) - -// Convert_acme_ACMEIssuer_To_v1beta1_ACMEIssuer is explicitly defined to avoid issues in conversion-gen -// when referencing types in other API groups. -func Convert_acme_ACMEIssuer_To_v1beta1_ACMEIssuer(in *acme.ACMEIssuer, out *ACMEIssuer, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuer_To_v1beta1_ACMEIssuer(in, out, s) -} - -// Convert_v1beta1_ACMEIssuer_To_acme_ACMEIssuer is explicitly defined to avoid issues in conversion-gen -// when referencing types in other API groups. -func Convert_v1beta1_ACMEIssuer_To_acme_ACMEIssuer(in *ACMEIssuer, out *acme.ACMEIssuer, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEIssuer_To_acme_ACMEIssuer(in, out, s) -} diff --git a/internal/apis/acme/v1beta1/defaults.go b/internal/apis/acme/v1beta1/defaults.go deleted file mode 100644 index 7f5a9bfc623..00000000000 --- a/internal/apis/acme/v1beta1/defaults.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1beta1 - -import ( - "k8s.io/apimachinery/pkg/runtime" -) - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} diff --git a/internal/apis/acme/v1beta1/doc.go b/internal/apis/acme/v1beta1/doc.go deleted file mode 100644 index 8f5dec8a666..00000000000 --- a/internal/apis/acme/v1beta1/doc.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2020 The cert-manager 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:conversion-gen=github.com/cert-manager/cert-manager/internal/apis/acme -// +k8s:conversion-gen-external-types=github.com/cert-manager/cert-manager/internal/apis/acme/v1beta1 -// +k8s:defaulter-gen=TypeMeta -// +k8s:deepcopy-gen=package,register - -// +groupName=acme.cert-manager.io -package v1beta1 diff --git a/internal/apis/acme/v1beta1/register.go b/internal/apis/acme/v1beta1/register.go deleted file mode 100644 index 38e93fa026f..00000000000 --- a/internal/apis/acme/v1beta1/register.go +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1beta1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - "github.com/cert-manager/cert-manager/pkg/apis/acme" -) - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: acme.GroupName, Version: "v1beta1"} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addDefaultingFuncs) - - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes) -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &Order{}, - &OrderList{}, - &Challenge{}, - &ChallengeList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/internal/apis/acme/v1beta1/types.go b/internal/apis/acme/v1beta1/types.go deleted file mode 100644 index c02e8f82ec4..00000000000 --- a/internal/apis/acme/v1beta1/types.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1beta1 - -const ( - // If this annotation is specified on a Certificate or Order resource when - // using the HTTP01 solver type, the ingress.name field of the HTTP01 - // solver's configuration will be set to the value given here. - // This is especially useful for users of Ingress controllers that maintain - // a 1:1 mapping between endpoint IP and Ingress resource. - ACMECertificateHTTP01IngressNameOverride = "acme.cert-manager.io/http01-override-ingress-name" - - // If this annotation is specified on a Certificate or Order resource when - // using the HTTP01 solver type, the ingress.class field of the HTTP01 - // solver's configuration will be set to the value given here. - // This is especially useful for users deploying many different ingress - // classes into a single cluster that want to be able to re-use a single - // solver for each ingress class. - ACMECertificateHTTP01IngressClassOverride = "acme.cert-manager.io/http01-override-ingress-class" - - // IngressEditInPlaceAnnotation is used to toggle the use of ingressClass instead - // of ingress on the created Certificate resource - IngressEditInPlaceAnnotationKey = "acme.cert-manager.io/http01-edit-in-place" -) - -const ( - OrderKind = "Order" - ChallengeKind = "Challenge" -) diff --git a/internal/apis/acme/v1beta1/types_challenge.go b/internal/apis/acme/v1beta1/types_challenge.go deleted file mode 100644 index 6075b6227a1..00000000000 --- a/internal/apis/acme/v1beta1/types_challenge.go +++ /dev/null @@ -1,145 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1beta1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Challenge is a type to represent a Challenge request with an ACME server -// +k8s:openapi-gen=true -// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.state" -// +kubebuilder:printcolumn:name="Domain",type="string",JSONPath=".spec.dnsName" -// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.reason",description="",priority=1 -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC." -// +kubebuilder:subresource:status -// +kubebuilder:resource:path=challenges -type Challenge struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata"` - - Spec ChallengeSpec `json:"spec"` - // +optional - Status ChallengeStatus `json:"status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ChallengeList is a list of Challenges -type ChallengeList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []Challenge `json:"items"` -} - -type ChallengeSpec struct { - // The URL of the ACME Challenge resource for this challenge. - // This can be used to lookup details about the status of this challenge. - URL string `json:"url"` - - // The URL to the ACME Authorization resource that this - // challenge is a part of. - AuthorizationURL string `json:"authorizationURL"` - - // dnsName is the identifier that this challenge is for, e.g. example.com. - // If the requested DNSName is a 'wildcard', this field MUST be set to the - // non-wildcard domain, e.g. for `*.example.com`, it must be `example.com`. - DNSName string `json:"dnsName"` - - // wildcard will be true if this challenge is for a wildcard identifier, - // for example '*.example.com'. - // +optional - Wildcard bool `json:"wildcard"` - - // The type of ACME challenge this resource represents. - // One of "HTTP-01" or "DNS-01". - Type ACMEChallengeType `json:"type"` - - // The ACME challenge token for this challenge. - // This is the raw value returned from the ACME server. - Token string `json:"token"` - - // The ACME challenge key for this challenge - // For HTTP01 challenges, this is the value that must be responded with to - // complete the HTTP01 challenge in the format: - // `.`. - // For DNS01 challenges, this is the base64 encoded SHA256 sum of the - // `.` - // text that must be set as the TXT record content. - Key string `json:"key"` - - // Contains the domain solving configuration that should be used to - // solve this challenge resource. - Solver ACMEChallengeSolver `json:"solver"` - - // References a properly configured ACME-type Issuer which should - // be used to create this Challenge. - // If the Issuer does not exist, processing will be retried. - // If the Issuer is not an 'ACME' Issuer, an error will be returned and the - // Challenge will be marked as failed. - IssuerRef cmmeta.ObjectReference `json:"issuerRef"` -} - -// The type of ACME challenge. Only HTTP-01 and DNS-01 are supported. -// +kubebuilder:validation:Enum=HTTP-01;DNS-01 -type ACMEChallengeType string - -const ( - // ACMEChallengeTypeHTTP01 denotes a Challenge is of type http-01 - // More info: https://letsencrypt.org/docs/challenge-types/#http-01-challenge - ACMEChallengeTypeHTTP01 ACMEChallengeType = "HTTP-01" - - // ACMEChallengeTypeDNS01 denotes a Challenge is of type dns-01 - // More info: https://letsencrypt.org/docs/challenge-types/#dns-01-challenge - ACMEChallengeTypeDNS01 ACMEChallengeType = "DNS-01" -) - -type ChallengeStatus struct { - // Used to denote whether this challenge should be processed or not. - // This field will only be set to true by the 'scheduling' component. - // It will only be set to false by the 'challenges' controller, after the - // challenge has reached a final state or timed out. - // If this field is set to false, the challenge controller will not take - // any more action. - // +optional - Processing bool `json:"processing"` - - // presented will be set to true if the challenge values for this challenge - // are currently 'presented'. - // This *does not* imply the self check is passing. Only that the values - // have been 'submitted' for the appropriate challenge mechanism (i.e. the - // DNS01 TXT record has been presented, or the HTTP01 configuration has been - // configured). - // +optional - Presented bool `json:"presented"` - - // Contains human readable information on why the Challenge is in the - // current state. - // +optional - Reason string `json:"reason,omitempty"` - - // Contains the current 'state' of the challenge. - // If not set, the state of the challenge is unknown. - // +optional - State State `json:"state,omitempty"` -} diff --git a/internal/apis/acme/v1beta1/types_issuer.go b/internal/apis/acme/v1beta1/types_issuer.go deleted file mode 100644 index 4c164a25ccf..00000000000 --- a/internal/apis/acme/v1beta1/types_issuer.go +++ /dev/null @@ -1,670 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1beta1 - -import ( - corev1 "k8s.io/api/core/v1" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - gwapi "sigs.k8s.io/gateway-api/apis/v1" - - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" -) - -// ACMEIssuer contains the specification for an ACME issuer. -// This uses the RFC8555 specification to obtain certificates by completing -// 'challenges' to prove ownership of domain identifiers. -// Earlier draft versions of the ACME specification are not supported. -type ACMEIssuer struct { - // Email is the email address to be associated with the ACME account. - // This field is optional, but it is strongly recommended to be set. - // It will be used to contact you in case of issues with your account or - // certificates, including expiry notification emails. - // This field may be updated after the account is initially registered. - // +optional - Email string `json:"email,omitempty"` - - // Server is the URL used to access the ACME server's 'directory' endpoint. - // For example, for Let's Encrypt's staging endpoint, you would use: - // "https://acme-staging-v02.api.letsencrypt.org/directory". - // Only ACME v2 endpoints (i.e. RFC 8555) are supported. - Server string `json:"server"` - - // PreferredChain is the chain to use if the ACME server outputs multiple. - // PreferredChain is no guarantee that this one gets delivered by the ACME - // endpoint. - // For example, for Let's Encrypt's DST crosssign you would use: - // "DST Root CA X3" or "ISRG Root X1" for the newer Let's Encrypt root CA. - // This value picks the first certificate bundle in the ACME alternative - // chains that has a certificate with this value as its issuer's CN - // +optional - // +kubebuilder:validation:MaxLength=64 - PreferredChain string `json:"preferredChain"` - - // Base64-encoded bundle of PEM CAs which can be used to validate the certificate - // chain presented by the ACME server. - // Mutually exclusive with SkipTLSVerify; prefer using CABundle to prevent various - // kinds of security vulnerabilities. - // If CABundle and SkipTLSVerify are unset, the system certificate bundle inside - // the container is used to validate the TLS connection. - // +optional - CABundle []byte `json:"caBundle,omitempty"` - - // INSECURE: Enables or disables validation of the ACME server TLS certificate. - // If true, requests to the ACME server will not have the TLS certificate chain - // validated. - // Mutually exclusive with CABundle; prefer using CABundle to prevent various - // kinds of security vulnerabilities. - // Only enable this option in development environments. - // If CABundle and SkipTLSVerify are unset, the system certificate bundle inside - // the container is used to validate the TLS connection. - // Defaults to false. - // +optional - SkipTLSVerify bool `json:"skipTLSVerify,omitempty"` - - // ExternalAccountBinding is a reference to a CA external account of the ACME - // server. - // If set, upon registration cert-manager will attempt to associate the given - // external account credentials with the registered ACME account. - // +optional - ExternalAccountBinding *ACMEExternalAccountBinding `json:"externalAccountBinding,omitempty"` - - // PrivateKey is the name of a Kubernetes Secret resource that will be used to - // store the automatically generated ACME account private key. - // Optionally, a `key` may be specified to select a specific entry within - // the named Secret resource. - // If `key` is not specified, a default of `tls.key` will be used. - PrivateKey cmmeta.SecretKeySelector `json:"privateKeySecretRef"` - - // Solvers is a list of challenge solvers that will be used to solve - // ACME challenges for the matching domains. - // Solver configurations must be provided in order to obtain certificates - // from an ACME server. - // For more information, see: https://cert-manager.io/docs/configuration/acme/ - // +optional - Solvers []ACMEChallengeSolver `json:"solvers,omitempty"` - - // Enables or disables generating a new ACME account key. - // If true, the Issuer resource will *not* request a new account but will expect - // the account key to be supplied via an existing secret. - // If false, the cert-manager system will generate a new ACME account key - // for the Issuer. - // Defaults to false. - // +optional - DisableAccountKeyGeneration bool `json:"disableAccountKeyGeneration,omitempty"` - - // Enables requesting a Not After date on certificates that matches the - // duration of the certificate. This is not supported by all ACME servers - // like Let's Encrypt. If set to true when the ACME server does not support - // it, it will create an error on the Order. - // Defaults to false. - // +optional - EnableDurationFeature bool `json:"enableDurationFeature,omitempty"` -} - -// ACMEExternalAccountBinding is a reference to a CA external account of the ACME -// server. -type ACMEExternalAccountBinding struct { - // keyID is the ID of the CA key that the External Account is bound to. - KeyID string `json:"keyID"` - - // keySecretRef is a Secret Key Selector referencing a data item in a Kubernetes - // Secret which holds the symmetric MAC key of the External Account Binding. - // The `key` is the index string that is paired with the key data in the - // Secret and should not be confused with the key data itself, or indeed with - // the External Account Binding keyID above. - // The secret key stored in the Secret **must** be un-padded, base64 URL - // encoded data. - Key cmmeta.SecretKeySelector `json:"keySecretRef"` - - // Deprecated: keyAlgorithm field exists for historical compatibility - // reasons and should not be used. The algorithm is now hardcoded to HS256 - // in golang/x/crypto/acme. - // +optional - KeyAlgorithm HMACKeyAlgorithm `json:"keyAlgorithm,omitempty"` -} - -// HMACKeyAlgorithm is the name of a key algorithm used for HMAC encryption -// +kubebuilder:validation:Enum=HS256;HS384;HS512 -type HMACKeyAlgorithm string - -const ( - HS256 HMACKeyAlgorithm = "HS256" - HS384 HMACKeyAlgorithm = "HS384" - HS512 HMACKeyAlgorithm = "HS512" -) - -// Configures an issuer to solve challenges using the specified options. -// Only one of HTTP01 or DNS01 may be provided. -type ACMEChallengeSolver struct { - // Selector selects a set of DNSNames on the Certificate resource that - // should be solved using this challenge solver. - // If not specified, the solver will be treated as the 'default' solver - // with the lowest priority, i.e. if any other solver has a more specific - // match, it will be used instead. - // +optional - Selector *CertificateDNSNameSelector `json:"selector,omitempty"` - - // Configures cert-manager to attempt to complete authorizations by - // performing the HTTP01 challenge flow. - // It is not possible to obtain certificates for wildcard domain names - // (e.g. `*.example.com`) using the HTTP01 challenge mechanism. - // +optional - HTTP01 *ACMEChallengeSolverHTTP01 `json:"http01,omitempty"` - - // Configures cert-manager to attempt to complete authorizations by - // performing the DNS01 challenge flow. - // +optional - DNS01 *ACMEChallengeSolverDNS01 `json:"dns01,omitempty"` -} - -// CertificateDomainSelector selects certificates using a label selector, and -// can optionally select individual DNS names within those certificates. -// If both MatchLabels and DNSNames are empty, this selector will match all -// certificates and DNS names within them. -type CertificateDNSNameSelector struct { - // A label selector that is used to refine the set of certificate's that - // this challenge solver will apply to. - // +optional - MatchLabels map[string]string `json:"matchLabels,omitempty"` - - // List of DNSNames that this solver will be used to solve. - // If specified and a match is found, a dnsNames selector will take - // precedence over a dnsZones selector. - // If multiple solvers match with the same dnsNames value, the solver - // with the most matching labels in matchLabels will be selected. - // If neither has more matches, the solver defined earlier in the list - // will be selected. - // +optional - DNSNames []string `json:"dnsNames,omitempty"` - - // List of DNSZones that this solver will be used to solve. - // The most specific DNS zone match specified here will take precedence - // over other DNS zone matches, so a solver specifying sys.example.com - // will be selected over one specifying example.com for the domain - // www.sys.example.com. - // If multiple solvers match with the same dnsZones value, the solver - // with the most matching labels in matchLabels will be selected. - // If neither has more matches, the solver defined earlier in the list - // will be selected. - // +optional - DNSZones []string `json:"dnsZones,omitempty"` -} - -// ACMEChallengeSolverHTTP01 contains configuration detailing how to solve -// HTTP01 challenges within a Kubernetes cluster. -// Typically this is accomplished through creating 'routes' of some description -// that configure ingress controllers to direct traffic to 'solver pods', which -// are responsible for responding to the ACME server's HTTP requests. -type ACMEChallengeSolverHTTP01 struct { - // The ingress based HTTP01 challenge solver will solve challenges by - // creating or modifying Ingress resources in order to route requests for - // '/.well-known/acme-challenge/XYZ' to 'challenge solver' pods that are - // provisioned by cert-manager for each Challenge to be completed. - // +optional - Ingress *ACMEChallengeSolverHTTP01Ingress `json:"ingress,omitempty"` - - // The Gateway API is a sig-network community API that models service networking - // in Kubernetes (https://gateway-api.sigs.k8s.io/). The Gateway solver will - // create HTTPRoutes with the specified labels in the same namespace as the challenge. - // This solver is experimental, and fields / behaviour may change in the future. - // +optional - GatewayHTTPRoute *ACMEChallengeSolverHTTP01GatewayHTTPRoute `json:"gatewayHTTPRoute,omitempty"` -} - -type ACMEChallengeSolverHTTP01Ingress struct { - // Optional service type for Kubernetes solver service. Supported values - // are NodePort or ClusterIP. If unset, defaults to NodePort. - // +optional - ServiceType corev1.ServiceType `json:"serviceType,omitempty"` - - // This field configures the field `ingressClassName` on the created Ingress - // resources used to solve ACME challenges that use this challenge solver. - // This is the recommended way of configuring the ingress class. Only one of - // `class`, `name` or `ingressClassName` may be specified. - // +optional - IngressClassName *string `json:"ingressClassName,omitempty"` - - // This field configures the annotation `kubernetes.io/ingress.class` when - // creating Ingress resources to solve ACME challenges that use this - // challenge solver. Only one of `class`, `name` or `ingressClassName` may - // be specified. - // +optional - Class *string `json:"class,omitempty"` - - // The name of the ingress resource that should have ACME challenge solving - // routes inserted into it in order to solve HTTP01 challenges. - // This is typically used in conjunction with ingress controllers like - // ingress-gce, which maintains a 1:1 mapping between external IPs and - // ingress resources. Only one of `class`, `name` or `ingressClassName` may - // be specified. - // +optional - Name string `json:"name,omitempty"` - - // Optional pod template used to configure the ACME challenge solver pods - // used for HTTP01 challenges - // +optional - PodTemplate *ACMEChallengeSolverHTTP01IngressPodTemplate `json:"podTemplate,omitempty"` - - // Optional ingress template used to configure the ACME challenge solver - // ingress used for HTTP01 challenges. - // +optional - IngressTemplate *ACMEChallengeSolverHTTP01IngressTemplate `json:"ingressTemplate,omitempty"` -} - -type ACMEChallengeSolverHTTP01GatewayHTTPRoute struct { - // Optional service type for Kubernetes solver service. Supported values - // are NodePort or ClusterIP. If unset, defaults to NodePort. - // +optional - ServiceType corev1.ServiceType `json:"serviceType,omitempty"` - - // Custom labels that will be applied to HTTPRoutes created by cert-manager - // while solving HTTP-01 challenges. - // +optional - Labels map[string]string `json:"labels,omitempty"` - - // When solving an HTTP-01 challenge, cert-manager creates an HTTPRoute. - // cert-manager needs to know which parentRefs should be used when creating - // the HTTPRoute. Usually, the parentRef references a Gateway. See: - // https://gateway-api.sigs.k8s.io/v1alpha2/api-types/httproute/#attaching-to-gateways - ParentRefs []gwapi.ParentReference `json:"parentRefs,omitempty"` -} - -type ACMEChallengeSolverHTTP01IngressPodTemplate struct { - // ObjectMeta overrides for the pod used to solve HTTP01 challenges. - // Only the 'labels' and 'annotations' fields may be set. - // If labels or annotations overlap with in-built values, the values here - // will override the in-built values. - // +optional - ACMEChallengeSolverHTTP01IngressPodObjectMeta `json:"metadata"` - - // PodSpec defines overrides for the HTTP01 challenge solver pod. - // Check ACMEChallengeSolverHTTP01IngressPodSpec to find out currently supported fields. - // All other fields will be ignored. - // +optional - Spec ACMEChallengeSolverHTTP01IngressPodSpec `json:"spec"` -} - -type ACMEChallengeSolverHTTP01IngressPodObjectMeta struct { - // Annotations that should be added to the create ACME HTTP01 solver pods. - // +optional - Annotations map[string]string `json:"annotations,omitempty"` - - // Labels that should be added to the created ACME HTTP01 solver pods. - // +optional - Labels map[string]string `json:"labels,omitempty"` -} - -type ACMEChallengeSolverHTTP01IngressPodSpec struct { - // NodeSelector is a selector which must be true for the pod to fit on a node. - // Selector which must match a node's labels for the pod to be scheduled on that node. - // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - // +optional - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - - // If specified, the pod's scheduling constraints - // +optional - Affinity *corev1.Affinity `json:"affinity,omitempty"` - - // If specified, the pod's tolerations. - // +optional - Tolerations []corev1.Toleration `json:"tolerations,omitempty"` - - // If specified, the pod's priorityClassName. - // +optional - PriorityClassName string `json:"priorityClassName,omitempty"` - - // If specified, the pod's service account - // +optional - ServiceAccountName string `json:"serviceAccountName,omitempty"` - - // If specified, the pod's imagePullSecrets - // +optional - ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty" patchMergeKey:"name" patchStrategy:"merge"` -} - -type ACMEChallengeSolverHTTP01IngressTemplate struct { - // ObjectMeta overrides for the ingress used to solve HTTP01 challenges. - // Only the 'labels' and 'annotations' fields may be set. - // If labels or annotations overlap with in-built values, the values here - // will override the in-built values. - // +optional - ACMEChallengeSolverHTTP01IngressObjectMeta `json:"metadata"` -} - -type ACMEChallengeSolverHTTP01IngressObjectMeta struct { - // Annotations that should be added to the created ACME HTTP01 solver ingress. - // +optional - Annotations map[string]string `json:"annotations,omitempty"` - - // Labels that should be added to the created ACME HTTP01 solver ingress. - // +optional - Labels map[string]string `json:"labels,omitempty"` -} - -// Used to configure a DNS01 challenge provider to be used when solving DNS01 -// challenges. -// Only one DNS provider may be configured per solver. -type ACMEChallengeSolverDNS01 struct { - // CNAMEStrategy configures how the DNS01 provider should handle CNAME - // records when found in DNS zones. - // +optional - CNAMEStrategy CNAMEStrategy `json:"cnameStrategy,omitempty"` - - // Use the Akamai DNS zone management API to manage DNS01 challenge records. - // +optional - Akamai *ACMEIssuerDNS01ProviderAkamai `json:"akamai,omitempty"` - - // Use the Google Cloud DNS API to manage DNS01 challenge records. - // +optional - CloudDNS *ACMEIssuerDNS01ProviderCloudDNS `json:"cloudDNS,omitempty"` - - // Use the Cloudflare API to manage DNS01 challenge records. - // +optional - Cloudflare *ACMEIssuerDNS01ProviderCloudflare `json:"cloudflare,omitempty"` - - // Use the AWS Route53 API to manage DNS01 challenge records. - // +optional - Route53 *ACMEIssuerDNS01ProviderRoute53 `json:"route53,omitempty"` - - // Use the Microsoft Azure DNS API to manage DNS01 challenge records. - // +optional - AzureDNS *ACMEIssuerDNS01ProviderAzureDNS `json:"azureDNS,omitempty"` - - // Use the DigitalOcean DNS API to manage DNS01 challenge records. - // +optional - DigitalOcean *ACMEIssuerDNS01ProviderDigitalOcean `json:"digitalocean,omitempty"` - - // Use the 'ACME DNS' (https://github.com/joohoi/acme-dns) API to manage - // DNS01 challenge records. - // +optional - AcmeDNS *ACMEIssuerDNS01ProviderAcmeDNS `json:"acmeDNS,omitempty"` - - // Use RFC2136 ("Dynamic Updates in the Domain Name System") (https://datatracker.ietf.org/doc/rfc2136/) - // to manage DNS01 challenge records. - // +optional - RFC2136 *ACMEIssuerDNS01ProviderRFC2136 `json:"rfc2136,omitempty"` - - // Configure an external webhook based DNS01 challenge solver to manage - // DNS01 challenge records. - // +optional - Webhook *ACMEIssuerDNS01ProviderWebhook `json:"webhook,omitempty"` -} - -// CNAMEStrategy configures how the DNS01 provider should handle CNAME records -// when found in DNS zones. -// By default, the None strategy will be applied (i.e. do not follow CNAMEs). -// +kubebuilder:validation:Enum=None;Follow -type CNAMEStrategy string - -const ( - // NoneStrategy indicates that no CNAME resolution strategy should be used - // when determining which DNS zone to update during DNS01 challenges. - NoneStrategy = "None" - - // FollowStrategy will cause cert-manager to recurse through CNAMEs in - // order to determine which DNS zone to update during DNS01 challenges. - // This is useful if you do not want to grant cert-manager access to your - // root DNS zone, and instead delegate the _acme-challenge.example.com - // subdomain to some other, less privileged domain. - FollowStrategy = "Follow" -) - -// ACMEIssuerDNS01ProviderAkamai is a structure containing the DNS -// configuration for Akamai DNS—Zone Record Management API -type ACMEIssuerDNS01ProviderAkamai struct { - ServiceConsumerDomain string `json:"serviceConsumerDomain"` - ClientToken cmmeta.SecretKeySelector `json:"clientTokenSecretRef"` - ClientSecret cmmeta.SecretKeySelector `json:"clientSecretSecretRef"` - AccessToken cmmeta.SecretKeySelector `json:"accessTokenSecretRef"` -} - -// ACMEIssuerDNS01ProviderCloudDNS is a structure containing the DNS -// configuration for Google Cloud DNS -type ACMEIssuerDNS01ProviderCloudDNS struct { - // +optional - ServiceAccount *cmmeta.SecretKeySelector `json:"serviceAccountSecretRef,omitempty"` - Project string `json:"project"` - - // HostedZoneName is an optional field that tells cert-manager in which - // Cloud DNS zone the challenge record has to be created. - // If left empty cert-manager will automatically choose a zone. - // +optional - HostedZoneName string `json:"hostedZoneName,omitempty"` -} - -// ACMEIssuerDNS01ProviderCloudflare is a structure containing the DNS -// configuration for Cloudflare. -// One of `apiKeySecretRef` or `apiTokenSecretRef` must be provided. -type ACMEIssuerDNS01ProviderCloudflare struct { - // Email of the account, only required when using API key based authentication. - // +optional - Email string `json:"email,omitempty"` - - // API key to use to authenticate with Cloudflare. - // Note: using an API token to authenticate is now the recommended method - // as it allows greater control of permissions. - // +optional - APIKey *cmmeta.SecretKeySelector `json:"apiKeySecretRef,omitempty"` - - // API token used to authenticate with Cloudflare. - // +optional - APIToken *cmmeta.SecretKeySelector `json:"apiTokenSecretRef,omitempty"` -} - -// ACMEIssuerDNS01ProviderDigitalOcean is a structure containing the DNS -// configuration for DigitalOcean Domains -type ACMEIssuerDNS01ProviderDigitalOcean struct { - Token cmmeta.SecretKeySelector `json:"tokenSecretRef"` -} - -// ACMEIssuerDNS01ProviderRoute53 is a structure containing the Route 53 -// configuration for AWS -type ACMEIssuerDNS01ProviderRoute53 struct { - // Auth configures how cert-manager authenticates. - // +optional - Auth *Route53Auth `json:"auth,omitempty"` - - // The AccessKeyID is used for authentication. If not set we fall-back to using env vars, shared credentials file or AWS Instance metadata - // see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials - // +optional - AccessKeyID string `json:"accessKeyID,omitempty"` - - // If set, pull the AWS access key ID from a key within a kubernetes secret. - // see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials - // +optional - SecretAccessKeyID *cmmeta.SecretKeySelector `json:"accessKeyIDSecretRef,omitempty"` - - // The SecretAccessKey is used for authentication. If not set we fall-back to using env vars, shared credentials file or AWS Instance metadata - // https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials - // +optional - SecretAccessKey cmmeta.SecretKeySelector `json:"secretAccessKeySecretRef"` - - // Role is a Role ARN which the Route53 provider will assume using either the explicit credentials AccessKeyID/SecretAccessKey - // or the inferred credentials from environment variables, shared credentials file or AWS Instance metadata - // +optional - Role string `json:"role,omitempty"` - - // If set, the provider will manage only this zone in Route53 and will not do an lookup using the route53:ListHostedZonesByName api call. - // +optional - HostedZoneID string `json:"hostedZoneID,omitempty"` - - // Always set the region when using AccessKeyID and SecretAccessKey - Region string `json:"region"` -} - -// Route53Auth is configuration used to authenticate with a Route53. -type Route53Auth struct { - // Kubernetes authenticates with Route53 using AssumeRoleWithWebIdentity - // by passing a bound ServiceAccount token. - Kubernetes *Route53KubernetesAuth `json:"kubernetes"` -} - -// Route53KubernetesAuth is a configuration to authenticate against Route53 -// using a bound Kubernetes ServiceAccount token. -type Route53KubernetesAuth struct { - // A reference to a service account that will be used to request a bound - // token (also known as "projected token"). To use this field, you must - // configure an RBAC rule to let cert-manager request a token. - ServiceAccountRef *ServiceAccountRef `json:"serviceAccountRef"` -} - -// ServiceAccountRef is a service account used by cert-manager to request a -// token. The expiration of the token is also set by cert-manager to 10 minutes. -type ServiceAccountRef struct { - // Name of the ServiceAccount used to request a token. - Name string `json:"name"` - - // TokenAudiences is an optional list of audiences to include in the - // token passed to AWS. The default token consisting of the issuer's namespace - // and name is always included. - // If unset the audience defaults to `sts.amazonaws.com`. - // +optional - TokenAudiences []string `json:"audiences,omitempty"` -} - -// ACMEIssuerDNS01ProviderAzureDNS is a structure containing the -// configuration for Azure DNS -type ACMEIssuerDNS01ProviderAzureDNS struct { - // if both this and ClientSecret are left unset MSI will be used - // +optional - ClientID string `json:"clientID,omitempty"` - - // if both this and ClientID are left unset MSI will be used - // +optional - ClientSecret *cmmeta.SecretKeySelector `json:"clientSecretSecretRef,omitempty"` - - // ID of the Azure subscription - SubscriptionID string `json:"subscriptionID"` - - // when specifying ClientID and ClientSecret then this field is also needed - // +optional - TenantID string `json:"tenantID,omitempty"` - - // resource group the DNS zone is located in - ResourceGroupName string `json:"resourceGroupName"` - - // name of the DNS zone that should be used - // +optional - HostedZoneName string `json:"hostedZoneName,omitempty"` - - // name of the Azure environment (default AzurePublicCloud) - // +optional - Environment AzureDNSEnvironment `json:"environment,omitempty"` - - // managed identity configuration, can not be used at the same time as clientID, clientSecretSecretRef or tenantID - // +optional - ManagedIdentity *AzureManagedIdentity `json:"managedIdentity,omitempty"` -} - -type AzureManagedIdentity struct { - // client ID of the managed identity, can not be used at the same time as resourceID - // +optional - ClientID string `json:"clientID,omitempty"` - - // resource ID of the managed identity, can not be used at the same time as clientID - // +optional - ResourceID string `json:"resourceID,omitempty"` -} - -// +kubebuilder:validation:Enum=AzurePublicCloud;AzureChinaCloud;AzureGermanCloud;AzureUSGovernmentCloud -type AzureDNSEnvironment string - -const ( - AzurePublicCloud AzureDNSEnvironment = "AzurePublicCloud" - AzureChinaCloud AzureDNSEnvironment = "AzureChinaCloud" - AzureGermanCloud AzureDNSEnvironment = "AzureGermanCloud" - AzureUSGovernmentCloud AzureDNSEnvironment = "AzureUSGovernmentCloud" -) - -// ACMEIssuerDNS01ProviderAcmeDNS is a structure containing the -// configuration for ACME-DNS servers -type ACMEIssuerDNS01ProviderAcmeDNS struct { - Host string `json:"host"` - - AccountSecret cmmeta.SecretKeySelector `json:"accountSecretRef"` -} - -// ACMEIssuerDNS01ProviderRFC2136 is a structure containing the -// configuration for RFC2136 DNS -type ACMEIssuerDNS01ProviderRFC2136 struct { - // The IP address or hostname of an authoritative DNS server supporting - // RFC2136 in the form host:port. If the host is an IPv6 address it must be - // enclosed in square brackets (e.g [2001:db8::1]) ; port is optional. - // This field is required. - Nameserver string `json:"nameserver"` - - // The name of the secret containing the TSIG value. - // If ``tsigKeyName`` is defined, this field is required. - // +optional - TSIGSecret cmmeta.SecretKeySelector `json:"tsigSecretSecretRef,omitempty"` - - // The TSIG Key name configured in the DNS. - // If ``tsigSecretSecretRef`` is defined, this field is required. - // +optional - TSIGKeyName string `json:"tsigKeyName,omitempty"` - - // The TSIG Algorithm configured in the DNS supporting RFC2136. Used only - // when ``tsigSecretSecretRef`` and ``tsigKeyName`` are defined. - // Supported values are (case-insensitive): ``HMACMD5`` (default), - // ``HMACSHA1``, ``HMACSHA256`` or ``HMACSHA512``. - // +optional - TSIGAlgorithm string `json:"tsigAlgorithm,omitempty"` -} - -// ACMEIssuerDNS01ProviderWebhook specifies configuration for a webhook DNS01 -// provider, including where to POST ChallengePayload resources. -type ACMEIssuerDNS01ProviderWebhook struct { - // The API group name that should be used when POSTing ChallengePayload - // resources to the webhook apiserver. - // This should be the same as the GroupName specified in the webhook - // provider implementation. - GroupName string `json:"groupName"` - - // The name of the solver to use, as defined in the webhook provider - // implementation. - // This will typically be the name of the provider, e.g. 'cloudflare'. - SolverName string `json:"solverName"` - - // Additional configuration that should be passed to the webhook apiserver - // when challenges are processed. - // This can contain arbitrary JSON data. - // Secret values should not be specified in this stanza. - // If secret values are needed (e.g. credentials for a DNS service), you - // should use a SecretKeySelector to reference a Secret resource. - // For details on the schema of this field, consult the webhook provider - // implementation's documentation. - // +optional - Config *apiextensionsv1.JSON `json:"config,omitempty"` -} - -type ACMEIssuerStatus struct { - // URI is the unique account identifier, which can also be used to retrieve - // account details from the CA - // +optional - URI string `json:"uri,omitempty"` - - // LastRegisteredEmail is the email associated with the latest registered - // ACME account, in order to track changes made to registered account - // associated with the Issuer - // +optional - LastRegisteredEmail string `json:"lastRegisteredEmail,omitempty"` - - // LastPrivateKeyHash is a hash of the private key associated with the latest - // registered ACME account, in order to track changes made to registered account - // associated with the Issuer - LastPrivateKeyHash string `json:"lastPrivateKeyHash,omitempty"` -} diff --git a/internal/apis/acme/v1beta1/types_order.go b/internal/apis/acme/v1beta1/types_order.go deleted file mode 100644 index 7c760494250..00000000000 --- a/internal/apis/acme/v1beta1/types_order.go +++ /dev/null @@ -1,239 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1beta1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Order is a type to represent an Order with an ACME server -// +k8s:openapi-gen=true -type Order struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata"` - - Spec OrderSpec `json:"spec"` - // +optional - Status OrderStatus `json:"status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// OrderList is a list of Orders -type OrderList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []Order `json:"items"` -} - -type OrderSpec struct { - // Certificate signing request bytes in DER encoding. - // This will be used when finalizing the order. - // This field must be set on the order. - Request []byte `json:"request"` - - // IssuerRef references a properly configured ACME-type Issuer which should - // be used to create this Order. - // If the Issuer does not exist, processing will be retried. - // If the Issuer is not an 'ACME' Issuer, an error will be returned and the - // Order will be marked as failed. - IssuerRef cmmeta.ObjectReference `json:"issuerRef"` - - // CommonName is the common name as specified on the DER encoded CSR. - // If specified, this value must also be present in `dnsNames` or `ipAddresses`. - // This field must match the corresponding field on the DER encoded CSR. - // +optional - CommonName string `json:"commonName,omitempty"` - - // DNSNames is a list of DNS names that should be included as part of the Order - // validation process. - // This field must match the corresponding field on the DER encoded CSR. - //+optional - DNSNames []string `json:"dnsNames,omitempty"` - - // IPAddresses is a list of IP addresses that should be included as part of the Order - // validation process. - // This field must match the corresponding field on the DER encoded CSR. - // +optional - IPAddresses []string `json:"ipAddresses,omitempty"` - - // Duration is the duration for the not after date for the requested certificate. - // this is set on order creation as pe the ACME spec. - // +optional - Duration *metav1.Duration `json:"duration,omitempty"` -} - -type OrderStatus struct { - // URL of the Order. - // This will initially be empty when the resource is first created. - // The Order controller will populate this field when the Order is first processed. - // This field will be immutable after it is initially set. - // +optional - URL string `json:"url,omitempty"` - - // FinalizeURL of the Order. - // This is used to obtain certificates for this order once it has been completed. - // +optional - FinalizeURL string `json:"finalizeURL,omitempty"` - - // Authorizations contains data returned from the ACME server on what - // authorizations must be completed in order to validate the DNS names - // specified on the Order. - // +optional - Authorizations []ACMEAuthorization `json:"authorizations,omitempty"` - - // Certificate is a copy of the PEM encoded certificate for this Order. - // This field will be populated after the order has been successfully - // finalized with the ACME server, and the order has transitioned to the - // 'valid' state. - // +optional - Certificate []byte `json:"certificate,omitempty"` - - // State contains the current state of this Order resource. - // States 'success' and 'expired' are 'final' - // +optional - State State `json:"state,omitempty"` - - // Reason optionally provides more information about a why the order is in - // the current state. - // +optional - Reason string `json:"reason,omitempty"` - - // FailureTime stores the time that this order failed. - // This is used to influence garbage collection and back-off. - // +optional - FailureTime *metav1.Time `json:"failureTime,omitempty"` -} - -// ACMEAuthorization contains data returned from the ACME server on an -// authorization that must be completed in order validate a DNS name on an ACME -// Order resource. -type ACMEAuthorization struct { - // URL is the URL of the Authorization that must be completed - URL string `json:"url"` - - // Identifier is the DNS name to be validated as part of this authorization - // +optional - Identifier string `json:"identifier,omitempty"` - - // Wildcard will be true if this authorization is for a wildcard DNS name. - // If this is true, the identifier will be the *non-wildcard* version of - // the DNS name. - // For example, if '*.example.com' is the DNS name being validated, this - // field will be 'true' and the 'identifier' field will be 'example.com'. - // +optional - Wildcard *bool `json:"wildcard,omitempty"` - - // InitialState is the initial state of the ACME authorization when first - // fetched from the ACME server. - // If an Authorization is already 'valid', the Order controller will not - // create a Challenge resource for the authorization. This will occur when - // working with an ACME server that enables 'authz reuse' (such as Let's - // Encrypt's production endpoint). - // If not set and 'identifier' is set, the state is assumed to be pending - // and a Challenge will be created. - // +optional - InitialState State `json:"initialState,omitempty"` - - // Challenges specifies the challenge types offered by the ACME server. - // One of these challenge types will be selected when validating the DNS - // name and an appropriate Challenge resource will be created to perform - // the ACME challenge process. - // +optional - Challenges []ACMEChallenge `json:"challenges,omitempty"` -} - -// Challenge specifies a challenge offered by the ACME server for an Order. -// An appropriate Challenge resource can be created to perform the ACME -// challenge process. -type ACMEChallenge struct { - // URL is the URL of this challenge. It can be used to retrieve additional - // metadata about the Challenge from the ACME server. - URL string `json:"url"` - - // Token is the token that must be presented for this challenge. - // This is used to compute the 'key' that must also be presented. - Token string `json:"token"` - - // Type is the type of challenge being offered, e.g. 'http-01', 'dns-01', - // 'tls-sni-01', etc. - // This is the raw value retrieved from the ACME server. - // Only 'http-01' and 'dns-01' are supported by cert-manager, other values - // will be ignored. - Type string `json:"type"` -} - -// State represents the state of an ACME resource, such as an Order. -// The possible options here map to the corresponding values in the -// ACME specification. -// Full details of these values can be found here: https://tools.ietf.org/html/draft-ietf-acme-acme-15#section-7.1.6 -// Clients utilising this type must also gracefully handle unknown -// values, as the contents of this enumeration may be added to over time. -// +kubebuilder:validation:Enum=valid;ready;pending;processing;invalid;expired;errored -type State string - -const ( - // Unknown is not a real state as part of the ACME spec. - // It is used to represent an unrecognised value. - Unknown State = "" - - // Valid signifies that an ACME resource is in a valid state. - // If an order is 'valid', it has been finalized with the ACME server and - // the certificate can be retrieved from the ACME server using the - // certificate URL stored in the Order's status subresource. - // This is a final state. - Valid State = "valid" - - // Ready signifies that an ACME resource is in a ready state. - // If an order is 'ready', all of its challenges have been completed - // successfully and the order is ready to be finalized. - // Once finalized, it will transition to the Valid state. - // This is a transient state. - Ready State = "ready" - - // Pending signifies that an ACME resource is still pending and is not yet ready. - // If an Order is marked 'Pending', the validations for that Order are still in progress. - // This is a transient state. - Pending State = "pending" - - // Processing signifies that an ACME resource is being processed by the server. - // If an Order is marked 'Processing', the validations for that Order are currently being processed. - // This is a transient state. - Processing State = "processing" - - // Invalid signifies that an ACME resource is invalid for some reason. - // If an Order is marked 'invalid', one of its validations be have invalid for some reason. - // This is a final state. - Invalid State = "invalid" - - // Expired signifies that an ACME resource has expired. - // If an Order is marked 'Expired', one of its validations may have expired or the Order itself. - // This is a final state. - Expired State = "expired" - - // Errored signifies that the ACME resource has errored for some reason. - // This is a catch-all state, and is used for marking internal cert-manager - // errors such as validation failures. - // This is a final state. - Errored State = "errored" -) diff --git a/internal/apis/acme/v1beta1/zz_generated.conversion.go b/internal/apis/acme/v1beta1/zz_generated.conversion.go deleted file mode 100644 index 17223764866..00000000000 --- a/internal/apis/acme/v1beta1/zz_generated.conversion.go +++ /dev/null @@ -1,1731 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The cert-manager 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 conversion-gen. DO NOT EDIT. - -package v1beta1 - -import ( - unsafe "unsafe" - - acme "github.com/cert-manager/cert-manager/internal/apis/acme" - meta "github.com/cert-manager/cert-manager/internal/apis/meta" - metav1 "github.com/cert-manager/cert-manager/internal/apis/meta/v1" - apismetav1 "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" - v1 "k8s.io/api/core/v1" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - pkgapismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - apisv1 "sigs.k8s.io/gateway-api/apis/v1" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*ACMEAuthorization)(nil), (*acme.ACMEAuthorization)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEAuthorization_To_acme_ACMEAuthorization(a.(*ACMEAuthorization), b.(*acme.ACMEAuthorization), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEAuthorization)(nil), (*ACMEAuthorization)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEAuthorization_To_v1beta1_ACMEAuthorization(a.(*acme.ACMEAuthorization), b.(*ACMEAuthorization), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallenge)(nil), (*acme.ACMEChallenge)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEChallenge_To_acme_ACMEChallenge(a.(*ACMEChallenge), b.(*acme.ACMEChallenge), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallenge)(nil), (*ACMEChallenge)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallenge_To_v1beta1_ACMEChallenge(a.(*acme.ACMEChallenge), b.(*ACMEChallenge), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolver)(nil), (*acme.ACMEChallengeSolver)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEChallengeSolver_To_acme_ACMEChallengeSolver(a.(*ACMEChallengeSolver), b.(*acme.ACMEChallengeSolver), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolver)(nil), (*ACMEChallengeSolver)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolver_To_v1beta1_ACMEChallengeSolver(a.(*acme.ACMEChallengeSolver), b.(*ACMEChallengeSolver), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverDNS01)(nil), (*acme.ACMEChallengeSolverDNS01)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEChallengeSolverDNS01_To_acme_ACMEChallengeSolverDNS01(a.(*ACMEChallengeSolverDNS01), b.(*acme.ACMEChallengeSolverDNS01), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverDNS01)(nil), (*ACMEChallengeSolverDNS01)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverDNS01_To_v1beta1_ACMEChallengeSolverDNS01(a.(*acme.ACMEChallengeSolverDNS01), b.(*ACMEChallengeSolverDNS01), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01)(nil), (*acme.ACMEChallengeSolverHTTP01)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEChallengeSolverHTTP01_To_acme_ACMEChallengeSolverHTTP01(a.(*ACMEChallengeSolverHTTP01), b.(*acme.ACMEChallengeSolverHTTP01), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01)(nil), (*ACMEChallengeSolverHTTP01)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01_To_v1beta1_ACMEChallengeSolverHTTP01(a.(*acme.ACMEChallengeSolverHTTP01), b.(*ACMEChallengeSolverHTTP01), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01GatewayHTTPRoute)(nil), (*acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute(a.(*ACMEChallengeSolverHTTP01GatewayHTTPRoute), b.(*acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute)(nil), (*ACMEChallengeSolverHTTP01GatewayHTTPRoute)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_v1beta1_ACMEChallengeSolverHTTP01GatewayHTTPRoute(a.(*acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute), b.(*ACMEChallengeSolverHTTP01GatewayHTTPRoute), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01Ingress)(nil), (*acme.ACMEChallengeSolverHTTP01Ingress)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEChallengeSolverHTTP01Ingress_To_acme_ACMEChallengeSolverHTTP01Ingress(a.(*ACMEChallengeSolverHTTP01Ingress), b.(*acme.ACMEChallengeSolverHTTP01Ingress), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01Ingress)(nil), (*ACMEChallengeSolverHTTP01Ingress)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01Ingress_To_v1beta1_ACMEChallengeSolverHTTP01Ingress(a.(*acme.ACMEChallengeSolverHTTP01Ingress), b.(*ACMEChallengeSolverHTTP01Ingress), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01IngressObjectMeta)(nil), (*acme.ACMEChallengeSolverHTTP01IngressObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEChallengeSolverHTTP01IngressObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressObjectMeta(a.(*ACMEChallengeSolverHTTP01IngressObjectMeta), b.(*acme.ACMEChallengeSolverHTTP01IngressObjectMeta), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01IngressObjectMeta)(nil), (*ACMEChallengeSolverHTTP01IngressObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01IngressObjectMeta_To_v1beta1_ACMEChallengeSolverHTTP01IngressObjectMeta(a.(*acme.ACMEChallengeSolverHTTP01IngressObjectMeta), b.(*ACMEChallengeSolverHTTP01IngressObjectMeta), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01IngressPodObjectMeta)(nil), (*acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta(a.(*ACMEChallengeSolverHTTP01IngressPodObjectMeta), b.(*acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta)(nil), (*ACMEChallengeSolverHTTP01IngressPodObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_v1beta1_ACMEChallengeSolverHTTP01IngressPodObjectMeta(a.(*acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta), b.(*ACMEChallengeSolverHTTP01IngressPodObjectMeta), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01IngressPodSpec)(nil), (*acme.ACMEChallengeSolverHTTP01IngressPodSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEChallengeSolverHTTP01IngressPodSpec_To_acme_ACMEChallengeSolverHTTP01IngressPodSpec(a.(*ACMEChallengeSolverHTTP01IngressPodSpec), b.(*acme.ACMEChallengeSolverHTTP01IngressPodSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01IngressPodSpec)(nil), (*ACMEChallengeSolverHTTP01IngressPodSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01IngressPodSpec_To_v1beta1_ACMEChallengeSolverHTTP01IngressPodSpec(a.(*acme.ACMEChallengeSolverHTTP01IngressPodSpec), b.(*ACMEChallengeSolverHTTP01IngressPodSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01IngressPodTemplate)(nil), (*acme.ACMEChallengeSolverHTTP01IngressPodTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEChallengeSolverHTTP01IngressPodTemplate_To_acme_ACMEChallengeSolverHTTP01IngressPodTemplate(a.(*ACMEChallengeSolverHTTP01IngressPodTemplate), b.(*acme.ACMEChallengeSolverHTTP01IngressPodTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01IngressPodTemplate)(nil), (*ACMEChallengeSolverHTTP01IngressPodTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01IngressPodTemplate_To_v1beta1_ACMEChallengeSolverHTTP01IngressPodTemplate(a.(*acme.ACMEChallengeSolverHTTP01IngressPodTemplate), b.(*ACMEChallengeSolverHTTP01IngressPodTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEChallengeSolverHTTP01IngressTemplate)(nil), (*acme.ACMEChallengeSolverHTTP01IngressTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEChallengeSolverHTTP01IngressTemplate_To_acme_ACMEChallengeSolverHTTP01IngressTemplate(a.(*ACMEChallengeSolverHTTP01IngressTemplate), b.(*acme.ACMEChallengeSolverHTTP01IngressTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEChallengeSolverHTTP01IngressTemplate)(nil), (*ACMEChallengeSolverHTTP01IngressTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEChallengeSolverHTTP01IngressTemplate_To_v1beta1_ACMEChallengeSolverHTTP01IngressTemplate(a.(*acme.ACMEChallengeSolverHTTP01IngressTemplate), b.(*ACMEChallengeSolverHTTP01IngressTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEExternalAccountBinding)(nil), (*acme.ACMEExternalAccountBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEExternalAccountBinding_To_acme_ACMEExternalAccountBinding(a.(*ACMEExternalAccountBinding), b.(*acme.ACMEExternalAccountBinding), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEExternalAccountBinding)(nil), (*ACMEExternalAccountBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEExternalAccountBinding_To_v1beta1_ACMEExternalAccountBinding(a.(*acme.ACMEExternalAccountBinding), b.(*ACMEExternalAccountBinding), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderAcmeDNS)(nil), (*acme.ACMEIssuerDNS01ProviderAcmeDNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEIssuerDNS01ProviderAcmeDNS_To_acme_ACMEIssuerDNS01ProviderAcmeDNS(a.(*ACMEIssuerDNS01ProviderAcmeDNS), b.(*acme.ACMEIssuerDNS01ProviderAcmeDNS), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderAcmeDNS)(nil), (*ACMEIssuerDNS01ProviderAcmeDNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderAcmeDNS_To_v1beta1_ACMEIssuerDNS01ProviderAcmeDNS(a.(*acme.ACMEIssuerDNS01ProviderAcmeDNS), b.(*ACMEIssuerDNS01ProviderAcmeDNS), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderAkamai)(nil), (*acme.ACMEIssuerDNS01ProviderAkamai)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEIssuerDNS01ProviderAkamai_To_acme_ACMEIssuerDNS01ProviderAkamai(a.(*ACMEIssuerDNS01ProviderAkamai), b.(*acme.ACMEIssuerDNS01ProviderAkamai), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderAkamai)(nil), (*ACMEIssuerDNS01ProviderAkamai)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderAkamai_To_v1beta1_ACMEIssuerDNS01ProviderAkamai(a.(*acme.ACMEIssuerDNS01ProviderAkamai), b.(*ACMEIssuerDNS01ProviderAkamai), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderAzureDNS)(nil), (*acme.ACMEIssuerDNS01ProviderAzureDNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEIssuerDNS01ProviderAzureDNS_To_acme_ACMEIssuerDNS01ProviderAzureDNS(a.(*ACMEIssuerDNS01ProviderAzureDNS), b.(*acme.ACMEIssuerDNS01ProviderAzureDNS), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderAzureDNS)(nil), (*ACMEIssuerDNS01ProviderAzureDNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderAzureDNS_To_v1beta1_ACMEIssuerDNS01ProviderAzureDNS(a.(*acme.ACMEIssuerDNS01ProviderAzureDNS), b.(*ACMEIssuerDNS01ProviderAzureDNS), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderCloudDNS)(nil), (*acme.ACMEIssuerDNS01ProviderCloudDNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEIssuerDNS01ProviderCloudDNS_To_acme_ACMEIssuerDNS01ProviderCloudDNS(a.(*ACMEIssuerDNS01ProviderCloudDNS), b.(*acme.ACMEIssuerDNS01ProviderCloudDNS), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderCloudDNS)(nil), (*ACMEIssuerDNS01ProviderCloudDNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderCloudDNS_To_v1beta1_ACMEIssuerDNS01ProviderCloudDNS(a.(*acme.ACMEIssuerDNS01ProviderCloudDNS), b.(*ACMEIssuerDNS01ProviderCloudDNS), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderCloudflare)(nil), (*acme.ACMEIssuerDNS01ProviderCloudflare)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEIssuerDNS01ProviderCloudflare_To_acme_ACMEIssuerDNS01ProviderCloudflare(a.(*ACMEIssuerDNS01ProviderCloudflare), b.(*acme.ACMEIssuerDNS01ProviderCloudflare), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderCloudflare)(nil), (*ACMEIssuerDNS01ProviderCloudflare)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderCloudflare_To_v1beta1_ACMEIssuerDNS01ProviderCloudflare(a.(*acme.ACMEIssuerDNS01ProviderCloudflare), b.(*ACMEIssuerDNS01ProviderCloudflare), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderDigitalOcean)(nil), (*acme.ACMEIssuerDNS01ProviderDigitalOcean)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEIssuerDNS01ProviderDigitalOcean_To_acme_ACMEIssuerDNS01ProviderDigitalOcean(a.(*ACMEIssuerDNS01ProviderDigitalOcean), b.(*acme.ACMEIssuerDNS01ProviderDigitalOcean), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderDigitalOcean)(nil), (*ACMEIssuerDNS01ProviderDigitalOcean)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderDigitalOcean_To_v1beta1_ACMEIssuerDNS01ProviderDigitalOcean(a.(*acme.ACMEIssuerDNS01ProviderDigitalOcean), b.(*ACMEIssuerDNS01ProviderDigitalOcean), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderRFC2136)(nil), (*acme.ACMEIssuerDNS01ProviderRFC2136)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEIssuerDNS01ProviderRFC2136_To_acme_ACMEIssuerDNS01ProviderRFC2136(a.(*ACMEIssuerDNS01ProviderRFC2136), b.(*acme.ACMEIssuerDNS01ProviderRFC2136), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderRFC2136)(nil), (*ACMEIssuerDNS01ProviderRFC2136)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderRFC2136_To_v1beta1_ACMEIssuerDNS01ProviderRFC2136(a.(*acme.ACMEIssuerDNS01ProviderRFC2136), b.(*ACMEIssuerDNS01ProviderRFC2136), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderRoute53)(nil), (*acme.ACMEIssuerDNS01ProviderRoute53)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEIssuerDNS01ProviderRoute53_To_acme_ACMEIssuerDNS01ProviderRoute53(a.(*ACMEIssuerDNS01ProviderRoute53), b.(*acme.ACMEIssuerDNS01ProviderRoute53), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderRoute53)(nil), (*ACMEIssuerDNS01ProviderRoute53)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderRoute53_To_v1beta1_ACMEIssuerDNS01ProviderRoute53(a.(*acme.ACMEIssuerDNS01ProviderRoute53), b.(*ACMEIssuerDNS01ProviderRoute53), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerDNS01ProviderWebhook)(nil), (*acme.ACMEIssuerDNS01ProviderWebhook)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEIssuerDNS01ProviderWebhook_To_acme_ACMEIssuerDNS01ProviderWebhook(a.(*ACMEIssuerDNS01ProviderWebhook), b.(*acme.ACMEIssuerDNS01ProviderWebhook), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerDNS01ProviderWebhook)(nil), (*ACMEIssuerDNS01ProviderWebhook)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerDNS01ProviderWebhook_To_v1beta1_ACMEIssuerDNS01ProviderWebhook(a.(*acme.ACMEIssuerDNS01ProviderWebhook), b.(*ACMEIssuerDNS01ProviderWebhook), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ACMEIssuerStatus)(nil), (*acme.ACMEIssuerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEIssuerStatus_To_acme_ACMEIssuerStatus(a.(*ACMEIssuerStatus), b.(*acme.ACMEIssuerStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ACMEIssuerStatus)(nil), (*ACMEIssuerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuerStatus_To_v1beta1_ACMEIssuerStatus(a.(*acme.ACMEIssuerStatus), b.(*ACMEIssuerStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedIdentity)(nil), (*acme.AzureManagedIdentity)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedIdentity_To_acme_AzureManagedIdentity(a.(*AzureManagedIdentity), b.(*acme.AzureManagedIdentity), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.AzureManagedIdentity)(nil), (*AzureManagedIdentity)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_AzureManagedIdentity_To_v1beta1_AzureManagedIdentity(a.(*acme.AzureManagedIdentity), b.(*AzureManagedIdentity), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateDNSNameSelector)(nil), (*acme.CertificateDNSNameSelector)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CertificateDNSNameSelector_To_acme_CertificateDNSNameSelector(a.(*CertificateDNSNameSelector), b.(*acme.CertificateDNSNameSelector), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.CertificateDNSNameSelector)(nil), (*CertificateDNSNameSelector)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_CertificateDNSNameSelector_To_v1beta1_CertificateDNSNameSelector(a.(*acme.CertificateDNSNameSelector), b.(*CertificateDNSNameSelector), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Challenge)(nil), (*acme.Challenge)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Challenge_To_acme_Challenge(a.(*Challenge), b.(*acme.Challenge), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.Challenge)(nil), (*Challenge)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_Challenge_To_v1beta1_Challenge(a.(*acme.Challenge), b.(*Challenge), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ChallengeList)(nil), (*acme.ChallengeList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ChallengeList_To_acme_ChallengeList(a.(*ChallengeList), b.(*acme.ChallengeList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ChallengeList)(nil), (*ChallengeList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ChallengeList_To_v1beta1_ChallengeList(a.(*acme.ChallengeList), b.(*ChallengeList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ChallengeSpec)(nil), (*acme.ChallengeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ChallengeSpec_To_acme_ChallengeSpec(a.(*ChallengeSpec), b.(*acme.ChallengeSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ChallengeSpec)(nil), (*ChallengeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ChallengeSpec_To_v1beta1_ChallengeSpec(a.(*acme.ChallengeSpec), b.(*ChallengeSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ChallengeStatus)(nil), (*acme.ChallengeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ChallengeStatus_To_acme_ChallengeStatus(a.(*ChallengeStatus), b.(*acme.ChallengeStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ChallengeStatus)(nil), (*ChallengeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ChallengeStatus_To_v1beta1_ChallengeStatus(a.(*acme.ChallengeStatus), b.(*ChallengeStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Order)(nil), (*acme.Order)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Order_To_acme_Order(a.(*Order), b.(*acme.Order), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.Order)(nil), (*Order)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_Order_To_v1beta1_Order(a.(*acme.Order), b.(*Order), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OrderList)(nil), (*acme.OrderList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_OrderList_To_acme_OrderList(a.(*OrderList), b.(*acme.OrderList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.OrderList)(nil), (*OrderList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_OrderList_To_v1beta1_OrderList(a.(*acme.OrderList), b.(*OrderList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OrderSpec)(nil), (*acme.OrderSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_OrderSpec_To_acme_OrderSpec(a.(*OrderSpec), b.(*acme.OrderSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.OrderSpec)(nil), (*OrderSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_OrderSpec_To_v1beta1_OrderSpec(a.(*acme.OrderSpec), b.(*OrderSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OrderStatus)(nil), (*acme.OrderStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_OrderStatus_To_acme_OrderStatus(a.(*OrderStatus), b.(*acme.OrderStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.OrderStatus)(nil), (*OrderStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_OrderStatus_To_v1beta1_OrderStatus(a.(*acme.OrderStatus), b.(*OrderStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Route53Auth)(nil), (*acme.Route53Auth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Route53Auth_To_acme_Route53Auth(a.(*Route53Auth), b.(*acme.Route53Auth), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.Route53Auth)(nil), (*Route53Auth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_Route53Auth_To_v1beta1_Route53Auth(a.(*acme.Route53Auth), b.(*Route53Auth), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Route53KubernetesAuth)(nil), (*acme.Route53KubernetesAuth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Route53KubernetesAuth_To_acme_Route53KubernetesAuth(a.(*Route53KubernetesAuth), b.(*acme.Route53KubernetesAuth), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.Route53KubernetesAuth)(nil), (*Route53KubernetesAuth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_Route53KubernetesAuth_To_v1beta1_Route53KubernetesAuth(a.(*acme.Route53KubernetesAuth), b.(*Route53KubernetesAuth), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ServiceAccountRef)(nil), (*acme.ServiceAccountRef)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ServiceAccountRef_To_acme_ServiceAccountRef(a.(*ServiceAccountRef), b.(*acme.ServiceAccountRef), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*acme.ServiceAccountRef)(nil), (*ServiceAccountRef)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ServiceAccountRef_To_v1beta1_ServiceAccountRef(a.(*acme.ServiceAccountRef), b.(*ServiceAccountRef), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*acme.ACMEIssuer)(nil), (*ACMEIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_acme_ACMEIssuer_To_v1beta1_ACMEIssuer(a.(*acme.ACMEIssuer), b.(*ACMEIssuer), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*ACMEIssuer)(nil), (*acme.ACMEIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ACMEIssuer_To_acme_ACMEIssuer(a.(*ACMEIssuer), b.(*acme.ACMEIssuer), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1beta1_ACMEAuthorization_To_acme_ACMEAuthorization(in *ACMEAuthorization, out *acme.ACMEAuthorization, s conversion.Scope) error { - out.URL = in.URL - out.Identifier = in.Identifier - out.Wildcard = (*bool)(unsafe.Pointer(in.Wildcard)) - out.InitialState = acme.State(in.InitialState) - out.Challenges = *(*[]acme.ACMEChallenge)(unsafe.Pointer(&in.Challenges)) - return nil -} - -// Convert_v1beta1_ACMEAuthorization_To_acme_ACMEAuthorization is an autogenerated conversion function. -func Convert_v1beta1_ACMEAuthorization_To_acme_ACMEAuthorization(in *ACMEAuthorization, out *acme.ACMEAuthorization, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEAuthorization_To_acme_ACMEAuthorization(in, out, s) -} - -func autoConvert_acme_ACMEAuthorization_To_v1beta1_ACMEAuthorization(in *acme.ACMEAuthorization, out *ACMEAuthorization, s conversion.Scope) error { - out.URL = in.URL - out.Identifier = in.Identifier - out.Wildcard = (*bool)(unsafe.Pointer(in.Wildcard)) - out.InitialState = State(in.InitialState) - out.Challenges = *(*[]ACMEChallenge)(unsafe.Pointer(&in.Challenges)) - return nil -} - -// Convert_acme_ACMEAuthorization_To_v1beta1_ACMEAuthorization is an autogenerated conversion function. -func Convert_acme_ACMEAuthorization_To_v1beta1_ACMEAuthorization(in *acme.ACMEAuthorization, out *ACMEAuthorization, s conversion.Scope) error { - return autoConvert_acme_ACMEAuthorization_To_v1beta1_ACMEAuthorization(in, out, s) -} - -func autoConvert_v1beta1_ACMEChallenge_To_acme_ACMEChallenge(in *ACMEChallenge, out *acme.ACMEChallenge, s conversion.Scope) error { - out.URL = in.URL - out.Token = in.Token - out.Type = in.Type - return nil -} - -// Convert_v1beta1_ACMEChallenge_To_acme_ACMEChallenge is an autogenerated conversion function. -func Convert_v1beta1_ACMEChallenge_To_acme_ACMEChallenge(in *ACMEChallenge, out *acme.ACMEChallenge, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEChallenge_To_acme_ACMEChallenge(in, out, s) -} - -func autoConvert_acme_ACMEChallenge_To_v1beta1_ACMEChallenge(in *acme.ACMEChallenge, out *ACMEChallenge, s conversion.Scope) error { - out.URL = in.URL - out.Token = in.Token - out.Type = in.Type - return nil -} - -// Convert_acme_ACMEChallenge_To_v1beta1_ACMEChallenge is an autogenerated conversion function. -func Convert_acme_ACMEChallenge_To_v1beta1_ACMEChallenge(in *acme.ACMEChallenge, out *ACMEChallenge, s conversion.Scope) error { - return autoConvert_acme_ACMEChallenge_To_v1beta1_ACMEChallenge(in, out, s) -} - -func autoConvert_v1beta1_ACMEChallengeSolver_To_acme_ACMEChallengeSolver(in *ACMEChallengeSolver, out *acme.ACMEChallengeSolver, s conversion.Scope) error { - out.Selector = (*acme.CertificateDNSNameSelector)(unsafe.Pointer(in.Selector)) - out.HTTP01 = (*acme.ACMEChallengeSolverHTTP01)(unsafe.Pointer(in.HTTP01)) - if in.DNS01 != nil { - in, out := &in.DNS01, &out.DNS01 - *out = new(acme.ACMEChallengeSolverDNS01) - if err := Convert_v1beta1_ACMEChallengeSolverDNS01_To_acme_ACMEChallengeSolverDNS01(*in, *out, s); err != nil { - return err - } - } else { - out.DNS01 = nil - } - return nil -} - -// Convert_v1beta1_ACMEChallengeSolver_To_acme_ACMEChallengeSolver is an autogenerated conversion function. -func Convert_v1beta1_ACMEChallengeSolver_To_acme_ACMEChallengeSolver(in *ACMEChallengeSolver, out *acme.ACMEChallengeSolver, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEChallengeSolver_To_acme_ACMEChallengeSolver(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolver_To_v1beta1_ACMEChallengeSolver(in *acme.ACMEChallengeSolver, out *ACMEChallengeSolver, s conversion.Scope) error { - out.Selector = (*CertificateDNSNameSelector)(unsafe.Pointer(in.Selector)) - out.HTTP01 = (*ACMEChallengeSolverHTTP01)(unsafe.Pointer(in.HTTP01)) - if in.DNS01 != nil { - in, out := &in.DNS01, &out.DNS01 - *out = new(ACMEChallengeSolverDNS01) - if err := Convert_acme_ACMEChallengeSolverDNS01_To_v1beta1_ACMEChallengeSolverDNS01(*in, *out, s); err != nil { - return err - } - } else { - out.DNS01 = nil - } - return nil -} - -// Convert_acme_ACMEChallengeSolver_To_v1beta1_ACMEChallengeSolver is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolver_To_v1beta1_ACMEChallengeSolver(in *acme.ACMEChallengeSolver, out *ACMEChallengeSolver, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolver_To_v1beta1_ACMEChallengeSolver(in, out, s) -} - -func autoConvert_v1beta1_ACMEChallengeSolverDNS01_To_acme_ACMEChallengeSolverDNS01(in *ACMEChallengeSolverDNS01, out *acme.ACMEChallengeSolverDNS01, s conversion.Scope) error { - out.CNAMEStrategy = acme.CNAMEStrategy(in.CNAMEStrategy) - if in.Akamai != nil { - in, out := &in.Akamai, &out.Akamai - *out = new(acme.ACMEIssuerDNS01ProviderAkamai) - if err := Convert_v1beta1_ACMEIssuerDNS01ProviderAkamai_To_acme_ACMEIssuerDNS01ProviderAkamai(*in, *out, s); err != nil { - return err - } - } else { - out.Akamai = nil - } - if in.CloudDNS != nil { - in, out := &in.CloudDNS, &out.CloudDNS - *out = new(acme.ACMEIssuerDNS01ProviderCloudDNS) - if err := Convert_v1beta1_ACMEIssuerDNS01ProviderCloudDNS_To_acme_ACMEIssuerDNS01ProviderCloudDNS(*in, *out, s); err != nil { - return err - } - } else { - out.CloudDNS = nil - } - if in.Cloudflare != nil { - in, out := &in.Cloudflare, &out.Cloudflare - *out = new(acme.ACMEIssuerDNS01ProviderCloudflare) - if err := Convert_v1beta1_ACMEIssuerDNS01ProviderCloudflare_To_acme_ACMEIssuerDNS01ProviderCloudflare(*in, *out, s); err != nil { - return err - } - } else { - out.Cloudflare = nil - } - if in.Route53 != nil { - in, out := &in.Route53, &out.Route53 - *out = new(acme.ACMEIssuerDNS01ProviderRoute53) - if err := Convert_v1beta1_ACMEIssuerDNS01ProviderRoute53_To_acme_ACMEIssuerDNS01ProviderRoute53(*in, *out, s); err != nil { - return err - } - } else { - out.Route53 = nil - } - if in.AzureDNS != nil { - in, out := &in.AzureDNS, &out.AzureDNS - *out = new(acme.ACMEIssuerDNS01ProviderAzureDNS) - if err := Convert_v1beta1_ACMEIssuerDNS01ProviderAzureDNS_To_acme_ACMEIssuerDNS01ProviderAzureDNS(*in, *out, s); err != nil { - return err - } - } else { - out.AzureDNS = nil - } - if in.DigitalOcean != nil { - in, out := &in.DigitalOcean, &out.DigitalOcean - *out = new(acme.ACMEIssuerDNS01ProviderDigitalOcean) - if err := Convert_v1beta1_ACMEIssuerDNS01ProviderDigitalOcean_To_acme_ACMEIssuerDNS01ProviderDigitalOcean(*in, *out, s); err != nil { - return err - } - } else { - out.DigitalOcean = nil - } - if in.AcmeDNS != nil { - in, out := &in.AcmeDNS, &out.AcmeDNS - *out = new(acme.ACMEIssuerDNS01ProviderAcmeDNS) - if err := Convert_v1beta1_ACMEIssuerDNS01ProviderAcmeDNS_To_acme_ACMEIssuerDNS01ProviderAcmeDNS(*in, *out, s); err != nil { - return err - } - } else { - out.AcmeDNS = nil - } - if in.RFC2136 != nil { - in, out := &in.RFC2136, &out.RFC2136 - *out = new(acme.ACMEIssuerDNS01ProviderRFC2136) - if err := Convert_v1beta1_ACMEIssuerDNS01ProviderRFC2136_To_acme_ACMEIssuerDNS01ProviderRFC2136(*in, *out, s); err != nil { - return err - } - } else { - out.RFC2136 = nil - } - out.Webhook = (*acme.ACMEIssuerDNS01ProviderWebhook)(unsafe.Pointer(in.Webhook)) - return nil -} - -// Convert_v1beta1_ACMEChallengeSolverDNS01_To_acme_ACMEChallengeSolverDNS01 is an autogenerated conversion function. -func Convert_v1beta1_ACMEChallengeSolverDNS01_To_acme_ACMEChallengeSolverDNS01(in *ACMEChallengeSolverDNS01, out *acme.ACMEChallengeSolverDNS01, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEChallengeSolverDNS01_To_acme_ACMEChallengeSolverDNS01(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverDNS01_To_v1beta1_ACMEChallengeSolverDNS01(in *acme.ACMEChallengeSolverDNS01, out *ACMEChallengeSolverDNS01, s conversion.Scope) error { - out.CNAMEStrategy = CNAMEStrategy(in.CNAMEStrategy) - if in.Akamai != nil { - in, out := &in.Akamai, &out.Akamai - *out = new(ACMEIssuerDNS01ProviderAkamai) - if err := Convert_acme_ACMEIssuerDNS01ProviderAkamai_To_v1beta1_ACMEIssuerDNS01ProviderAkamai(*in, *out, s); err != nil { - return err - } - } else { - out.Akamai = nil - } - if in.CloudDNS != nil { - in, out := &in.CloudDNS, &out.CloudDNS - *out = new(ACMEIssuerDNS01ProviderCloudDNS) - if err := Convert_acme_ACMEIssuerDNS01ProviderCloudDNS_To_v1beta1_ACMEIssuerDNS01ProviderCloudDNS(*in, *out, s); err != nil { - return err - } - } else { - out.CloudDNS = nil - } - if in.Cloudflare != nil { - in, out := &in.Cloudflare, &out.Cloudflare - *out = new(ACMEIssuerDNS01ProviderCloudflare) - if err := Convert_acme_ACMEIssuerDNS01ProviderCloudflare_To_v1beta1_ACMEIssuerDNS01ProviderCloudflare(*in, *out, s); err != nil { - return err - } - } else { - out.Cloudflare = nil - } - if in.Route53 != nil { - in, out := &in.Route53, &out.Route53 - *out = new(ACMEIssuerDNS01ProviderRoute53) - if err := Convert_acme_ACMEIssuerDNS01ProviderRoute53_To_v1beta1_ACMEIssuerDNS01ProviderRoute53(*in, *out, s); err != nil { - return err - } - } else { - out.Route53 = nil - } - if in.AzureDNS != nil { - in, out := &in.AzureDNS, &out.AzureDNS - *out = new(ACMEIssuerDNS01ProviderAzureDNS) - if err := Convert_acme_ACMEIssuerDNS01ProviderAzureDNS_To_v1beta1_ACMEIssuerDNS01ProviderAzureDNS(*in, *out, s); err != nil { - return err - } - } else { - out.AzureDNS = nil - } - if in.DigitalOcean != nil { - in, out := &in.DigitalOcean, &out.DigitalOcean - *out = new(ACMEIssuerDNS01ProviderDigitalOcean) - if err := Convert_acme_ACMEIssuerDNS01ProviderDigitalOcean_To_v1beta1_ACMEIssuerDNS01ProviderDigitalOcean(*in, *out, s); err != nil { - return err - } - } else { - out.DigitalOcean = nil - } - if in.AcmeDNS != nil { - in, out := &in.AcmeDNS, &out.AcmeDNS - *out = new(ACMEIssuerDNS01ProviderAcmeDNS) - if err := Convert_acme_ACMEIssuerDNS01ProviderAcmeDNS_To_v1beta1_ACMEIssuerDNS01ProviderAcmeDNS(*in, *out, s); err != nil { - return err - } - } else { - out.AcmeDNS = nil - } - if in.RFC2136 != nil { - in, out := &in.RFC2136, &out.RFC2136 - *out = new(ACMEIssuerDNS01ProviderRFC2136) - if err := Convert_acme_ACMEIssuerDNS01ProviderRFC2136_To_v1beta1_ACMEIssuerDNS01ProviderRFC2136(*in, *out, s); err != nil { - return err - } - } else { - out.RFC2136 = nil - } - out.Webhook = (*ACMEIssuerDNS01ProviderWebhook)(unsafe.Pointer(in.Webhook)) - return nil -} - -// Convert_acme_ACMEChallengeSolverDNS01_To_v1beta1_ACMEChallengeSolverDNS01 is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverDNS01_To_v1beta1_ACMEChallengeSolverDNS01(in *acme.ACMEChallengeSolverDNS01, out *ACMEChallengeSolverDNS01, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverDNS01_To_v1beta1_ACMEChallengeSolverDNS01(in, out, s) -} - -func autoConvert_v1beta1_ACMEChallengeSolverHTTP01_To_acme_ACMEChallengeSolverHTTP01(in *ACMEChallengeSolverHTTP01, out *acme.ACMEChallengeSolverHTTP01, s conversion.Scope) error { - out.Ingress = (*acme.ACMEChallengeSolverHTTP01Ingress)(unsafe.Pointer(in.Ingress)) - out.GatewayHTTPRoute = (*acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute)(unsafe.Pointer(in.GatewayHTTPRoute)) - return nil -} - -// Convert_v1beta1_ACMEChallengeSolverHTTP01_To_acme_ACMEChallengeSolverHTTP01 is an autogenerated conversion function. -func Convert_v1beta1_ACMEChallengeSolverHTTP01_To_acme_ACMEChallengeSolverHTTP01(in *ACMEChallengeSolverHTTP01, out *acme.ACMEChallengeSolverHTTP01, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEChallengeSolverHTTP01_To_acme_ACMEChallengeSolverHTTP01(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01_To_v1beta1_ACMEChallengeSolverHTTP01(in *acme.ACMEChallengeSolverHTTP01, out *ACMEChallengeSolverHTTP01, s conversion.Scope) error { - out.Ingress = (*ACMEChallengeSolverHTTP01Ingress)(unsafe.Pointer(in.Ingress)) - out.GatewayHTTPRoute = (*ACMEChallengeSolverHTTP01GatewayHTTPRoute)(unsafe.Pointer(in.GatewayHTTPRoute)) - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01_To_v1beta1_ACMEChallengeSolverHTTP01 is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01_To_v1beta1_ACMEChallengeSolverHTTP01(in *acme.ACMEChallengeSolverHTTP01, out *ACMEChallengeSolverHTTP01, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01_To_v1beta1_ACMEChallengeSolverHTTP01(in, out, s) -} - -func autoConvert_v1beta1_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute(in *ACMEChallengeSolverHTTP01GatewayHTTPRoute, out *acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute, s conversion.Scope) error { - out.ServiceType = v1.ServiceType(in.ServiceType) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - out.ParentRefs = *(*[]apisv1.ParentReference)(unsafe.Pointer(&in.ParentRefs)) - return nil -} - -// Convert_v1beta1_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute is an autogenerated conversion function. -func Convert_v1beta1_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute(in *ACMEChallengeSolverHTTP01GatewayHTTPRoute, out *acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_v1beta1_ACMEChallengeSolverHTTP01GatewayHTTPRoute(in *acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute, out *ACMEChallengeSolverHTTP01GatewayHTTPRoute, s conversion.Scope) error { - out.ServiceType = v1.ServiceType(in.ServiceType) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - out.ParentRefs = *(*[]apisv1.ParentReference)(unsafe.Pointer(&in.ParentRefs)) - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_v1beta1_ACMEChallengeSolverHTTP01GatewayHTTPRoute is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_v1beta1_ACMEChallengeSolverHTTP01GatewayHTTPRoute(in *acme.ACMEChallengeSolverHTTP01GatewayHTTPRoute, out *ACMEChallengeSolverHTTP01GatewayHTTPRoute, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01GatewayHTTPRoute_To_v1beta1_ACMEChallengeSolverHTTP01GatewayHTTPRoute(in, out, s) -} - -func autoConvert_v1beta1_ACMEChallengeSolverHTTP01Ingress_To_acme_ACMEChallengeSolverHTTP01Ingress(in *ACMEChallengeSolverHTTP01Ingress, out *acme.ACMEChallengeSolverHTTP01Ingress, s conversion.Scope) error { - out.ServiceType = v1.ServiceType(in.ServiceType) - out.IngressClassName = (*string)(unsafe.Pointer(in.IngressClassName)) - out.Class = (*string)(unsafe.Pointer(in.Class)) - out.Name = in.Name - out.PodTemplate = (*acme.ACMEChallengeSolverHTTP01IngressPodTemplate)(unsafe.Pointer(in.PodTemplate)) - out.IngressTemplate = (*acme.ACMEChallengeSolverHTTP01IngressTemplate)(unsafe.Pointer(in.IngressTemplate)) - return nil -} - -// Convert_v1beta1_ACMEChallengeSolverHTTP01Ingress_To_acme_ACMEChallengeSolverHTTP01Ingress is an autogenerated conversion function. -func Convert_v1beta1_ACMEChallengeSolverHTTP01Ingress_To_acme_ACMEChallengeSolverHTTP01Ingress(in *ACMEChallengeSolverHTTP01Ingress, out *acme.ACMEChallengeSolverHTTP01Ingress, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEChallengeSolverHTTP01Ingress_To_acme_ACMEChallengeSolverHTTP01Ingress(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01Ingress_To_v1beta1_ACMEChallengeSolverHTTP01Ingress(in *acme.ACMEChallengeSolverHTTP01Ingress, out *ACMEChallengeSolverHTTP01Ingress, s conversion.Scope) error { - out.ServiceType = v1.ServiceType(in.ServiceType) - out.IngressClassName = (*string)(unsafe.Pointer(in.IngressClassName)) - out.Class = (*string)(unsafe.Pointer(in.Class)) - out.Name = in.Name - out.PodTemplate = (*ACMEChallengeSolverHTTP01IngressPodTemplate)(unsafe.Pointer(in.PodTemplate)) - out.IngressTemplate = (*ACMEChallengeSolverHTTP01IngressTemplate)(unsafe.Pointer(in.IngressTemplate)) - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01Ingress_To_v1beta1_ACMEChallengeSolverHTTP01Ingress is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01Ingress_To_v1beta1_ACMEChallengeSolverHTTP01Ingress(in *acme.ACMEChallengeSolverHTTP01Ingress, out *ACMEChallengeSolverHTTP01Ingress, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01Ingress_To_v1beta1_ACMEChallengeSolverHTTP01Ingress(in, out, s) -} - -func autoConvert_v1beta1_ACMEChallengeSolverHTTP01IngressObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressObjectMeta(in *ACMEChallengeSolverHTTP01IngressObjectMeta, out *acme.ACMEChallengeSolverHTTP01IngressObjectMeta, s conversion.Scope) error { - out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - return nil -} - -// Convert_v1beta1_ACMEChallengeSolverHTTP01IngressObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressObjectMeta is an autogenerated conversion function. -func Convert_v1beta1_ACMEChallengeSolverHTTP01IngressObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressObjectMeta(in *ACMEChallengeSolverHTTP01IngressObjectMeta, out *acme.ACMEChallengeSolverHTTP01IngressObjectMeta, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEChallengeSolverHTTP01IngressObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressObjectMeta(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01IngressObjectMeta_To_v1beta1_ACMEChallengeSolverHTTP01IngressObjectMeta(in *acme.ACMEChallengeSolverHTTP01IngressObjectMeta, out *ACMEChallengeSolverHTTP01IngressObjectMeta, s conversion.Scope) error { - out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01IngressObjectMeta_To_v1beta1_ACMEChallengeSolverHTTP01IngressObjectMeta is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01IngressObjectMeta_To_v1beta1_ACMEChallengeSolverHTTP01IngressObjectMeta(in *acme.ACMEChallengeSolverHTTP01IngressObjectMeta, out *ACMEChallengeSolverHTTP01IngressObjectMeta, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01IngressObjectMeta_To_v1beta1_ACMEChallengeSolverHTTP01IngressObjectMeta(in, out, s) -} - -func autoConvert_v1beta1_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta(in *ACMEChallengeSolverHTTP01IngressPodObjectMeta, out *acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta, s conversion.Scope) error { - out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - return nil -} - -// Convert_v1beta1_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta is an autogenerated conversion function. -func Convert_v1beta1_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta(in *ACMEChallengeSolverHTTP01IngressPodObjectMeta, out *acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_v1beta1_ACMEChallengeSolverHTTP01IngressPodObjectMeta(in *acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta, out *ACMEChallengeSolverHTTP01IngressPodObjectMeta, s conversion.Scope) error { - out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_v1beta1_ACMEChallengeSolverHTTP01IngressPodObjectMeta is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_v1beta1_ACMEChallengeSolverHTTP01IngressPodObjectMeta(in *acme.ACMEChallengeSolverHTTP01IngressPodObjectMeta, out *ACMEChallengeSolverHTTP01IngressPodObjectMeta, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_v1beta1_ACMEChallengeSolverHTTP01IngressPodObjectMeta(in, out, s) -} - -func autoConvert_v1beta1_ACMEChallengeSolverHTTP01IngressPodSpec_To_acme_ACMEChallengeSolverHTTP01IngressPodSpec(in *ACMEChallengeSolverHTTP01IngressPodSpec, out *acme.ACMEChallengeSolverHTTP01IngressPodSpec, s conversion.Scope) error { - out.NodeSelector = *(*map[string]string)(unsafe.Pointer(&in.NodeSelector)) - out.Affinity = (*v1.Affinity)(unsafe.Pointer(in.Affinity)) - out.Tolerations = *(*[]v1.Toleration)(unsafe.Pointer(&in.Tolerations)) - out.PriorityClassName = in.PriorityClassName - out.ServiceAccountName = in.ServiceAccountName - out.ImagePullSecrets = *(*[]v1.LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets)) - return nil -} - -// Convert_v1beta1_ACMEChallengeSolverHTTP01IngressPodSpec_To_acme_ACMEChallengeSolverHTTP01IngressPodSpec is an autogenerated conversion function. -func Convert_v1beta1_ACMEChallengeSolverHTTP01IngressPodSpec_To_acme_ACMEChallengeSolverHTTP01IngressPodSpec(in *ACMEChallengeSolverHTTP01IngressPodSpec, out *acme.ACMEChallengeSolverHTTP01IngressPodSpec, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEChallengeSolverHTTP01IngressPodSpec_To_acme_ACMEChallengeSolverHTTP01IngressPodSpec(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01IngressPodSpec_To_v1beta1_ACMEChallengeSolverHTTP01IngressPodSpec(in *acme.ACMEChallengeSolverHTTP01IngressPodSpec, out *ACMEChallengeSolverHTTP01IngressPodSpec, s conversion.Scope) error { - out.NodeSelector = *(*map[string]string)(unsafe.Pointer(&in.NodeSelector)) - out.Affinity = (*v1.Affinity)(unsafe.Pointer(in.Affinity)) - out.Tolerations = *(*[]v1.Toleration)(unsafe.Pointer(&in.Tolerations)) - out.PriorityClassName = in.PriorityClassName - out.ServiceAccountName = in.ServiceAccountName - out.ImagePullSecrets = *(*[]v1.LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets)) - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01IngressPodSpec_To_v1beta1_ACMEChallengeSolverHTTP01IngressPodSpec is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01IngressPodSpec_To_v1beta1_ACMEChallengeSolverHTTP01IngressPodSpec(in *acme.ACMEChallengeSolverHTTP01IngressPodSpec, out *ACMEChallengeSolverHTTP01IngressPodSpec, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01IngressPodSpec_To_v1beta1_ACMEChallengeSolverHTTP01IngressPodSpec(in, out, s) -} - -func autoConvert_v1beta1_ACMEChallengeSolverHTTP01IngressPodTemplate_To_acme_ACMEChallengeSolverHTTP01IngressPodTemplate(in *ACMEChallengeSolverHTTP01IngressPodTemplate, out *acme.ACMEChallengeSolverHTTP01IngressPodTemplate, s conversion.Scope) error { - if err := Convert_v1beta1_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta(&in.ACMEChallengeSolverHTTP01IngressPodObjectMeta, &out.ACMEChallengeSolverHTTP01IngressPodObjectMeta, s); err != nil { - return err - } - if err := Convert_v1beta1_ACMEChallengeSolverHTTP01IngressPodSpec_To_acme_ACMEChallengeSolverHTTP01IngressPodSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_ACMEChallengeSolverHTTP01IngressPodTemplate_To_acme_ACMEChallengeSolverHTTP01IngressPodTemplate is an autogenerated conversion function. -func Convert_v1beta1_ACMEChallengeSolverHTTP01IngressPodTemplate_To_acme_ACMEChallengeSolverHTTP01IngressPodTemplate(in *ACMEChallengeSolverHTTP01IngressPodTemplate, out *acme.ACMEChallengeSolverHTTP01IngressPodTemplate, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEChallengeSolverHTTP01IngressPodTemplate_To_acme_ACMEChallengeSolverHTTP01IngressPodTemplate(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01IngressPodTemplate_To_v1beta1_ACMEChallengeSolverHTTP01IngressPodTemplate(in *acme.ACMEChallengeSolverHTTP01IngressPodTemplate, out *ACMEChallengeSolverHTTP01IngressPodTemplate, s conversion.Scope) error { - if err := Convert_acme_ACMEChallengeSolverHTTP01IngressPodObjectMeta_To_v1beta1_ACMEChallengeSolverHTTP01IngressPodObjectMeta(&in.ACMEChallengeSolverHTTP01IngressPodObjectMeta, &out.ACMEChallengeSolverHTTP01IngressPodObjectMeta, s); err != nil { - return err - } - if err := Convert_acme_ACMEChallengeSolverHTTP01IngressPodSpec_To_v1beta1_ACMEChallengeSolverHTTP01IngressPodSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01IngressPodTemplate_To_v1beta1_ACMEChallengeSolverHTTP01IngressPodTemplate is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01IngressPodTemplate_To_v1beta1_ACMEChallengeSolverHTTP01IngressPodTemplate(in *acme.ACMEChallengeSolverHTTP01IngressPodTemplate, out *ACMEChallengeSolverHTTP01IngressPodTemplate, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01IngressPodTemplate_To_v1beta1_ACMEChallengeSolverHTTP01IngressPodTemplate(in, out, s) -} - -func autoConvert_v1beta1_ACMEChallengeSolverHTTP01IngressTemplate_To_acme_ACMEChallengeSolverHTTP01IngressTemplate(in *ACMEChallengeSolverHTTP01IngressTemplate, out *acme.ACMEChallengeSolverHTTP01IngressTemplate, s conversion.Scope) error { - if err := Convert_v1beta1_ACMEChallengeSolverHTTP01IngressObjectMeta_To_acme_ACMEChallengeSolverHTTP01IngressObjectMeta(&in.ACMEChallengeSolverHTTP01IngressObjectMeta, &out.ACMEChallengeSolverHTTP01IngressObjectMeta, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_ACMEChallengeSolverHTTP01IngressTemplate_To_acme_ACMEChallengeSolverHTTP01IngressTemplate is an autogenerated conversion function. -func Convert_v1beta1_ACMEChallengeSolverHTTP01IngressTemplate_To_acme_ACMEChallengeSolverHTTP01IngressTemplate(in *ACMEChallengeSolverHTTP01IngressTemplate, out *acme.ACMEChallengeSolverHTTP01IngressTemplate, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEChallengeSolverHTTP01IngressTemplate_To_acme_ACMEChallengeSolverHTTP01IngressTemplate(in, out, s) -} - -func autoConvert_acme_ACMEChallengeSolverHTTP01IngressTemplate_To_v1beta1_ACMEChallengeSolverHTTP01IngressTemplate(in *acme.ACMEChallengeSolverHTTP01IngressTemplate, out *ACMEChallengeSolverHTTP01IngressTemplate, s conversion.Scope) error { - if err := Convert_acme_ACMEChallengeSolverHTTP01IngressObjectMeta_To_v1beta1_ACMEChallengeSolverHTTP01IngressObjectMeta(&in.ACMEChallengeSolverHTTP01IngressObjectMeta, &out.ACMEChallengeSolverHTTP01IngressObjectMeta, s); err != nil { - return err - } - return nil -} - -// Convert_acme_ACMEChallengeSolverHTTP01IngressTemplate_To_v1beta1_ACMEChallengeSolverHTTP01IngressTemplate is an autogenerated conversion function. -func Convert_acme_ACMEChallengeSolverHTTP01IngressTemplate_To_v1beta1_ACMEChallengeSolverHTTP01IngressTemplate(in *acme.ACMEChallengeSolverHTTP01IngressTemplate, out *ACMEChallengeSolverHTTP01IngressTemplate, s conversion.Scope) error { - return autoConvert_acme_ACMEChallengeSolverHTTP01IngressTemplate_To_v1beta1_ACMEChallengeSolverHTTP01IngressTemplate(in, out, s) -} - -func autoConvert_v1beta1_ACMEExternalAccountBinding_To_acme_ACMEExternalAccountBinding(in *ACMEExternalAccountBinding, out *acme.ACMEExternalAccountBinding, s conversion.Scope) error { - out.KeyID = in.KeyID - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.Key, &out.Key, s); err != nil { - return err - } - out.KeyAlgorithm = acme.HMACKeyAlgorithm(in.KeyAlgorithm) - return nil -} - -// Convert_v1beta1_ACMEExternalAccountBinding_To_acme_ACMEExternalAccountBinding is an autogenerated conversion function. -func Convert_v1beta1_ACMEExternalAccountBinding_To_acme_ACMEExternalAccountBinding(in *ACMEExternalAccountBinding, out *acme.ACMEExternalAccountBinding, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEExternalAccountBinding_To_acme_ACMEExternalAccountBinding(in, out, s) -} - -func autoConvert_acme_ACMEExternalAccountBinding_To_v1beta1_ACMEExternalAccountBinding(in *acme.ACMEExternalAccountBinding, out *ACMEExternalAccountBinding, s conversion.Scope) error { - out.KeyID = in.KeyID - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.Key, &out.Key, s); err != nil { - return err - } - out.KeyAlgorithm = HMACKeyAlgorithm(in.KeyAlgorithm) - return nil -} - -// Convert_acme_ACMEExternalAccountBinding_To_v1beta1_ACMEExternalAccountBinding is an autogenerated conversion function. -func Convert_acme_ACMEExternalAccountBinding_To_v1beta1_ACMEExternalAccountBinding(in *acme.ACMEExternalAccountBinding, out *ACMEExternalAccountBinding, s conversion.Scope) error { - return autoConvert_acme_ACMEExternalAccountBinding_To_v1beta1_ACMEExternalAccountBinding(in, out, s) -} - -func autoConvert_v1beta1_ACMEIssuer_To_acme_ACMEIssuer(in *ACMEIssuer, out *acme.ACMEIssuer, s conversion.Scope) error { - out.Email = in.Email - out.Server = in.Server - out.PreferredChain = in.PreferredChain - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - out.SkipTLSVerify = in.SkipTLSVerify - if in.ExternalAccountBinding != nil { - in, out := &in.ExternalAccountBinding, &out.ExternalAccountBinding - *out = new(acme.ACMEExternalAccountBinding) - if err := Convert_v1beta1_ACMEExternalAccountBinding_To_acme_ACMEExternalAccountBinding(*in, *out, s); err != nil { - return err - } - } else { - out.ExternalAccountBinding = nil - } - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.PrivateKey, &out.PrivateKey, s); err != nil { - return err - } - if in.Solvers != nil { - in, out := &in.Solvers, &out.Solvers - *out = make([]acme.ACMEChallengeSolver, len(*in)) - for i := range *in { - if err := Convert_v1beta1_ACMEChallengeSolver_To_acme_ACMEChallengeSolver(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Solvers = nil - } - out.DisableAccountKeyGeneration = in.DisableAccountKeyGeneration - out.EnableDurationFeature = in.EnableDurationFeature - return nil -} - -func autoConvert_acme_ACMEIssuer_To_v1beta1_ACMEIssuer(in *acme.ACMEIssuer, out *ACMEIssuer, s conversion.Scope) error { - out.Email = in.Email - out.Server = in.Server - out.PreferredChain = in.PreferredChain - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - out.SkipTLSVerify = in.SkipTLSVerify - if in.ExternalAccountBinding != nil { - in, out := &in.ExternalAccountBinding, &out.ExternalAccountBinding - *out = new(ACMEExternalAccountBinding) - if err := Convert_acme_ACMEExternalAccountBinding_To_v1beta1_ACMEExternalAccountBinding(*in, *out, s); err != nil { - return err - } - } else { - out.ExternalAccountBinding = nil - } - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.PrivateKey, &out.PrivateKey, s); err != nil { - return err - } - if in.Solvers != nil { - in, out := &in.Solvers, &out.Solvers - *out = make([]ACMEChallengeSolver, len(*in)) - for i := range *in { - if err := Convert_acme_ACMEChallengeSolver_To_v1beta1_ACMEChallengeSolver(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Solvers = nil - } - out.DisableAccountKeyGeneration = in.DisableAccountKeyGeneration - out.EnableDurationFeature = in.EnableDurationFeature - return nil -} - -func autoConvert_v1beta1_ACMEIssuerDNS01ProviderAcmeDNS_To_acme_ACMEIssuerDNS01ProviderAcmeDNS(in *ACMEIssuerDNS01ProviderAcmeDNS, out *acme.ACMEIssuerDNS01ProviderAcmeDNS, s conversion.Scope) error { - out.Host = in.Host - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.AccountSecret, &out.AccountSecret, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_ACMEIssuerDNS01ProviderAcmeDNS_To_acme_ACMEIssuerDNS01ProviderAcmeDNS is an autogenerated conversion function. -func Convert_v1beta1_ACMEIssuerDNS01ProviderAcmeDNS_To_acme_ACMEIssuerDNS01ProviderAcmeDNS(in *ACMEIssuerDNS01ProviderAcmeDNS, out *acme.ACMEIssuerDNS01ProviderAcmeDNS, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEIssuerDNS01ProviderAcmeDNS_To_acme_ACMEIssuerDNS01ProviderAcmeDNS(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderAcmeDNS_To_v1beta1_ACMEIssuerDNS01ProviderAcmeDNS(in *acme.ACMEIssuerDNS01ProviderAcmeDNS, out *ACMEIssuerDNS01ProviderAcmeDNS, s conversion.Scope) error { - out.Host = in.Host - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.AccountSecret, &out.AccountSecret, s); err != nil { - return err - } - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderAcmeDNS_To_v1beta1_ACMEIssuerDNS01ProviderAcmeDNS is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderAcmeDNS_To_v1beta1_ACMEIssuerDNS01ProviderAcmeDNS(in *acme.ACMEIssuerDNS01ProviderAcmeDNS, out *ACMEIssuerDNS01ProviderAcmeDNS, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderAcmeDNS_To_v1beta1_ACMEIssuerDNS01ProviderAcmeDNS(in, out, s) -} - -func autoConvert_v1beta1_ACMEIssuerDNS01ProviderAkamai_To_acme_ACMEIssuerDNS01ProviderAkamai(in *ACMEIssuerDNS01ProviderAkamai, out *acme.ACMEIssuerDNS01ProviderAkamai, s conversion.Scope) error { - out.ServiceConsumerDomain = in.ServiceConsumerDomain - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.ClientToken, &out.ClientToken, s); err != nil { - return err - } - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.ClientSecret, &out.ClientSecret, s); err != nil { - return err - } - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.AccessToken, &out.AccessToken, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_ACMEIssuerDNS01ProviderAkamai_To_acme_ACMEIssuerDNS01ProviderAkamai is an autogenerated conversion function. -func Convert_v1beta1_ACMEIssuerDNS01ProviderAkamai_To_acme_ACMEIssuerDNS01ProviderAkamai(in *ACMEIssuerDNS01ProviderAkamai, out *acme.ACMEIssuerDNS01ProviderAkamai, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEIssuerDNS01ProviderAkamai_To_acme_ACMEIssuerDNS01ProviderAkamai(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderAkamai_To_v1beta1_ACMEIssuerDNS01ProviderAkamai(in *acme.ACMEIssuerDNS01ProviderAkamai, out *ACMEIssuerDNS01ProviderAkamai, s conversion.Scope) error { - out.ServiceConsumerDomain = in.ServiceConsumerDomain - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.ClientToken, &out.ClientToken, s); err != nil { - return err - } - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.ClientSecret, &out.ClientSecret, s); err != nil { - return err - } - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.AccessToken, &out.AccessToken, s); err != nil { - return err - } - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderAkamai_To_v1beta1_ACMEIssuerDNS01ProviderAkamai is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderAkamai_To_v1beta1_ACMEIssuerDNS01ProviderAkamai(in *acme.ACMEIssuerDNS01ProviderAkamai, out *ACMEIssuerDNS01ProviderAkamai, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderAkamai_To_v1beta1_ACMEIssuerDNS01ProviderAkamai(in, out, s) -} - -func autoConvert_v1beta1_ACMEIssuerDNS01ProviderAzureDNS_To_acme_ACMEIssuerDNS01ProviderAzureDNS(in *ACMEIssuerDNS01ProviderAzureDNS, out *acme.ACMEIssuerDNS01ProviderAzureDNS, s conversion.Scope) error { - out.ClientID = in.ClientID - if in.ClientSecret != nil { - in, out := &in.ClientSecret, &out.ClientSecret - *out = new(meta.SecretKeySelector) - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ClientSecret = nil - } - out.SubscriptionID = in.SubscriptionID - out.TenantID = in.TenantID - out.ResourceGroupName = in.ResourceGroupName - out.HostedZoneName = in.HostedZoneName - out.Environment = acme.AzureDNSEnvironment(in.Environment) - out.ManagedIdentity = (*acme.AzureManagedIdentity)(unsafe.Pointer(in.ManagedIdentity)) - return nil -} - -// Convert_v1beta1_ACMEIssuerDNS01ProviderAzureDNS_To_acme_ACMEIssuerDNS01ProviderAzureDNS is an autogenerated conversion function. -func Convert_v1beta1_ACMEIssuerDNS01ProviderAzureDNS_To_acme_ACMEIssuerDNS01ProviderAzureDNS(in *ACMEIssuerDNS01ProviderAzureDNS, out *acme.ACMEIssuerDNS01ProviderAzureDNS, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEIssuerDNS01ProviderAzureDNS_To_acme_ACMEIssuerDNS01ProviderAzureDNS(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderAzureDNS_To_v1beta1_ACMEIssuerDNS01ProviderAzureDNS(in *acme.ACMEIssuerDNS01ProviderAzureDNS, out *ACMEIssuerDNS01ProviderAzureDNS, s conversion.Scope) error { - out.ClientID = in.ClientID - if in.ClientSecret != nil { - in, out := &in.ClientSecret, &out.ClientSecret - *out = new(apismetav1.SecretKeySelector) - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ClientSecret = nil - } - out.SubscriptionID = in.SubscriptionID - out.TenantID = in.TenantID - out.ResourceGroupName = in.ResourceGroupName - out.HostedZoneName = in.HostedZoneName - out.Environment = AzureDNSEnvironment(in.Environment) - out.ManagedIdentity = (*AzureManagedIdentity)(unsafe.Pointer(in.ManagedIdentity)) - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderAzureDNS_To_v1beta1_ACMEIssuerDNS01ProviderAzureDNS is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderAzureDNS_To_v1beta1_ACMEIssuerDNS01ProviderAzureDNS(in *acme.ACMEIssuerDNS01ProviderAzureDNS, out *ACMEIssuerDNS01ProviderAzureDNS, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderAzureDNS_To_v1beta1_ACMEIssuerDNS01ProviderAzureDNS(in, out, s) -} - -func autoConvert_v1beta1_ACMEIssuerDNS01ProviderCloudDNS_To_acme_ACMEIssuerDNS01ProviderCloudDNS(in *ACMEIssuerDNS01ProviderCloudDNS, out *acme.ACMEIssuerDNS01ProviderCloudDNS, s conversion.Scope) error { - if in.ServiceAccount != nil { - in, out := &in.ServiceAccount, &out.ServiceAccount - *out = new(meta.SecretKeySelector) - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ServiceAccount = nil - } - out.Project = in.Project - out.HostedZoneName = in.HostedZoneName - return nil -} - -// Convert_v1beta1_ACMEIssuerDNS01ProviderCloudDNS_To_acme_ACMEIssuerDNS01ProviderCloudDNS is an autogenerated conversion function. -func Convert_v1beta1_ACMEIssuerDNS01ProviderCloudDNS_To_acme_ACMEIssuerDNS01ProviderCloudDNS(in *ACMEIssuerDNS01ProviderCloudDNS, out *acme.ACMEIssuerDNS01ProviderCloudDNS, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEIssuerDNS01ProviderCloudDNS_To_acme_ACMEIssuerDNS01ProviderCloudDNS(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderCloudDNS_To_v1beta1_ACMEIssuerDNS01ProviderCloudDNS(in *acme.ACMEIssuerDNS01ProviderCloudDNS, out *ACMEIssuerDNS01ProviderCloudDNS, s conversion.Scope) error { - if in.ServiceAccount != nil { - in, out := &in.ServiceAccount, &out.ServiceAccount - *out = new(apismetav1.SecretKeySelector) - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ServiceAccount = nil - } - out.Project = in.Project - out.HostedZoneName = in.HostedZoneName - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderCloudDNS_To_v1beta1_ACMEIssuerDNS01ProviderCloudDNS is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderCloudDNS_To_v1beta1_ACMEIssuerDNS01ProviderCloudDNS(in *acme.ACMEIssuerDNS01ProviderCloudDNS, out *ACMEIssuerDNS01ProviderCloudDNS, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderCloudDNS_To_v1beta1_ACMEIssuerDNS01ProviderCloudDNS(in, out, s) -} - -func autoConvert_v1beta1_ACMEIssuerDNS01ProviderCloudflare_To_acme_ACMEIssuerDNS01ProviderCloudflare(in *ACMEIssuerDNS01ProviderCloudflare, out *acme.ACMEIssuerDNS01ProviderCloudflare, s conversion.Scope) error { - out.Email = in.Email - if in.APIKey != nil { - in, out := &in.APIKey, &out.APIKey - *out = new(meta.SecretKeySelector) - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.APIKey = nil - } - if in.APIToken != nil { - in, out := &in.APIToken, &out.APIToken - *out = new(meta.SecretKeySelector) - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.APIToken = nil - } - return nil -} - -// Convert_v1beta1_ACMEIssuerDNS01ProviderCloudflare_To_acme_ACMEIssuerDNS01ProviderCloudflare is an autogenerated conversion function. -func Convert_v1beta1_ACMEIssuerDNS01ProviderCloudflare_To_acme_ACMEIssuerDNS01ProviderCloudflare(in *ACMEIssuerDNS01ProviderCloudflare, out *acme.ACMEIssuerDNS01ProviderCloudflare, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEIssuerDNS01ProviderCloudflare_To_acme_ACMEIssuerDNS01ProviderCloudflare(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderCloudflare_To_v1beta1_ACMEIssuerDNS01ProviderCloudflare(in *acme.ACMEIssuerDNS01ProviderCloudflare, out *ACMEIssuerDNS01ProviderCloudflare, s conversion.Scope) error { - out.Email = in.Email - if in.APIKey != nil { - in, out := &in.APIKey, &out.APIKey - *out = new(apismetav1.SecretKeySelector) - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.APIKey = nil - } - if in.APIToken != nil { - in, out := &in.APIToken, &out.APIToken - *out = new(apismetav1.SecretKeySelector) - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.APIToken = nil - } - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderCloudflare_To_v1beta1_ACMEIssuerDNS01ProviderCloudflare is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderCloudflare_To_v1beta1_ACMEIssuerDNS01ProviderCloudflare(in *acme.ACMEIssuerDNS01ProviderCloudflare, out *ACMEIssuerDNS01ProviderCloudflare, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderCloudflare_To_v1beta1_ACMEIssuerDNS01ProviderCloudflare(in, out, s) -} - -func autoConvert_v1beta1_ACMEIssuerDNS01ProviderDigitalOcean_To_acme_ACMEIssuerDNS01ProviderDigitalOcean(in *ACMEIssuerDNS01ProviderDigitalOcean, out *acme.ACMEIssuerDNS01ProviderDigitalOcean, s conversion.Scope) error { - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.Token, &out.Token, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_ACMEIssuerDNS01ProviderDigitalOcean_To_acme_ACMEIssuerDNS01ProviderDigitalOcean is an autogenerated conversion function. -func Convert_v1beta1_ACMEIssuerDNS01ProviderDigitalOcean_To_acme_ACMEIssuerDNS01ProviderDigitalOcean(in *ACMEIssuerDNS01ProviderDigitalOcean, out *acme.ACMEIssuerDNS01ProviderDigitalOcean, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEIssuerDNS01ProviderDigitalOcean_To_acme_ACMEIssuerDNS01ProviderDigitalOcean(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderDigitalOcean_To_v1beta1_ACMEIssuerDNS01ProviderDigitalOcean(in *acme.ACMEIssuerDNS01ProviderDigitalOcean, out *ACMEIssuerDNS01ProviderDigitalOcean, s conversion.Scope) error { - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.Token, &out.Token, s); err != nil { - return err - } - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderDigitalOcean_To_v1beta1_ACMEIssuerDNS01ProviderDigitalOcean is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderDigitalOcean_To_v1beta1_ACMEIssuerDNS01ProviderDigitalOcean(in *acme.ACMEIssuerDNS01ProviderDigitalOcean, out *ACMEIssuerDNS01ProviderDigitalOcean, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderDigitalOcean_To_v1beta1_ACMEIssuerDNS01ProviderDigitalOcean(in, out, s) -} - -func autoConvert_v1beta1_ACMEIssuerDNS01ProviderRFC2136_To_acme_ACMEIssuerDNS01ProviderRFC2136(in *ACMEIssuerDNS01ProviderRFC2136, out *acme.ACMEIssuerDNS01ProviderRFC2136, s conversion.Scope) error { - out.Nameserver = in.Nameserver - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.TSIGSecret, &out.TSIGSecret, s); err != nil { - return err - } - out.TSIGKeyName = in.TSIGKeyName - out.TSIGAlgorithm = in.TSIGAlgorithm - return nil -} - -// Convert_v1beta1_ACMEIssuerDNS01ProviderRFC2136_To_acme_ACMEIssuerDNS01ProviderRFC2136 is an autogenerated conversion function. -func Convert_v1beta1_ACMEIssuerDNS01ProviderRFC2136_To_acme_ACMEIssuerDNS01ProviderRFC2136(in *ACMEIssuerDNS01ProviderRFC2136, out *acme.ACMEIssuerDNS01ProviderRFC2136, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEIssuerDNS01ProviderRFC2136_To_acme_ACMEIssuerDNS01ProviderRFC2136(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderRFC2136_To_v1beta1_ACMEIssuerDNS01ProviderRFC2136(in *acme.ACMEIssuerDNS01ProviderRFC2136, out *ACMEIssuerDNS01ProviderRFC2136, s conversion.Scope) error { - out.Nameserver = in.Nameserver - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.TSIGSecret, &out.TSIGSecret, s); err != nil { - return err - } - out.TSIGKeyName = in.TSIGKeyName - out.TSIGAlgorithm = in.TSIGAlgorithm - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderRFC2136_To_v1beta1_ACMEIssuerDNS01ProviderRFC2136 is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderRFC2136_To_v1beta1_ACMEIssuerDNS01ProviderRFC2136(in *acme.ACMEIssuerDNS01ProviderRFC2136, out *ACMEIssuerDNS01ProviderRFC2136, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderRFC2136_To_v1beta1_ACMEIssuerDNS01ProviderRFC2136(in, out, s) -} - -func autoConvert_v1beta1_ACMEIssuerDNS01ProviderRoute53_To_acme_ACMEIssuerDNS01ProviderRoute53(in *ACMEIssuerDNS01ProviderRoute53, out *acme.ACMEIssuerDNS01ProviderRoute53, s conversion.Scope) error { - out.Auth = (*acme.Route53Auth)(unsafe.Pointer(in.Auth)) - out.AccessKeyID = in.AccessKeyID - if in.SecretAccessKeyID != nil { - in, out := &in.SecretAccessKeyID, &out.SecretAccessKeyID - *out = new(meta.SecretKeySelector) - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.SecretAccessKeyID = nil - } - if err := metav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.SecretAccessKey, &out.SecretAccessKey, s); err != nil { - return err - } - out.Role = in.Role - out.HostedZoneID = in.HostedZoneID - out.Region = in.Region - return nil -} - -// Convert_v1beta1_ACMEIssuerDNS01ProviderRoute53_To_acme_ACMEIssuerDNS01ProviderRoute53 is an autogenerated conversion function. -func Convert_v1beta1_ACMEIssuerDNS01ProviderRoute53_To_acme_ACMEIssuerDNS01ProviderRoute53(in *ACMEIssuerDNS01ProviderRoute53, out *acme.ACMEIssuerDNS01ProviderRoute53, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEIssuerDNS01ProviderRoute53_To_acme_ACMEIssuerDNS01ProviderRoute53(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderRoute53_To_v1beta1_ACMEIssuerDNS01ProviderRoute53(in *acme.ACMEIssuerDNS01ProviderRoute53, out *ACMEIssuerDNS01ProviderRoute53, s conversion.Scope) error { - out.Auth = (*Route53Auth)(unsafe.Pointer(in.Auth)) - out.AccessKeyID = in.AccessKeyID - if in.SecretAccessKeyID != nil { - in, out := &in.SecretAccessKeyID, &out.SecretAccessKeyID - *out = new(apismetav1.SecretKeySelector) - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.SecretAccessKeyID = nil - } - if err := metav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.SecretAccessKey, &out.SecretAccessKey, s); err != nil { - return err - } - out.Role = in.Role - out.HostedZoneID = in.HostedZoneID - out.Region = in.Region - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderRoute53_To_v1beta1_ACMEIssuerDNS01ProviderRoute53 is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderRoute53_To_v1beta1_ACMEIssuerDNS01ProviderRoute53(in *acme.ACMEIssuerDNS01ProviderRoute53, out *ACMEIssuerDNS01ProviderRoute53, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderRoute53_To_v1beta1_ACMEIssuerDNS01ProviderRoute53(in, out, s) -} - -func autoConvert_v1beta1_ACMEIssuerDNS01ProviderWebhook_To_acme_ACMEIssuerDNS01ProviderWebhook(in *ACMEIssuerDNS01ProviderWebhook, out *acme.ACMEIssuerDNS01ProviderWebhook, s conversion.Scope) error { - out.GroupName = in.GroupName - out.SolverName = in.SolverName - out.Config = (*apiextensionsv1.JSON)(unsafe.Pointer(in.Config)) - return nil -} - -// Convert_v1beta1_ACMEIssuerDNS01ProviderWebhook_To_acme_ACMEIssuerDNS01ProviderWebhook is an autogenerated conversion function. -func Convert_v1beta1_ACMEIssuerDNS01ProviderWebhook_To_acme_ACMEIssuerDNS01ProviderWebhook(in *ACMEIssuerDNS01ProviderWebhook, out *acme.ACMEIssuerDNS01ProviderWebhook, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEIssuerDNS01ProviderWebhook_To_acme_ACMEIssuerDNS01ProviderWebhook(in, out, s) -} - -func autoConvert_acme_ACMEIssuerDNS01ProviderWebhook_To_v1beta1_ACMEIssuerDNS01ProviderWebhook(in *acme.ACMEIssuerDNS01ProviderWebhook, out *ACMEIssuerDNS01ProviderWebhook, s conversion.Scope) error { - out.GroupName = in.GroupName - out.SolverName = in.SolverName - out.Config = (*apiextensionsv1.JSON)(unsafe.Pointer(in.Config)) - return nil -} - -// Convert_acme_ACMEIssuerDNS01ProviderWebhook_To_v1beta1_ACMEIssuerDNS01ProviderWebhook is an autogenerated conversion function. -func Convert_acme_ACMEIssuerDNS01ProviderWebhook_To_v1beta1_ACMEIssuerDNS01ProviderWebhook(in *acme.ACMEIssuerDNS01ProviderWebhook, out *ACMEIssuerDNS01ProviderWebhook, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerDNS01ProviderWebhook_To_v1beta1_ACMEIssuerDNS01ProviderWebhook(in, out, s) -} - -func autoConvert_v1beta1_ACMEIssuerStatus_To_acme_ACMEIssuerStatus(in *ACMEIssuerStatus, out *acme.ACMEIssuerStatus, s conversion.Scope) error { - out.URI = in.URI - out.LastRegisteredEmail = in.LastRegisteredEmail - out.LastPrivateKeyHash = in.LastPrivateKeyHash - return nil -} - -// Convert_v1beta1_ACMEIssuerStatus_To_acme_ACMEIssuerStatus is an autogenerated conversion function. -func Convert_v1beta1_ACMEIssuerStatus_To_acme_ACMEIssuerStatus(in *ACMEIssuerStatus, out *acme.ACMEIssuerStatus, s conversion.Scope) error { - return autoConvert_v1beta1_ACMEIssuerStatus_To_acme_ACMEIssuerStatus(in, out, s) -} - -func autoConvert_acme_ACMEIssuerStatus_To_v1beta1_ACMEIssuerStatus(in *acme.ACMEIssuerStatus, out *ACMEIssuerStatus, s conversion.Scope) error { - out.URI = in.URI - out.LastRegisteredEmail = in.LastRegisteredEmail - out.LastPrivateKeyHash = in.LastPrivateKeyHash - return nil -} - -// Convert_acme_ACMEIssuerStatus_To_v1beta1_ACMEIssuerStatus is an autogenerated conversion function. -func Convert_acme_ACMEIssuerStatus_To_v1beta1_ACMEIssuerStatus(in *acme.ACMEIssuerStatus, out *ACMEIssuerStatus, s conversion.Scope) error { - return autoConvert_acme_ACMEIssuerStatus_To_v1beta1_ACMEIssuerStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedIdentity_To_acme_AzureManagedIdentity(in *AzureManagedIdentity, out *acme.AzureManagedIdentity, s conversion.Scope) error { - out.ClientID = in.ClientID - out.ResourceID = in.ResourceID - return nil -} - -// Convert_v1beta1_AzureManagedIdentity_To_acme_AzureManagedIdentity is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedIdentity_To_acme_AzureManagedIdentity(in *AzureManagedIdentity, out *acme.AzureManagedIdentity, s conversion.Scope) error { - return autoConvert_v1beta1_AzureManagedIdentity_To_acme_AzureManagedIdentity(in, out, s) -} - -func autoConvert_acme_AzureManagedIdentity_To_v1beta1_AzureManagedIdentity(in *acme.AzureManagedIdentity, out *AzureManagedIdentity, s conversion.Scope) error { - out.ClientID = in.ClientID - out.ResourceID = in.ResourceID - return nil -} - -// Convert_acme_AzureManagedIdentity_To_v1beta1_AzureManagedIdentity is an autogenerated conversion function. -func Convert_acme_AzureManagedIdentity_To_v1beta1_AzureManagedIdentity(in *acme.AzureManagedIdentity, out *AzureManagedIdentity, s conversion.Scope) error { - return autoConvert_acme_AzureManagedIdentity_To_v1beta1_AzureManagedIdentity(in, out, s) -} - -func autoConvert_v1beta1_CertificateDNSNameSelector_To_acme_CertificateDNSNameSelector(in *CertificateDNSNameSelector, out *acme.CertificateDNSNameSelector, s conversion.Scope) error { - out.MatchLabels = *(*map[string]string)(unsafe.Pointer(&in.MatchLabels)) - out.DNSNames = *(*[]string)(unsafe.Pointer(&in.DNSNames)) - out.DNSZones = *(*[]string)(unsafe.Pointer(&in.DNSZones)) - return nil -} - -// Convert_v1beta1_CertificateDNSNameSelector_To_acme_CertificateDNSNameSelector is an autogenerated conversion function. -func Convert_v1beta1_CertificateDNSNameSelector_To_acme_CertificateDNSNameSelector(in *CertificateDNSNameSelector, out *acme.CertificateDNSNameSelector, s conversion.Scope) error { - return autoConvert_v1beta1_CertificateDNSNameSelector_To_acme_CertificateDNSNameSelector(in, out, s) -} - -func autoConvert_acme_CertificateDNSNameSelector_To_v1beta1_CertificateDNSNameSelector(in *acme.CertificateDNSNameSelector, out *CertificateDNSNameSelector, s conversion.Scope) error { - out.MatchLabels = *(*map[string]string)(unsafe.Pointer(&in.MatchLabels)) - out.DNSNames = *(*[]string)(unsafe.Pointer(&in.DNSNames)) - out.DNSZones = *(*[]string)(unsafe.Pointer(&in.DNSZones)) - return nil -} - -// Convert_acme_CertificateDNSNameSelector_To_v1beta1_CertificateDNSNameSelector is an autogenerated conversion function. -func Convert_acme_CertificateDNSNameSelector_To_v1beta1_CertificateDNSNameSelector(in *acme.CertificateDNSNameSelector, out *CertificateDNSNameSelector, s conversion.Scope) error { - return autoConvert_acme_CertificateDNSNameSelector_To_v1beta1_CertificateDNSNameSelector(in, out, s) -} - -func autoConvert_v1beta1_Challenge_To_acme_Challenge(in *Challenge, out *acme.Challenge, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_ChallengeSpec_To_acme_ChallengeSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_ChallengeStatus_To_acme_ChallengeStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_Challenge_To_acme_Challenge is an autogenerated conversion function. -func Convert_v1beta1_Challenge_To_acme_Challenge(in *Challenge, out *acme.Challenge, s conversion.Scope) error { - return autoConvert_v1beta1_Challenge_To_acme_Challenge(in, out, s) -} - -func autoConvert_acme_Challenge_To_v1beta1_Challenge(in *acme.Challenge, out *Challenge, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_acme_ChallengeSpec_To_v1beta1_ChallengeSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_acme_ChallengeStatus_To_v1beta1_ChallengeStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_acme_Challenge_To_v1beta1_Challenge is an autogenerated conversion function. -func Convert_acme_Challenge_To_v1beta1_Challenge(in *acme.Challenge, out *Challenge, s conversion.Scope) error { - return autoConvert_acme_Challenge_To_v1beta1_Challenge(in, out, s) -} - -func autoConvert_v1beta1_ChallengeList_To_acme_ChallengeList(in *ChallengeList, out *acme.ChallengeList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]acme.Challenge, len(*in)) - for i := range *in { - if err := Convert_v1beta1_Challenge_To_acme_Challenge(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_ChallengeList_To_acme_ChallengeList is an autogenerated conversion function. -func Convert_v1beta1_ChallengeList_To_acme_ChallengeList(in *ChallengeList, out *acme.ChallengeList, s conversion.Scope) error { - return autoConvert_v1beta1_ChallengeList_To_acme_ChallengeList(in, out, s) -} - -func autoConvert_acme_ChallengeList_To_v1beta1_ChallengeList(in *acme.ChallengeList, out *ChallengeList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Challenge, len(*in)) - for i := range *in { - if err := Convert_acme_Challenge_To_v1beta1_Challenge(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_acme_ChallengeList_To_v1beta1_ChallengeList is an autogenerated conversion function. -func Convert_acme_ChallengeList_To_v1beta1_ChallengeList(in *acme.ChallengeList, out *ChallengeList, s conversion.Scope) error { - return autoConvert_acme_ChallengeList_To_v1beta1_ChallengeList(in, out, s) -} - -func autoConvert_v1beta1_ChallengeSpec_To_acme_ChallengeSpec(in *ChallengeSpec, out *acme.ChallengeSpec, s conversion.Scope) error { - out.URL = in.URL - out.AuthorizationURL = in.AuthorizationURL - out.DNSName = in.DNSName - out.Wildcard = in.Wildcard - out.Type = acme.ACMEChallengeType(in.Type) - out.Token = in.Token - out.Key = in.Key - if err := Convert_v1beta1_ACMEChallengeSolver_To_acme_ACMEChallengeSolver(&in.Solver, &out.Solver, s); err != nil { - return err - } - if err := metav1.Convert_v1_ObjectReference_To_meta_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_ChallengeSpec_To_acme_ChallengeSpec is an autogenerated conversion function. -func Convert_v1beta1_ChallengeSpec_To_acme_ChallengeSpec(in *ChallengeSpec, out *acme.ChallengeSpec, s conversion.Scope) error { - return autoConvert_v1beta1_ChallengeSpec_To_acme_ChallengeSpec(in, out, s) -} - -func autoConvert_acme_ChallengeSpec_To_v1beta1_ChallengeSpec(in *acme.ChallengeSpec, out *ChallengeSpec, s conversion.Scope) error { - out.URL = in.URL - out.AuthorizationURL = in.AuthorizationURL - out.DNSName = in.DNSName - out.Wildcard = in.Wildcard - out.Type = ACMEChallengeType(in.Type) - out.Token = in.Token - out.Key = in.Key - if err := Convert_acme_ACMEChallengeSolver_To_v1beta1_ACMEChallengeSolver(&in.Solver, &out.Solver, s); err != nil { - return err - } - if err := metav1.Convert_meta_ObjectReference_To_v1_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - return nil -} - -// Convert_acme_ChallengeSpec_To_v1beta1_ChallengeSpec is an autogenerated conversion function. -func Convert_acme_ChallengeSpec_To_v1beta1_ChallengeSpec(in *acme.ChallengeSpec, out *ChallengeSpec, s conversion.Scope) error { - return autoConvert_acme_ChallengeSpec_To_v1beta1_ChallengeSpec(in, out, s) -} - -func autoConvert_v1beta1_ChallengeStatus_To_acme_ChallengeStatus(in *ChallengeStatus, out *acme.ChallengeStatus, s conversion.Scope) error { - out.Processing = in.Processing - out.Presented = in.Presented - out.Reason = in.Reason - out.State = acme.State(in.State) - return nil -} - -// Convert_v1beta1_ChallengeStatus_To_acme_ChallengeStatus is an autogenerated conversion function. -func Convert_v1beta1_ChallengeStatus_To_acme_ChallengeStatus(in *ChallengeStatus, out *acme.ChallengeStatus, s conversion.Scope) error { - return autoConvert_v1beta1_ChallengeStatus_To_acme_ChallengeStatus(in, out, s) -} - -func autoConvert_acme_ChallengeStatus_To_v1beta1_ChallengeStatus(in *acme.ChallengeStatus, out *ChallengeStatus, s conversion.Scope) error { - out.Processing = in.Processing - out.Presented = in.Presented - out.Reason = in.Reason - out.State = State(in.State) - return nil -} - -// Convert_acme_ChallengeStatus_To_v1beta1_ChallengeStatus is an autogenerated conversion function. -func Convert_acme_ChallengeStatus_To_v1beta1_ChallengeStatus(in *acme.ChallengeStatus, out *ChallengeStatus, s conversion.Scope) error { - return autoConvert_acme_ChallengeStatus_To_v1beta1_ChallengeStatus(in, out, s) -} - -func autoConvert_v1beta1_Order_To_acme_Order(in *Order, out *acme.Order, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_OrderSpec_To_acme_OrderSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_OrderStatus_To_acme_OrderStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_Order_To_acme_Order is an autogenerated conversion function. -func Convert_v1beta1_Order_To_acme_Order(in *Order, out *acme.Order, s conversion.Scope) error { - return autoConvert_v1beta1_Order_To_acme_Order(in, out, s) -} - -func autoConvert_acme_Order_To_v1beta1_Order(in *acme.Order, out *Order, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_acme_OrderSpec_To_v1beta1_OrderSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_acme_OrderStatus_To_v1beta1_OrderStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_acme_Order_To_v1beta1_Order is an autogenerated conversion function. -func Convert_acme_Order_To_v1beta1_Order(in *acme.Order, out *Order, s conversion.Scope) error { - return autoConvert_acme_Order_To_v1beta1_Order(in, out, s) -} - -func autoConvert_v1beta1_OrderList_To_acme_OrderList(in *OrderList, out *acme.OrderList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]acme.Order, len(*in)) - for i := range *in { - if err := Convert_v1beta1_Order_To_acme_Order(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_OrderList_To_acme_OrderList is an autogenerated conversion function. -func Convert_v1beta1_OrderList_To_acme_OrderList(in *OrderList, out *acme.OrderList, s conversion.Scope) error { - return autoConvert_v1beta1_OrderList_To_acme_OrderList(in, out, s) -} - -func autoConvert_acme_OrderList_To_v1beta1_OrderList(in *acme.OrderList, out *OrderList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Order, len(*in)) - for i := range *in { - if err := Convert_acme_Order_To_v1beta1_Order(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_acme_OrderList_To_v1beta1_OrderList is an autogenerated conversion function. -func Convert_acme_OrderList_To_v1beta1_OrderList(in *acme.OrderList, out *OrderList, s conversion.Scope) error { - return autoConvert_acme_OrderList_To_v1beta1_OrderList(in, out, s) -} - -func autoConvert_v1beta1_OrderSpec_To_acme_OrderSpec(in *OrderSpec, out *acme.OrderSpec, s conversion.Scope) error { - out.Request = *(*[]byte)(unsafe.Pointer(&in.Request)) - if err := metav1.Convert_v1_ObjectReference_To_meta_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - out.CommonName = in.CommonName - out.DNSNames = *(*[]string)(unsafe.Pointer(&in.DNSNames)) - out.IPAddresses = *(*[]string)(unsafe.Pointer(&in.IPAddresses)) - out.Duration = (*pkgapismetav1.Duration)(unsafe.Pointer(in.Duration)) - return nil -} - -// Convert_v1beta1_OrderSpec_To_acme_OrderSpec is an autogenerated conversion function. -func Convert_v1beta1_OrderSpec_To_acme_OrderSpec(in *OrderSpec, out *acme.OrderSpec, s conversion.Scope) error { - return autoConvert_v1beta1_OrderSpec_To_acme_OrderSpec(in, out, s) -} - -func autoConvert_acme_OrderSpec_To_v1beta1_OrderSpec(in *acme.OrderSpec, out *OrderSpec, s conversion.Scope) error { - out.Request = *(*[]byte)(unsafe.Pointer(&in.Request)) - if err := metav1.Convert_meta_ObjectReference_To_v1_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - out.CommonName = in.CommonName - out.DNSNames = *(*[]string)(unsafe.Pointer(&in.DNSNames)) - out.IPAddresses = *(*[]string)(unsafe.Pointer(&in.IPAddresses)) - out.Duration = (*pkgapismetav1.Duration)(unsafe.Pointer(in.Duration)) - return nil -} - -// Convert_acme_OrderSpec_To_v1beta1_OrderSpec is an autogenerated conversion function. -func Convert_acme_OrderSpec_To_v1beta1_OrderSpec(in *acme.OrderSpec, out *OrderSpec, s conversion.Scope) error { - return autoConvert_acme_OrderSpec_To_v1beta1_OrderSpec(in, out, s) -} - -func autoConvert_v1beta1_OrderStatus_To_acme_OrderStatus(in *OrderStatus, out *acme.OrderStatus, s conversion.Scope) error { - out.URL = in.URL - out.FinalizeURL = in.FinalizeURL - out.Authorizations = *(*[]acme.ACMEAuthorization)(unsafe.Pointer(&in.Authorizations)) - out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) - out.State = acme.State(in.State) - out.Reason = in.Reason - out.FailureTime = (*pkgapismetav1.Time)(unsafe.Pointer(in.FailureTime)) - return nil -} - -// Convert_v1beta1_OrderStatus_To_acme_OrderStatus is an autogenerated conversion function. -func Convert_v1beta1_OrderStatus_To_acme_OrderStatus(in *OrderStatus, out *acme.OrderStatus, s conversion.Scope) error { - return autoConvert_v1beta1_OrderStatus_To_acme_OrderStatus(in, out, s) -} - -func autoConvert_acme_OrderStatus_To_v1beta1_OrderStatus(in *acme.OrderStatus, out *OrderStatus, s conversion.Scope) error { - out.URL = in.URL - out.FinalizeURL = in.FinalizeURL - out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) - out.State = State(in.State) - out.Reason = in.Reason - out.Authorizations = *(*[]ACMEAuthorization)(unsafe.Pointer(&in.Authorizations)) - out.FailureTime = (*pkgapismetav1.Time)(unsafe.Pointer(in.FailureTime)) - return nil -} - -// Convert_acme_OrderStatus_To_v1beta1_OrderStatus is an autogenerated conversion function. -func Convert_acme_OrderStatus_To_v1beta1_OrderStatus(in *acme.OrderStatus, out *OrderStatus, s conversion.Scope) error { - return autoConvert_acme_OrderStatus_To_v1beta1_OrderStatus(in, out, s) -} - -func autoConvert_v1beta1_Route53Auth_To_acme_Route53Auth(in *Route53Auth, out *acme.Route53Auth, s conversion.Scope) error { - out.Kubernetes = (*acme.Route53KubernetesAuth)(unsafe.Pointer(in.Kubernetes)) - return nil -} - -// Convert_v1beta1_Route53Auth_To_acme_Route53Auth is an autogenerated conversion function. -func Convert_v1beta1_Route53Auth_To_acme_Route53Auth(in *Route53Auth, out *acme.Route53Auth, s conversion.Scope) error { - return autoConvert_v1beta1_Route53Auth_To_acme_Route53Auth(in, out, s) -} - -func autoConvert_acme_Route53Auth_To_v1beta1_Route53Auth(in *acme.Route53Auth, out *Route53Auth, s conversion.Scope) error { - out.Kubernetes = (*Route53KubernetesAuth)(unsafe.Pointer(in.Kubernetes)) - return nil -} - -// Convert_acme_Route53Auth_To_v1beta1_Route53Auth is an autogenerated conversion function. -func Convert_acme_Route53Auth_To_v1beta1_Route53Auth(in *acme.Route53Auth, out *Route53Auth, s conversion.Scope) error { - return autoConvert_acme_Route53Auth_To_v1beta1_Route53Auth(in, out, s) -} - -func autoConvert_v1beta1_Route53KubernetesAuth_To_acme_Route53KubernetesAuth(in *Route53KubernetesAuth, out *acme.Route53KubernetesAuth, s conversion.Scope) error { - out.ServiceAccountRef = (*acme.ServiceAccountRef)(unsafe.Pointer(in.ServiceAccountRef)) - return nil -} - -// Convert_v1beta1_Route53KubernetesAuth_To_acme_Route53KubernetesAuth is an autogenerated conversion function. -func Convert_v1beta1_Route53KubernetesAuth_To_acme_Route53KubernetesAuth(in *Route53KubernetesAuth, out *acme.Route53KubernetesAuth, s conversion.Scope) error { - return autoConvert_v1beta1_Route53KubernetesAuth_To_acme_Route53KubernetesAuth(in, out, s) -} - -func autoConvert_acme_Route53KubernetesAuth_To_v1beta1_Route53KubernetesAuth(in *acme.Route53KubernetesAuth, out *Route53KubernetesAuth, s conversion.Scope) error { - out.ServiceAccountRef = (*ServiceAccountRef)(unsafe.Pointer(in.ServiceAccountRef)) - return nil -} - -// Convert_acme_Route53KubernetesAuth_To_v1beta1_Route53KubernetesAuth is an autogenerated conversion function. -func Convert_acme_Route53KubernetesAuth_To_v1beta1_Route53KubernetesAuth(in *acme.Route53KubernetesAuth, out *Route53KubernetesAuth, s conversion.Scope) error { - return autoConvert_acme_Route53KubernetesAuth_To_v1beta1_Route53KubernetesAuth(in, out, s) -} - -func autoConvert_v1beta1_ServiceAccountRef_To_acme_ServiceAccountRef(in *ServiceAccountRef, out *acme.ServiceAccountRef, s conversion.Scope) error { - out.Name = in.Name - out.TokenAudiences = *(*[]string)(unsafe.Pointer(&in.TokenAudiences)) - return nil -} - -// Convert_v1beta1_ServiceAccountRef_To_acme_ServiceAccountRef is an autogenerated conversion function. -func Convert_v1beta1_ServiceAccountRef_To_acme_ServiceAccountRef(in *ServiceAccountRef, out *acme.ServiceAccountRef, s conversion.Scope) error { - return autoConvert_v1beta1_ServiceAccountRef_To_acme_ServiceAccountRef(in, out, s) -} - -func autoConvert_acme_ServiceAccountRef_To_v1beta1_ServiceAccountRef(in *acme.ServiceAccountRef, out *ServiceAccountRef, s conversion.Scope) error { - out.Name = in.Name - out.TokenAudiences = *(*[]string)(unsafe.Pointer(&in.TokenAudiences)) - return nil -} - -// Convert_acme_ServiceAccountRef_To_v1beta1_ServiceAccountRef is an autogenerated conversion function. -func Convert_acme_ServiceAccountRef_To_v1beta1_ServiceAccountRef(in *acme.ServiceAccountRef, out *ServiceAccountRef, s conversion.Scope) error { - return autoConvert_acme_ServiceAccountRef_To_v1beta1_ServiceAccountRef(in, out, s) -} diff --git a/internal/apis/acme/v1beta1/zz_generated.deepcopy.go b/internal/apis/acme/v1beta1/zz_generated.deepcopy.go deleted file mode 100644 index 07e73a07683..00000000000 --- a/internal/apis/acme/v1beta1/zz_generated.deepcopy.go +++ /dev/null @@ -1,987 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The cert-manager 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 v1beta1 - -import ( - metav1 "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" - corev1 "k8s.io/api/core/v1" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - v1 "sigs.k8s.io/gateway-api/apis/v1" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEAuthorization) DeepCopyInto(out *ACMEAuthorization) { - *out = *in - if in.Wildcard != nil { - in, out := &in.Wildcard, &out.Wildcard - *out = new(bool) - **out = **in - } - if in.Challenges != nil { - in, out := &in.Challenges, &out.Challenges - *out = make([]ACMEChallenge, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEAuthorization. -func (in *ACMEAuthorization) DeepCopy() *ACMEAuthorization { - if in == nil { - return nil - } - out := new(ACMEAuthorization) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallenge) DeepCopyInto(out *ACMEChallenge) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallenge. -func (in *ACMEChallenge) DeepCopy() *ACMEChallenge { - if in == nil { - return nil - } - out := new(ACMEChallenge) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolver) DeepCopyInto(out *ACMEChallengeSolver) { - *out = *in - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(CertificateDNSNameSelector) - (*in).DeepCopyInto(*out) - } - if in.HTTP01 != nil { - in, out := &in.HTTP01, &out.HTTP01 - *out = new(ACMEChallengeSolverHTTP01) - (*in).DeepCopyInto(*out) - } - if in.DNS01 != nil { - in, out := &in.DNS01, &out.DNS01 - *out = new(ACMEChallengeSolverDNS01) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolver. -func (in *ACMEChallengeSolver) DeepCopy() *ACMEChallengeSolver { - if in == nil { - return nil - } - out := new(ACMEChallengeSolver) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverDNS01) DeepCopyInto(out *ACMEChallengeSolverDNS01) { - *out = *in - if in.Akamai != nil { - in, out := &in.Akamai, &out.Akamai - *out = new(ACMEIssuerDNS01ProviderAkamai) - **out = **in - } - if in.CloudDNS != nil { - in, out := &in.CloudDNS, &out.CloudDNS - *out = new(ACMEIssuerDNS01ProviderCloudDNS) - (*in).DeepCopyInto(*out) - } - if in.Cloudflare != nil { - in, out := &in.Cloudflare, &out.Cloudflare - *out = new(ACMEIssuerDNS01ProviderCloudflare) - (*in).DeepCopyInto(*out) - } - if in.Route53 != nil { - in, out := &in.Route53, &out.Route53 - *out = new(ACMEIssuerDNS01ProviderRoute53) - (*in).DeepCopyInto(*out) - } - if in.AzureDNS != nil { - in, out := &in.AzureDNS, &out.AzureDNS - *out = new(ACMEIssuerDNS01ProviderAzureDNS) - (*in).DeepCopyInto(*out) - } - if in.DigitalOcean != nil { - in, out := &in.DigitalOcean, &out.DigitalOcean - *out = new(ACMEIssuerDNS01ProviderDigitalOcean) - **out = **in - } - if in.AcmeDNS != nil { - in, out := &in.AcmeDNS, &out.AcmeDNS - *out = new(ACMEIssuerDNS01ProviderAcmeDNS) - **out = **in - } - if in.RFC2136 != nil { - in, out := &in.RFC2136, &out.RFC2136 - *out = new(ACMEIssuerDNS01ProviderRFC2136) - **out = **in - } - if in.Webhook != nil { - in, out := &in.Webhook, &out.Webhook - *out = new(ACMEIssuerDNS01ProviderWebhook) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverDNS01. -func (in *ACMEChallengeSolverDNS01) DeepCopy() *ACMEChallengeSolverDNS01 { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverDNS01) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01) DeepCopyInto(out *ACMEChallengeSolverHTTP01) { - *out = *in - if in.Ingress != nil { - in, out := &in.Ingress, &out.Ingress - *out = new(ACMEChallengeSolverHTTP01Ingress) - (*in).DeepCopyInto(*out) - } - if in.GatewayHTTPRoute != nil { - in, out := &in.GatewayHTTPRoute, &out.GatewayHTTPRoute - *out = new(ACMEChallengeSolverHTTP01GatewayHTTPRoute) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01. -func (in *ACMEChallengeSolverHTTP01) DeepCopy() *ACMEChallengeSolverHTTP01 { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01GatewayHTTPRoute) DeepCopyInto(out *ACMEChallengeSolverHTTP01GatewayHTTPRoute) { - *out = *in - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.ParentRefs != nil { - in, out := &in.ParentRefs, &out.ParentRefs - *out = make([]v1.ParentReference, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01GatewayHTTPRoute. -func (in *ACMEChallengeSolverHTTP01GatewayHTTPRoute) DeepCopy() *ACMEChallengeSolverHTTP01GatewayHTTPRoute { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01GatewayHTTPRoute) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01Ingress) DeepCopyInto(out *ACMEChallengeSolverHTTP01Ingress) { - *out = *in - if in.IngressClassName != nil { - in, out := &in.IngressClassName, &out.IngressClassName - *out = new(string) - **out = **in - } - if in.Class != nil { - in, out := &in.Class, &out.Class - *out = new(string) - **out = **in - } - if in.PodTemplate != nil { - in, out := &in.PodTemplate, &out.PodTemplate - *out = new(ACMEChallengeSolverHTTP01IngressPodTemplate) - (*in).DeepCopyInto(*out) - } - if in.IngressTemplate != nil { - in, out := &in.IngressTemplate, &out.IngressTemplate - *out = new(ACMEChallengeSolverHTTP01IngressTemplate) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01Ingress. -func (in *ACMEChallengeSolverHTTP01Ingress) DeepCopy() *ACMEChallengeSolverHTTP01Ingress { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01Ingress) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01IngressObjectMeta) DeepCopyInto(out *ACMEChallengeSolverHTTP01IngressObjectMeta) { - *out = *in - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01IngressObjectMeta. -func (in *ACMEChallengeSolverHTTP01IngressObjectMeta) DeepCopy() *ACMEChallengeSolverHTTP01IngressObjectMeta { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01IngressObjectMeta) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01IngressPodObjectMeta) DeepCopyInto(out *ACMEChallengeSolverHTTP01IngressPodObjectMeta) { - *out = *in - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01IngressPodObjectMeta. -func (in *ACMEChallengeSolverHTTP01IngressPodObjectMeta) DeepCopy() *ACMEChallengeSolverHTTP01IngressPodObjectMeta { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01IngressPodObjectMeta) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01IngressPodSpec) DeepCopyInto(out *ACMEChallengeSolverHTTP01IngressPodSpec) { - *out = *in - if in.NodeSelector != nil { - in, out := &in.NodeSelector, &out.NodeSelector - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Affinity != nil { - in, out := &in.Affinity, &out.Affinity - *out = new(corev1.Affinity) - (*in).DeepCopyInto(*out) - } - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = make([]corev1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ImagePullSecrets != nil { - in, out := &in.ImagePullSecrets, &out.ImagePullSecrets - *out = make([]corev1.LocalObjectReference, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01IngressPodSpec. -func (in *ACMEChallengeSolverHTTP01IngressPodSpec) DeepCopy() *ACMEChallengeSolverHTTP01IngressPodSpec { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01IngressPodSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01IngressPodTemplate) DeepCopyInto(out *ACMEChallengeSolverHTTP01IngressPodTemplate) { - *out = *in - in.ACMEChallengeSolverHTTP01IngressPodObjectMeta.DeepCopyInto(&out.ACMEChallengeSolverHTTP01IngressPodObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01IngressPodTemplate. -func (in *ACMEChallengeSolverHTTP01IngressPodTemplate) DeepCopy() *ACMEChallengeSolverHTTP01IngressPodTemplate { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01IngressPodTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEChallengeSolverHTTP01IngressTemplate) DeepCopyInto(out *ACMEChallengeSolverHTTP01IngressTemplate) { - *out = *in - in.ACMEChallengeSolverHTTP01IngressObjectMeta.DeepCopyInto(&out.ACMEChallengeSolverHTTP01IngressObjectMeta) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01IngressTemplate. -func (in *ACMEChallengeSolverHTTP01IngressTemplate) DeepCopy() *ACMEChallengeSolverHTTP01IngressTemplate { - if in == nil { - return nil - } - out := new(ACMEChallengeSolverHTTP01IngressTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEExternalAccountBinding) DeepCopyInto(out *ACMEExternalAccountBinding) { - *out = *in - out.Key = in.Key - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEExternalAccountBinding. -func (in *ACMEExternalAccountBinding) DeepCopy() *ACMEExternalAccountBinding { - if in == nil { - return nil - } - out := new(ACMEExternalAccountBinding) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuer) DeepCopyInto(out *ACMEIssuer) { - *out = *in - if in.CABundle != nil { - in, out := &in.CABundle, &out.CABundle - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.ExternalAccountBinding != nil { - in, out := &in.ExternalAccountBinding, &out.ExternalAccountBinding - *out = new(ACMEExternalAccountBinding) - **out = **in - } - out.PrivateKey = in.PrivateKey - if in.Solvers != nil { - in, out := &in.Solvers, &out.Solvers - *out = make([]ACMEChallengeSolver, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuer. -func (in *ACMEIssuer) DeepCopy() *ACMEIssuer { - if in == nil { - return nil - } - out := new(ACMEIssuer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderAcmeDNS) DeepCopyInto(out *ACMEIssuerDNS01ProviderAcmeDNS) { - *out = *in - out.AccountSecret = in.AccountSecret - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderAcmeDNS. -func (in *ACMEIssuerDNS01ProviderAcmeDNS) DeepCopy() *ACMEIssuerDNS01ProviderAcmeDNS { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderAcmeDNS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderAkamai) DeepCopyInto(out *ACMEIssuerDNS01ProviderAkamai) { - *out = *in - out.ClientToken = in.ClientToken - out.ClientSecret = in.ClientSecret - out.AccessToken = in.AccessToken - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderAkamai. -func (in *ACMEIssuerDNS01ProviderAkamai) DeepCopy() *ACMEIssuerDNS01ProviderAkamai { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderAkamai) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderAzureDNS) DeepCopyInto(out *ACMEIssuerDNS01ProviderAzureDNS) { - *out = *in - if in.ClientSecret != nil { - in, out := &in.ClientSecret, &out.ClientSecret - *out = new(metav1.SecretKeySelector) - **out = **in - } - if in.ManagedIdentity != nil { - in, out := &in.ManagedIdentity, &out.ManagedIdentity - *out = new(AzureManagedIdentity) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderAzureDNS. -func (in *ACMEIssuerDNS01ProviderAzureDNS) DeepCopy() *ACMEIssuerDNS01ProviderAzureDNS { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderAzureDNS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderCloudDNS) DeepCopyInto(out *ACMEIssuerDNS01ProviderCloudDNS) { - *out = *in - if in.ServiceAccount != nil { - in, out := &in.ServiceAccount, &out.ServiceAccount - *out = new(metav1.SecretKeySelector) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderCloudDNS. -func (in *ACMEIssuerDNS01ProviderCloudDNS) DeepCopy() *ACMEIssuerDNS01ProviderCloudDNS { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderCloudDNS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderCloudflare) DeepCopyInto(out *ACMEIssuerDNS01ProviderCloudflare) { - *out = *in - if in.APIKey != nil { - in, out := &in.APIKey, &out.APIKey - *out = new(metav1.SecretKeySelector) - **out = **in - } - if in.APIToken != nil { - in, out := &in.APIToken, &out.APIToken - *out = new(metav1.SecretKeySelector) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderCloudflare. -func (in *ACMEIssuerDNS01ProviderCloudflare) DeepCopy() *ACMEIssuerDNS01ProviderCloudflare { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderCloudflare) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderDigitalOcean) DeepCopyInto(out *ACMEIssuerDNS01ProviderDigitalOcean) { - *out = *in - out.Token = in.Token - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderDigitalOcean. -func (in *ACMEIssuerDNS01ProviderDigitalOcean) DeepCopy() *ACMEIssuerDNS01ProviderDigitalOcean { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderDigitalOcean) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderRFC2136) DeepCopyInto(out *ACMEIssuerDNS01ProviderRFC2136) { - *out = *in - out.TSIGSecret = in.TSIGSecret - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderRFC2136. -func (in *ACMEIssuerDNS01ProviderRFC2136) DeepCopy() *ACMEIssuerDNS01ProviderRFC2136 { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderRFC2136) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderRoute53) DeepCopyInto(out *ACMEIssuerDNS01ProviderRoute53) { - *out = *in - if in.Auth != nil { - in, out := &in.Auth, &out.Auth - *out = new(Route53Auth) - (*in).DeepCopyInto(*out) - } - if in.SecretAccessKeyID != nil { - in, out := &in.SecretAccessKeyID, &out.SecretAccessKeyID - *out = new(metav1.SecretKeySelector) - **out = **in - } - out.SecretAccessKey = in.SecretAccessKey - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderRoute53. -func (in *ACMEIssuerDNS01ProviderRoute53) DeepCopy() *ACMEIssuerDNS01ProviderRoute53 { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderRoute53) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderWebhook) DeepCopyInto(out *ACMEIssuerDNS01ProviderWebhook) { - *out = *in - if in.Config != nil { - in, out := &in.Config, &out.Config - *out = new(apiextensionsv1.JSON) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderWebhook. -func (in *ACMEIssuerDNS01ProviderWebhook) DeepCopy() *ACMEIssuerDNS01ProviderWebhook { - if in == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderWebhook) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerStatus) DeepCopyInto(out *ACMEIssuerStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerStatus. -func (in *ACMEIssuerStatus) DeepCopy() *ACMEIssuerStatus { - if in == nil { - return nil - } - out := new(ACMEIssuerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureManagedIdentity) DeepCopyInto(out *AzureManagedIdentity) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedIdentity. -func (in *AzureManagedIdentity) DeepCopy() *AzureManagedIdentity { - if in == nil { - return nil - } - out := new(AzureManagedIdentity) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateDNSNameSelector) DeepCopyInto(out *CertificateDNSNameSelector) { - *out = *in - if in.MatchLabels != nil { - in, out := &in.MatchLabels, &out.MatchLabels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.DNSNames != nil { - in, out := &in.DNSNames, &out.DNSNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.DNSZones != nil { - in, out := &in.DNSZones, &out.DNSZones - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateDNSNameSelector. -func (in *CertificateDNSNameSelector) DeepCopy() *CertificateDNSNameSelector { - if in == nil { - return nil - } - out := new(CertificateDNSNameSelector) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Challenge) DeepCopyInto(out *Challenge) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Challenge. -func (in *Challenge) DeepCopy() *Challenge { - if in == nil { - return nil - } - out := new(Challenge) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Challenge) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChallengeList) DeepCopyInto(out *ChallengeList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Challenge, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChallengeList. -func (in *ChallengeList) DeepCopy() *ChallengeList { - if in == nil { - return nil - } - out := new(ChallengeList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ChallengeList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChallengeSpec) DeepCopyInto(out *ChallengeSpec) { - *out = *in - in.Solver.DeepCopyInto(&out.Solver) - out.IssuerRef = in.IssuerRef - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChallengeSpec. -func (in *ChallengeSpec) DeepCopy() *ChallengeSpec { - if in == nil { - return nil - } - out := new(ChallengeSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChallengeStatus) DeepCopyInto(out *ChallengeStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChallengeStatus. -func (in *ChallengeStatus) DeepCopy() *ChallengeStatus { - if in == nil { - return nil - } - out := new(ChallengeStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Order) DeepCopyInto(out *Order) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Order. -func (in *Order) DeepCopy() *Order { - if in == nil { - return nil - } - out := new(Order) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Order) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrderList) DeepCopyInto(out *OrderList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Order, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrderList. -func (in *OrderList) DeepCopy() *OrderList { - if in == nil { - return nil - } - out := new(OrderList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OrderList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrderSpec) DeepCopyInto(out *OrderSpec) { - *out = *in - if in.Request != nil { - in, out := &in.Request, &out.Request - *out = make([]byte, len(*in)) - copy(*out, *in) - } - out.IssuerRef = in.IssuerRef - if in.DNSNames != nil { - in, out := &in.DNSNames, &out.DNSNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.IPAddresses != nil { - in, out := &in.IPAddresses, &out.IPAddresses - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Duration != nil { - in, out := &in.Duration, &out.Duration - *out = new(apismetav1.Duration) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrderSpec. -func (in *OrderSpec) DeepCopy() *OrderSpec { - if in == nil { - return nil - } - out := new(OrderSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrderStatus) DeepCopyInto(out *OrderStatus) { - *out = *in - if in.Authorizations != nil { - in, out := &in.Authorizations, &out.Authorizations - *out = make([]ACMEAuthorization, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Certificate != nil { - in, out := &in.Certificate, &out.Certificate - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.FailureTime != nil { - in, out := &in.FailureTime, &out.FailureTime - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrderStatus. -func (in *OrderStatus) DeepCopy() *OrderStatus { - if in == nil { - return nil - } - out := new(OrderStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Route53Auth) DeepCopyInto(out *Route53Auth) { - *out = *in - if in.Kubernetes != nil { - in, out := &in.Kubernetes, &out.Kubernetes - *out = new(Route53KubernetesAuth) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route53Auth. -func (in *Route53Auth) DeepCopy() *Route53Auth { - if in == nil { - return nil - } - out := new(Route53Auth) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Route53KubernetesAuth) DeepCopyInto(out *Route53KubernetesAuth) { - *out = *in - if in.ServiceAccountRef != nil { - in, out := &in.ServiceAccountRef, &out.ServiceAccountRef - *out = new(ServiceAccountRef) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route53KubernetesAuth. -func (in *Route53KubernetesAuth) DeepCopy() *Route53KubernetesAuth { - if in == nil { - return nil - } - out := new(Route53KubernetesAuth) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceAccountRef) DeepCopyInto(out *ServiceAccountRef) { - *out = *in - if in.TokenAudiences != nil { - in, out := &in.TokenAudiences, &out.TokenAudiences - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountRef. -func (in *ServiceAccountRef) DeepCopy() *ServiceAccountRef { - if in == nil { - return nil - } - out := new(ServiceAccountRef) - in.DeepCopyInto(out) - return out -} diff --git a/internal/apis/acme/v1beta1/zz_generated.defaults.go b/internal/apis/acme/v1beta1/zz_generated.defaults.go deleted file mode 100644 index 176b36f98d6..00000000000 --- a/internal/apis/acme/v1beta1/zz_generated.defaults.go +++ /dev/null @@ -1,33 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The cert-manager 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 defaulter-gen. DO NOT EDIT. - -package v1beta1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - return nil -} diff --git a/internal/apis/acme/zz_generated.deepcopy.go b/internal/apis/acme/zz_generated.deepcopy.go index c798aecce58..4890dc28609 100644 --- a/internal/apis/acme/zz_generated.deepcopy.go +++ b/internal/apis/acme/zz_generated.deepcopy.go @@ -207,6 +207,11 @@ func (in *ACMEChallengeSolverHTTP01GatewayHTTPRoute) DeepCopyInto(out *ACMEChall (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.PodTemplate != nil { + in, out := &in.PodTemplate, &out.PodTemplate + *out = new(ACMEChallengeSolverHTTP01IngressPodTemplate) + (*in).DeepCopyInto(*out) + } return } @@ -316,6 +321,67 @@ func (in *ACMEChallengeSolverHTTP01IngressPodObjectMeta) DeepCopy() *ACMEChallen return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ACMEChallengeSolverHTTP01IngressPodSecurityContext) DeepCopyInto(out *ACMEChallengeSolverHTTP01IngressPodSecurityContext) { + *out = *in + if in.SELinuxOptions != nil { + in, out := &in.SELinuxOptions, &out.SELinuxOptions + *out = new(corev1.SELinuxOptions) + **out = **in + } + if in.RunAsUser != nil { + in, out := &in.RunAsUser, &out.RunAsUser + *out = new(int64) + **out = **in + } + if in.RunAsGroup != nil { + in, out := &in.RunAsGroup, &out.RunAsGroup + *out = new(int64) + **out = **in + } + if in.RunAsNonRoot != nil { + in, out := &in.RunAsNonRoot, &out.RunAsNonRoot + *out = new(bool) + **out = **in + } + if in.SupplementalGroups != nil { + in, out := &in.SupplementalGroups, &out.SupplementalGroups + *out = make([]int64, len(*in)) + copy(*out, *in) + } + if in.FSGroup != nil { + in, out := &in.FSGroup, &out.FSGroup + *out = new(int64) + **out = **in + } + if in.Sysctls != nil { + in, out := &in.Sysctls, &out.Sysctls + *out = make([]corev1.Sysctl, len(*in)) + copy(*out, *in) + } + if in.FSGroupChangePolicy != nil { + in, out := &in.FSGroupChangePolicy, &out.FSGroupChangePolicy + *out = new(corev1.PodFSGroupChangePolicy) + **out = **in + } + if in.SeccompProfile != nil { + in, out := &in.SeccompProfile, &out.SeccompProfile + *out = new(corev1.SeccompProfile) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01IngressPodSecurityContext. +func (in *ACMEChallengeSolverHTTP01IngressPodSecurityContext) DeepCopy() *ACMEChallengeSolverHTTP01IngressPodSecurityContext { + if in == nil { + return nil + } + out := new(ACMEChallengeSolverHTTP01IngressPodSecurityContext) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ACMEChallengeSolverHTTP01IngressPodSpec) DeepCopyInto(out *ACMEChallengeSolverHTTP01IngressPodSpec) { *out = *in @@ -343,6 +409,11 @@ func (in *ACMEChallengeSolverHTTP01IngressPodSpec) DeepCopyInto(out *ACMEChallen *out = make([]corev1.LocalObjectReference, len(*in)) copy(*out, *in) } + if in.SecurityContext != nil { + in, out := &in.SecurityContext, &out.SecurityContext + *out = new(ACMEChallengeSolverHTTP01IngressPodSecurityContext) + (*in).DeepCopyInto(*out) + } return } diff --git a/internal/apis/certmanager/install/install.go b/internal/apis/certmanager/install/install.go index 6d9b3aec5b6..016ad76f256 100644 --- a/internal/apis/certmanager/install/install.go +++ b/internal/apis/certmanager/install/install.go @@ -24,9 +24,6 @@ import ( "github.com/cert-manager/cert-manager/internal/apis/certmanager" v1 "github.com/cert-manager/cert-manager/internal/apis/certmanager/v1" - "github.com/cert-manager/cert-manager/internal/apis/certmanager/v1alpha2" - "github.com/cert-manager/cert-manager/internal/apis/certmanager/v1alpha3" - "github.com/cert-manager/cert-manager/internal/apis/certmanager/v1beta1" cmmetav1 "github.com/cert-manager/cert-manager/internal/apis/meta/v1" ) @@ -35,9 +32,6 @@ func Install(scheme *runtime.Scheme) { utilruntime.Must(certmanager.AddToScheme(scheme)) // The first version in this list will be the default version used utilruntime.Must(v1.AddToScheme(scheme)) - utilruntime.Must(v1beta1.AddToScheme(scheme)) - utilruntime.Must(v1alpha3.AddToScheme(scheme)) - utilruntime.Must(v1alpha2.AddToScheme(scheme)) utilruntime.Must(cmmetav1.AddToScheme(scheme)) } diff --git a/internal/apis/certmanager/types_certificate.go b/internal/apis/certmanager/types_certificate.go index 97a5ff94e08..546cbd67fb7 100644 --- a/internal/apis/certmanager/types_certificate.go +++ b/internal/apis/certmanager/types_certificate.go @@ -150,8 +150,27 @@ type CertificateSpec struct { // If unset, this defaults to 1/3 of the issued certificate's lifetime. // Minimum accepted value is 5 minutes. // Value must be in units accepted by Go time.ParseDuration https://golang.org/pkg/time/#ParseDuration. + // Cannot be set if the `renewBeforePercentage` field is set. + // +optional RenewBefore *metav1.Duration + // `renewBeforePercentage` is like `renewBefore`, except it is a relative percentage + // rather than an absolute duration. For example, if a certificate is valid for 60 + // minutes, and `renewBeforePercentage=25`, cert-manager will begin to attempt to + // renew the certificate 45 minutes after it was issued (i.e. when there are 15 + // minutes (25%) remaining until the certificate is no longer valid). + // + // NOTE: The actual lifetime of the issued certificate is used to determine the + // renewal time. If an issuer returns a certificate with a different lifetime than + // the one requested, cert-manager will use the lifetime of the issued certificate. + // + // Value must be an integer in the range (0,100). The minimum effective + // `renewBefore` derived from the `renewBeforePercentage` and `duration` fields is 5 + // minutes. + // Cannot be set if the `renewBefore` field is set. + // +optional + RenewBeforePercentage *int32 + // Requested DNS subject alternative names. DNSNames []string @@ -272,7 +291,7 @@ type CertificatePrivateKey struct { // re-issuance is being processed. // // If set to `Never`, a private key will only be generated if one does not - // already exist in the target `spec.secretName`. If one does exists but it + // already exist in the target `spec.secretName`. If one does exist but it // does not have the correct algorithm or size, a warning will be raised // to await user intervention. // If set to `Always`, a private key matching the specified requirements @@ -316,7 +335,7 @@ type PrivateKeyRotationPolicy string var ( // RotationPolicyNever means a private key will only be generated if one // does not already exist in the target `spec.secretName`. - // If one does exists but it does not have the correct algorithm or size, + // If one does exist but it does not have the correct algorithm or size, // a warning will be raised to await user intervention. RotationPolicyNever PrivateKeyRotationPolicy = "Never" @@ -463,7 +482,7 @@ type CertificateStatus struct { // Known condition types are `Ready` and `Issuing`. Conditions []CertificateCondition - // LastFailureTime is set only if the lastest issuance for this + // LastFailureTime is set only if the latest issuance for this // Certificate failed and contains the time of the failure. If an // issuance has failed, the delay till the next issuance will be // calculated using formula time.Hour * 2 ^ (failedIssuanceAttempts - @@ -515,7 +534,7 @@ type CertificateStatus struct { FailedIssuanceAttempts *int } -// CertificateCondition contains condition information for an Certificate. +// CertificateCondition contains condition information for a Certificate. type CertificateCondition struct { // Type of the condition, known values are (`Ready`, `Issuing`). Type CertificateConditionType @@ -543,7 +562,7 @@ type CertificateCondition struct { ObservedGeneration int64 } -// CertificateConditionType represents an Certificate condition value. +// CertificateConditionType represents a Certificate condition value. type CertificateConditionType string const ( diff --git a/internal/apis/certmanager/types_certificaterequest.go b/internal/apis/certmanager/types_certificaterequest.go index f89f3eca798..afd5da53e03 100644 --- a/internal/apis/certmanager/types_certificaterequest.go +++ b/internal/apis/certmanager/types_certificaterequest.go @@ -196,7 +196,7 @@ type CertificateRequestCondition struct { Message string } -// CertificateRequestConditionType represents an Certificate condition value. +// CertificateRequestConditionType represents a Certificate condition value. type CertificateRequestConditionType string const ( diff --git a/internal/apis/certmanager/types_issuer.go b/internal/apis/certmanager/types_issuer.go index e9a91f8dbef..e5926d36752 100644 --- a/internal/apis/certmanager/types_issuer.go +++ b/internal/apis/certmanager/types_issuer.go @@ -132,9 +132,9 @@ type VenafiTPP struct { // for example: "https://tpp.example.com/vedsdk". URL string - // CredentialsRef is a reference to a Secret containing the username and - // password for the TPP server. - // The secret must contain two keys, 'username' and 'password'. + // CredentialsRef is a reference to a Secret containing the Venafi TPP API credentials. + // The secret must contain the key 'access-token' for the Access Token Authentication, + // or two keys, 'username' and 'password' for the API Keys Authentication. CredentialsRef cmmeta.LocalObjectReference // Base64-encoded bundle of PEM CAs which will be used to validate the certificate @@ -142,6 +142,13 @@ type VenafiTPP struct { // If undefined, the certificate bundle in the cert-manager controller container // is used to validate the chain. CABundle []byte + + // Reference to a Secret containing a base64-encoded bundle of PEM CAs + // which will be used to validate the certificate chain presented by the TPP server. + // Only used if using HTTPS; ignored for HTTP. Mutually exclusive with CABundle. + // If neither CABundle nor CABundleSecretRef is defined, the certificate bundle in + // the cert-manager controller container is used to validate the TLS connection. + CABundleSecretRef *cmmeta.SecretKeySelector `json:"caBundleSecretRef,omitempty"` } // VenafiCloud defines connection configuration details for Venafi Cloud @@ -210,7 +217,7 @@ type VaultIssuer struct { } // VaultAuth is configuration used to authenticate with a Vault server. The -// order of precedence is [`tokenSecretRef`, `appRole` or `kubernetes`]. +// order of precedence is [`tokenSecretRef`, `appRole`, `clientCertificate` or `kubernetes`]. type VaultAuth struct { // TokenSecretRef authenticates with Vault by presenting a token. TokenSecretRef *cmmeta.SecretKeySelector @@ -219,6 +226,12 @@ type VaultAuth struct { // with the role and secret stored in a Kubernetes Secret resource. AppRole *VaultAppRole + // ClientCertificate authenticates with Vault by presenting a client + // certificate during the request's TLS handshake. + // Works only when using HTTPS protocol. + // +optional + ClientCertificate *VaultClientCertificateAuth + // Kubernetes authenticates with Vault by passing the ServiceAccount // token stored in the named Secret resource to the Vault server. Kubernetes *VaultKubernetesAuth @@ -242,6 +255,28 @@ type VaultAppRole struct { SecretRef cmmeta.SecretKeySelector } +// VaultKubernetesAuth is used to authenticate against Vault using a client +// certificate stored in a Secret. +type VaultClientCertificateAuth struct { + // The Vault mountPath here is the mount path to use when authenticating with + // Vault. For example, setting a value to `/v1/auth/foo`, will use the path + // `/v1/auth/foo/login` to authenticate with Vault. If unspecified, the + // default value "/v1/auth/cert" will be used. + // +optional + Path string + + // Reference to Kubernetes Secret of type "kubernetes.io/tls" (hence containing + // tls.crt and tls.key) used to authenticate to Vault using TLS client + // authentication. + // +optional + SecretName string + + // Name of the certificate role to authenticate against. + // If not set, matching any certificate role, if available. + // +optional + Name string +} + // Authenticate against Vault using a Kubernetes ServiceAccount token stored in // a Secret. type VaultKubernetesAuth struct { diff --git a/internal/apis/certmanager/v1/zz_generated.conversion.go b/internal/apis/certmanager/v1/zz_generated.conversion.go index ed4d3b3c10c..4ca99cb9901 100644 --- a/internal/apis/certmanager/v1/zz_generated.conversion.go +++ b/internal/apis/certmanager/v1/zz_generated.conversion.go @@ -364,6 +364,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*v1.VaultClientCertificateAuth)(nil), (*certmanager.VaultClientCertificateAuth)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_VaultClientCertificateAuth_To_certmanager_VaultClientCertificateAuth(a.(*v1.VaultClientCertificateAuth), b.(*certmanager.VaultClientCertificateAuth), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*certmanager.VaultClientCertificateAuth)(nil), (*v1.VaultClientCertificateAuth)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_certmanager_VaultClientCertificateAuth_To_v1_VaultClientCertificateAuth(a.(*certmanager.VaultClientCertificateAuth), b.(*v1.VaultClientCertificateAuth), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*v1.VaultIssuer)(nil), (*certmanager.VaultIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_VaultIssuer_To_certmanager_VaultIssuer(a.(*v1.VaultIssuer), b.(*certmanager.VaultIssuer), scope) }); err != nil { @@ -853,6 +863,7 @@ func autoConvert_v1_CertificateSpec_To_certmanager_CertificateSpec(in *v1.Certif out.CommonName = in.CommonName out.Duration = (*metav1.Duration)(unsafe.Pointer(in.Duration)) out.RenewBefore = (*metav1.Duration)(unsafe.Pointer(in.RenewBefore)) + out.RenewBeforePercentage = (*int32)(unsafe.Pointer(in.RenewBeforePercentage)) out.DNSNames = *(*[]string)(unsafe.Pointer(&in.DNSNames)) out.IPAddresses = *(*[]string)(unsafe.Pointer(&in.IPAddresses)) out.URIs = *(*[]string)(unsafe.Pointer(&in.URIs)) @@ -893,6 +904,7 @@ func autoConvert_certmanager_CertificateSpec_To_v1_CertificateSpec(in *certmanag out.CommonName = in.CommonName out.Duration = (*metav1.Duration)(unsafe.Pointer(in.Duration)) out.RenewBefore = (*metav1.Duration)(unsafe.Pointer(in.RenewBefore)) + out.RenewBeforePercentage = (*int32)(unsafe.Pointer(in.RenewBeforePercentage)) out.DNSNames = *(*[]string)(unsafe.Pointer(&in.DNSNames)) out.IPAddresses = *(*[]string)(unsafe.Pointer(&in.IPAddresses)) out.URIs = *(*[]string)(unsafe.Pointer(&in.URIs)) @@ -1478,6 +1490,7 @@ func autoConvert_v1_VaultAuth_To_certmanager_VaultAuth(in *v1.VaultAuth, out *ce } else { out.AppRole = nil } + out.ClientCertificate = (*certmanager.VaultClientCertificateAuth)(unsafe.Pointer(in.ClientCertificate)) if in.Kubernetes != nil { in, out := &in.Kubernetes, &out.Kubernetes *out = new(certmanager.VaultKubernetesAuth) @@ -1514,6 +1527,7 @@ func autoConvert_certmanager_VaultAuth_To_v1_VaultAuth(in *certmanager.VaultAuth } else { out.AppRole = nil } + out.ClientCertificate = (*v1.VaultClientCertificateAuth)(unsafe.Pointer(in.ClientCertificate)) if in.Kubernetes != nil { in, out := &in.Kubernetes, &out.Kubernetes *out = new(v1.VaultKubernetesAuth) @@ -1531,6 +1545,30 @@ func Convert_certmanager_VaultAuth_To_v1_VaultAuth(in *certmanager.VaultAuth, ou return autoConvert_certmanager_VaultAuth_To_v1_VaultAuth(in, out, s) } +func autoConvert_v1_VaultClientCertificateAuth_To_certmanager_VaultClientCertificateAuth(in *v1.VaultClientCertificateAuth, out *certmanager.VaultClientCertificateAuth, s conversion.Scope) error { + out.Path = in.Path + out.SecretName = in.SecretName + out.Name = in.Name + return nil +} + +// Convert_v1_VaultClientCertificateAuth_To_certmanager_VaultClientCertificateAuth is an autogenerated conversion function. +func Convert_v1_VaultClientCertificateAuth_To_certmanager_VaultClientCertificateAuth(in *v1.VaultClientCertificateAuth, out *certmanager.VaultClientCertificateAuth, s conversion.Scope) error { + return autoConvert_v1_VaultClientCertificateAuth_To_certmanager_VaultClientCertificateAuth(in, out, s) +} + +func autoConvert_certmanager_VaultClientCertificateAuth_To_v1_VaultClientCertificateAuth(in *certmanager.VaultClientCertificateAuth, out *v1.VaultClientCertificateAuth, s conversion.Scope) error { + out.Path = in.Path + out.SecretName = in.SecretName + out.Name = in.Name + return nil +} + +// Convert_certmanager_VaultClientCertificateAuth_To_v1_VaultClientCertificateAuth is an autogenerated conversion function. +func Convert_certmanager_VaultClientCertificateAuth_To_v1_VaultClientCertificateAuth(in *certmanager.VaultClientCertificateAuth, out *v1.VaultClientCertificateAuth, s conversion.Scope) error { + return autoConvert_certmanager_VaultClientCertificateAuth_To_v1_VaultClientCertificateAuth(in, out, s) +} + func autoConvert_v1_VaultIssuer_To_certmanager_VaultIssuer(in *v1.VaultIssuer, out *certmanager.VaultIssuer, s conversion.Scope) error { if err := Convert_v1_VaultAuth_To_certmanager_VaultAuth(&in.Auth, &out.Auth, s); err != nil { return err @@ -1735,6 +1773,15 @@ func autoConvert_v1_VenafiTPP_To_certmanager_VenafiTPP(in *v1.VenafiTPP, out *ce return err } out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) + if in.CABundleSecretRef != nil { + in, out := &in.CABundleSecretRef, &out.CABundleSecretRef + *out = new(meta.SecretKeySelector) + if err := internalapismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { + return err + } + } else { + out.CABundleSecretRef = nil + } return nil } @@ -1749,6 +1796,15 @@ func autoConvert_certmanager_VenafiTPP_To_v1_VenafiTPP(in *certmanager.VenafiTPP return err } out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) + if in.CABundleSecretRef != nil { + in, out := &in.CABundleSecretRef, &out.CABundleSecretRef + *out = new(apismetav1.SecretKeySelector) + if err := internalapismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { + return err + } + } else { + out.CABundleSecretRef = nil + } return nil } diff --git a/internal/apis/certmanager/v1alpha2/const.go b/internal/apis/certmanager/v1alpha2/const.go deleted file mode 100644 index 2a26fcf47bf..00000000000 --- a/internal/apis/certmanager/v1alpha2/const.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha2 - -import "time" - -const ( - // minimum permitted certificate duration by cert-manager - MinimumCertificateDuration = time.Hour - - // default certificate duration if Issuer.spec.duration is not set - DefaultCertificateDuration = time.Hour * 24 * 90 - - // minimum certificate duration before certificate expiration - MinimumRenewBefore = time.Minute * 5 - - // Deprecated: the default is now 2/3 of Certificate's duration - DefaultRenewBefore = time.Hour * 24 * 30 -) - -const ( - // Default index key for the Secret reference for Token authentication - DefaultVaultTokenAuthSecretKey = "token" - - // Default mount path location for Kubernetes ServiceAccount authentication - // (/v1/auth/kubernetes). The endpoint will then be called at `/login`, so - // left as the default, `/v1/auth/kubernetes/login` will be called. - DefaultVaultKubernetesAuthMountPath = "/v1/auth/kubernetes" -) diff --git a/internal/apis/certmanager/v1alpha2/conversion.go b/internal/apis/certmanager/v1alpha2/conversion.go deleted file mode 100644 index eb6440a3228..00000000000 --- a/internal/apis/certmanager/v1alpha2/conversion.go +++ /dev/null @@ -1,137 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha2 - -import ( - "k8s.io/apimachinery/pkg/conversion" - - "github.com/cert-manager/cert-manager/internal/apis/certmanager" -) - -func Convert_v1alpha2_CertificateSpec_To_certmanager_CertificateSpec(in *CertificateSpec, out *certmanager.CertificateSpec, s conversion.Scope) error { - if err := autoConvert_v1alpha2_CertificateSpec_To_certmanager_CertificateSpec(in, out, s); err != nil { - return err - } - - out.EmailAddresses = in.EmailSANs - out.URIs = in.URISANs - - if len(in.Organization) > 0 { - if out.Subject == nil { - out.Subject = &certmanager.X509Subject{} - } - - out.Subject.Organizations = in.Organization - } - - if in.KeyAlgorithm != "" || in.KeyEncoding != "" || in.KeySize != 0 { - if out.PrivateKey == nil { - out.PrivateKey = &certmanager.CertificatePrivateKey{} - } - - switch in.KeyAlgorithm { - case ECDSAKeyAlgorithm: - out.PrivateKey.Algorithm = certmanager.ECDSAKeyAlgorithm - case RSAKeyAlgorithm: - out.PrivateKey.Algorithm = certmanager.RSAKeyAlgorithm - default: - out.PrivateKey.Algorithm = certmanager.PrivateKeyAlgorithm(in.KeyAlgorithm) - } - - switch in.KeyEncoding { - case PKCS1: - out.PrivateKey.Encoding = certmanager.PKCS1 - case PKCS8: - out.PrivateKey.Encoding = certmanager.PKCS8 - default: - out.PrivateKey.Encoding = certmanager.PrivateKeyEncoding(in.KeyEncoding) - } - - out.PrivateKey.Size = in.KeySize - } - - return nil -} - -func Convert_certmanager_CertificateSpec_To_v1alpha2_CertificateSpec(in *certmanager.CertificateSpec, out *CertificateSpec, s conversion.Scope) error { - if err := autoConvert_certmanager_CertificateSpec_To_v1alpha2_CertificateSpec(in, out, s); err != nil { - return err - } - - out.EmailSANs = in.EmailAddresses - out.URISANs = in.URIs - - if in.Subject != nil { - out.Organization = in.Subject.Organizations - } else { - out.Organization = nil - } - - if in.PrivateKey != nil { - switch in.PrivateKey.Algorithm { - case certmanager.ECDSAKeyAlgorithm: - out.KeyAlgorithm = ECDSAKeyAlgorithm - case certmanager.RSAKeyAlgorithm: - out.KeyAlgorithm = RSAKeyAlgorithm - default: - out.KeyAlgorithm = KeyAlgorithm(in.PrivateKey.Algorithm) - } - - switch in.PrivateKey.Encoding { - case certmanager.PKCS1: - out.KeyEncoding = PKCS1 - case certmanager.PKCS8: - out.KeyEncoding = PKCS8 - default: - out.KeyEncoding = KeyEncoding(in.PrivateKey.Encoding) - } - - out.KeySize = in.PrivateKey.Size - } - - return nil -} - -func Convert_certmanager_X509Subject_To_v1alpha2_X509Subject(in *certmanager.X509Subject, out *X509Subject, s conversion.Scope) error { - return autoConvert_certmanager_X509Subject_To_v1alpha2_X509Subject(in, out, s) -} - -func Convert_certmanager_CertificatePrivateKey_To_v1alpha2_CertificatePrivateKey(in *certmanager.CertificatePrivateKey, out *CertificatePrivateKey, s conversion.Scope) error { - return autoConvert_certmanager_CertificatePrivateKey_To_v1alpha2_CertificatePrivateKey(in, out, s) -} - -func Convert_v1alpha2_CertificateRequestSpec_To_certmanager_CertificateRequestSpec(in *CertificateRequestSpec, out *certmanager.CertificateRequestSpec, s conversion.Scope) error { - if err := autoConvert_v1alpha2_CertificateRequestSpec_To_certmanager_CertificateRequestSpec(in, out, s); err != nil { - return err - } - - out.Request = in.CSRPEM - return nil -} - -func Convert_certmanager_CertificateRequestSpec_To_v1alpha2_CertificateRequestSpec(in *certmanager.CertificateRequestSpec, out *CertificateRequestSpec, s conversion.Scope) error { - if err := autoConvert_certmanager_CertificateRequestSpec_To_v1alpha2_CertificateRequestSpec(in, out, s); err != nil { - return err - } - - out.CSRPEM = in.Request - return nil -} - -func Convert_certmanager_VaultKubernetesAuth_To_v1alpha2_VaultKubernetesAuth(in *certmanager.VaultKubernetesAuth, out *VaultKubernetesAuth, s conversion.Scope) error { - return autoConvert_certmanager_VaultKubernetesAuth_To_v1alpha2_VaultKubernetesAuth(in, out, s) -} diff --git a/internal/apis/certmanager/v1alpha2/defaults.go b/internal/apis/certmanager/v1alpha2/defaults.go deleted file mode 100644 index 93ea5ff4f97..00000000000 --- a/internal/apis/certmanager/v1alpha2/defaults.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha2 - -import ( - "k8s.io/apimachinery/pkg/runtime" -) - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} diff --git a/internal/apis/certmanager/v1alpha2/doc.go b/internal/apis/certmanager/v1alpha2/doc.go deleted file mode 100644 index 6dec230eb21..00000000000 --- a/internal/apis/certmanager/v1alpha2/doc.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2020 The cert-manager 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:conversion-gen=github.com/cert-manager/cert-manager/internal/apis/certmanager -// +k8s:conversion-gen-external-types=github.com/cert-manager/cert-manager/internal/apis/certmanager/v1alpha2 -// +k8s:defaulter-gen=TypeMeta -// +k8s:deepcopy-gen=package,register - -// +groupName=cert-manager.io -package v1alpha2 diff --git a/internal/apis/certmanager/v1alpha2/generic_issuer.go b/internal/apis/certmanager/v1alpha2/generic_issuer.go deleted file mode 100644 index d83335c0959..00000000000 --- a/internal/apis/certmanager/v1alpha2/generic_issuer.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - - cmacme "github.com/cert-manager/cert-manager/internal/apis/acme/v1alpha2" -) - -type GenericIssuer interface { - runtime.Object - metav1.Object - - GetObjectMeta() *metav1.ObjectMeta - GetSpec() *IssuerSpec - GetStatus() *IssuerStatus -} - -var _ GenericIssuer = &Issuer{} -var _ GenericIssuer = &ClusterIssuer{} - -func (c *ClusterIssuer) GetObjectMeta() *metav1.ObjectMeta { - return &c.ObjectMeta -} -func (c *ClusterIssuer) GetSpec() *IssuerSpec { - return &c.Spec -} -func (c *ClusterIssuer) GetStatus() *IssuerStatus { - return &c.Status -} -func (c *ClusterIssuer) SetSpec(spec IssuerSpec) { - c.Spec = spec -} -func (c *ClusterIssuer) SetStatus(status IssuerStatus) { - c.Status = status -} -func (c *ClusterIssuer) Copy() GenericIssuer { - return c.DeepCopy() -} -func (c *Issuer) GetObjectMeta() *metav1.ObjectMeta { - return &c.ObjectMeta -} -func (c *Issuer) GetSpec() *IssuerSpec { - return &c.Spec -} -func (c *Issuer) GetStatus() *IssuerStatus { - return &c.Status -} -func (c *Issuer) SetSpec(spec IssuerSpec) { - c.Spec = spec -} -func (c *Issuer) SetStatus(status IssuerStatus) { - c.Status = status -} -func (c *Issuer) Copy() GenericIssuer { - return c.DeepCopy() -} - -// TODO: refactor these functions away -func (i *IssuerStatus) ACMEStatus() *cmacme.ACMEIssuerStatus { - // this is an edge case, but this will prevent panics - if i == nil { - return &cmacme.ACMEIssuerStatus{} - } - if i.ACME == nil { - i.ACME = &cmacme.ACMEIssuerStatus{} - } - return i.ACME -} diff --git a/internal/apis/certmanager/v1alpha2/register.go b/internal/apis/certmanager/v1alpha2/register.go deleted file mode 100644 index 227c7110fd7..00000000000 --- a/internal/apis/certmanager/v1alpha2/register.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - "github.com/cert-manager/cert-manager/pkg/apis/certmanager" -) - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: certmanager.GroupName, Version: "v1alpha2"} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addDefaultingFuncs) - - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes) -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &Certificate{}, - &CertificateList{}, - &Issuer{}, - &IssuerList{}, - &ClusterIssuer{}, - &ClusterIssuerList{}, - &CertificateRequest{}, - &CertificateRequestList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/internal/apis/certmanager/v1alpha2/types.go b/internal/apis/certmanager/v1alpha2/types.go deleted file mode 100644 index 82b1564797f..00000000000 --- a/internal/apis/certmanager/v1alpha2/types.go +++ /dev/null @@ -1,205 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha2 - -// Common annotation keys added to resources. -const ( - // Annotation key for DNS subjectAltNames. - AltNamesAnnotationKey = "cert-manager.io/alt-names" - - // Annotation key for IP subjectAltNames. - IPSANAnnotationKey = "cert-manager.io/ip-sans" - - // Annotation key for URI subjectAltNames. - URISANAnnotationKey = "cert-manager.io/uri-sans" - - // Annotation key for certificate common name. - CommonNameAnnotationKey = "cert-manager.io/common-name" - - // Annotation key the 'name' of the Issuer resource. - IssuerNameAnnotationKey = "cert-manager.io/issuer-name" - - // Annotation key for the 'kind' of the Issuer resource. - IssuerKindAnnotationKey = "cert-manager.io/issuer-kind" - - // Annotation key for the 'group' of the Issuer resource. - IssuerGroupAnnotationKey = "cert-manager.io/issuer-group" - - // Annotation key for the name of the certificate that a resource is related to. - CertificateNameKey = "cert-manager.io/certificate-name" - - // Annotation key used to denote whether a Secret is named on a Certificate - // as a 'next private key' Secret resource. - IsNextPrivateKeySecretLabelKey = "cert-manager.io/next-private-key" -) - -// Deprecated annotation names for Secrets -// These will be removed in a future release. -const ( - DeprecatedIssuerNameAnnotationKey = "certmanager.k8s.io/issuer-name" - DeprecatedIssuerKindAnnotationKey = "certmanager.k8s.io/issuer-kind" -) - -const ( - // issuerNameAnnotation can be used to override the issuer specified on the - // created Certificate resource. - IngressIssuerNameAnnotationKey = "cert-manager.io/issuer" - // clusterIssuerNameAnnotation can be used to override the issuer specified on the - // created Certificate resource. The Certificate will reference the - // specified *ClusterIssuer* instead of normal issuer. - IngressClusterIssuerNameAnnotationKey = "cert-manager.io/cluster-issuer" - // acmeIssuerHTTP01IngressClassAnnotation can be used to override the http01 ingressClass - // if the challenge type is set to http01 - IngressACMEIssuerHTTP01IngressClassAnnotationKey = "acme.cert-manager.io/http01-ingress-class" - - // IngressClassAnnotationKey picks a specific "class" for the Ingress. The - // controller only processes Ingresses with this annotation either unset, or - // set to either the configured value or the empty string. - IngressClassAnnotationKey = "kubernetes.io/ingress.class" -) - -// Annotation names for CertificateRequests -const ( - // Annotation added to CertificateRequest resources to denote the name of - // a Secret resource containing the private key used to sign the CSR stored - // on the resource. - // This annotation *may* not be present, and is used by the 'self signing' - // issuer type to self-sign certificates. - CertificateRequestPrivateKeyAnnotationKey = "cert-manager.io/private-key-secret-name" - - // Annotation to declare the CertificateRequest "revision", belonging to a Certificate Resource - CertificateRequestRevisionAnnotationKey = "cert-manager.io/certificate-revision" -) - -const ( - // IssueTemporaryCertificateAnnotation is an annotation that can be added to - // Certificate resources. - // If it is present, a temporary internally signed certificate will be - // stored in the target Secret resource whilst the real Issuer is processing - // the certificate request. - IssueTemporaryCertificateAnnotation = "cert-manager.io/issue-temporary-certificate" -) - -// Common/known resource kinds. -const ( - ClusterIssuerKind = "ClusterIssuer" - IssuerKind = "Issuer" - CertificateKind = "Certificate" - CertificateRequestKind = "CertificateRequest" -) - -const ( - // WantInjectAnnotation is the annotation that specifies that a particular - // object wants injection of CAs. It takes the form of a reference to a certificate - // as namespace/name. - WantInjectAnnotation = "cert-manager.io/inject-ca-from" - - // WantInjectAPIServerCAAnnotation, if set to "true", will make the cainjector - // inject the CA certificate for the Kubernetes apiserver into the resource. - // It discovers the apiserver's CA by inspecting the service account credentials - // mounted into the cainjector pod. - WantInjectAPIServerCAAnnotation = "cert-manager.io/inject-apiserver-ca" - - // WantInjectFromSecretAnnotation is the annotation that specifies that a particular - // object wants injection of CAs. It takes the form of a reference to a Secret - // as namespace/name. - WantInjectFromSecretAnnotation = "cert-manager.io/inject-ca-from-secret" - - // AllowsInjectionFromSecretAnnotation is an annotation that must be added - // to Secret resource that want to denote that they can be directly - // injected into injectables that have a `inject-ca-from-secret` annotation. - // If an injectable references a Secret that does NOT have this annotation, - // the cainjector will refuse to inject the secret. - AllowsInjectionFromSecretAnnotation = "cert-manager.io/allow-direct-injection" -) - -// Issuer specific Annotations -const ( - // VenafiCustomFieldsAnnotationKey is the annotation that passes on JSON encoded custom fields to the Venafi issuer - // This will only work with Venafi TPP v19.3 and higher - // The value is an array with objects containing the name and value keys - // for example: `[{"name": "custom-field", "value": "custom-value"}]` - VenafiCustomFieldsAnnotationKey = "venafi.cert-manager.io/custom-fields" -) - -// KeyUsage specifies valid usage contexts for keys. -// See: -// https://tools.ietf.org/html/rfc5280#section-4.2.1.3 -// https://tools.ietf.org/html/rfc5280#section-4.2.1.12 -// -// Valid KeyUsage values are as follows: -// "signing", -// "digital signature", -// "content commitment", -// "key encipherment", -// "key agreement", -// "data encipherment", -// "cert sign", -// "crl sign", -// "encipher only", -// "decipher only", -// "any", -// "server auth", -// "client auth", -// "code signing", -// "email protection", -// "s/mime", -// "ipsec end system", -// "ipsec tunnel", -// "ipsec user", -// "timestamping", -// "ocsp signing", -// "microsoft sgc", -// "netscape sgc" -// +kubebuilder:validation:Enum="signing";"digital signature";"content commitment";"key encipherment";"key agreement";"data encipherment";"cert sign";"crl sign";"encipher only";"decipher only";"any";"server auth";"client auth";"code signing";"email protection";"s/mime";"ipsec end system";"ipsec tunnel";"ipsec user";"timestamping";"ocsp signing";"microsoft sgc";"netscape sgc" -type KeyUsage string - -const ( - UsageSigning KeyUsage = "signing" - UsageDigitalSignature KeyUsage = "digital signature" - UsageContentCommitment KeyUsage = "content commitment" - UsageKeyEncipherment KeyUsage = "key encipherment" - UsageKeyAgreement KeyUsage = "key agreement" - UsageDataEncipherment KeyUsage = "data encipherment" - UsageCertSign KeyUsage = "cert sign" - UsageCRLSign KeyUsage = "crl sign" - UsageEncipherOnly KeyUsage = "encipher only" - UsageDecipherOnly KeyUsage = "decipher only" - UsageAny KeyUsage = "any" - UsageServerAuth KeyUsage = "server auth" - UsageClientAuth KeyUsage = "client auth" - UsageCodeSigning KeyUsage = "code signing" - UsageEmailProtection KeyUsage = "email protection" - UsageSMIME KeyUsage = "s/mime" - UsageIPsecEndSystem KeyUsage = "ipsec end system" - UsageIPsecTunnel KeyUsage = "ipsec tunnel" - UsageIPsecUser KeyUsage = "ipsec user" - UsageTimestamping KeyUsage = "timestamping" - UsageOCSPSigning KeyUsage = "ocsp signing" - UsageMicrosoftSGC KeyUsage = "microsoft sgc" - UsageNetscapeSGC KeyUsage = "netscape sgc" -) - -// DefaultKeyUsages contains the default list of key usages -func DefaultKeyUsages() []KeyUsage { - // The serverAuth EKU is required as of Mac OS Catalina: https://support.apple.com/en-us/HT210176 - // Without this usage, certificates will _always_ flag a warning in newer Mac OS browsers. - // We don't explicitly add it here as it leads to strange behaviour when a user sets isCA: true - // (in which case, 'serverAuth' on the CA can break a lot of clients). - // CAs can (and often do) opt to automatically add usages. - return []KeyUsage{UsageDigitalSignature, UsageKeyEncipherment} -} diff --git a/internal/apis/certmanager/v1alpha2/types_certificate.go b/internal/apis/certmanager/v1alpha2/types_certificate.go deleted file mode 100644 index 6772b1f078a..00000000000 --- a/internal/apis/certmanager/v1alpha2/types_certificate.go +++ /dev/null @@ -1,606 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// A Certificate resource should be created to ensure an up to date and signed -// x509 certificate is stored in the Kubernetes Secret resource named in `spec.secretName`. -// -// The stored certificate will be renewed before it expires (as configured by `spec.renewBefore`). -// +k8s:openapi-gen=true -type Certificate struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Desired state of the Certificate resource. - Spec CertificateSpec `json:"spec,omitempty"` - - // Status of the Certificate. This is set and managed automatically. - Status CertificateStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CertificateList is a list of Certificates -type CertificateList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []Certificate `json:"items"` -} - -// +kubebuilder:validation:Enum=rsa;ecdsa -type KeyAlgorithm string - -const ( - // Denotes the RSA private key type. - RSAKeyAlgorithm KeyAlgorithm = "rsa" - - // Denotes the ECDSA private key type. - ECDSAKeyAlgorithm KeyAlgorithm = "ecdsa" -) - -// +kubebuilder:validation:Enum=pkcs1;pkcs8 -type KeyEncoding string - -const ( - // PKCS1 key encoding will produce PEM files that include the type of - // private key as part of the PEM header, e.g. `BEGIN RSA PRIVATE KEY`. - // If the keyAlgorithm is set to 'ECDSA', this will produce private keys - // that use the `BEGIN EC PRIVATE KEY` header. - PKCS1 KeyEncoding = "pkcs1" - - // PKCS8 key encoding will produce PEM files with the `BEGIN PRIVATE KEY` - // header. It encodes the keyAlgorithm of the private key as part of the - // DER encoded PEM block. - PKCS8 KeyEncoding = "pkcs8" -) - -// CertificateSpec defines the desired state of Certificate. -type CertificateSpec struct { - // Full X509 name specification (https://golang.org/pkg/crypto/x509/pkix/#Name). - // +optional - Subject *X509Subject `json:"subject,omitempty"` - - // Requested X.509 certificate subject, represented using the LDAP "String - // Representation of a Distinguished Name" [1]. - // Important: the LDAP string format also specifies the order of the attributes - // in the subject, this is important when issuing certs for LDAP authentication. - // Example: `CN=foo,DC=corp,DC=example,DC=com` - // More info [1]: https://datatracker.ietf.org/doc/html/rfc4514 - // More info: https://github.com/cert-manager/cert-manager/issues/3203 - // More info: https://github.com/cert-manager/cert-manager/issues/4424 - // - // Cannot be set if the `subject` or `commonName` field is set. - // +optional - LiteralSubject string `json:"literalSubject,omitempty"` - - // CommonName is a common name to be used on the Certificate. - // The CommonName should have a length of 64 characters or fewer to avoid - // generating invalid CSRs. - // This value is ignored by TLS clients when any subject alt name is set. - // This is x509 behaviour: https://tools.ietf.org/html/rfc6125#section-6.4.4 - // +optional - CommonName string `json:"commonName,omitempty"` - - // Organization is a list of organizations to be used on the Certificate. - // +optional - Organization []string `json:"organization,omitempty"` - - // The requested 'duration' (i.e. lifetime) of the Certificate. This option - // may be ignored/overridden by some issuer types. If unset this defaults to - // 90 days. Certificate will be renewed either 2/3 through its duration or - // `renewBefore` period before its expiry, whichever is later. Minimum - // accepted duration is 1 hour. Value must be in units accepted by Go - // time.ParseDuration https://golang.org/pkg/time/#ParseDuration - // +optional - Duration *metav1.Duration `json:"duration,omitempty"` - - // How long before the currently issued certificate's expiry - // cert-manager should renew the certificate. The default is 2/3 of the - // issued certificate's duration. Minimum accepted value is 5 minutes. - // Value must be in units accepted by Go time.ParseDuration - // https://golang.org/pkg/time/#ParseDuration - // +optional - RenewBefore *metav1.Duration `json:"renewBefore,omitempty"` - - // DNSNames is a list of DNS subjectAltNames to be set on the Certificate. - // +optional - DNSNames []string `json:"dnsNames,omitempty"` - - // IPAddresses is a list of IP address subjectAltNames to be set on the Certificate. - // +optional - IPAddresses []string `json:"ipAddresses,omitempty"` - - // URISANs is a list of URI subjectAltNames to be set on the Certificate. - // +optional - URISANs []string `json:"uriSANs,omitempty"` - - // EmailSANs is a list of email subjectAltNames to be set on the Certificate. - // +optional - EmailSANs []string `json:"emailSANs,omitempty"` - - // `otherNames` is an escape hatch for SAN that allows any type. We currently restrict the support to string like otherNames, cf RFC 5280 p 37 - // Any UTF8 String valued otherName can be passed with by setting the keys oid: x.x.x.x and UTF8Value: somevalue for `otherName`. - // Most commonly this would be UPN set with oid: 1.3.6.1.4.1.311.20.2.3 - // You should ensure that any OID passed is valid for the UTF8String type as we do not explicitly validate this. - // +optional - OtherNames []OtherName `json:"otherNames,omitempty"` - - // SecretName is the name of the secret resource that will be automatically - // created and managed by this Certificate resource. - // It will be populated with a private key and certificate, signed by the - // denoted issuer. - SecretName string `json:"secretName"` - - // SecretTemplate defines annotations and labels to be copied to the - // Certificate's Secret. Labels and annotations on the Secret will be changed - // as they appear on the SecretTemplate when added or removed. SecretTemplate - // annotations are added in conjunction with, and cannot overwrite, the base - // set of annotations cert-manager sets on the Certificate's Secret. - // +optional - SecretTemplate *CertificateSecretTemplate `json:"secretTemplate,omitempty"` - - // Keystores configures additional keystore output formats stored in the - // `secretName` Secret resource. - // +optional - Keystores *CertificateKeystores `json:"keystores,omitempty"` - - // IssuerRef is a reference to the issuer for this certificate. - // If the `kind` field is not set, or set to `Issuer`, an Issuer resource - // with the given name in the same namespace as the Certificate will be used. - // If the `kind` field is set to `ClusterIssuer`, a ClusterIssuer with the - // provided name will be used. - // The `name` field in this stanza is required at all times. - IssuerRef cmmeta.ObjectReference `json:"issuerRef"` - - // IsCA will mark this Certificate as valid for certificate signing. - // This will automatically add the `cert sign` usage to the list of `usages`. - // +optional - IsCA bool `json:"isCA,omitempty"` - - // Usages is the set of x509 usages that are requested for the certificate. - // Defaults to `digital signature` and `key encipherment` if not specified. - // +optional - Usages []KeyUsage `json:"usages,omitempty"` - - // KeySize is the key bit size of the corresponding private key for this certificate. - // If `keyAlgorithm` is set to `rsa`, valid values are `2048`, `4096` or `8192`, - // and will default to `2048` if not specified. - // If `keyAlgorithm` is set to `ecdsa`, valid values are `256`, `384` or `521`, - // and will default to `256` if not specified. - // No other values are allowed. - // +optional - KeySize int `json:"keySize,omitempty"` // Validated by webhook. Be mindful of adding OpenAPI validation- see https://github.com/cert-manager/cert-manager/issues/3644 . - - // KeyAlgorithm is the private key algorithm of the corresponding private key - // for this certificate. If provided, allowed values are either `rsa` or `ecdsa` - // If `keyAlgorithm` is specified and `keySize` is not provided, - // key size of 256 will be used for `ecdsa` key algorithm and - // key size of 2048 will be used for `rsa` key algorithm. - // +optional - KeyAlgorithm KeyAlgorithm `json:"keyAlgorithm,omitempty"` - - // KeyEncoding is the private key cryptography standards (PKCS) - // for this certificate's private key to be encoded in. If provided, allowed - // values are `pkcs1` and `pkcs8` standing for PKCS#1 and PKCS#8, respectively. - // If KeyEncoding is not specified, then `pkcs1` will be used by default. - // +optional - KeyEncoding KeyEncoding `json:"keyEncoding,omitempty"` - - // Options to control private keys used for the Certificate. - // +optional - PrivateKey *CertificatePrivateKey `json:"privateKey,omitempty"` - - // EncodeUsagesInRequest controls whether key usages should be present - // in the CertificateRequest - // +optional - EncodeUsagesInRequest *bool `json:"encodeUsagesInRequest,omitempty"` - - // revisionHistoryLimit is the maximum number of CertificateRequest revisions - // that are maintained in the Certificate's history. Each revision represents - // a single `CertificateRequest` created by this Certificate, either when it - // was created, renewed, or Spec was changed. Revisions will be removed by - // oldest first if the number of revisions exceeds this number. If set, - // revisionHistoryLimit must be a value of `1` or greater. If unset (`nil`), - // revisions will not be garbage collected. Default value is `nil`. - // +kubebuilder:validation:ExclusiveMaximum=false - // +optional - RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` // Validated by the validating webhook. - - // AdditionalOutputFormats defines extra output formats of the private key - // and signed certificate chain to be written to this Certificate's target - // Secret. This is an Alpha Feature and is only enabled with the - // `--feature-gates=AdditionalCertificateOutputFormats=true` option on both - // the controller and webhook components. - // +optional - AdditionalOutputFormats []CertificateAdditionalOutputFormat `json:"additionalOutputFormats,omitempty"` - - // x.509 certificate NameConstraint extension which MUST NOT be used in a non-CA certificate. - // More Info: https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.10 - // - // This is an Alpha Feature and is only enabled with the - // `--feature-gates=NameConstraints=true` option set on both - // the controller and webhook components. - // +optional - NameConstraints *NameConstraints `json:"nameConstraints,omitempty"` -} - -type OtherName struct { - // OID is the object identifier for the otherName SAN. - // The object identifier must be expressed as a dotted string, for - // example, "1.2.840.113556.1.4.221". - OID string `json:"oid,omitempty"` - - // utf8Value is the string value of the otherName SAN. - // The utf8Value accepts any valid UTF8 string to set as value for the otherName SAN. - UTF8Value string `json:"utf8Value,omitempty"` -} - -// CertificatePrivateKey contains configuration options for private keys -// used by the Certificate controller. -// This allows control of how private keys are rotated. -type CertificatePrivateKey struct { - // RotationPolicy controls how private keys should be regenerated when a - // re-issuance is being processed. - // If set to Never, a private key will only be generated if one does not - // already exist in the target `spec.secretName`. If one does exists but it - // does not have the correct algorithm or size, a warning will be raised - // to await user intervention. - // If set to Always, a private key matching the specified requirements - // will be generated whenever a re-issuance occurs. - // Default is 'Never' for backward compatibility. - // +optional - RotationPolicy PrivateKeyRotationPolicy `json:"rotationPolicy,omitempty"` -} - -// Denotes how private keys should be generated or sourced when a Certificate -// is being issued. -type PrivateKeyRotationPolicy string - -var ( - // RotationPolicyNever means a private key will only be generated if one - // does not already exist in the target `spec.secretName`. - // If one does exists but it does not have the correct algorithm or size, - // a warning will be raised to await user intervention. - RotationPolicyNever PrivateKeyRotationPolicy = "Never" - - // RotationPolicyAlways means a private key matching the specified - // requirements will be generated whenever a re-issuance occurs. - RotationPolicyAlways PrivateKeyRotationPolicy = "Always" -) - -// X509Subject Full X509 name specification -type X509Subject struct { - // Countries to be used on the Certificate. - // +optional - Countries []string `json:"countries,omitempty"` - // Organizational Units to be used on the Certificate. - // +optional - OrganizationalUnits []string `json:"organizationalUnits,omitempty"` - // Cities to be used on the Certificate. - // +optional - Localities []string `json:"localities,omitempty"` - // State/Provinces to be used on the Certificate. - // +optional - Provinces []string `json:"provinces,omitempty"` - // Street addresses to be used on the Certificate. - // +optional - StreetAddresses []string `json:"streetAddresses,omitempty"` - // Postal codes to be used on the Certificate. - // +optional - PostalCodes []string `json:"postalCodes,omitempty"` - // Serial number to be used on the Certificate. - // +optional - SerialNumber string `json:"serialNumber,omitempty"` -} - -// CertificateKeystores configures additional keystore output formats to be -// created in the Certificate's output Secret. -type CertificateKeystores struct { - // JKS configures options for storing a JKS keystore in the - // `spec.secretName` Secret resource. - JKS *JKSKeystore `json:"jks,omitempty"` - - // PKCS12 configures options for storing a PKCS12 keystore in the - // `spec.secretName` Secret resource. - PKCS12 *PKCS12Keystore `json:"pkcs12,omitempty"` -} - -// JKS configures options for storing a JKS keystore in the `spec.secretName` -// Secret resource. -type JKSKeystore struct { - // Create enables JKS keystore creation for the Certificate. - // If true, a file named `keystore.jks` will be created in the target - // Secret resource, encrypted using the password stored in - // `passwordSecretRef`. - // The keystore file will only be updated upon re-issuance. - Create bool `json:"create"` - - // PasswordSecretRef is a reference to a key in a Secret resource - // containing the password used to encrypt the JKS keystore. - PasswordSecretRef cmmeta.SecretKeySelector `json:"passwordSecretRef"` - - // Alias specifies the alias of the key in the keystore, required by the JKS format. - // If not provided, the default alias `certificate` will be used. - // +optional - Alias *string `json:"alias,omitempty"` -} - -// PKCS12 configures options for storing a PKCS12 keystore in the -// `spec.secretName` Secret resource. -type PKCS12Keystore struct { - // Create enables PKCS12 keystore creation for the Certificate. - // If true, a file named `keystore.p12` will be created in the target - // Secret resource, encrypted using the password stored in - // `passwordSecretRef`. - // The keystore file will only be updated upon re-issuance. - Create bool `json:"create"` - - // PasswordSecretRef is a reference to a key in a Secret resource - // containing the password used to encrypt the PKCS12 keystore. - PasswordSecretRef cmmeta.SecretKeySelector `json:"passwordSecretRef"` - - // Profile specifies the key and certificate encryption algorithms and the HMAC algorithm - // used to create the PKCS12 keystore. Default value is `LegacyRC2` for backward compatibility. - // - // If provided, allowed values are: - // `LegacyRC2`: Deprecated. Not supported by default in OpenSSL 3 or Java 20. - // `LegacyDES`: Less secure algorithm. Use this option for maximal compatibility. - // `Modern2023`: Secure algorithm. Use this option in case you have to always use secure algorithms - // (eg. because of company policy). Please note that the security of the algorithm is not that important - // in reality, because the unencrypted certificate and private key are also stored in the Secret. - // +optional - Profile PKCS12Profile `json:"profile,omitempty"` -} - -// +kubebuilder:validation:Enum=LegacyRC2;LegacyDES;Modern2023 -type PKCS12Profile string - -const ( - // see: https://pkg.go.dev/software.sslmate.com/src/go-pkcs12#LegacyRC2 - LegacyRC2PKCS12Profile PKCS12Profile = "LegacyRC2" - - // see: https://pkg.go.dev/software.sslmate.com/src/go-pkcs12#LegacyDES - LegacyDESPKCS12Profile PKCS12Profile = "LegacyDES" - - // see: https://pkg.go.dev/software.sslmate.com/src/go-pkcs12#Modern2023 - Modern2023PKCS12Profile PKCS12Profile = "Modern2023" -) - -// CertificateStatus defines the observed state of Certificate -type CertificateStatus struct { - // List of status conditions to indicate the status of certificates. - // Known condition types are `Ready` and `Issuing`. - // +listType=map - // +listMapKey=type - // +optional - Conditions []CertificateCondition `json:"conditions,omitempty"` - - // LastFailureTime is the time as recorded by the Certificate controller - // of the most recent failure to complete a CertificateRequest for this - // Certificate resource. - // If set, cert-manager will not re-request another Certificate until - // 1 hour has elapsed from this time. - // +optional - LastFailureTime *metav1.Time `json:"lastFailureTime,omitempty"` - - // The time after which the certificate stored in the secret named - // by this resource in spec.secretName is valid. - // +optional - NotBefore *metav1.Time `json:"notBefore,omitempty"` - - // The expiration time of the certificate stored in the secret named - // by this resource in `spec.secretName`. - // +optional - NotAfter *metav1.Time `json:"notAfter,omitempty"` - - // RenewalTime is the time at which the certificate will be next - // renewed. - // If not set, no upcoming renewal is scheduled. - // +optional - RenewalTime *metav1.Time `json:"renewalTime,omitempty"` - - // The current 'revision' of the certificate as issued. - // - // When a CertificateRequest resource is created, it will have the - // `cert-manager.io/certificate-revision` set to one greater than the - // current value of this field. - // - // Upon issuance, this field will be set to the value of the annotation - // on the CertificateRequest resource used to issue the certificate. - // - // Persisting the value on the CertificateRequest resource allows the - // certificates controller to know whether a request is part of an old - // issuance or if it is part of the ongoing revision's issuance by - // checking if the revision value in the annotation is greater than this - // field. - // +optional - Revision *int `json:"revision,omitempty"` - - // The name of the Secret resource containing the private key to be used - // for the next certificate iteration. - // The keymanager controller will automatically set this field if the - // `Issuing` condition is set to `True`. - // It will automatically unset this field when the Issuing condition is - // not set or False. - // +optional - NextPrivateKeySecretName *string `json:"nextPrivateKeySecretName,omitempty"` - - // The number of continuous failed issuance attempts up till now. This - // field gets removed (if set) on a successful issuance and gets set to - // 1 if unset and an issuance has failed. If an issuance has failed, the - // delay till the next issuance will be calculated using formula - // time.Hour * 2 ^ (failedIssuanceAttempts - 1). - // +optional - FailedIssuanceAttempts *int `json:"failedIssuanceAttempts,omitempty"` -} - -// CertificateCondition contains condition information for an Certificate. -type CertificateCondition struct { - // Type of the condition, known values are (`Ready`, `Issuing`). - Type CertificateConditionType `json:"type"` - - // Status of the condition, one of (`True`, `False`, `Unknown`). - Status cmmeta.ConditionStatus `json:"status"` - - // LastTransitionTime is the timestamp corresponding to the last status - // change of this condition. - // +optional - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - - // Reason is a brief machine readable explanation for the condition's last - // transition. - // +optional - Reason string `json:"reason,omitempty"` - - // Message is a human readable description of the details of the last - // transition, complementing reason. - // +optional - Message string `json:"message,omitempty"` - - // If set, this represents the .metadata.generation that the condition was - // set based upon. - // For instance, if .metadata.generation is currently 12, but the - // .status.condition[x].observedGeneration is 9, the condition is out of date - // with respect to the current state of the Certificate. - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty"` -} - -// CertificateConditionType represents an Certificate condition value. -type CertificateConditionType string - -const ( - // CertificateConditionReady indicates that a certificate is ready for use. - // This is defined as: - // - The target secret exists - // - The target secret contains a certificate that has not expired - // - The target secret contains a private key valid for the certificate - // - The commonName and dnsNames attributes match those specified on the Certificate - CertificateConditionReady CertificateConditionType = "Ready" - - // A condition added to Certificate resources when an issuance is required. - // This condition will be automatically added and set to true if: - // * No keypair data exists in the target Secret - // * The data stored in the Secret cannot be decoded - // * The private key and certificate do not have matching public keys - // * If a CertificateRequest for the current revision exists and the - // certificate data stored in the Secret does not match the - // `status.certificate` on the CertificateRequest. - // * If no CertificateRequest resource exists for the current revision, - // the options on the Certificate resource are compared against the - // x509 data in the Secret, similar to what's done in earlier versions. - // If there is a mismatch, an issuance is triggered. - // This condition may also be added by external API consumers to trigger - // a re-issuance manually for any other reason. - // - // It will be removed by the 'issuing' controller upon completing issuance. - CertificateConditionIssuing CertificateConditionType = "Issuing" -) - -// CertificateSecretTemplate defines the default labels and annotations -// to be copied to the Kubernetes Secret resource named in `CertificateSpec.secretName`. -type CertificateSecretTemplate struct { - // Annotations is a key value map to be copied to the target Kubernetes Secret. - // +optional - Annotations map[string]string `json:"annotations,omitempty"` - - // Labels is a key value map to be copied to the target Kubernetes Secret. - // +optional - Labels map[string]string `json:"labels,omitempty"` -} - -// CertificateOutputFormatType specifies which output formats that can be -// written to the Certificate's target Secret. -// Allowed values are `DER` or `CombinedPEM`. -// When Type is set to `DER` an additional entry `key.der` will be written to -// the Secret, containing the binary format of the private key. -// When Type is set to `CombinedPEM` an additional entry `tls-combined.pem` -// will be written to the Secret, containing the PEM formatted private key and -// signed certificate chain (tls.key + tls.crt concatenated). -// +kubebuilder:validation:Enum=DER;CombinedPEM -type CertificateOutputFormatType string - -const ( - // CertificateOutputFormatDER writes the Certificate's private key in DER - // binary format to the `key.der` target Secret Data key. - CertificateOutputFormatDER CertificateOutputFormatType = "DER" - - // CertificateOutputFormatCombinedPEM writes the Certificate's signed - // certificate chain and private key, in PEM format, to the - // `tls-combined.pem` target Secret Data key. The value at this key will - // include the private key PEM document, followed by at least one new line - // character, followed by the chain of signed certificate PEM documents - // (` + \n + `). - CertificateOutputFormatCombinedPEM CertificateOutputFormatType = "CombinedPEM" -) - -// CertificateAdditionalOutputFormat defines an additional output format of a -// Certificate resource. These contain supplementary data formats of the signed -// certificate chain and paired private key. -type CertificateAdditionalOutputFormat struct { - // Type is the name of the format type that should be written to the - // Certificate's target Secret. - Type CertificateOutputFormatType `json:"type"` -} - -// NameConstraints is a type to represent x509 NameConstraints -type NameConstraints struct { - // if true then the name constraints are marked critical. - // - // +optional - Critical bool `json:"critical,omitempty"` - // Permitted contains the constraints in which the names must be located. - // - // +optional - Permitted *NameConstraintItem `json:"permitted,omitempty"` - // Excluded contains the constraints which must be disallowed. Any name matching a - // restriction in the excluded field is invalid regardless - // of information appearing in the permitted - // - // +optional - Excluded *NameConstraintItem `json:"excluded,omitempty"` -} - -type NameConstraintItem struct { - // DNSDomains is a list of DNS domains that are permitted or excluded. - // - // +optional - DNSDomains []string `json:"dnsDomains,omitempty"` - // IPRanges is a list of IP Ranges that are permitted or excluded. - // This should be a valid CIDR notation. - // - // +optional - IPRanges []string `json:"ipRanges,omitempty"` - // EmailAddresses is a list of Email Addresses that are permitted or excluded. - // - // +optional - EmailAddresses []string `json:"emailAddresses,omitempty"` - // URIDomains is a list of URI domains that are permitted or excluded. - // - // +optional - URIDomains []string `json:"uriDomains,omitempty"` -} diff --git a/internal/apis/certmanager/v1alpha2/types_certificaterequest.go b/internal/apis/certmanager/v1alpha2/types_certificaterequest.go deleted file mode 100644 index d6618255251..00000000000 --- a/internal/apis/certmanager/v1alpha2/types_certificaterequest.go +++ /dev/null @@ -1,209 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" -) - -const ( - // Pending indicates that a CertificateRequest is still in progress. - CertificateRequestReasonPending = "Pending" - - // Failed indicates that a CertificateRequest has failed, either due to - // timing out or some other critical failure. - CertificateRequestReasonFailed = "Failed" - - // Issued indicates that a CertificateRequest has been completed, and that - // the `status.certificate` field is set. - CertificateRequestReasonIssued = "Issued" - - // Denied is a Ready condition reason that indicates that a - // CertificateRequest has been denied, and the CertificateRequest will never - // be issued. - CertificateRequestReasonDenied = "Denied" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// A CertificateRequest is used to request a signed certificate from one of the -// configured issuers. -// -// All fields within the CertificateRequest's `spec` are immutable after creation. -// A CertificateRequest will either succeed or fail, as denoted by its `status.state` -// field. -// -// A CertificateRequest is a one-shot resource, meaning it represents a single -// point in time request for a certificate and cannot be re-used. -// +k8s:openapi-gen=true -type CertificateRequest struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Desired state of the CertificateRequest resource. - Spec CertificateRequestSpec `json:"spec,omitempty"` - - // Status of the CertificateRequest. This is set and managed automatically. - Status CertificateRequestStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CertificateRequestList is a list of Certificates -type CertificateRequestList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []CertificateRequest `json:"items"` -} - -// CertificateRequestSpec defines the desired state of CertificateRequest -type CertificateRequestSpec struct { - // The requested 'duration' (i.e. lifetime) of the Certificate. - // This option may be ignored/overridden by some issuer types. - // +optional - Duration *metav1.Duration `json:"duration,omitempty"` - - // IssuerRef is a reference to the issuer for this CertificateRequest. If - // the `kind` field is not set, or set to `Issuer`, an Issuer resource with - // the given name in the same namespace as the CertificateRequest will be - // used. If the `kind` field is set to `ClusterIssuer`, a ClusterIssuer with - // the provided name will be used. The `name` field in this stanza is - // required at all times. The group field refers to the API group of the - // issuer which defaults to `cert-manager.io` if empty. - IssuerRef cmmeta.ObjectReference `json:"issuerRef"` - - // The PEM-encoded x509 certificate signing request to be submitted to the - // CA for signing. - CSRPEM []byte `json:"csr"` - - // IsCA will request to mark the certificate as valid for certificate signing - // when submitting to the issuer. - // This will automatically add the `cert sign` usage to the list of `usages`. - // +optional - IsCA bool `json:"isCA,omitempty"` - - // Usages is the set of x509 usages that are requested for the certificate. - // Defaults to `digital signature` and `key encipherment` if not specified. - // +optional - Usages []KeyUsage `json:"usages,omitempty"` - - // Username contains the name of the user that created the CertificateRequest. - // Populated by the cert-manager webhook on creation and immutable. - // +optional - Username string `json:"username,omitempty"` - // UID contains the uid of the user that created the CertificateRequest. - // Populated by the cert-manager webhook on creation and immutable. - // +optional - UID string `json:"uid,omitempty"` - // Groups contains group membership of the user that created the CertificateRequest. - // Populated by the cert-manager webhook on creation and immutable. - // +listType=atomic - // +optional - Groups []string `json:"groups,omitempty"` - // Extra contains extra attributes of the user that created the CertificateRequest. - // Populated by the cert-manager webhook on creation and immutable. - // +optional - Extra map[string][]string `json:"extra,omitempty"` -} - -// CertificateRequestStatus defines the observed state of CertificateRequest and -// resulting signed certificate. -type CertificateRequestStatus struct { - // List of status conditions to indicate the status of a CertificateRequest. - // Known condition types are `Ready` and `InvalidRequest`. - // +listType=map - // +listMapKey=type - // +optional - Conditions []CertificateRequestCondition `json:"conditions,omitempty"` - - // The PEM encoded x509 certificate resulting from the certificate - // signing request. - // If not set, the CertificateRequest has either not been completed or has - // failed. More information on failure can be found by checking the - // `conditions` field. - // +optional - Certificate []byte `json:"certificate,omitempty"` - - // The PEM encoded x509 certificate of the signer, also known as the CA - // (Certificate Authority). - // This is set on a best-effort basis by different issuers. - // If not set, the CA is assumed to be unknown/not available. - // +optional - CA []byte `json:"ca,omitempty"` - - // FailureTime stores the time that this CertificateRequest failed. This is - // used to influence garbage collection and back-off. - // +optional - FailureTime *metav1.Time `json:"failureTime,omitempty"` -} - -// CertificateRequestCondition contains condition information for a CertificateRequest. -type CertificateRequestCondition struct { - // Type of the condition, known values are (`Ready`, - // `InvalidRequest`, `Approved`, `Denied`). - Type CertificateRequestConditionType `json:"type"` - - // Status of the condition, one of (`True`, `False`, `Unknown`). - Status cmmeta.ConditionStatus `json:"status"` - - // LastTransitionTime is the timestamp corresponding to the last status - // change of this condition. - // +optional - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - - // Reason is a brief machine readable explanation for the condition's last - // transition. - // +optional - Reason string `json:"reason,omitempty"` - - // Message is a human readable description of the details of the last - // transition, complementing reason. - // +optional - Message string `json:"message,omitempty"` -} - -// CertificateRequestConditionType represents an Certificate condition value. -type CertificateRequestConditionType string - -const ( - // CertificateRequestConditionReady indicates that a certificate is ready for use. - // This is defined as: - // - The target certificate exists in CertificateRequest.Status - CertificateRequestConditionReady CertificateRequestConditionType = "Ready" - - // CertificateRequestConditionInvalidRequest indicates that a certificate - // signer has refused to sign the request due to at least one of the input - // parameters being invalid. Additional information about why the request - // was rejected can be found in the `reason` and `message` fields. - CertificateRequestConditionInvalidRequest CertificateRequestConditionType = "InvalidRequest" - - // CertificateRequestConditionApproved indicates that a certificate request - // is approved and ready for signing. Condition must never have a status of - // `False`, and cannot be modified once set. Cannot be set alongside - // `Denied`. - CertificateRequestConditionApproved CertificateRequestConditionType = "Approved" - - // CertificateRequestConditionDenied indicates that a certificate request is - // denied, and must never be signed. Condition must never have a status of - // `False`, and cannot be modified once set. Cannot be set alongside - // `Approved`. - CertificateRequestConditionDenied CertificateRequestConditionType = "Denied" -) diff --git a/internal/apis/certmanager/v1alpha2/types_issuer.go b/internal/apis/certmanager/v1alpha2/types_issuer.go deleted file mode 100644 index c0db3ff02ea..00000000000 --- a/internal/apis/certmanager/v1alpha2/types_issuer.go +++ /dev/null @@ -1,392 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - cmacme "github.com/cert-manager/cert-manager/internal/apis/acme/v1alpha2" - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// A ClusterIssuer represents a certificate issuing authority which can be -// referenced as part of `issuerRef` fields. -// It is similar to an Issuer, however it is cluster-scoped and therefore can -// be referenced by resources that exist in *any* namespace, not just the same -// namespace as the referent. -type ClusterIssuer struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Desired state of the ClusterIssuer resource. - Spec IssuerSpec `json:"spec,omitempty"` - - // Status of the ClusterIssuer. This is set and managed automatically. - Status IssuerStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterIssuerList is a list of Issuers -type ClusterIssuerList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []ClusterIssuer `json:"items"` -} - -// +genclient -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// An Issuer represents a certificate issuing authority which can be -// referenced as part of `issuerRef` fields. -// It is scoped to a single namespace and can therefore only be referenced by -// resources within the same namespace. -type Issuer struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Desired state of the Issuer resource. - Spec IssuerSpec `json:"spec,omitempty"` - - // Status of the Issuer. This is set and managed automatically. - Status IssuerStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// IssuerList is a list of Issuers -type IssuerList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []Issuer `json:"items"` -} - -// IssuerSpec is the specification of an Issuer. This includes any -// configuration required for the issuer. -type IssuerSpec struct { - IssuerConfig `json:",inline"` -} - -// The configuration for the issuer. -// Only one of these can be set. -type IssuerConfig struct { - // ACME configures this issuer to communicate with a RFC8555 (ACME) server - // to obtain signed x509 certificates. - // +optional - ACME *cmacme.ACMEIssuer `json:"acme,omitempty"` - - // CA configures this issuer to sign certificates using a signing CA keypair - // stored in a Secret resource. - // This is used to build internal PKIs that are managed by cert-manager. - // +optional - CA *CAIssuer `json:"ca,omitempty"` - - // Vault configures this issuer to sign certificates using a HashiCorp Vault - // PKI backend. - // +optional - Vault *VaultIssuer `json:"vault,omitempty"` - - // SelfSigned configures this issuer to 'self sign' certificates using the - // private key used to create the CertificateRequest object. - // +optional - SelfSigned *SelfSignedIssuer `json:"selfSigned,omitempty"` - - // Venafi configures this issuer to sign certificates using a Venafi TPP - // or Venafi Cloud policy zone. - // +optional - Venafi *VenafiIssuer `json:"venafi,omitempty"` -} - -// Configures an issuer to sign certificates using a Venafi TPP -// or Cloud policy zone. -type VenafiIssuer struct { - // Zone is the Venafi Policy Zone to use for this issuer. - // All requests made to the Venafi platform will be restricted by the named - // zone policy. - // This field is required. - Zone string `json:"zone"` - - // TPP specifies Trust Protection Platform configuration settings. - // Only one of TPP or Cloud may be specified. - // +optional - TPP *VenafiTPP `json:"tpp,omitempty"` - - // Cloud specifies the Venafi cloud configuration settings. - // Only one of TPP or Cloud may be specified. - // +optional - Cloud *VenafiCloud `json:"cloud,omitempty"` -} - -// VenafiTPP defines connection configuration details for a Venafi TPP instance -type VenafiTPP struct { - // URL is the base URL for the vedsdk endpoint of the Venafi TPP instance, - // for example: "https://tpp.example.com/vedsdk". - URL string `json:"url"` - - // CredentialsRef is a reference to a Secret containing the username and - // password for the TPP server. - // The secret must contain two keys, 'username' and 'password'. - CredentialsRef cmmeta.LocalObjectReference `json:"credentialsRef"` - - // Base64-encoded bundle of PEM CAs which will be used to validate the certificate - // chain presented by the TPP server. Only used if using HTTPS; ignored for HTTP. - // If undefined, the certificate bundle in the cert-manager controller container - // is used to validate the chain. - // +optional - CABundle []byte `json:"caBundle,omitempty"` -} - -// VenafiCloud defines connection configuration details for Venafi Cloud -type VenafiCloud struct { - // URL is the base URL for Venafi Cloud. - // Defaults to "https://api.venafi.cloud/v1". - // +optional - URL string `json:"url,omitempty"` - - // APITokenSecretRef is a secret key selector for the Venafi Cloud API token. - APITokenSecretRef cmmeta.SecretKeySelector `json:"apiTokenSecretRef"` -} - -// Configures an issuer to 'self sign' certificates using the -// private key used to create the CertificateRequest object. -type SelfSignedIssuer struct { - // The CRL distribution points is an X.509 v3 certificate extension which identifies - // the location of the CRL from which the revocation of this certificate can be checked. - // If not set certificate will be issued without CDP. Values are strings. - // +optional - CRLDistributionPoints []string `json:"crlDistributionPoints,omitempty"` -} - -// Configures an issuer to sign certificates using a HashiCorp Vault -// PKI backend. -type VaultIssuer struct { - // Auth configures how cert-manager authenticates with the Vault server. - Auth VaultAuth `json:"auth"` - - // Server is the connection address for the Vault server, e.g: "https://vault.example.com:8200". - Server string `json:"server"` - - // Path is the mount path of the Vault PKI backend's `sign` endpoint, e.g: - // "my_pki_mount/sign/my-role-name". - Path string `json:"path"` - - // Name of the vault namespace. Namespaces is a set of features within Vault Enterprise that allows Vault environments to support Secure Multi-tenancy. e.g: "ns1" - // More about namespaces can be found here https://www.vaultproject.io/docs/enterprise/namespaces - // +optional - Namespace string `json:"namespace,omitempty"` - - // Base64-encoded bundle of PEM CAs which will be used to validate the certificate - // chain presented by Vault. Only used if using HTTPS to connect to Vault and - // ignored for HTTP connections. - // Mutually exclusive with CABundleSecretRef. - // If neither CABundle nor CABundleSecretRef are defined, the certificate bundle in - // the cert-manager controller container is used to validate the TLS connection. - // +optional - CABundle []byte `json:"caBundle,omitempty"` - - // Reference to a Secret containing a bundle of PEM-encoded CAs to use when - // verifying the certificate chain presented by Vault when using HTTPS. - // Mutually exclusive with CABundle. - // If neither CABundle nor CABundleSecretRef are defined, the certificate bundle in - // the cert-manager controller container is used to validate the TLS connection. - // If no key for the Secret is specified, cert-manager will default to 'ca.crt'. - // +optional - CABundleSecretRef *cmmeta.SecretKeySelector `json:"caBundleSecretRef,omitempty"` - - // Reference to a Secret containing a PEM-encoded Client Certificate to use when the - // Vault server requires mTLS. - // +optional - ClientCertSecretRef *cmmeta.SecretKeySelector `json:"clientCertSecretRef,omitempty"` - - // Reference to a Secret containing a PEM-encoded Client Private Key to use when the - // Vault server requires mTLS. - // +optional - ClientKeySecretRef *cmmeta.SecretKeySelector `json:"clientKeySecretRef,omitempty"` -} - -// Configuration used to authenticate with a Vault server. -// Only one of `tokenSecretRef`, `appRole` or `kubernetes` may be specified. -type VaultAuth struct { - // TokenSecretRef authenticates with Vault by presenting a token. - // +optional - TokenSecretRef *cmmeta.SecretKeySelector `json:"tokenSecretRef,omitempty"` - - // AppRole authenticates with Vault using the App Role auth mechanism, - // with the role and secret stored in a Kubernetes Secret resource. - // +optional - AppRole *VaultAppRole `json:"appRole,omitempty"` - - // Kubernetes authenticates with Vault by passing the ServiceAccount - // token stored in the named Secret resource to the Vault server. - // +optional - Kubernetes *VaultKubernetesAuth `json:"kubernetes,omitempty"` -} - -// VaultAppRole authenticates with Vault using the App Role auth mechanism, -// with the role and secret stored in a Kubernetes Secret resource. -type VaultAppRole struct { - // Path where the App Role authentication backend is mounted in Vault, e.g: - // "approle" - Path string `json:"path"` - - // RoleID configured in the App Role authentication backend when setting - // up the authentication backend in Vault. - RoleId string `json:"roleId"` - - // Reference to a key in a Secret that contains the App Role secret used - // to authenticate with Vault. - // The `key` field must be specified and denotes which entry within the Secret - // resource is used as the app role secret. - SecretRef cmmeta.SecretKeySelector `json:"secretRef"` -} - -// Authenticate against Vault using a Kubernetes ServiceAccount token stored in -// a Secret. -type VaultKubernetesAuth struct { - // The Vault mountPath here is the mount path to use when authenticating with - // Vault. For example, setting a value to `/v1/auth/foo`, will use the path - // `/v1/auth/foo/login` to authenticate with Vault. If unspecified, the - // default value "/v1/auth/kubernetes" will be used. - // +optional - Path string `json:"mountPath,omitempty"` - - // The required Secret field containing a Kubernetes ServiceAccount JWT used - // for authenticating with Vault. Use of 'ambient credentials' is not - // supported. - // +optional - SecretRef cmmeta.SecretKeySelector `json:"secretRef,omitempty"` - - // A reference to a service account that will be used to request a bound - // token (also known as "projected token"). Compared to using "secretRef", - // using this field means that you don't rely on statically bound tokens. To - // use this field, you must configure an RBAC rule to let cert-manager - // request a token. - // +optional - ServiceAccountRef *ServiceAccountRef `json:"serviceAccountRef,omitempty"` - - // A required field containing the Vault Role to assume. A Role binds a - // Kubernetes ServiceAccount with a set of Vault policies. - Role string `json:"role"` -} - -// ServiceAccountRef is a service account used by cert-manager to request a -// token. The audience cannot be configured. The audience is generated by -// cert-manager and takes the form `vault://namespace-name/issuer-name` for an -// Issuer and `vault://issuer-name` for a ClusterIssuer. The expiration of the -// token is also set by cert-manager to 10 minutes. -type ServiceAccountRef struct { - // Name of the ServiceAccount used to request a token. - Name string `json:"name"` - - // TokenAudiences is an option list of extra audiences to include in the token passed to Vault. The default token - // consisting of the issuer's namespace and name is always included. - // +optional - TokenAudiences []string `json:"audiences,omitempty"` -} - -type CAIssuer struct { - // SecretName is the name of the secret used to sign Certificates issued - // by this Issuer. - SecretName string `json:"secretName"` - - // The CRL distribution points is an X.509 v3 certificate extension which identifies - // the location of the CRL from which the revocation of this certificate can be checked. - // If not set, certificates will be issued without distribution points set. - // +optional - CRLDistributionPoints []string `json:"crlDistributionPoints,omitempty"` - - // The OCSP server list is an X.509 v3 extension that defines a list of - // URLs of OCSP responders. The OCSP responders can be queried for the - // revocation status of an issued certificate. If not set, the - // certificate will be issued with no OCSP servers set. For example, an - // OCSP server URL could be "http://ocsp.int-x3.letsencrypt.org". - // +optional - OCSPServers []string `json:"ocspServers,omitempty"` - - // IssuingCertificateURLs is a list of URLs which this issuer should embed into certificates - // it creates. See https://www.rfc-editor.org/rfc/rfc5280#section-4.2.2.1 for more details. - // As an example, such a URL might be "http://ca.domain.com/ca.crt". - // +optional - IssuingCertificateURLs []string `json:"issuingCertificateURLs,omitempty"` -} - -// IssuerStatus contains status information about an Issuer -type IssuerStatus struct { - // List of status conditions to indicate the status of a CertificateRequest. - // Known condition types are `Ready`. - // +listType=map - // +listMapKey=type - // +optional - Conditions []IssuerCondition `json:"conditions,omitempty"` - - // ACME specific status options. - // This field should only be set if the Issuer is configured to use an ACME - // server to issue certificates. - // +optional - ACME *cmacme.ACMEIssuerStatus `json:"acme,omitempty"` -} - -// IssuerCondition contains condition information for an Issuer. -type IssuerCondition struct { - // Type of the condition, known values are (`Ready`). - Type IssuerConditionType `json:"type"` - - // Status of the condition, one of (`True`, `False`, `Unknown`). - Status cmmeta.ConditionStatus `json:"status"` - - // LastTransitionTime is the timestamp corresponding to the last status - // change of this condition. - // +optional - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - - // Reason is a brief machine readable explanation for the condition's last - // transition. - // +optional - Reason string `json:"reason,omitempty"` - - // Message is a human readable description of the details of the last - // transition, complementing reason. - // +optional - Message string `json:"message,omitempty"` - - // If set, this represents the .metadata.generation that the condition was - // set based upon. - // For instance, if .metadata.generation is currently 12, but the - // .status.condition[x].observedGeneration is 9, the condition is out of date - // with respect to the current state of the Issuer. - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty"` -} - -// IssuerConditionType represents an Issuer condition value. -type IssuerConditionType string - -const ( - // IssuerConditionReady represents the fact that a given Issuer condition - // is in ready state and able to issue certificates. - // If the `status` of this condition is `False`, CertificateRequest controllers - // should prevent attempts to sign certificates. - IssuerConditionReady IssuerConditionType = "Ready" -) diff --git a/internal/apis/certmanager/v1alpha2/zz_generated.conversion.go b/internal/apis/certmanager/v1alpha2/zz_generated.conversion.go deleted file mode 100644 index b07a368cbab..00000000000 --- a/internal/apis/certmanager/v1alpha2/zz_generated.conversion.go +++ /dev/null @@ -1,1787 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The cert-manager 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 conversion-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - unsafe "unsafe" - - acme "github.com/cert-manager/cert-manager/internal/apis/acme" - acmev1alpha2 "github.com/cert-manager/cert-manager/internal/apis/acme/v1alpha2" - certmanager "github.com/cert-manager/cert-manager/internal/apis/certmanager" - meta "github.com/cert-manager/cert-manager/internal/apis/meta" - apismetav1 "github.com/cert-manager/cert-manager/internal/apis/meta/v1" - metav1 "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*CAIssuer)(nil), (*certmanager.CAIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_CAIssuer_To_certmanager_CAIssuer(a.(*CAIssuer), b.(*certmanager.CAIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CAIssuer)(nil), (*CAIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CAIssuer_To_v1alpha2_CAIssuer(a.(*certmanager.CAIssuer), b.(*CAIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Certificate)(nil), (*certmanager.Certificate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_Certificate_To_certmanager_Certificate(a.(*Certificate), b.(*certmanager.Certificate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.Certificate)(nil), (*Certificate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_Certificate_To_v1alpha2_Certificate(a.(*certmanager.Certificate), b.(*Certificate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateAdditionalOutputFormat)(nil), (*certmanager.CertificateAdditionalOutputFormat)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_CertificateAdditionalOutputFormat_To_certmanager_CertificateAdditionalOutputFormat(a.(*CertificateAdditionalOutputFormat), b.(*certmanager.CertificateAdditionalOutputFormat), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateAdditionalOutputFormat)(nil), (*CertificateAdditionalOutputFormat)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateAdditionalOutputFormat_To_v1alpha2_CertificateAdditionalOutputFormat(a.(*certmanager.CertificateAdditionalOutputFormat), b.(*CertificateAdditionalOutputFormat), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateCondition)(nil), (*certmanager.CertificateCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_CertificateCondition_To_certmanager_CertificateCondition(a.(*CertificateCondition), b.(*certmanager.CertificateCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateCondition)(nil), (*CertificateCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateCondition_To_v1alpha2_CertificateCondition(a.(*certmanager.CertificateCondition), b.(*CertificateCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateKeystores)(nil), (*certmanager.CertificateKeystores)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_CertificateKeystores_To_certmanager_CertificateKeystores(a.(*CertificateKeystores), b.(*certmanager.CertificateKeystores), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateKeystores)(nil), (*CertificateKeystores)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateKeystores_To_v1alpha2_CertificateKeystores(a.(*certmanager.CertificateKeystores), b.(*CertificateKeystores), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateList)(nil), (*certmanager.CertificateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_CertificateList_To_certmanager_CertificateList(a.(*CertificateList), b.(*certmanager.CertificateList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateList)(nil), (*CertificateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateList_To_v1alpha2_CertificateList(a.(*certmanager.CertificateList), b.(*CertificateList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificatePrivateKey)(nil), (*certmanager.CertificatePrivateKey)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_CertificatePrivateKey_To_certmanager_CertificatePrivateKey(a.(*CertificatePrivateKey), b.(*certmanager.CertificatePrivateKey), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateRequest)(nil), (*certmanager.CertificateRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_CertificateRequest_To_certmanager_CertificateRequest(a.(*CertificateRequest), b.(*certmanager.CertificateRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateRequest)(nil), (*CertificateRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateRequest_To_v1alpha2_CertificateRequest(a.(*certmanager.CertificateRequest), b.(*CertificateRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateRequestCondition)(nil), (*certmanager.CertificateRequestCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_CertificateRequestCondition_To_certmanager_CertificateRequestCondition(a.(*CertificateRequestCondition), b.(*certmanager.CertificateRequestCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateRequestCondition)(nil), (*CertificateRequestCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateRequestCondition_To_v1alpha2_CertificateRequestCondition(a.(*certmanager.CertificateRequestCondition), b.(*CertificateRequestCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateRequestList)(nil), (*certmanager.CertificateRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_CertificateRequestList_To_certmanager_CertificateRequestList(a.(*CertificateRequestList), b.(*certmanager.CertificateRequestList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateRequestList)(nil), (*CertificateRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateRequestList_To_v1alpha2_CertificateRequestList(a.(*certmanager.CertificateRequestList), b.(*CertificateRequestList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateRequestStatus)(nil), (*certmanager.CertificateRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_CertificateRequestStatus_To_certmanager_CertificateRequestStatus(a.(*CertificateRequestStatus), b.(*certmanager.CertificateRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateRequestStatus)(nil), (*CertificateRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateRequestStatus_To_v1alpha2_CertificateRequestStatus(a.(*certmanager.CertificateRequestStatus), b.(*CertificateRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateSecretTemplate)(nil), (*certmanager.CertificateSecretTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_CertificateSecretTemplate_To_certmanager_CertificateSecretTemplate(a.(*CertificateSecretTemplate), b.(*certmanager.CertificateSecretTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateSecretTemplate)(nil), (*CertificateSecretTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateSecretTemplate_To_v1alpha2_CertificateSecretTemplate(a.(*certmanager.CertificateSecretTemplate), b.(*CertificateSecretTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateStatus)(nil), (*certmanager.CertificateStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_CertificateStatus_To_certmanager_CertificateStatus(a.(*CertificateStatus), b.(*certmanager.CertificateStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateStatus)(nil), (*CertificateStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateStatus_To_v1alpha2_CertificateStatus(a.(*certmanager.CertificateStatus), b.(*CertificateStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ClusterIssuer)(nil), (*certmanager.ClusterIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ClusterIssuer_To_certmanager_ClusterIssuer(a.(*ClusterIssuer), b.(*certmanager.ClusterIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.ClusterIssuer)(nil), (*ClusterIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_ClusterIssuer_To_v1alpha2_ClusterIssuer(a.(*certmanager.ClusterIssuer), b.(*ClusterIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ClusterIssuerList)(nil), (*certmanager.ClusterIssuerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ClusterIssuerList_To_certmanager_ClusterIssuerList(a.(*ClusterIssuerList), b.(*certmanager.ClusterIssuerList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.ClusterIssuerList)(nil), (*ClusterIssuerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_ClusterIssuerList_To_v1alpha2_ClusterIssuerList(a.(*certmanager.ClusterIssuerList), b.(*ClusterIssuerList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Issuer)(nil), (*certmanager.Issuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_Issuer_To_certmanager_Issuer(a.(*Issuer), b.(*certmanager.Issuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.Issuer)(nil), (*Issuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_Issuer_To_v1alpha2_Issuer(a.(*certmanager.Issuer), b.(*Issuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*IssuerCondition)(nil), (*certmanager.IssuerCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_IssuerCondition_To_certmanager_IssuerCondition(a.(*IssuerCondition), b.(*certmanager.IssuerCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.IssuerCondition)(nil), (*IssuerCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_IssuerCondition_To_v1alpha2_IssuerCondition(a.(*certmanager.IssuerCondition), b.(*IssuerCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*IssuerConfig)(nil), (*certmanager.IssuerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_IssuerConfig_To_certmanager_IssuerConfig(a.(*IssuerConfig), b.(*certmanager.IssuerConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.IssuerConfig)(nil), (*IssuerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_IssuerConfig_To_v1alpha2_IssuerConfig(a.(*certmanager.IssuerConfig), b.(*IssuerConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*IssuerList)(nil), (*certmanager.IssuerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_IssuerList_To_certmanager_IssuerList(a.(*IssuerList), b.(*certmanager.IssuerList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.IssuerList)(nil), (*IssuerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_IssuerList_To_v1alpha2_IssuerList(a.(*certmanager.IssuerList), b.(*IssuerList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*IssuerSpec)(nil), (*certmanager.IssuerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_IssuerSpec_To_certmanager_IssuerSpec(a.(*IssuerSpec), b.(*certmanager.IssuerSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.IssuerSpec)(nil), (*IssuerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_IssuerSpec_To_v1alpha2_IssuerSpec(a.(*certmanager.IssuerSpec), b.(*IssuerSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*IssuerStatus)(nil), (*certmanager.IssuerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_IssuerStatus_To_certmanager_IssuerStatus(a.(*IssuerStatus), b.(*certmanager.IssuerStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.IssuerStatus)(nil), (*IssuerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_IssuerStatus_To_v1alpha2_IssuerStatus(a.(*certmanager.IssuerStatus), b.(*IssuerStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*JKSKeystore)(nil), (*certmanager.JKSKeystore)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_JKSKeystore_To_certmanager_JKSKeystore(a.(*JKSKeystore), b.(*certmanager.JKSKeystore), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.JKSKeystore)(nil), (*JKSKeystore)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_JKSKeystore_To_v1alpha2_JKSKeystore(a.(*certmanager.JKSKeystore), b.(*JKSKeystore), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NameConstraintItem)(nil), (*certmanager.NameConstraintItem)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NameConstraintItem_To_certmanager_NameConstraintItem(a.(*NameConstraintItem), b.(*certmanager.NameConstraintItem), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.NameConstraintItem)(nil), (*NameConstraintItem)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_NameConstraintItem_To_v1alpha2_NameConstraintItem(a.(*certmanager.NameConstraintItem), b.(*NameConstraintItem), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NameConstraints)(nil), (*certmanager.NameConstraints)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NameConstraints_To_certmanager_NameConstraints(a.(*NameConstraints), b.(*certmanager.NameConstraints), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.NameConstraints)(nil), (*NameConstraints)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_NameConstraints_To_v1alpha2_NameConstraints(a.(*certmanager.NameConstraints), b.(*NameConstraints), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OtherName)(nil), (*certmanager.OtherName)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_OtherName_To_certmanager_OtherName(a.(*OtherName), b.(*certmanager.OtherName), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.OtherName)(nil), (*OtherName)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_OtherName_To_v1alpha2_OtherName(a.(*certmanager.OtherName), b.(*OtherName), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*PKCS12Keystore)(nil), (*certmanager.PKCS12Keystore)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_PKCS12Keystore_To_certmanager_PKCS12Keystore(a.(*PKCS12Keystore), b.(*certmanager.PKCS12Keystore), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.PKCS12Keystore)(nil), (*PKCS12Keystore)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_PKCS12Keystore_To_v1alpha2_PKCS12Keystore(a.(*certmanager.PKCS12Keystore), b.(*PKCS12Keystore), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*SelfSignedIssuer)(nil), (*certmanager.SelfSignedIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_SelfSignedIssuer_To_certmanager_SelfSignedIssuer(a.(*SelfSignedIssuer), b.(*certmanager.SelfSignedIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.SelfSignedIssuer)(nil), (*SelfSignedIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_SelfSignedIssuer_To_v1alpha2_SelfSignedIssuer(a.(*certmanager.SelfSignedIssuer), b.(*SelfSignedIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ServiceAccountRef)(nil), (*certmanager.ServiceAccountRef)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ServiceAccountRef_To_certmanager_ServiceAccountRef(a.(*ServiceAccountRef), b.(*certmanager.ServiceAccountRef), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.ServiceAccountRef)(nil), (*ServiceAccountRef)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_ServiceAccountRef_To_v1alpha2_ServiceAccountRef(a.(*certmanager.ServiceAccountRef), b.(*ServiceAccountRef), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VaultAppRole)(nil), (*certmanager.VaultAppRole)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_VaultAppRole_To_certmanager_VaultAppRole(a.(*VaultAppRole), b.(*certmanager.VaultAppRole), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.VaultAppRole)(nil), (*VaultAppRole)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_VaultAppRole_To_v1alpha2_VaultAppRole(a.(*certmanager.VaultAppRole), b.(*VaultAppRole), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VaultAuth)(nil), (*certmanager.VaultAuth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_VaultAuth_To_certmanager_VaultAuth(a.(*VaultAuth), b.(*certmanager.VaultAuth), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.VaultAuth)(nil), (*VaultAuth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_VaultAuth_To_v1alpha2_VaultAuth(a.(*certmanager.VaultAuth), b.(*VaultAuth), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VaultIssuer)(nil), (*certmanager.VaultIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_VaultIssuer_To_certmanager_VaultIssuer(a.(*VaultIssuer), b.(*certmanager.VaultIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.VaultIssuer)(nil), (*VaultIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_VaultIssuer_To_v1alpha2_VaultIssuer(a.(*certmanager.VaultIssuer), b.(*VaultIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VaultKubernetesAuth)(nil), (*certmanager.VaultKubernetesAuth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_VaultKubernetesAuth_To_certmanager_VaultKubernetesAuth(a.(*VaultKubernetesAuth), b.(*certmanager.VaultKubernetesAuth), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VenafiCloud)(nil), (*certmanager.VenafiCloud)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_VenafiCloud_To_certmanager_VenafiCloud(a.(*VenafiCloud), b.(*certmanager.VenafiCloud), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.VenafiCloud)(nil), (*VenafiCloud)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_VenafiCloud_To_v1alpha2_VenafiCloud(a.(*certmanager.VenafiCloud), b.(*VenafiCloud), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VenafiIssuer)(nil), (*certmanager.VenafiIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_VenafiIssuer_To_certmanager_VenafiIssuer(a.(*VenafiIssuer), b.(*certmanager.VenafiIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.VenafiIssuer)(nil), (*VenafiIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_VenafiIssuer_To_v1alpha2_VenafiIssuer(a.(*certmanager.VenafiIssuer), b.(*VenafiIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VenafiTPP)(nil), (*certmanager.VenafiTPP)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_VenafiTPP_To_certmanager_VenafiTPP(a.(*VenafiTPP), b.(*certmanager.VenafiTPP), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.VenafiTPP)(nil), (*VenafiTPP)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_VenafiTPP_To_v1alpha2_VenafiTPP(a.(*certmanager.VenafiTPP), b.(*VenafiTPP), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*X509Subject)(nil), (*certmanager.X509Subject)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_X509Subject_To_certmanager_X509Subject(a.(*X509Subject), b.(*certmanager.X509Subject), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*certmanager.CertificatePrivateKey)(nil), (*CertificatePrivateKey)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificatePrivateKey_To_v1alpha2_CertificatePrivateKey(a.(*certmanager.CertificatePrivateKey), b.(*CertificatePrivateKey), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*certmanager.CertificateRequestSpec)(nil), (*CertificateRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateRequestSpec_To_v1alpha2_CertificateRequestSpec(a.(*certmanager.CertificateRequestSpec), b.(*CertificateRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*certmanager.CertificateSpec)(nil), (*CertificateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateSpec_To_v1alpha2_CertificateSpec(a.(*certmanager.CertificateSpec), b.(*CertificateSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*certmanager.VaultKubernetesAuth)(nil), (*VaultKubernetesAuth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_VaultKubernetesAuth_To_v1alpha2_VaultKubernetesAuth(a.(*certmanager.VaultKubernetesAuth), b.(*VaultKubernetesAuth), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*certmanager.X509Subject)(nil), (*X509Subject)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_X509Subject_To_v1alpha2_X509Subject(a.(*certmanager.X509Subject), b.(*X509Subject), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*CertificateRequestSpec)(nil), (*certmanager.CertificateRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_CertificateRequestSpec_To_certmanager_CertificateRequestSpec(a.(*CertificateRequestSpec), b.(*certmanager.CertificateRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*CertificateSpec)(nil), (*certmanager.CertificateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_CertificateSpec_To_certmanager_CertificateSpec(a.(*CertificateSpec), b.(*certmanager.CertificateSpec), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha2_CAIssuer_To_certmanager_CAIssuer(in *CAIssuer, out *certmanager.CAIssuer, s conversion.Scope) error { - out.SecretName = in.SecretName - out.CRLDistributionPoints = *(*[]string)(unsafe.Pointer(&in.CRLDistributionPoints)) - out.OCSPServers = *(*[]string)(unsafe.Pointer(&in.OCSPServers)) - out.IssuingCertificateURLs = *(*[]string)(unsafe.Pointer(&in.IssuingCertificateURLs)) - return nil -} - -// Convert_v1alpha2_CAIssuer_To_certmanager_CAIssuer is an autogenerated conversion function. -func Convert_v1alpha2_CAIssuer_To_certmanager_CAIssuer(in *CAIssuer, out *certmanager.CAIssuer, s conversion.Scope) error { - return autoConvert_v1alpha2_CAIssuer_To_certmanager_CAIssuer(in, out, s) -} - -func autoConvert_certmanager_CAIssuer_To_v1alpha2_CAIssuer(in *certmanager.CAIssuer, out *CAIssuer, s conversion.Scope) error { - out.SecretName = in.SecretName - out.CRLDistributionPoints = *(*[]string)(unsafe.Pointer(&in.CRLDistributionPoints)) - out.OCSPServers = *(*[]string)(unsafe.Pointer(&in.OCSPServers)) - out.IssuingCertificateURLs = *(*[]string)(unsafe.Pointer(&in.IssuingCertificateURLs)) - return nil -} - -// Convert_certmanager_CAIssuer_To_v1alpha2_CAIssuer is an autogenerated conversion function. -func Convert_certmanager_CAIssuer_To_v1alpha2_CAIssuer(in *certmanager.CAIssuer, out *CAIssuer, s conversion.Scope) error { - return autoConvert_certmanager_CAIssuer_To_v1alpha2_CAIssuer(in, out, s) -} - -func autoConvert_v1alpha2_Certificate_To_certmanager_Certificate(in *Certificate, out *certmanager.Certificate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_CertificateSpec_To_certmanager_CertificateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha2_CertificateStatus_To_certmanager_CertificateStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_Certificate_To_certmanager_Certificate is an autogenerated conversion function. -func Convert_v1alpha2_Certificate_To_certmanager_Certificate(in *Certificate, out *certmanager.Certificate, s conversion.Scope) error { - return autoConvert_v1alpha2_Certificate_To_certmanager_Certificate(in, out, s) -} - -func autoConvert_certmanager_Certificate_To_v1alpha2_Certificate(in *certmanager.Certificate, out *Certificate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_certmanager_CertificateSpec_To_v1alpha2_CertificateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_certmanager_CertificateStatus_To_v1alpha2_CertificateStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_Certificate_To_v1alpha2_Certificate is an autogenerated conversion function. -func Convert_certmanager_Certificate_To_v1alpha2_Certificate(in *certmanager.Certificate, out *Certificate, s conversion.Scope) error { - return autoConvert_certmanager_Certificate_To_v1alpha2_Certificate(in, out, s) -} - -func autoConvert_v1alpha2_CertificateAdditionalOutputFormat_To_certmanager_CertificateAdditionalOutputFormat(in *CertificateAdditionalOutputFormat, out *certmanager.CertificateAdditionalOutputFormat, s conversion.Scope) error { - out.Type = certmanager.CertificateOutputFormatType(in.Type) - return nil -} - -// Convert_v1alpha2_CertificateAdditionalOutputFormat_To_certmanager_CertificateAdditionalOutputFormat is an autogenerated conversion function. -func Convert_v1alpha2_CertificateAdditionalOutputFormat_To_certmanager_CertificateAdditionalOutputFormat(in *CertificateAdditionalOutputFormat, out *certmanager.CertificateAdditionalOutputFormat, s conversion.Scope) error { - return autoConvert_v1alpha2_CertificateAdditionalOutputFormat_To_certmanager_CertificateAdditionalOutputFormat(in, out, s) -} - -func autoConvert_certmanager_CertificateAdditionalOutputFormat_To_v1alpha2_CertificateAdditionalOutputFormat(in *certmanager.CertificateAdditionalOutputFormat, out *CertificateAdditionalOutputFormat, s conversion.Scope) error { - out.Type = CertificateOutputFormatType(in.Type) - return nil -} - -// Convert_certmanager_CertificateAdditionalOutputFormat_To_v1alpha2_CertificateAdditionalOutputFormat is an autogenerated conversion function. -func Convert_certmanager_CertificateAdditionalOutputFormat_To_v1alpha2_CertificateAdditionalOutputFormat(in *certmanager.CertificateAdditionalOutputFormat, out *CertificateAdditionalOutputFormat, s conversion.Scope) error { - return autoConvert_certmanager_CertificateAdditionalOutputFormat_To_v1alpha2_CertificateAdditionalOutputFormat(in, out, s) -} - -func autoConvert_v1alpha2_CertificateCondition_To_certmanager_CertificateCondition(in *CertificateCondition, out *certmanager.CertificateCondition, s conversion.Scope) error { - out.Type = certmanager.CertificateConditionType(in.Type) - out.Status = meta.ConditionStatus(in.Status) - out.LastTransitionTime = (*v1.Time)(unsafe.Pointer(in.LastTransitionTime)) - out.Reason = in.Reason - out.Message = in.Message - out.ObservedGeneration = in.ObservedGeneration - return nil -} - -// Convert_v1alpha2_CertificateCondition_To_certmanager_CertificateCondition is an autogenerated conversion function. -func Convert_v1alpha2_CertificateCondition_To_certmanager_CertificateCondition(in *CertificateCondition, out *certmanager.CertificateCondition, s conversion.Scope) error { - return autoConvert_v1alpha2_CertificateCondition_To_certmanager_CertificateCondition(in, out, s) -} - -func autoConvert_certmanager_CertificateCondition_To_v1alpha2_CertificateCondition(in *certmanager.CertificateCondition, out *CertificateCondition, s conversion.Scope) error { - out.Type = CertificateConditionType(in.Type) - out.Status = metav1.ConditionStatus(in.Status) - out.LastTransitionTime = (*v1.Time)(unsafe.Pointer(in.LastTransitionTime)) - out.Reason = in.Reason - out.Message = in.Message - out.ObservedGeneration = in.ObservedGeneration - return nil -} - -// Convert_certmanager_CertificateCondition_To_v1alpha2_CertificateCondition is an autogenerated conversion function. -func Convert_certmanager_CertificateCondition_To_v1alpha2_CertificateCondition(in *certmanager.CertificateCondition, out *CertificateCondition, s conversion.Scope) error { - return autoConvert_certmanager_CertificateCondition_To_v1alpha2_CertificateCondition(in, out, s) -} - -func autoConvert_v1alpha2_CertificateKeystores_To_certmanager_CertificateKeystores(in *CertificateKeystores, out *certmanager.CertificateKeystores, s conversion.Scope) error { - if in.JKS != nil { - in, out := &in.JKS, &out.JKS - *out = new(certmanager.JKSKeystore) - if err := Convert_v1alpha2_JKSKeystore_To_certmanager_JKSKeystore(*in, *out, s); err != nil { - return err - } - } else { - out.JKS = nil - } - if in.PKCS12 != nil { - in, out := &in.PKCS12, &out.PKCS12 - *out = new(certmanager.PKCS12Keystore) - if err := Convert_v1alpha2_PKCS12Keystore_To_certmanager_PKCS12Keystore(*in, *out, s); err != nil { - return err - } - } else { - out.PKCS12 = nil - } - return nil -} - -// Convert_v1alpha2_CertificateKeystores_To_certmanager_CertificateKeystores is an autogenerated conversion function. -func Convert_v1alpha2_CertificateKeystores_To_certmanager_CertificateKeystores(in *CertificateKeystores, out *certmanager.CertificateKeystores, s conversion.Scope) error { - return autoConvert_v1alpha2_CertificateKeystores_To_certmanager_CertificateKeystores(in, out, s) -} - -func autoConvert_certmanager_CertificateKeystores_To_v1alpha2_CertificateKeystores(in *certmanager.CertificateKeystores, out *CertificateKeystores, s conversion.Scope) error { - if in.JKS != nil { - in, out := &in.JKS, &out.JKS - *out = new(JKSKeystore) - if err := Convert_certmanager_JKSKeystore_To_v1alpha2_JKSKeystore(*in, *out, s); err != nil { - return err - } - } else { - out.JKS = nil - } - if in.PKCS12 != nil { - in, out := &in.PKCS12, &out.PKCS12 - *out = new(PKCS12Keystore) - if err := Convert_certmanager_PKCS12Keystore_To_v1alpha2_PKCS12Keystore(*in, *out, s); err != nil { - return err - } - } else { - out.PKCS12 = nil - } - return nil -} - -// Convert_certmanager_CertificateKeystores_To_v1alpha2_CertificateKeystores is an autogenerated conversion function. -func Convert_certmanager_CertificateKeystores_To_v1alpha2_CertificateKeystores(in *certmanager.CertificateKeystores, out *CertificateKeystores, s conversion.Scope) error { - return autoConvert_certmanager_CertificateKeystores_To_v1alpha2_CertificateKeystores(in, out, s) -} - -func autoConvert_v1alpha2_CertificateList_To_certmanager_CertificateList(in *CertificateList, out *certmanager.CertificateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]certmanager.Certificate, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_Certificate_To_certmanager_Certificate(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha2_CertificateList_To_certmanager_CertificateList is an autogenerated conversion function. -func Convert_v1alpha2_CertificateList_To_certmanager_CertificateList(in *CertificateList, out *certmanager.CertificateList, s conversion.Scope) error { - return autoConvert_v1alpha2_CertificateList_To_certmanager_CertificateList(in, out, s) -} - -func autoConvert_certmanager_CertificateList_To_v1alpha2_CertificateList(in *certmanager.CertificateList, out *CertificateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Certificate, len(*in)) - for i := range *in { - if err := Convert_certmanager_Certificate_To_v1alpha2_Certificate(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_certmanager_CertificateList_To_v1alpha2_CertificateList is an autogenerated conversion function. -func Convert_certmanager_CertificateList_To_v1alpha2_CertificateList(in *certmanager.CertificateList, out *CertificateList, s conversion.Scope) error { - return autoConvert_certmanager_CertificateList_To_v1alpha2_CertificateList(in, out, s) -} - -func autoConvert_v1alpha2_CertificatePrivateKey_To_certmanager_CertificatePrivateKey(in *CertificatePrivateKey, out *certmanager.CertificatePrivateKey, s conversion.Scope) error { - out.RotationPolicy = certmanager.PrivateKeyRotationPolicy(in.RotationPolicy) - return nil -} - -// Convert_v1alpha2_CertificatePrivateKey_To_certmanager_CertificatePrivateKey is an autogenerated conversion function. -func Convert_v1alpha2_CertificatePrivateKey_To_certmanager_CertificatePrivateKey(in *CertificatePrivateKey, out *certmanager.CertificatePrivateKey, s conversion.Scope) error { - return autoConvert_v1alpha2_CertificatePrivateKey_To_certmanager_CertificatePrivateKey(in, out, s) -} - -func autoConvert_certmanager_CertificatePrivateKey_To_v1alpha2_CertificatePrivateKey(in *certmanager.CertificatePrivateKey, out *CertificatePrivateKey, s conversion.Scope) error { - out.RotationPolicy = PrivateKeyRotationPolicy(in.RotationPolicy) - // WARNING: in.Encoding requires manual conversion: does not exist in peer-type - // WARNING: in.Algorithm requires manual conversion: does not exist in peer-type - // WARNING: in.Size requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha2_CertificateRequest_To_certmanager_CertificateRequest(in *CertificateRequest, out *certmanager.CertificateRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_CertificateRequestSpec_To_certmanager_CertificateRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha2_CertificateRequestStatus_To_certmanager_CertificateRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_CertificateRequest_To_certmanager_CertificateRequest is an autogenerated conversion function. -func Convert_v1alpha2_CertificateRequest_To_certmanager_CertificateRequest(in *CertificateRequest, out *certmanager.CertificateRequest, s conversion.Scope) error { - return autoConvert_v1alpha2_CertificateRequest_To_certmanager_CertificateRequest(in, out, s) -} - -func autoConvert_certmanager_CertificateRequest_To_v1alpha2_CertificateRequest(in *certmanager.CertificateRequest, out *CertificateRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_certmanager_CertificateRequestSpec_To_v1alpha2_CertificateRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_certmanager_CertificateRequestStatus_To_v1alpha2_CertificateRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_CertificateRequest_To_v1alpha2_CertificateRequest is an autogenerated conversion function. -func Convert_certmanager_CertificateRequest_To_v1alpha2_CertificateRequest(in *certmanager.CertificateRequest, out *CertificateRequest, s conversion.Scope) error { - return autoConvert_certmanager_CertificateRequest_To_v1alpha2_CertificateRequest(in, out, s) -} - -func autoConvert_v1alpha2_CertificateRequestCondition_To_certmanager_CertificateRequestCondition(in *CertificateRequestCondition, out *certmanager.CertificateRequestCondition, s conversion.Scope) error { - out.Type = certmanager.CertificateRequestConditionType(in.Type) - out.Status = meta.ConditionStatus(in.Status) - out.LastTransitionTime = (*v1.Time)(unsafe.Pointer(in.LastTransitionTime)) - out.Reason = in.Reason - out.Message = in.Message - return nil -} - -// Convert_v1alpha2_CertificateRequestCondition_To_certmanager_CertificateRequestCondition is an autogenerated conversion function. -func Convert_v1alpha2_CertificateRequestCondition_To_certmanager_CertificateRequestCondition(in *CertificateRequestCondition, out *certmanager.CertificateRequestCondition, s conversion.Scope) error { - return autoConvert_v1alpha2_CertificateRequestCondition_To_certmanager_CertificateRequestCondition(in, out, s) -} - -func autoConvert_certmanager_CertificateRequestCondition_To_v1alpha2_CertificateRequestCondition(in *certmanager.CertificateRequestCondition, out *CertificateRequestCondition, s conversion.Scope) error { - out.Type = CertificateRequestConditionType(in.Type) - out.Status = metav1.ConditionStatus(in.Status) - out.LastTransitionTime = (*v1.Time)(unsafe.Pointer(in.LastTransitionTime)) - out.Reason = in.Reason - out.Message = in.Message - return nil -} - -// Convert_certmanager_CertificateRequestCondition_To_v1alpha2_CertificateRequestCondition is an autogenerated conversion function. -func Convert_certmanager_CertificateRequestCondition_To_v1alpha2_CertificateRequestCondition(in *certmanager.CertificateRequestCondition, out *CertificateRequestCondition, s conversion.Scope) error { - return autoConvert_certmanager_CertificateRequestCondition_To_v1alpha2_CertificateRequestCondition(in, out, s) -} - -func autoConvert_v1alpha2_CertificateRequestList_To_certmanager_CertificateRequestList(in *CertificateRequestList, out *certmanager.CertificateRequestList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]certmanager.CertificateRequest, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_CertificateRequest_To_certmanager_CertificateRequest(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha2_CertificateRequestList_To_certmanager_CertificateRequestList is an autogenerated conversion function. -func Convert_v1alpha2_CertificateRequestList_To_certmanager_CertificateRequestList(in *CertificateRequestList, out *certmanager.CertificateRequestList, s conversion.Scope) error { - return autoConvert_v1alpha2_CertificateRequestList_To_certmanager_CertificateRequestList(in, out, s) -} - -func autoConvert_certmanager_CertificateRequestList_To_v1alpha2_CertificateRequestList(in *certmanager.CertificateRequestList, out *CertificateRequestList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CertificateRequest, len(*in)) - for i := range *in { - if err := Convert_certmanager_CertificateRequest_To_v1alpha2_CertificateRequest(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_certmanager_CertificateRequestList_To_v1alpha2_CertificateRequestList is an autogenerated conversion function. -func Convert_certmanager_CertificateRequestList_To_v1alpha2_CertificateRequestList(in *certmanager.CertificateRequestList, out *CertificateRequestList, s conversion.Scope) error { - return autoConvert_certmanager_CertificateRequestList_To_v1alpha2_CertificateRequestList(in, out, s) -} - -func autoConvert_v1alpha2_CertificateRequestSpec_To_certmanager_CertificateRequestSpec(in *CertificateRequestSpec, out *certmanager.CertificateRequestSpec, s conversion.Scope) error { - out.Duration = (*v1.Duration)(unsafe.Pointer(in.Duration)) - if err := apismetav1.Convert_v1_ObjectReference_To_meta_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - // WARNING: in.CSRPEM requires manual conversion: does not exist in peer-type - out.IsCA = in.IsCA - out.Usages = *(*[]certmanager.KeyUsage)(unsafe.Pointer(&in.Usages)) - out.Username = in.Username - out.UID = in.UID - out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) - out.Extra = *(*map[string][]string)(unsafe.Pointer(&in.Extra)) - return nil -} - -func autoConvert_certmanager_CertificateRequestSpec_To_v1alpha2_CertificateRequestSpec(in *certmanager.CertificateRequestSpec, out *CertificateRequestSpec, s conversion.Scope) error { - out.Duration = (*v1.Duration)(unsafe.Pointer(in.Duration)) - if err := apismetav1.Convert_meta_ObjectReference_To_v1_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - // WARNING: in.Request requires manual conversion: does not exist in peer-type - out.IsCA = in.IsCA - out.Usages = *(*[]KeyUsage)(unsafe.Pointer(&in.Usages)) - out.Username = in.Username - out.UID = in.UID - out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) - out.Extra = *(*map[string][]string)(unsafe.Pointer(&in.Extra)) - return nil -} - -func autoConvert_v1alpha2_CertificateRequestStatus_To_certmanager_CertificateRequestStatus(in *CertificateRequestStatus, out *certmanager.CertificateRequestStatus, s conversion.Scope) error { - out.Conditions = *(*[]certmanager.CertificateRequestCondition)(unsafe.Pointer(&in.Conditions)) - out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) - out.CA = *(*[]byte)(unsafe.Pointer(&in.CA)) - out.FailureTime = (*v1.Time)(unsafe.Pointer(in.FailureTime)) - return nil -} - -// Convert_v1alpha2_CertificateRequestStatus_To_certmanager_CertificateRequestStatus is an autogenerated conversion function. -func Convert_v1alpha2_CertificateRequestStatus_To_certmanager_CertificateRequestStatus(in *CertificateRequestStatus, out *certmanager.CertificateRequestStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_CertificateRequestStatus_To_certmanager_CertificateRequestStatus(in, out, s) -} - -func autoConvert_certmanager_CertificateRequestStatus_To_v1alpha2_CertificateRequestStatus(in *certmanager.CertificateRequestStatus, out *CertificateRequestStatus, s conversion.Scope) error { - out.Conditions = *(*[]CertificateRequestCondition)(unsafe.Pointer(&in.Conditions)) - out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) - out.CA = *(*[]byte)(unsafe.Pointer(&in.CA)) - out.FailureTime = (*v1.Time)(unsafe.Pointer(in.FailureTime)) - return nil -} - -// Convert_certmanager_CertificateRequestStatus_To_v1alpha2_CertificateRequestStatus is an autogenerated conversion function. -func Convert_certmanager_CertificateRequestStatus_To_v1alpha2_CertificateRequestStatus(in *certmanager.CertificateRequestStatus, out *CertificateRequestStatus, s conversion.Scope) error { - return autoConvert_certmanager_CertificateRequestStatus_To_v1alpha2_CertificateRequestStatus(in, out, s) -} - -func autoConvert_v1alpha2_CertificateSecretTemplate_To_certmanager_CertificateSecretTemplate(in *CertificateSecretTemplate, out *certmanager.CertificateSecretTemplate, s conversion.Scope) error { - out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - return nil -} - -// Convert_v1alpha2_CertificateSecretTemplate_To_certmanager_CertificateSecretTemplate is an autogenerated conversion function. -func Convert_v1alpha2_CertificateSecretTemplate_To_certmanager_CertificateSecretTemplate(in *CertificateSecretTemplate, out *certmanager.CertificateSecretTemplate, s conversion.Scope) error { - return autoConvert_v1alpha2_CertificateSecretTemplate_To_certmanager_CertificateSecretTemplate(in, out, s) -} - -func autoConvert_certmanager_CertificateSecretTemplate_To_v1alpha2_CertificateSecretTemplate(in *certmanager.CertificateSecretTemplate, out *CertificateSecretTemplate, s conversion.Scope) error { - out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - return nil -} - -// Convert_certmanager_CertificateSecretTemplate_To_v1alpha2_CertificateSecretTemplate is an autogenerated conversion function. -func Convert_certmanager_CertificateSecretTemplate_To_v1alpha2_CertificateSecretTemplate(in *certmanager.CertificateSecretTemplate, out *CertificateSecretTemplate, s conversion.Scope) error { - return autoConvert_certmanager_CertificateSecretTemplate_To_v1alpha2_CertificateSecretTemplate(in, out, s) -} - -func autoConvert_v1alpha2_CertificateSpec_To_certmanager_CertificateSpec(in *CertificateSpec, out *certmanager.CertificateSpec, s conversion.Scope) error { - if in.Subject != nil { - in, out := &in.Subject, &out.Subject - *out = new(certmanager.X509Subject) - if err := Convert_v1alpha2_X509Subject_To_certmanager_X509Subject(*in, *out, s); err != nil { - return err - } - } else { - out.Subject = nil - } - out.LiteralSubject = in.LiteralSubject - out.CommonName = in.CommonName - // WARNING: in.Organization requires manual conversion: does not exist in peer-type - out.Duration = (*v1.Duration)(unsafe.Pointer(in.Duration)) - out.RenewBefore = (*v1.Duration)(unsafe.Pointer(in.RenewBefore)) - out.DNSNames = *(*[]string)(unsafe.Pointer(&in.DNSNames)) - out.IPAddresses = *(*[]string)(unsafe.Pointer(&in.IPAddresses)) - // WARNING: in.URISANs requires manual conversion: does not exist in peer-type - // WARNING: in.EmailSANs requires manual conversion: does not exist in peer-type - out.OtherNames = *(*[]certmanager.OtherName)(unsafe.Pointer(&in.OtherNames)) - out.SecretName = in.SecretName - out.SecretTemplate = (*certmanager.CertificateSecretTemplate)(unsafe.Pointer(in.SecretTemplate)) - if in.Keystores != nil { - in, out := &in.Keystores, &out.Keystores - *out = new(certmanager.CertificateKeystores) - if err := Convert_v1alpha2_CertificateKeystores_To_certmanager_CertificateKeystores(*in, *out, s); err != nil { - return err - } - } else { - out.Keystores = nil - } - if err := apismetav1.Convert_v1_ObjectReference_To_meta_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - out.IsCA = in.IsCA - out.Usages = *(*[]certmanager.KeyUsage)(unsafe.Pointer(&in.Usages)) - // WARNING: in.KeySize requires manual conversion: does not exist in peer-type - // WARNING: in.KeyAlgorithm requires manual conversion: does not exist in peer-type - // WARNING: in.KeyEncoding requires manual conversion: does not exist in peer-type - if in.PrivateKey != nil { - in, out := &in.PrivateKey, &out.PrivateKey - *out = new(certmanager.CertificatePrivateKey) - if err := Convert_v1alpha2_CertificatePrivateKey_To_certmanager_CertificatePrivateKey(*in, *out, s); err != nil { - return err - } - } else { - out.PrivateKey = nil - } - out.EncodeUsagesInRequest = (*bool)(unsafe.Pointer(in.EncodeUsagesInRequest)) - out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit)) - out.AdditionalOutputFormats = *(*[]certmanager.CertificateAdditionalOutputFormat)(unsafe.Pointer(&in.AdditionalOutputFormats)) - out.NameConstraints = (*certmanager.NameConstraints)(unsafe.Pointer(in.NameConstraints)) - return nil -} - -func autoConvert_certmanager_CertificateSpec_To_v1alpha2_CertificateSpec(in *certmanager.CertificateSpec, out *CertificateSpec, s conversion.Scope) error { - if in.Subject != nil { - in, out := &in.Subject, &out.Subject - *out = new(X509Subject) - if err := Convert_certmanager_X509Subject_To_v1alpha2_X509Subject(*in, *out, s); err != nil { - return err - } - } else { - out.Subject = nil - } - out.LiteralSubject = in.LiteralSubject - out.CommonName = in.CommonName - out.Duration = (*v1.Duration)(unsafe.Pointer(in.Duration)) - out.RenewBefore = (*v1.Duration)(unsafe.Pointer(in.RenewBefore)) - out.DNSNames = *(*[]string)(unsafe.Pointer(&in.DNSNames)) - out.IPAddresses = *(*[]string)(unsafe.Pointer(&in.IPAddresses)) - // WARNING: in.URIs requires manual conversion: does not exist in peer-type - // WARNING: in.EmailAddresses requires manual conversion: does not exist in peer-type - out.OtherNames = *(*[]OtherName)(unsafe.Pointer(&in.OtherNames)) - out.SecretName = in.SecretName - out.SecretTemplate = (*CertificateSecretTemplate)(unsafe.Pointer(in.SecretTemplate)) - if in.Keystores != nil { - in, out := &in.Keystores, &out.Keystores - *out = new(CertificateKeystores) - if err := Convert_certmanager_CertificateKeystores_To_v1alpha2_CertificateKeystores(*in, *out, s); err != nil { - return err - } - } else { - out.Keystores = nil - } - if err := apismetav1.Convert_meta_ObjectReference_To_v1_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - out.IsCA = in.IsCA - out.Usages = *(*[]KeyUsage)(unsafe.Pointer(&in.Usages)) - if in.PrivateKey != nil { - in, out := &in.PrivateKey, &out.PrivateKey - *out = new(CertificatePrivateKey) - if err := Convert_certmanager_CertificatePrivateKey_To_v1alpha2_CertificatePrivateKey(*in, *out, s); err != nil { - return err - } - } else { - out.PrivateKey = nil - } - out.EncodeUsagesInRequest = (*bool)(unsafe.Pointer(in.EncodeUsagesInRequest)) - out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit)) - out.AdditionalOutputFormats = *(*[]CertificateAdditionalOutputFormat)(unsafe.Pointer(&in.AdditionalOutputFormats)) - out.NameConstraints = (*NameConstraints)(unsafe.Pointer(in.NameConstraints)) - return nil -} - -func autoConvert_v1alpha2_CertificateStatus_To_certmanager_CertificateStatus(in *CertificateStatus, out *certmanager.CertificateStatus, s conversion.Scope) error { - out.Conditions = *(*[]certmanager.CertificateCondition)(unsafe.Pointer(&in.Conditions)) - out.LastFailureTime = (*v1.Time)(unsafe.Pointer(in.LastFailureTime)) - out.NotBefore = (*v1.Time)(unsafe.Pointer(in.NotBefore)) - out.NotAfter = (*v1.Time)(unsafe.Pointer(in.NotAfter)) - out.RenewalTime = (*v1.Time)(unsafe.Pointer(in.RenewalTime)) - out.Revision = (*int)(unsafe.Pointer(in.Revision)) - out.NextPrivateKeySecretName = (*string)(unsafe.Pointer(in.NextPrivateKeySecretName)) - out.FailedIssuanceAttempts = (*int)(unsafe.Pointer(in.FailedIssuanceAttempts)) - return nil -} - -// Convert_v1alpha2_CertificateStatus_To_certmanager_CertificateStatus is an autogenerated conversion function. -func Convert_v1alpha2_CertificateStatus_To_certmanager_CertificateStatus(in *CertificateStatus, out *certmanager.CertificateStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_CertificateStatus_To_certmanager_CertificateStatus(in, out, s) -} - -func autoConvert_certmanager_CertificateStatus_To_v1alpha2_CertificateStatus(in *certmanager.CertificateStatus, out *CertificateStatus, s conversion.Scope) error { - out.Conditions = *(*[]CertificateCondition)(unsafe.Pointer(&in.Conditions)) - out.LastFailureTime = (*v1.Time)(unsafe.Pointer(in.LastFailureTime)) - out.NotBefore = (*v1.Time)(unsafe.Pointer(in.NotBefore)) - out.NotAfter = (*v1.Time)(unsafe.Pointer(in.NotAfter)) - out.RenewalTime = (*v1.Time)(unsafe.Pointer(in.RenewalTime)) - out.Revision = (*int)(unsafe.Pointer(in.Revision)) - out.NextPrivateKeySecretName = (*string)(unsafe.Pointer(in.NextPrivateKeySecretName)) - out.FailedIssuanceAttempts = (*int)(unsafe.Pointer(in.FailedIssuanceAttempts)) - return nil -} - -// Convert_certmanager_CertificateStatus_To_v1alpha2_CertificateStatus is an autogenerated conversion function. -func Convert_certmanager_CertificateStatus_To_v1alpha2_CertificateStatus(in *certmanager.CertificateStatus, out *CertificateStatus, s conversion.Scope) error { - return autoConvert_certmanager_CertificateStatus_To_v1alpha2_CertificateStatus(in, out, s) -} - -func autoConvert_v1alpha2_ClusterIssuer_To_certmanager_ClusterIssuer(in *ClusterIssuer, out *certmanager.ClusterIssuer, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_IssuerSpec_To_certmanager_IssuerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha2_IssuerStatus_To_certmanager_IssuerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_ClusterIssuer_To_certmanager_ClusterIssuer is an autogenerated conversion function. -func Convert_v1alpha2_ClusterIssuer_To_certmanager_ClusterIssuer(in *ClusterIssuer, out *certmanager.ClusterIssuer, s conversion.Scope) error { - return autoConvert_v1alpha2_ClusterIssuer_To_certmanager_ClusterIssuer(in, out, s) -} - -func autoConvert_certmanager_ClusterIssuer_To_v1alpha2_ClusterIssuer(in *certmanager.ClusterIssuer, out *ClusterIssuer, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_certmanager_IssuerSpec_To_v1alpha2_IssuerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_certmanager_IssuerStatus_To_v1alpha2_IssuerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_ClusterIssuer_To_v1alpha2_ClusterIssuer is an autogenerated conversion function. -func Convert_certmanager_ClusterIssuer_To_v1alpha2_ClusterIssuer(in *certmanager.ClusterIssuer, out *ClusterIssuer, s conversion.Scope) error { - return autoConvert_certmanager_ClusterIssuer_To_v1alpha2_ClusterIssuer(in, out, s) -} - -func autoConvert_v1alpha2_ClusterIssuerList_To_certmanager_ClusterIssuerList(in *ClusterIssuerList, out *certmanager.ClusterIssuerList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]certmanager.ClusterIssuer, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_ClusterIssuer_To_certmanager_ClusterIssuer(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha2_ClusterIssuerList_To_certmanager_ClusterIssuerList is an autogenerated conversion function. -func Convert_v1alpha2_ClusterIssuerList_To_certmanager_ClusterIssuerList(in *ClusterIssuerList, out *certmanager.ClusterIssuerList, s conversion.Scope) error { - return autoConvert_v1alpha2_ClusterIssuerList_To_certmanager_ClusterIssuerList(in, out, s) -} - -func autoConvert_certmanager_ClusterIssuerList_To_v1alpha2_ClusterIssuerList(in *certmanager.ClusterIssuerList, out *ClusterIssuerList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterIssuer, len(*in)) - for i := range *in { - if err := Convert_certmanager_ClusterIssuer_To_v1alpha2_ClusterIssuer(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_certmanager_ClusterIssuerList_To_v1alpha2_ClusterIssuerList is an autogenerated conversion function. -func Convert_certmanager_ClusterIssuerList_To_v1alpha2_ClusterIssuerList(in *certmanager.ClusterIssuerList, out *ClusterIssuerList, s conversion.Scope) error { - return autoConvert_certmanager_ClusterIssuerList_To_v1alpha2_ClusterIssuerList(in, out, s) -} - -func autoConvert_v1alpha2_Issuer_To_certmanager_Issuer(in *Issuer, out *certmanager.Issuer, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_IssuerSpec_To_certmanager_IssuerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha2_IssuerStatus_To_certmanager_IssuerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_Issuer_To_certmanager_Issuer is an autogenerated conversion function. -func Convert_v1alpha2_Issuer_To_certmanager_Issuer(in *Issuer, out *certmanager.Issuer, s conversion.Scope) error { - return autoConvert_v1alpha2_Issuer_To_certmanager_Issuer(in, out, s) -} - -func autoConvert_certmanager_Issuer_To_v1alpha2_Issuer(in *certmanager.Issuer, out *Issuer, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_certmanager_IssuerSpec_To_v1alpha2_IssuerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_certmanager_IssuerStatus_To_v1alpha2_IssuerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_Issuer_To_v1alpha2_Issuer is an autogenerated conversion function. -func Convert_certmanager_Issuer_To_v1alpha2_Issuer(in *certmanager.Issuer, out *Issuer, s conversion.Scope) error { - return autoConvert_certmanager_Issuer_To_v1alpha2_Issuer(in, out, s) -} - -func autoConvert_v1alpha2_IssuerCondition_To_certmanager_IssuerCondition(in *IssuerCondition, out *certmanager.IssuerCondition, s conversion.Scope) error { - out.Type = certmanager.IssuerConditionType(in.Type) - out.Status = meta.ConditionStatus(in.Status) - out.LastTransitionTime = (*v1.Time)(unsafe.Pointer(in.LastTransitionTime)) - out.Reason = in.Reason - out.Message = in.Message - out.ObservedGeneration = in.ObservedGeneration - return nil -} - -// Convert_v1alpha2_IssuerCondition_To_certmanager_IssuerCondition is an autogenerated conversion function. -func Convert_v1alpha2_IssuerCondition_To_certmanager_IssuerCondition(in *IssuerCondition, out *certmanager.IssuerCondition, s conversion.Scope) error { - return autoConvert_v1alpha2_IssuerCondition_To_certmanager_IssuerCondition(in, out, s) -} - -func autoConvert_certmanager_IssuerCondition_To_v1alpha2_IssuerCondition(in *certmanager.IssuerCondition, out *IssuerCondition, s conversion.Scope) error { - out.Type = IssuerConditionType(in.Type) - out.Status = metav1.ConditionStatus(in.Status) - out.LastTransitionTime = (*v1.Time)(unsafe.Pointer(in.LastTransitionTime)) - out.Reason = in.Reason - out.Message = in.Message - out.ObservedGeneration = in.ObservedGeneration - return nil -} - -// Convert_certmanager_IssuerCondition_To_v1alpha2_IssuerCondition is an autogenerated conversion function. -func Convert_certmanager_IssuerCondition_To_v1alpha2_IssuerCondition(in *certmanager.IssuerCondition, out *IssuerCondition, s conversion.Scope) error { - return autoConvert_certmanager_IssuerCondition_To_v1alpha2_IssuerCondition(in, out, s) -} - -func autoConvert_v1alpha2_IssuerConfig_To_certmanager_IssuerConfig(in *IssuerConfig, out *certmanager.IssuerConfig, s conversion.Scope) error { - if in.ACME != nil { - in, out := &in.ACME, &out.ACME - *out = new(acme.ACMEIssuer) - if err := acmev1alpha2.Convert_v1alpha2_ACMEIssuer_To_acme_ACMEIssuer(*in, *out, s); err != nil { - return err - } - } else { - out.ACME = nil - } - out.CA = (*certmanager.CAIssuer)(unsafe.Pointer(in.CA)) - if in.Vault != nil { - in, out := &in.Vault, &out.Vault - *out = new(certmanager.VaultIssuer) - if err := Convert_v1alpha2_VaultIssuer_To_certmanager_VaultIssuer(*in, *out, s); err != nil { - return err - } - } else { - out.Vault = nil - } - out.SelfSigned = (*certmanager.SelfSignedIssuer)(unsafe.Pointer(in.SelfSigned)) - if in.Venafi != nil { - in, out := &in.Venafi, &out.Venafi - *out = new(certmanager.VenafiIssuer) - if err := Convert_v1alpha2_VenafiIssuer_To_certmanager_VenafiIssuer(*in, *out, s); err != nil { - return err - } - } else { - out.Venafi = nil - } - return nil -} - -// Convert_v1alpha2_IssuerConfig_To_certmanager_IssuerConfig is an autogenerated conversion function. -func Convert_v1alpha2_IssuerConfig_To_certmanager_IssuerConfig(in *IssuerConfig, out *certmanager.IssuerConfig, s conversion.Scope) error { - return autoConvert_v1alpha2_IssuerConfig_To_certmanager_IssuerConfig(in, out, s) -} - -func autoConvert_certmanager_IssuerConfig_To_v1alpha2_IssuerConfig(in *certmanager.IssuerConfig, out *IssuerConfig, s conversion.Scope) error { - if in.ACME != nil { - in, out := &in.ACME, &out.ACME - *out = new(acmev1alpha2.ACMEIssuer) - if err := acmev1alpha2.Convert_acme_ACMEIssuer_To_v1alpha2_ACMEIssuer(*in, *out, s); err != nil { - return err - } - } else { - out.ACME = nil - } - out.CA = (*CAIssuer)(unsafe.Pointer(in.CA)) - if in.Vault != nil { - in, out := &in.Vault, &out.Vault - *out = new(VaultIssuer) - if err := Convert_certmanager_VaultIssuer_To_v1alpha2_VaultIssuer(*in, *out, s); err != nil { - return err - } - } else { - out.Vault = nil - } - out.SelfSigned = (*SelfSignedIssuer)(unsafe.Pointer(in.SelfSigned)) - if in.Venafi != nil { - in, out := &in.Venafi, &out.Venafi - *out = new(VenafiIssuer) - if err := Convert_certmanager_VenafiIssuer_To_v1alpha2_VenafiIssuer(*in, *out, s); err != nil { - return err - } - } else { - out.Venafi = nil - } - return nil -} - -// Convert_certmanager_IssuerConfig_To_v1alpha2_IssuerConfig is an autogenerated conversion function. -func Convert_certmanager_IssuerConfig_To_v1alpha2_IssuerConfig(in *certmanager.IssuerConfig, out *IssuerConfig, s conversion.Scope) error { - return autoConvert_certmanager_IssuerConfig_To_v1alpha2_IssuerConfig(in, out, s) -} - -func autoConvert_v1alpha2_IssuerList_To_certmanager_IssuerList(in *IssuerList, out *certmanager.IssuerList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]certmanager.Issuer, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_Issuer_To_certmanager_Issuer(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha2_IssuerList_To_certmanager_IssuerList is an autogenerated conversion function. -func Convert_v1alpha2_IssuerList_To_certmanager_IssuerList(in *IssuerList, out *certmanager.IssuerList, s conversion.Scope) error { - return autoConvert_v1alpha2_IssuerList_To_certmanager_IssuerList(in, out, s) -} - -func autoConvert_certmanager_IssuerList_To_v1alpha2_IssuerList(in *certmanager.IssuerList, out *IssuerList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Issuer, len(*in)) - for i := range *in { - if err := Convert_certmanager_Issuer_To_v1alpha2_Issuer(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_certmanager_IssuerList_To_v1alpha2_IssuerList is an autogenerated conversion function. -func Convert_certmanager_IssuerList_To_v1alpha2_IssuerList(in *certmanager.IssuerList, out *IssuerList, s conversion.Scope) error { - return autoConvert_certmanager_IssuerList_To_v1alpha2_IssuerList(in, out, s) -} - -func autoConvert_v1alpha2_IssuerSpec_To_certmanager_IssuerSpec(in *IssuerSpec, out *certmanager.IssuerSpec, s conversion.Scope) error { - if err := Convert_v1alpha2_IssuerConfig_To_certmanager_IssuerConfig(&in.IssuerConfig, &out.IssuerConfig, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_IssuerSpec_To_certmanager_IssuerSpec is an autogenerated conversion function. -func Convert_v1alpha2_IssuerSpec_To_certmanager_IssuerSpec(in *IssuerSpec, out *certmanager.IssuerSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_IssuerSpec_To_certmanager_IssuerSpec(in, out, s) -} - -func autoConvert_certmanager_IssuerSpec_To_v1alpha2_IssuerSpec(in *certmanager.IssuerSpec, out *IssuerSpec, s conversion.Scope) error { - if err := Convert_certmanager_IssuerConfig_To_v1alpha2_IssuerConfig(&in.IssuerConfig, &out.IssuerConfig, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_IssuerSpec_To_v1alpha2_IssuerSpec is an autogenerated conversion function. -func Convert_certmanager_IssuerSpec_To_v1alpha2_IssuerSpec(in *certmanager.IssuerSpec, out *IssuerSpec, s conversion.Scope) error { - return autoConvert_certmanager_IssuerSpec_To_v1alpha2_IssuerSpec(in, out, s) -} - -func autoConvert_v1alpha2_IssuerStatus_To_certmanager_IssuerStatus(in *IssuerStatus, out *certmanager.IssuerStatus, s conversion.Scope) error { - out.Conditions = *(*[]certmanager.IssuerCondition)(unsafe.Pointer(&in.Conditions)) - out.ACME = (*acme.ACMEIssuerStatus)(unsafe.Pointer(in.ACME)) - return nil -} - -// Convert_v1alpha2_IssuerStatus_To_certmanager_IssuerStatus is an autogenerated conversion function. -func Convert_v1alpha2_IssuerStatus_To_certmanager_IssuerStatus(in *IssuerStatus, out *certmanager.IssuerStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_IssuerStatus_To_certmanager_IssuerStatus(in, out, s) -} - -func autoConvert_certmanager_IssuerStatus_To_v1alpha2_IssuerStatus(in *certmanager.IssuerStatus, out *IssuerStatus, s conversion.Scope) error { - out.Conditions = *(*[]IssuerCondition)(unsafe.Pointer(&in.Conditions)) - out.ACME = (*acmev1alpha2.ACMEIssuerStatus)(unsafe.Pointer(in.ACME)) - return nil -} - -// Convert_certmanager_IssuerStatus_To_v1alpha2_IssuerStatus is an autogenerated conversion function. -func Convert_certmanager_IssuerStatus_To_v1alpha2_IssuerStatus(in *certmanager.IssuerStatus, out *IssuerStatus, s conversion.Scope) error { - return autoConvert_certmanager_IssuerStatus_To_v1alpha2_IssuerStatus(in, out, s) -} - -func autoConvert_v1alpha2_JKSKeystore_To_certmanager_JKSKeystore(in *JKSKeystore, out *certmanager.JKSKeystore, s conversion.Scope) error { - out.Create = in.Create - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.PasswordSecretRef, &out.PasswordSecretRef, s); err != nil { - return err - } - out.Alias = (*string)(unsafe.Pointer(in.Alias)) - return nil -} - -// Convert_v1alpha2_JKSKeystore_To_certmanager_JKSKeystore is an autogenerated conversion function. -func Convert_v1alpha2_JKSKeystore_To_certmanager_JKSKeystore(in *JKSKeystore, out *certmanager.JKSKeystore, s conversion.Scope) error { - return autoConvert_v1alpha2_JKSKeystore_To_certmanager_JKSKeystore(in, out, s) -} - -func autoConvert_certmanager_JKSKeystore_To_v1alpha2_JKSKeystore(in *certmanager.JKSKeystore, out *JKSKeystore, s conversion.Scope) error { - out.Create = in.Create - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.PasswordSecretRef, &out.PasswordSecretRef, s); err != nil { - return err - } - out.Alias = (*string)(unsafe.Pointer(in.Alias)) - return nil -} - -// Convert_certmanager_JKSKeystore_To_v1alpha2_JKSKeystore is an autogenerated conversion function. -func Convert_certmanager_JKSKeystore_To_v1alpha2_JKSKeystore(in *certmanager.JKSKeystore, out *JKSKeystore, s conversion.Scope) error { - return autoConvert_certmanager_JKSKeystore_To_v1alpha2_JKSKeystore(in, out, s) -} - -func autoConvert_v1alpha2_NameConstraintItem_To_certmanager_NameConstraintItem(in *NameConstraintItem, out *certmanager.NameConstraintItem, s conversion.Scope) error { - out.DNSDomains = *(*[]string)(unsafe.Pointer(&in.DNSDomains)) - out.IPRanges = *(*[]string)(unsafe.Pointer(&in.IPRanges)) - out.EmailAddresses = *(*[]string)(unsafe.Pointer(&in.EmailAddresses)) - out.URIDomains = *(*[]string)(unsafe.Pointer(&in.URIDomains)) - return nil -} - -// Convert_v1alpha2_NameConstraintItem_To_certmanager_NameConstraintItem is an autogenerated conversion function. -func Convert_v1alpha2_NameConstraintItem_To_certmanager_NameConstraintItem(in *NameConstraintItem, out *certmanager.NameConstraintItem, s conversion.Scope) error { - return autoConvert_v1alpha2_NameConstraintItem_To_certmanager_NameConstraintItem(in, out, s) -} - -func autoConvert_certmanager_NameConstraintItem_To_v1alpha2_NameConstraintItem(in *certmanager.NameConstraintItem, out *NameConstraintItem, s conversion.Scope) error { - out.DNSDomains = *(*[]string)(unsafe.Pointer(&in.DNSDomains)) - out.IPRanges = *(*[]string)(unsafe.Pointer(&in.IPRanges)) - out.EmailAddresses = *(*[]string)(unsafe.Pointer(&in.EmailAddresses)) - out.URIDomains = *(*[]string)(unsafe.Pointer(&in.URIDomains)) - return nil -} - -// Convert_certmanager_NameConstraintItem_To_v1alpha2_NameConstraintItem is an autogenerated conversion function. -func Convert_certmanager_NameConstraintItem_To_v1alpha2_NameConstraintItem(in *certmanager.NameConstraintItem, out *NameConstraintItem, s conversion.Scope) error { - return autoConvert_certmanager_NameConstraintItem_To_v1alpha2_NameConstraintItem(in, out, s) -} - -func autoConvert_v1alpha2_NameConstraints_To_certmanager_NameConstraints(in *NameConstraints, out *certmanager.NameConstraints, s conversion.Scope) error { - out.Critical = in.Critical - out.Permitted = (*certmanager.NameConstraintItem)(unsafe.Pointer(in.Permitted)) - out.Excluded = (*certmanager.NameConstraintItem)(unsafe.Pointer(in.Excluded)) - return nil -} - -// Convert_v1alpha2_NameConstraints_To_certmanager_NameConstraints is an autogenerated conversion function. -func Convert_v1alpha2_NameConstraints_To_certmanager_NameConstraints(in *NameConstraints, out *certmanager.NameConstraints, s conversion.Scope) error { - return autoConvert_v1alpha2_NameConstraints_To_certmanager_NameConstraints(in, out, s) -} - -func autoConvert_certmanager_NameConstraints_To_v1alpha2_NameConstraints(in *certmanager.NameConstraints, out *NameConstraints, s conversion.Scope) error { - out.Critical = in.Critical - out.Permitted = (*NameConstraintItem)(unsafe.Pointer(in.Permitted)) - out.Excluded = (*NameConstraintItem)(unsafe.Pointer(in.Excluded)) - return nil -} - -// Convert_certmanager_NameConstraints_To_v1alpha2_NameConstraints is an autogenerated conversion function. -func Convert_certmanager_NameConstraints_To_v1alpha2_NameConstraints(in *certmanager.NameConstraints, out *NameConstraints, s conversion.Scope) error { - return autoConvert_certmanager_NameConstraints_To_v1alpha2_NameConstraints(in, out, s) -} - -func autoConvert_v1alpha2_OtherName_To_certmanager_OtherName(in *OtherName, out *certmanager.OtherName, s conversion.Scope) error { - out.OID = in.OID - out.UTF8Value = in.UTF8Value - return nil -} - -// Convert_v1alpha2_OtherName_To_certmanager_OtherName is an autogenerated conversion function. -func Convert_v1alpha2_OtherName_To_certmanager_OtherName(in *OtherName, out *certmanager.OtherName, s conversion.Scope) error { - return autoConvert_v1alpha2_OtherName_To_certmanager_OtherName(in, out, s) -} - -func autoConvert_certmanager_OtherName_To_v1alpha2_OtherName(in *certmanager.OtherName, out *OtherName, s conversion.Scope) error { - out.OID = in.OID - out.UTF8Value = in.UTF8Value - return nil -} - -// Convert_certmanager_OtherName_To_v1alpha2_OtherName is an autogenerated conversion function. -func Convert_certmanager_OtherName_To_v1alpha2_OtherName(in *certmanager.OtherName, out *OtherName, s conversion.Scope) error { - return autoConvert_certmanager_OtherName_To_v1alpha2_OtherName(in, out, s) -} - -func autoConvert_v1alpha2_PKCS12Keystore_To_certmanager_PKCS12Keystore(in *PKCS12Keystore, out *certmanager.PKCS12Keystore, s conversion.Scope) error { - out.Create = in.Create - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.PasswordSecretRef, &out.PasswordSecretRef, s); err != nil { - return err - } - out.Profile = certmanager.PKCS12Profile(in.Profile) - return nil -} - -// Convert_v1alpha2_PKCS12Keystore_To_certmanager_PKCS12Keystore is an autogenerated conversion function. -func Convert_v1alpha2_PKCS12Keystore_To_certmanager_PKCS12Keystore(in *PKCS12Keystore, out *certmanager.PKCS12Keystore, s conversion.Scope) error { - return autoConvert_v1alpha2_PKCS12Keystore_To_certmanager_PKCS12Keystore(in, out, s) -} - -func autoConvert_certmanager_PKCS12Keystore_To_v1alpha2_PKCS12Keystore(in *certmanager.PKCS12Keystore, out *PKCS12Keystore, s conversion.Scope) error { - out.Create = in.Create - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.PasswordSecretRef, &out.PasswordSecretRef, s); err != nil { - return err - } - out.Profile = PKCS12Profile(in.Profile) - return nil -} - -// Convert_certmanager_PKCS12Keystore_To_v1alpha2_PKCS12Keystore is an autogenerated conversion function. -func Convert_certmanager_PKCS12Keystore_To_v1alpha2_PKCS12Keystore(in *certmanager.PKCS12Keystore, out *PKCS12Keystore, s conversion.Scope) error { - return autoConvert_certmanager_PKCS12Keystore_To_v1alpha2_PKCS12Keystore(in, out, s) -} - -func autoConvert_v1alpha2_SelfSignedIssuer_To_certmanager_SelfSignedIssuer(in *SelfSignedIssuer, out *certmanager.SelfSignedIssuer, s conversion.Scope) error { - out.CRLDistributionPoints = *(*[]string)(unsafe.Pointer(&in.CRLDistributionPoints)) - return nil -} - -// Convert_v1alpha2_SelfSignedIssuer_To_certmanager_SelfSignedIssuer is an autogenerated conversion function. -func Convert_v1alpha2_SelfSignedIssuer_To_certmanager_SelfSignedIssuer(in *SelfSignedIssuer, out *certmanager.SelfSignedIssuer, s conversion.Scope) error { - return autoConvert_v1alpha2_SelfSignedIssuer_To_certmanager_SelfSignedIssuer(in, out, s) -} - -func autoConvert_certmanager_SelfSignedIssuer_To_v1alpha2_SelfSignedIssuer(in *certmanager.SelfSignedIssuer, out *SelfSignedIssuer, s conversion.Scope) error { - out.CRLDistributionPoints = *(*[]string)(unsafe.Pointer(&in.CRLDistributionPoints)) - return nil -} - -// Convert_certmanager_SelfSignedIssuer_To_v1alpha2_SelfSignedIssuer is an autogenerated conversion function. -func Convert_certmanager_SelfSignedIssuer_To_v1alpha2_SelfSignedIssuer(in *certmanager.SelfSignedIssuer, out *SelfSignedIssuer, s conversion.Scope) error { - return autoConvert_certmanager_SelfSignedIssuer_To_v1alpha2_SelfSignedIssuer(in, out, s) -} - -func autoConvert_v1alpha2_ServiceAccountRef_To_certmanager_ServiceAccountRef(in *ServiceAccountRef, out *certmanager.ServiceAccountRef, s conversion.Scope) error { - out.Name = in.Name - out.TokenAudiences = *(*[]string)(unsafe.Pointer(&in.TokenAudiences)) - return nil -} - -// Convert_v1alpha2_ServiceAccountRef_To_certmanager_ServiceAccountRef is an autogenerated conversion function. -func Convert_v1alpha2_ServiceAccountRef_To_certmanager_ServiceAccountRef(in *ServiceAccountRef, out *certmanager.ServiceAccountRef, s conversion.Scope) error { - return autoConvert_v1alpha2_ServiceAccountRef_To_certmanager_ServiceAccountRef(in, out, s) -} - -func autoConvert_certmanager_ServiceAccountRef_To_v1alpha2_ServiceAccountRef(in *certmanager.ServiceAccountRef, out *ServiceAccountRef, s conversion.Scope) error { - out.Name = in.Name - out.TokenAudiences = *(*[]string)(unsafe.Pointer(&in.TokenAudiences)) - return nil -} - -// Convert_certmanager_ServiceAccountRef_To_v1alpha2_ServiceAccountRef is an autogenerated conversion function. -func Convert_certmanager_ServiceAccountRef_To_v1alpha2_ServiceAccountRef(in *certmanager.ServiceAccountRef, out *ServiceAccountRef, s conversion.Scope) error { - return autoConvert_certmanager_ServiceAccountRef_To_v1alpha2_ServiceAccountRef(in, out, s) -} - -func autoConvert_v1alpha2_VaultAppRole_To_certmanager_VaultAppRole(in *VaultAppRole, out *certmanager.VaultAppRole, s conversion.Scope) error { - out.Path = in.Path - out.RoleId = in.RoleId - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.SecretRef, &out.SecretRef, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_VaultAppRole_To_certmanager_VaultAppRole is an autogenerated conversion function. -func Convert_v1alpha2_VaultAppRole_To_certmanager_VaultAppRole(in *VaultAppRole, out *certmanager.VaultAppRole, s conversion.Scope) error { - return autoConvert_v1alpha2_VaultAppRole_To_certmanager_VaultAppRole(in, out, s) -} - -func autoConvert_certmanager_VaultAppRole_To_v1alpha2_VaultAppRole(in *certmanager.VaultAppRole, out *VaultAppRole, s conversion.Scope) error { - out.Path = in.Path - out.RoleId = in.RoleId - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.SecretRef, &out.SecretRef, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_VaultAppRole_To_v1alpha2_VaultAppRole is an autogenerated conversion function. -func Convert_certmanager_VaultAppRole_To_v1alpha2_VaultAppRole(in *certmanager.VaultAppRole, out *VaultAppRole, s conversion.Scope) error { - return autoConvert_certmanager_VaultAppRole_To_v1alpha2_VaultAppRole(in, out, s) -} - -func autoConvert_v1alpha2_VaultAuth_To_certmanager_VaultAuth(in *VaultAuth, out *certmanager.VaultAuth, s conversion.Scope) error { - if in.TokenSecretRef != nil { - in, out := &in.TokenSecretRef, &out.TokenSecretRef - *out = new(meta.SecretKeySelector) - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.TokenSecretRef = nil - } - if in.AppRole != nil { - in, out := &in.AppRole, &out.AppRole - *out = new(certmanager.VaultAppRole) - if err := Convert_v1alpha2_VaultAppRole_To_certmanager_VaultAppRole(*in, *out, s); err != nil { - return err - } - } else { - out.AppRole = nil - } - if in.Kubernetes != nil { - in, out := &in.Kubernetes, &out.Kubernetes - *out = new(certmanager.VaultKubernetesAuth) - if err := Convert_v1alpha2_VaultKubernetesAuth_To_certmanager_VaultKubernetesAuth(*in, *out, s); err != nil { - return err - } - } else { - out.Kubernetes = nil - } - return nil -} - -// Convert_v1alpha2_VaultAuth_To_certmanager_VaultAuth is an autogenerated conversion function. -func Convert_v1alpha2_VaultAuth_To_certmanager_VaultAuth(in *VaultAuth, out *certmanager.VaultAuth, s conversion.Scope) error { - return autoConvert_v1alpha2_VaultAuth_To_certmanager_VaultAuth(in, out, s) -} - -func autoConvert_certmanager_VaultAuth_To_v1alpha2_VaultAuth(in *certmanager.VaultAuth, out *VaultAuth, s conversion.Scope) error { - if in.TokenSecretRef != nil { - in, out := &in.TokenSecretRef, &out.TokenSecretRef - *out = new(metav1.SecretKeySelector) - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.TokenSecretRef = nil - } - if in.AppRole != nil { - in, out := &in.AppRole, &out.AppRole - *out = new(VaultAppRole) - if err := Convert_certmanager_VaultAppRole_To_v1alpha2_VaultAppRole(*in, *out, s); err != nil { - return err - } - } else { - out.AppRole = nil - } - if in.Kubernetes != nil { - in, out := &in.Kubernetes, &out.Kubernetes - *out = new(VaultKubernetesAuth) - if err := Convert_certmanager_VaultKubernetesAuth_To_v1alpha2_VaultKubernetesAuth(*in, *out, s); err != nil { - return err - } - } else { - out.Kubernetes = nil - } - return nil -} - -// Convert_certmanager_VaultAuth_To_v1alpha2_VaultAuth is an autogenerated conversion function. -func Convert_certmanager_VaultAuth_To_v1alpha2_VaultAuth(in *certmanager.VaultAuth, out *VaultAuth, s conversion.Scope) error { - return autoConvert_certmanager_VaultAuth_To_v1alpha2_VaultAuth(in, out, s) -} - -func autoConvert_v1alpha2_VaultIssuer_To_certmanager_VaultIssuer(in *VaultIssuer, out *certmanager.VaultIssuer, s conversion.Scope) error { - if err := Convert_v1alpha2_VaultAuth_To_certmanager_VaultAuth(&in.Auth, &out.Auth, s); err != nil { - return err - } - out.Server = in.Server - out.Path = in.Path - out.Namespace = in.Namespace - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - if in.CABundleSecretRef != nil { - in, out := &in.CABundleSecretRef, &out.CABundleSecretRef - *out = new(meta.SecretKeySelector) - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.CABundleSecretRef = nil - } - if in.ClientCertSecretRef != nil { - in, out := &in.ClientCertSecretRef, &out.ClientCertSecretRef - *out = new(meta.SecretKeySelector) - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ClientCertSecretRef = nil - } - if in.ClientKeySecretRef != nil { - in, out := &in.ClientKeySecretRef, &out.ClientKeySecretRef - *out = new(meta.SecretKeySelector) - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ClientKeySecretRef = nil - } - return nil -} - -// Convert_v1alpha2_VaultIssuer_To_certmanager_VaultIssuer is an autogenerated conversion function. -func Convert_v1alpha2_VaultIssuer_To_certmanager_VaultIssuer(in *VaultIssuer, out *certmanager.VaultIssuer, s conversion.Scope) error { - return autoConvert_v1alpha2_VaultIssuer_To_certmanager_VaultIssuer(in, out, s) -} - -func autoConvert_certmanager_VaultIssuer_To_v1alpha2_VaultIssuer(in *certmanager.VaultIssuer, out *VaultIssuer, s conversion.Scope) error { - if err := Convert_certmanager_VaultAuth_To_v1alpha2_VaultAuth(&in.Auth, &out.Auth, s); err != nil { - return err - } - out.Server = in.Server - out.Path = in.Path - out.Namespace = in.Namespace - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - if in.CABundleSecretRef != nil { - in, out := &in.CABundleSecretRef, &out.CABundleSecretRef - *out = new(metav1.SecretKeySelector) - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.CABundleSecretRef = nil - } - if in.ClientCertSecretRef != nil { - in, out := &in.ClientCertSecretRef, &out.ClientCertSecretRef - *out = new(metav1.SecretKeySelector) - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ClientCertSecretRef = nil - } - if in.ClientKeySecretRef != nil { - in, out := &in.ClientKeySecretRef, &out.ClientKeySecretRef - *out = new(metav1.SecretKeySelector) - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ClientKeySecretRef = nil - } - return nil -} - -// Convert_certmanager_VaultIssuer_To_v1alpha2_VaultIssuer is an autogenerated conversion function. -func Convert_certmanager_VaultIssuer_To_v1alpha2_VaultIssuer(in *certmanager.VaultIssuer, out *VaultIssuer, s conversion.Scope) error { - return autoConvert_certmanager_VaultIssuer_To_v1alpha2_VaultIssuer(in, out, s) -} - -func autoConvert_v1alpha2_VaultKubernetesAuth_To_certmanager_VaultKubernetesAuth(in *VaultKubernetesAuth, out *certmanager.VaultKubernetesAuth, s conversion.Scope) error { - out.Path = in.Path - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.SecretRef, &out.SecretRef, s); err != nil { - return err - } - out.ServiceAccountRef = (*certmanager.ServiceAccountRef)(unsafe.Pointer(in.ServiceAccountRef)) - out.Role = in.Role - return nil -} - -// Convert_v1alpha2_VaultKubernetesAuth_To_certmanager_VaultKubernetesAuth is an autogenerated conversion function. -func Convert_v1alpha2_VaultKubernetesAuth_To_certmanager_VaultKubernetesAuth(in *VaultKubernetesAuth, out *certmanager.VaultKubernetesAuth, s conversion.Scope) error { - return autoConvert_v1alpha2_VaultKubernetesAuth_To_certmanager_VaultKubernetesAuth(in, out, s) -} - -func autoConvert_certmanager_VaultKubernetesAuth_To_v1alpha2_VaultKubernetesAuth(in *certmanager.VaultKubernetesAuth, out *VaultKubernetesAuth, s conversion.Scope) error { - out.Path = in.Path - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.SecretRef, &out.SecretRef, s); err != nil { - return err - } - out.ServiceAccountRef = (*ServiceAccountRef)(unsafe.Pointer(in.ServiceAccountRef)) - out.Role = in.Role - return nil -} - -func autoConvert_v1alpha2_VenafiCloud_To_certmanager_VenafiCloud(in *VenafiCloud, out *certmanager.VenafiCloud, s conversion.Scope) error { - out.URL = in.URL - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.APITokenSecretRef, &out.APITokenSecretRef, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_VenafiCloud_To_certmanager_VenafiCloud is an autogenerated conversion function. -func Convert_v1alpha2_VenafiCloud_To_certmanager_VenafiCloud(in *VenafiCloud, out *certmanager.VenafiCloud, s conversion.Scope) error { - return autoConvert_v1alpha2_VenafiCloud_To_certmanager_VenafiCloud(in, out, s) -} - -func autoConvert_certmanager_VenafiCloud_To_v1alpha2_VenafiCloud(in *certmanager.VenafiCloud, out *VenafiCloud, s conversion.Scope) error { - out.URL = in.URL - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.APITokenSecretRef, &out.APITokenSecretRef, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_VenafiCloud_To_v1alpha2_VenafiCloud is an autogenerated conversion function. -func Convert_certmanager_VenafiCloud_To_v1alpha2_VenafiCloud(in *certmanager.VenafiCloud, out *VenafiCloud, s conversion.Scope) error { - return autoConvert_certmanager_VenafiCloud_To_v1alpha2_VenafiCloud(in, out, s) -} - -func autoConvert_v1alpha2_VenafiIssuer_To_certmanager_VenafiIssuer(in *VenafiIssuer, out *certmanager.VenafiIssuer, s conversion.Scope) error { - out.Zone = in.Zone - if in.TPP != nil { - in, out := &in.TPP, &out.TPP - *out = new(certmanager.VenafiTPP) - if err := Convert_v1alpha2_VenafiTPP_To_certmanager_VenafiTPP(*in, *out, s); err != nil { - return err - } - } else { - out.TPP = nil - } - if in.Cloud != nil { - in, out := &in.Cloud, &out.Cloud - *out = new(certmanager.VenafiCloud) - if err := Convert_v1alpha2_VenafiCloud_To_certmanager_VenafiCloud(*in, *out, s); err != nil { - return err - } - } else { - out.Cloud = nil - } - return nil -} - -// Convert_v1alpha2_VenafiIssuer_To_certmanager_VenafiIssuer is an autogenerated conversion function. -func Convert_v1alpha2_VenafiIssuer_To_certmanager_VenafiIssuer(in *VenafiIssuer, out *certmanager.VenafiIssuer, s conversion.Scope) error { - return autoConvert_v1alpha2_VenafiIssuer_To_certmanager_VenafiIssuer(in, out, s) -} - -func autoConvert_certmanager_VenafiIssuer_To_v1alpha2_VenafiIssuer(in *certmanager.VenafiIssuer, out *VenafiIssuer, s conversion.Scope) error { - out.Zone = in.Zone - if in.TPP != nil { - in, out := &in.TPP, &out.TPP - *out = new(VenafiTPP) - if err := Convert_certmanager_VenafiTPP_To_v1alpha2_VenafiTPP(*in, *out, s); err != nil { - return err - } - } else { - out.TPP = nil - } - if in.Cloud != nil { - in, out := &in.Cloud, &out.Cloud - *out = new(VenafiCloud) - if err := Convert_certmanager_VenafiCloud_To_v1alpha2_VenafiCloud(*in, *out, s); err != nil { - return err - } - } else { - out.Cloud = nil - } - return nil -} - -// Convert_certmanager_VenafiIssuer_To_v1alpha2_VenafiIssuer is an autogenerated conversion function. -func Convert_certmanager_VenafiIssuer_To_v1alpha2_VenafiIssuer(in *certmanager.VenafiIssuer, out *VenafiIssuer, s conversion.Scope) error { - return autoConvert_certmanager_VenafiIssuer_To_v1alpha2_VenafiIssuer(in, out, s) -} - -func autoConvert_v1alpha2_VenafiTPP_To_certmanager_VenafiTPP(in *VenafiTPP, out *certmanager.VenafiTPP, s conversion.Scope) error { - out.URL = in.URL - if err := apismetav1.Convert_v1_LocalObjectReference_To_meta_LocalObjectReference(&in.CredentialsRef, &out.CredentialsRef, s); err != nil { - return err - } - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - return nil -} - -// Convert_v1alpha2_VenafiTPP_To_certmanager_VenafiTPP is an autogenerated conversion function. -func Convert_v1alpha2_VenafiTPP_To_certmanager_VenafiTPP(in *VenafiTPP, out *certmanager.VenafiTPP, s conversion.Scope) error { - return autoConvert_v1alpha2_VenafiTPP_To_certmanager_VenafiTPP(in, out, s) -} - -func autoConvert_certmanager_VenafiTPP_To_v1alpha2_VenafiTPP(in *certmanager.VenafiTPP, out *VenafiTPP, s conversion.Scope) error { - out.URL = in.URL - if err := apismetav1.Convert_meta_LocalObjectReference_To_v1_LocalObjectReference(&in.CredentialsRef, &out.CredentialsRef, s); err != nil { - return err - } - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - return nil -} - -// Convert_certmanager_VenafiTPP_To_v1alpha2_VenafiTPP is an autogenerated conversion function. -func Convert_certmanager_VenafiTPP_To_v1alpha2_VenafiTPP(in *certmanager.VenafiTPP, out *VenafiTPP, s conversion.Scope) error { - return autoConvert_certmanager_VenafiTPP_To_v1alpha2_VenafiTPP(in, out, s) -} - -func autoConvert_v1alpha2_X509Subject_To_certmanager_X509Subject(in *X509Subject, out *certmanager.X509Subject, s conversion.Scope) error { - out.Countries = *(*[]string)(unsafe.Pointer(&in.Countries)) - out.OrganizationalUnits = *(*[]string)(unsafe.Pointer(&in.OrganizationalUnits)) - out.Localities = *(*[]string)(unsafe.Pointer(&in.Localities)) - out.Provinces = *(*[]string)(unsafe.Pointer(&in.Provinces)) - out.StreetAddresses = *(*[]string)(unsafe.Pointer(&in.StreetAddresses)) - out.PostalCodes = *(*[]string)(unsafe.Pointer(&in.PostalCodes)) - out.SerialNumber = in.SerialNumber - return nil -} - -// Convert_v1alpha2_X509Subject_To_certmanager_X509Subject is an autogenerated conversion function. -func Convert_v1alpha2_X509Subject_To_certmanager_X509Subject(in *X509Subject, out *certmanager.X509Subject, s conversion.Scope) error { - return autoConvert_v1alpha2_X509Subject_To_certmanager_X509Subject(in, out, s) -} - -func autoConvert_certmanager_X509Subject_To_v1alpha2_X509Subject(in *certmanager.X509Subject, out *X509Subject, s conversion.Scope) error { - // WARNING: in.Organizations requires manual conversion: does not exist in peer-type - out.Countries = *(*[]string)(unsafe.Pointer(&in.Countries)) - out.OrganizationalUnits = *(*[]string)(unsafe.Pointer(&in.OrganizationalUnits)) - out.Localities = *(*[]string)(unsafe.Pointer(&in.Localities)) - out.Provinces = *(*[]string)(unsafe.Pointer(&in.Provinces)) - out.StreetAddresses = *(*[]string)(unsafe.Pointer(&in.StreetAddresses)) - out.PostalCodes = *(*[]string)(unsafe.Pointer(&in.PostalCodes)) - out.SerialNumber = in.SerialNumber - return nil -} diff --git a/internal/apis/certmanager/v1alpha2/zz_generated.deepcopy.go b/internal/apis/certmanager/v1alpha2/zz_generated.deepcopy.go deleted file mode 100644 index 37c3397cac7..00000000000 --- a/internal/apis/certmanager/v1alpha2/zz_generated.deepcopy.go +++ /dev/null @@ -1,1160 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The cert-manager 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 v1alpha2 - -import ( - acmev1alpha2 "github.com/cert-manager/cert-manager/internal/apis/acme/v1alpha2" - metav1 "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CAIssuer) DeepCopyInto(out *CAIssuer) { - *out = *in - if in.CRLDistributionPoints != nil { - in, out := &in.CRLDistributionPoints, &out.CRLDistributionPoints - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.OCSPServers != nil { - in, out := &in.OCSPServers, &out.OCSPServers - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.IssuingCertificateURLs != nil { - in, out := &in.IssuingCertificateURLs, &out.IssuingCertificateURLs - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAIssuer. -func (in *CAIssuer) DeepCopy() *CAIssuer { - if in == nil { - return nil - } - out := new(CAIssuer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Certificate) DeepCopyInto(out *Certificate) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Certificate. -func (in *Certificate) DeepCopy() *Certificate { - if in == nil { - return nil - } - out := new(Certificate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Certificate) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateAdditionalOutputFormat) DeepCopyInto(out *CertificateAdditionalOutputFormat) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateAdditionalOutputFormat. -func (in *CertificateAdditionalOutputFormat) DeepCopy() *CertificateAdditionalOutputFormat { - if in == nil { - return nil - } - out := new(CertificateAdditionalOutputFormat) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateCondition) DeepCopyInto(out *CertificateCondition) { - *out = *in - if in.LastTransitionTime != nil { - in, out := &in.LastTransitionTime, &out.LastTransitionTime - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateCondition. -func (in *CertificateCondition) DeepCopy() *CertificateCondition { - if in == nil { - return nil - } - out := new(CertificateCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateKeystores) DeepCopyInto(out *CertificateKeystores) { - *out = *in - if in.JKS != nil { - in, out := &in.JKS, &out.JKS - *out = new(JKSKeystore) - (*in).DeepCopyInto(*out) - } - if in.PKCS12 != nil { - in, out := &in.PKCS12, &out.PKCS12 - *out = new(PKCS12Keystore) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateKeystores. -func (in *CertificateKeystores) DeepCopy() *CertificateKeystores { - if in == nil { - return nil - } - out := new(CertificateKeystores) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateList) DeepCopyInto(out *CertificateList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Certificate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateList. -func (in *CertificateList) DeepCopy() *CertificateList { - if in == nil { - return nil - } - out := new(CertificateList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CertificateList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificatePrivateKey) DeepCopyInto(out *CertificatePrivateKey) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificatePrivateKey. -func (in *CertificatePrivateKey) DeepCopy() *CertificatePrivateKey { - if in == nil { - return nil - } - out := new(CertificatePrivateKey) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateRequest) DeepCopyInto(out *CertificateRequest) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateRequest. -func (in *CertificateRequest) DeepCopy() *CertificateRequest { - if in == nil { - return nil - } - out := new(CertificateRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CertificateRequest) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateRequestCondition) DeepCopyInto(out *CertificateRequestCondition) { - *out = *in - if in.LastTransitionTime != nil { - in, out := &in.LastTransitionTime, &out.LastTransitionTime - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateRequestCondition. -func (in *CertificateRequestCondition) DeepCopy() *CertificateRequestCondition { - if in == nil { - return nil - } - out := new(CertificateRequestCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateRequestList) DeepCopyInto(out *CertificateRequestList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CertificateRequest, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateRequestList. -func (in *CertificateRequestList) DeepCopy() *CertificateRequestList { - if in == nil { - return nil - } - out := new(CertificateRequestList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CertificateRequestList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateRequestSpec) DeepCopyInto(out *CertificateRequestSpec) { - *out = *in - if in.Duration != nil { - in, out := &in.Duration, &out.Duration - *out = new(v1.Duration) - **out = **in - } - out.IssuerRef = in.IssuerRef - if in.CSRPEM != nil { - in, out := &in.CSRPEM, &out.CSRPEM - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.Usages != nil { - in, out := &in.Usages, &out.Usages - *out = make([]KeyUsage, len(*in)) - copy(*out, *in) - } - if in.Groups != nil { - in, out := &in.Groups, &out.Groups - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Extra != nil { - in, out := &in.Extra, &out.Extra - *out = make(map[string][]string, len(*in)) - for key, val := range *in { - var outVal []string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make([]string, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateRequestSpec. -func (in *CertificateRequestSpec) DeepCopy() *CertificateRequestSpec { - if in == nil { - return nil - } - out := new(CertificateRequestSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateRequestStatus) DeepCopyInto(out *CertificateRequestStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]CertificateRequestCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Certificate != nil { - in, out := &in.Certificate, &out.Certificate - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.CA != nil { - in, out := &in.CA, &out.CA - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.FailureTime != nil { - in, out := &in.FailureTime, &out.FailureTime - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateRequestStatus. -func (in *CertificateRequestStatus) DeepCopy() *CertificateRequestStatus { - if in == nil { - return nil - } - out := new(CertificateRequestStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateSecretTemplate) DeepCopyInto(out *CertificateSecretTemplate) { - *out = *in - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSecretTemplate. -func (in *CertificateSecretTemplate) DeepCopy() *CertificateSecretTemplate { - if in == nil { - return nil - } - out := new(CertificateSecretTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateSpec) DeepCopyInto(out *CertificateSpec) { - *out = *in - if in.Subject != nil { - in, out := &in.Subject, &out.Subject - *out = new(X509Subject) - (*in).DeepCopyInto(*out) - } - if in.Organization != nil { - in, out := &in.Organization, &out.Organization - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Duration != nil { - in, out := &in.Duration, &out.Duration - *out = new(v1.Duration) - **out = **in - } - if in.RenewBefore != nil { - in, out := &in.RenewBefore, &out.RenewBefore - *out = new(v1.Duration) - **out = **in - } - if in.DNSNames != nil { - in, out := &in.DNSNames, &out.DNSNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.IPAddresses != nil { - in, out := &in.IPAddresses, &out.IPAddresses - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.URISANs != nil { - in, out := &in.URISANs, &out.URISANs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.EmailSANs != nil { - in, out := &in.EmailSANs, &out.EmailSANs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.OtherNames != nil { - in, out := &in.OtherNames, &out.OtherNames - *out = make([]OtherName, len(*in)) - copy(*out, *in) - } - if in.SecretTemplate != nil { - in, out := &in.SecretTemplate, &out.SecretTemplate - *out = new(CertificateSecretTemplate) - (*in).DeepCopyInto(*out) - } - if in.Keystores != nil { - in, out := &in.Keystores, &out.Keystores - *out = new(CertificateKeystores) - (*in).DeepCopyInto(*out) - } - out.IssuerRef = in.IssuerRef - if in.Usages != nil { - in, out := &in.Usages, &out.Usages - *out = make([]KeyUsage, len(*in)) - copy(*out, *in) - } - if in.PrivateKey != nil { - in, out := &in.PrivateKey, &out.PrivateKey - *out = new(CertificatePrivateKey) - **out = **in - } - if in.EncodeUsagesInRequest != nil { - in, out := &in.EncodeUsagesInRequest, &out.EncodeUsagesInRequest - *out = new(bool) - **out = **in - } - if in.RevisionHistoryLimit != nil { - in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit - *out = new(int32) - **out = **in - } - if in.AdditionalOutputFormats != nil { - in, out := &in.AdditionalOutputFormats, &out.AdditionalOutputFormats - *out = make([]CertificateAdditionalOutputFormat, len(*in)) - copy(*out, *in) - } - if in.NameConstraints != nil { - in, out := &in.NameConstraints, &out.NameConstraints - *out = new(NameConstraints) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSpec. -func (in *CertificateSpec) DeepCopy() *CertificateSpec { - if in == nil { - return nil - } - out := new(CertificateSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateStatus) DeepCopyInto(out *CertificateStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]CertificateCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.LastFailureTime != nil { - in, out := &in.LastFailureTime, &out.LastFailureTime - *out = (*in).DeepCopy() - } - if in.NotBefore != nil { - in, out := &in.NotBefore, &out.NotBefore - *out = (*in).DeepCopy() - } - if in.NotAfter != nil { - in, out := &in.NotAfter, &out.NotAfter - *out = (*in).DeepCopy() - } - if in.RenewalTime != nil { - in, out := &in.RenewalTime, &out.RenewalTime - *out = (*in).DeepCopy() - } - if in.Revision != nil { - in, out := &in.Revision, &out.Revision - *out = new(int) - **out = **in - } - if in.NextPrivateKeySecretName != nil { - in, out := &in.NextPrivateKeySecretName, &out.NextPrivateKeySecretName - *out = new(string) - **out = **in - } - if in.FailedIssuanceAttempts != nil { - in, out := &in.FailedIssuanceAttempts, &out.FailedIssuanceAttempts - *out = new(int) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateStatus. -func (in *CertificateStatus) DeepCopy() *CertificateStatus { - if in == nil { - return nil - } - out := new(CertificateStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterIssuer) DeepCopyInto(out *ClusterIssuer) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterIssuer. -func (in *ClusterIssuer) DeepCopy() *ClusterIssuer { - if in == nil { - return nil - } - out := new(ClusterIssuer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterIssuer) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterIssuerList) DeepCopyInto(out *ClusterIssuerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterIssuer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterIssuerList. -func (in *ClusterIssuerList) DeepCopy() *ClusterIssuerList { - if in == nil { - return nil - } - out := new(ClusterIssuerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterIssuerList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Issuer) DeepCopyInto(out *Issuer) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Issuer. -func (in *Issuer) DeepCopy() *Issuer { - if in == nil { - return nil - } - out := new(Issuer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Issuer) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IssuerCondition) DeepCopyInto(out *IssuerCondition) { - *out = *in - if in.LastTransitionTime != nil { - in, out := &in.LastTransitionTime, &out.LastTransitionTime - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IssuerCondition. -func (in *IssuerCondition) DeepCopy() *IssuerCondition { - if in == nil { - return nil - } - out := new(IssuerCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IssuerConfig) DeepCopyInto(out *IssuerConfig) { - *out = *in - if in.ACME != nil { - in, out := &in.ACME, &out.ACME - *out = new(acmev1alpha2.ACMEIssuer) - (*in).DeepCopyInto(*out) - } - if in.CA != nil { - in, out := &in.CA, &out.CA - *out = new(CAIssuer) - (*in).DeepCopyInto(*out) - } - if in.Vault != nil { - in, out := &in.Vault, &out.Vault - *out = new(VaultIssuer) - (*in).DeepCopyInto(*out) - } - if in.SelfSigned != nil { - in, out := &in.SelfSigned, &out.SelfSigned - *out = new(SelfSignedIssuer) - (*in).DeepCopyInto(*out) - } - if in.Venafi != nil { - in, out := &in.Venafi, &out.Venafi - *out = new(VenafiIssuer) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IssuerConfig. -func (in *IssuerConfig) DeepCopy() *IssuerConfig { - if in == nil { - return nil - } - out := new(IssuerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IssuerList) DeepCopyInto(out *IssuerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Issuer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IssuerList. -func (in *IssuerList) DeepCopy() *IssuerList { - if in == nil { - return nil - } - out := new(IssuerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IssuerList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IssuerSpec) DeepCopyInto(out *IssuerSpec) { - *out = *in - in.IssuerConfig.DeepCopyInto(&out.IssuerConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IssuerSpec. -func (in *IssuerSpec) DeepCopy() *IssuerSpec { - if in == nil { - return nil - } - out := new(IssuerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IssuerStatus) DeepCopyInto(out *IssuerStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]IssuerCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ACME != nil { - in, out := &in.ACME, &out.ACME - *out = new(acmev1alpha2.ACMEIssuerStatus) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IssuerStatus. -func (in *IssuerStatus) DeepCopy() *IssuerStatus { - if in == nil { - return nil - } - out := new(IssuerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JKSKeystore) DeepCopyInto(out *JKSKeystore) { - *out = *in - out.PasswordSecretRef = in.PasswordSecretRef - if in.Alias != nil { - in, out := &in.Alias, &out.Alias - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JKSKeystore. -func (in *JKSKeystore) DeepCopy() *JKSKeystore { - if in == nil { - return nil - } - out := new(JKSKeystore) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NameConstraintItem) DeepCopyInto(out *NameConstraintItem) { - *out = *in - if in.DNSDomains != nil { - in, out := &in.DNSDomains, &out.DNSDomains - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.IPRanges != nil { - in, out := &in.IPRanges, &out.IPRanges - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.EmailAddresses != nil { - in, out := &in.EmailAddresses, &out.EmailAddresses - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.URIDomains != nil { - in, out := &in.URIDomains, &out.URIDomains - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NameConstraintItem. -func (in *NameConstraintItem) DeepCopy() *NameConstraintItem { - if in == nil { - return nil - } - out := new(NameConstraintItem) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NameConstraints) DeepCopyInto(out *NameConstraints) { - *out = *in - if in.Permitted != nil { - in, out := &in.Permitted, &out.Permitted - *out = new(NameConstraintItem) - (*in).DeepCopyInto(*out) - } - if in.Excluded != nil { - in, out := &in.Excluded, &out.Excluded - *out = new(NameConstraintItem) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NameConstraints. -func (in *NameConstraints) DeepCopy() *NameConstraints { - if in == nil { - return nil - } - out := new(NameConstraints) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OtherName) DeepCopyInto(out *OtherName) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OtherName. -func (in *OtherName) DeepCopy() *OtherName { - if in == nil { - return nil - } - out := new(OtherName) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PKCS12Keystore) DeepCopyInto(out *PKCS12Keystore) { - *out = *in - out.PasswordSecretRef = in.PasswordSecretRef - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PKCS12Keystore. -func (in *PKCS12Keystore) DeepCopy() *PKCS12Keystore { - if in == nil { - return nil - } - out := new(PKCS12Keystore) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SelfSignedIssuer) DeepCopyInto(out *SelfSignedIssuer) { - *out = *in - if in.CRLDistributionPoints != nil { - in, out := &in.CRLDistributionPoints, &out.CRLDistributionPoints - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSignedIssuer. -func (in *SelfSignedIssuer) DeepCopy() *SelfSignedIssuer { - if in == nil { - return nil - } - out := new(SelfSignedIssuer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceAccountRef) DeepCopyInto(out *ServiceAccountRef) { - *out = *in - if in.TokenAudiences != nil { - in, out := &in.TokenAudiences, &out.TokenAudiences - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountRef. -func (in *ServiceAccountRef) DeepCopy() *ServiceAccountRef { - if in == nil { - return nil - } - out := new(ServiceAccountRef) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VaultAppRole) DeepCopyInto(out *VaultAppRole) { - *out = *in - out.SecretRef = in.SecretRef - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultAppRole. -func (in *VaultAppRole) DeepCopy() *VaultAppRole { - if in == nil { - return nil - } - out := new(VaultAppRole) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VaultAuth) DeepCopyInto(out *VaultAuth) { - *out = *in - if in.TokenSecretRef != nil { - in, out := &in.TokenSecretRef, &out.TokenSecretRef - *out = new(metav1.SecretKeySelector) - **out = **in - } - if in.AppRole != nil { - in, out := &in.AppRole, &out.AppRole - *out = new(VaultAppRole) - **out = **in - } - if in.Kubernetes != nil { - in, out := &in.Kubernetes, &out.Kubernetes - *out = new(VaultKubernetesAuth) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultAuth. -func (in *VaultAuth) DeepCopy() *VaultAuth { - if in == nil { - return nil - } - out := new(VaultAuth) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VaultIssuer) DeepCopyInto(out *VaultIssuer) { - *out = *in - in.Auth.DeepCopyInto(&out.Auth) - if in.CABundle != nil { - in, out := &in.CABundle, &out.CABundle - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.CABundleSecretRef != nil { - in, out := &in.CABundleSecretRef, &out.CABundleSecretRef - *out = new(metav1.SecretKeySelector) - **out = **in - } - if in.ClientCertSecretRef != nil { - in, out := &in.ClientCertSecretRef, &out.ClientCertSecretRef - *out = new(metav1.SecretKeySelector) - **out = **in - } - if in.ClientKeySecretRef != nil { - in, out := &in.ClientKeySecretRef, &out.ClientKeySecretRef - *out = new(metav1.SecretKeySelector) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultIssuer. -func (in *VaultIssuer) DeepCopy() *VaultIssuer { - if in == nil { - return nil - } - out := new(VaultIssuer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VaultKubernetesAuth) DeepCopyInto(out *VaultKubernetesAuth) { - *out = *in - out.SecretRef = in.SecretRef - if in.ServiceAccountRef != nil { - in, out := &in.ServiceAccountRef, &out.ServiceAccountRef - *out = new(ServiceAccountRef) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultKubernetesAuth. -func (in *VaultKubernetesAuth) DeepCopy() *VaultKubernetesAuth { - if in == nil { - return nil - } - out := new(VaultKubernetesAuth) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VenafiCloud) DeepCopyInto(out *VenafiCloud) { - *out = *in - out.APITokenSecretRef = in.APITokenSecretRef - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VenafiCloud. -func (in *VenafiCloud) DeepCopy() *VenafiCloud { - if in == nil { - return nil - } - out := new(VenafiCloud) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VenafiIssuer) DeepCopyInto(out *VenafiIssuer) { - *out = *in - if in.TPP != nil { - in, out := &in.TPP, &out.TPP - *out = new(VenafiTPP) - (*in).DeepCopyInto(*out) - } - if in.Cloud != nil { - in, out := &in.Cloud, &out.Cloud - *out = new(VenafiCloud) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VenafiIssuer. -func (in *VenafiIssuer) DeepCopy() *VenafiIssuer { - if in == nil { - return nil - } - out := new(VenafiIssuer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VenafiTPP) DeepCopyInto(out *VenafiTPP) { - *out = *in - out.CredentialsRef = in.CredentialsRef - if in.CABundle != nil { - in, out := &in.CABundle, &out.CABundle - *out = make([]byte, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VenafiTPP. -func (in *VenafiTPP) DeepCopy() *VenafiTPP { - if in == nil { - return nil - } - out := new(VenafiTPP) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *X509Subject) DeepCopyInto(out *X509Subject) { - *out = *in - if in.Countries != nil { - in, out := &in.Countries, &out.Countries - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.OrganizationalUnits != nil { - in, out := &in.OrganizationalUnits, &out.OrganizationalUnits - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Localities != nil { - in, out := &in.Localities, &out.Localities - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Provinces != nil { - in, out := &in.Provinces, &out.Provinces - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.StreetAddresses != nil { - in, out := &in.StreetAddresses, &out.StreetAddresses - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.PostalCodes != nil { - in, out := &in.PostalCodes, &out.PostalCodes - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new X509Subject. -func (in *X509Subject) DeepCopy() *X509Subject { - if in == nil { - return nil - } - out := new(X509Subject) - in.DeepCopyInto(out) - return out -} diff --git a/internal/apis/certmanager/v1alpha2/zz_generated.defaults.go b/internal/apis/certmanager/v1alpha2/zz_generated.defaults.go deleted file mode 100644 index 10b31a62682..00000000000 --- a/internal/apis/certmanager/v1alpha2/zz_generated.defaults.go +++ /dev/null @@ -1,33 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The cert-manager 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 defaulter-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - return nil -} diff --git a/internal/apis/certmanager/v1alpha3/const.go b/internal/apis/certmanager/v1alpha3/const.go deleted file mode 100644 index 7cfa28c7723..00000000000 --- a/internal/apis/certmanager/v1alpha3/const.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha3 - -import "time" - -const ( - // minimum permitted certificate duration by cert-manager - MinimumCertificateDuration = time.Hour - - // default certificate duration if Issuer.spec.duration is not set - DefaultCertificateDuration = time.Hour * 24 * 90 - - // minimum certificate duration before certificate expiration - MinimumRenewBefore = time.Minute * 5 - - // Deprecated: the default is now 2/3 of Certificate's duration - DefaultRenewBefore = time.Hour * 24 * 30 -) - -const ( - // Default index key for the Secret reference for Token authentication - DefaultVaultTokenAuthSecretKey = "token" - - // Default mount path location for Kubernetes ServiceAccount authentication - // (/v1/auth/kubernetes). The endpoint will then be called at `/login`, so - // left as the default, `/v1/auth/kubernetes/login` will be called. - DefaultVaultKubernetesAuthMountPath = "/v1/auth/kubernetes" -) diff --git a/internal/apis/certmanager/v1alpha3/conversion.go b/internal/apis/certmanager/v1alpha3/conversion.go deleted file mode 100644 index a44644a8b92..00000000000 --- a/internal/apis/certmanager/v1alpha3/conversion.go +++ /dev/null @@ -1,124 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha3 - -import ( - "k8s.io/apimachinery/pkg/conversion" - - "github.com/cert-manager/cert-manager/internal/apis/certmanager" -) - -func Convert_v1alpha3_CertificateSpec_To_certmanager_CertificateSpec(in *CertificateSpec, out *certmanager.CertificateSpec, s conversion.Scope) error { - if err := autoConvert_v1alpha3_CertificateSpec_To_certmanager_CertificateSpec(in, out, s); err != nil { - return err - } - - out.EmailAddresses = in.EmailSANs - out.URIs = in.URISANs - - if in.KeyAlgorithm != "" || in.KeyEncoding != "" || in.KeySize != 0 { - if out.PrivateKey == nil { - out.PrivateKey = &certmanager.CertificatePrivateKey{} - } - - switch in.KeyAlgorithm { - case ECDSAKeyAlgorithm: - out.PrivateKey.Algorithm = certmanager.ECDSAKeyAlgorithm - case RSAKeyAlgorithm: - out.PrivateKey.Algorithm = certmanager.RSAKeyAlgorithm - default: - out.PrivateKey.Algorithm = certmanager.PrivateKeyAlgorithm(in.KeyAlgorithm) - } - - switch in.KeyEncoding { - case PKCS1: - out.PrivateKey.Encoding = certmanager.PKCS1 - case PKCS8: - out.PrivateKey.Encoding = certmanager.PKCS8 - default: - out.PrivateKey.Encoding = certmanager.PrivateKeyEncoding(in.KeyEncoding) - } - - out.PrivateKey.Size = in.KeySize - } - - return nil -} - -func Convert_certmanager_CertificateSpec_To_v1alpha3_CertificateSpec(in *certmanager.CertificateSpec, out *CertificateSpec, s conversion.Scope) error { - if err := autoConvert_certmanager_CertificateSpec_To_v1alpha3_CertificateSpec(in, out, s); err != nil { - return err - } - - out.EmailSANs = in.EmailAddresses - out.URISANs = in.URIs - - if in.PrivateKey != nil { - switch in.PrivateKey.Algorithm { - case certmanager.ECDSAKeyAlgorithm: - out.KeyAlgorithm = ECDSAKeyAlgorithm - case certmanager.RSAKeyAlgorithm: - out.KeyAlgorithm = RSAKeyAlgorithm - default: - out.KeyAlgorithm = KeyAlgorithm(in.PrivateKey.Algorithm) - } - - switch in.PrivateKey.Encoding { - case certmanager.PKCS1: - out.KeyEncoding = PKCS1 - case certmanager.PKCS8: - out.KeyEncoding = PKCS8 - default: - out.KeyEncoding = KeyEncoding(in.PrivateKey.Encoding) - } - - out.KeySize = in.PrivateKey.Size - } - - return nil -} - -func Convert_certmanager_X509Subject_To_v1alpha3_X509Subject(in *certmanager.X509Subject, out *X509Subject, s conversion.Scope) error { - return autoConvert_certmanager_X509Subject_To_v1alpha3_X509Subject(in, out, s) -} - -func Convert_certmanager_CertificatePrivateKey_To_v1alpha3_CertificatePrivateKey(in *certmanager.CertificatePrivateKey, out *CertificatePrivateKey, s conversion.Scope) error { - return autoConvert_certmanager_CertificatePrivateKey_To_v1alpha3_CertificatePrivateKey(in, out, s) -} - -func Convert_v1alpha3_CertificateRequestSpec_To_certmanager_CertificateRequestSpec(in *CertificateRequestSpec, out *certmanager.CertificateRequestSpec, s conversion.Scope) error { - if err := autoConvert_v1alpha3_CertificateRequestSpec_To_certmanager_CertificateRequestSpec(in, out, s); err != nil { - return err - } - - out.Request = in.CSRPEM - return nil -} - -func Convert_certmanager_CertificateRequestSpec_To_v1alpha3_CertificateRequestSpec(in *certmanager.CertificateRequestSpec, out *CertificateRequestSpec, s conversion.Scope) error { - if err := autoConvert_certmanager_CertificateRequestSpec_To_v1alpha3_CertificateRequestSpec(in, out, s); err != nil { - return err - } - - out.CSRPEM = in.Request - return nil -} - -// Convert_certmanager_VaultKubernetesAuth_To_v1alpha3_VaultKubernetesAuth is an autogenerated conversion function. -func Convert_certmanager_VaultKubernetesAuth_To_v1alpha3_VaultKubernetesAuth(in *certmanager.VaultKubernetesAuth, out *VaultKubernetesAuth, s conversion.Scope) error { - return autoConvert_certmanager_VaultKubernetesAuth_To_v1alpha3_VaultKubernetesAuth(in, out, s) -} diff --git a/internal/apis/certmanager/v1alpha3/defaults.go b/internal/apis/certmanager/v1alpha3/defaults.go deleted file mode 100644 index 23beb3dd257..00000000000 --- a/internal/apis/certmanager/v1alpha3/defaults.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha3 - -import ( - "k8s.io/apimachinery/pkg/runtime" -) - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} diff --git a/internal/apis/certmanager/v1alpha3/doc.go b/internal/apis/certmanager/v1alpha3/doc.go deleted file mode 100644 index cd7f49f878a..00000000000 --- a/internal/apis/certmanager/v1alpha3/doc.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2020 The cert-manager 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:conversion-gen=github.com/cert-manager/cert-manager/internal/apis/certmanager -// +k8s:conversion-gen-external-types=github.com/cert-manager/cert-manager/internal/apis/certmanager/v1alpha3 -// +k8s:defaulter-gen=TypeMeta -// +k8s:deepcopy-gen=package,register - -// +groupName=cert-manager.io -package v1alpha3 diff --git a/internal/apis/certmanager/v1alpha3/generic_issuer.go b/internal/apis/certmanager/v1alpha3/generic_issuer.go deleted file mode 100644 index 4f443e0c1d9..00000000000 --- a/internal/apis/certmanager/v1alpha3/generic_issuer.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha3 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - - cmacme "github.com/cert-manager/cert-manager/internal/apis/acme/v1alpha3" -) - -type GenericIssuer interface { - runtime.Object - metav1.Object - - GetObjectMeta() *metav1.ObjectMeta - GetSpec() *IssuerSpec - GetStatus() *IssuerStatus -} - -var _ GenericIssuer = &Issuer{} -var _ GenericIssuer = &ClusterIssuer{} - -func (c *ClusterIssuer) GetObjectMeta() *metav1.ObjectMeta { - return &c.ObjectMeta -} -func (c *ClusterIssuer) GetSpec() *IssuerSpec { - return &c.Spec -} -func (c *ClusterIssuer) GetStatus() *IssuerStatus { - return &c.Status -} -func (c *ClusterIssuer) SetSpec(spec IssuerSpec) { - c.Spec = spec -} -func (c *ClusterIssuer) SetStatus(status IssuerStatus) { - c.Status = status -} -func (c *ClusterIssuer) Copy() GenericIssuer { - return c.DeepCopy() -} -func (c *Issuer) GetObjectMeta() *metav1.ObjectMeta { - return &c.ObjectMeta -} -func (c *Issuer) GetSpec() *IssuerSpec { - return &c.Spec -} -func (c *Issuer) GetStatus() *IssuerStatus { - return &c.Status -} -func (c *Issuer) SetSpec(spec IssuerSpec) { - c.Spec = spec -} -func (c *Issuer) SetStatus(status IssuerStatus) { - c.Status = status -} -func (c *Issuer) Copy() GenericIssuer { - return c.DeepCopy() -} - -// TODO: refactor these functions away -func (i *IssuerStatus) ACMEStatus() *cmacme.ACMEIssuerStatus { - // this is an edge case, but this will prevent panics - if i == nil { - return &cmacme.ACMEIssuerStatus{} - } - if i.ACME == nil { - i.ACME = &cmacme.ACMEIssuerStatus{} - } - return i.ACME -} diff --git a/internal/apis/certmanager/v1alpha3/register.go b/internal/apis/certmanager/v1alpha3/register.go deleted file mode 100644 index a001b0efa28..00000000000 --- a/internal/apis/certmanager/v1alpha3/register.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha3 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - "github.com/cert-manager/cert-manager/pkg/apis/certmanager" -) - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: certmanager.GroupName, Version: "v1alpha3"} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addDefaultingFuncs) - - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes) -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &Certificate{}, - &CertificateList{}, - &Issuer{}, - &IssuerList{}, - &ClusterIssuer{}, - &ClusterIssuerList{}, - &CertificateRequest{}, - &CertificateRequestList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/internal/apis/certmanager/v1alpha3/types.go b/internal/apis/certmanager/v1alpha3/types.go deleted file mode 100644 index 377ace3539e..00000000000 --- a/internal/apis/certmanager/v1alpha3/types.go +++ /dev/null @@ -1,195 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha3 - -// Common annotation keys added to resources. -const ( - // Annotation key for DNS subjectAltNames. - AltNamesAnnotationKey = "cert-manager.io/alt-names" - - // Annotation key for IP subjectAltNames. - IPSANAnnotationKey = "cert-manager.io/ip-sans" - - // Annotation key for URI subjectAltNames. - URISANAnnotationKey = "cert-manager.io/uri-sans" - - // Annotation key for certificate common name. - CommonNameAnnotationKey = "cert-manager.io/common-name" - - // Annotation key the 'name' of the Issuer resource. - IssuerNameAnnotationKey = "cert-manager.io/issuer-name" - - // Annotation key for the 'kind' of the Issuer resource. - IssuerKindAnnotationKey = "cert-manager.io/issuer-kind" - - // Annotation key for the 'group' of the Issuer resource. - IssuerGroupAnnotationKey = "cert-manager.io/issuer-group" - - // Annotation key for the name of the certificate that a resource is related to. - CertificateNameKey = "cert-manager.io/certificate-name" - - // Annotation key used to denote whether a Secret is named on a Certificate - // as a 'next private key' Secret resource. - IsNextPrivateKeySecretLabelKey = "cert-manager.io/next-private-key" -) - -// Deprecated annotation names for Secrets -// These will be removed in a future release. -const ( - DeprecatedIssuerNameAnnotationKey = "certmanager.k8s.io/issuer-name" - DeprecatedIssuerKindAnnotationKey = "certmanager.k8s.io/issuer-kind" -) - -const ( - // issuerNameAnnotation can be used to override the issuer specified on the - // created Certificate resource. - IngressIssuerNameAnnotationKey = "cert-manager.io/issuer" - // clusterIssuerNameAnnotation can be used to override the issuer specified on the - // created Certificate resource. The Certificate will reference the - // specified *ClusterIssuer* instead of normal issuer. - IngressClusterIssuerNameAnnotationKey = "cert-manager.io/cluster-issuer" - // acmeIssuerHTTP01IngressClassAnnotation can be used to override the http01 ingressClass - // if the challenge type is set to http01 - IngressACMEIssuerHTTP01IngressClassAnnotationKey = "acme.cert-manager.io/http01-ingress-class" - - // IngressClassAnnotationKey picks a specific "class" for the Ingress. The - // controller only processes Ingresses with this annotation either unset, or - // set to either the configured value or the empty string. - IngressClassAnnotationKey = "kubernetes.io/ingress.class" -) - -// Annotation names for CertificateRequests -const ( - // Annotation added to CertificateRequest resources to denote the name of - // a Secret resource containing the private key used to sign the CSR stored - // on the resource. - // This annotation *may* not be present, and is used by the 'self signing' - // issuer type to self-sign certificates. - CertificateRequestPrivateKeyAnnotationKey = "cert-manager.io/private-key-secret-name" - - // Annotation to declare the CertificateRequest "revision", belonging to a Certificate Resource - CertificateRequestRevisionAnnotationKey = "cert-manager.io/certificate-revision" -) - -const ( - // IssueTemporaryCertificateAnnotation is an annotation that can be added to - // Certificate resources. - // If it is present, a temporary internally signed certificate will be - // stored in the target Secret resource whilst the real Issuer is processing - // the certificate request. - IssueTemporaryCertificateAnnotation = "cert-manager.io/issue-temporary-certificate" -) - -// Common/known resource kinds. -const ( - ClusterIssuerKind = "ClusterIssuer" - IssuerKind = "Issuer" - CertificateKind = "Certificate" - CertificateRequestKind = "CertificateRequest" -) - -const ( - // WantInjectAnnotation is the annotation that specifies that a particular - // object wants injection of CAs. It takes the form of a reference to a certificate - // as namespace/name. The certificate is expected to have the is-serving-for annotations. - WantInjectAnnotation = "cert-manager.io/inject-ca-from" - - // WantInjectAPIServerCAAnnotation, if set to "true", will make the cainjector - // inject the CA certificate for the Kubernetes apiserver into the resource. - // It discovers the apiserver's CA by inspecting the service account credentials - // mounted into the cainjector pod. - WantInjectAPIServerCAAnnotation = "cert-manager.io/inject-apiserver-ca" - - // WantInjectFromSecretAnnotation is the annotation that specifies that a particular - // object wants injection of CAs. It takes the form of a reference to a Secret - // as namespace/name. - WantInjectFromSecretAnnotation = "cert-manager.io/inject-ca-from-secret" - - // AllowsInjectionFromSecretAnnotation is an annotation that must be added - // to Secret resource that want to denote that they can be directly - // injected into injectables that have a `inject-ca-from-secret` annotation. - // If an injectable references a Secret that does NOT have this annotation, - // the cainjector will refuse to inject the secret. - AllowsInjectionFromSecretAnnotation = "cert-manager.io/allow-direct-injection" -) - -// Issuer specific Annotations -const ( - // VenafiCustomFieldsAnnotationKey is the annotation that passes on JSON encoded custom fields to the Venafi issuer - // This will only work with Venafi TPP v19.3 and higher - // The value is an array with objects containing the name and value keys - // for example: `[{"name": "custom-field", "value": "custom-value"}]` - VenafiCustomFieldsAnnotationKey = "venafi.cert-manager.io/custom-fields" -) - -// KeyUsage specifies valid usage contexts for keys. -// See: -// https://tools.ietf.org/html/rfc5280#section-4.2.1.3 -// https://tools.ietf.org/html/rfc5280#section-4.2.1.12 -// -// Valid KeyUsage values are as follows: -// "signing", -// "digital signature", -// "content commitment", -// "key encipherment", -// "key agreement", -// "data encipherment", -// "cert sign", -// "crl sign", -// "encipher only", -// "decipher only", -// "any", -// "server auth", -// "client auth", -// "code signing", -// "email protection", -// "s/mime", -// "ipsec end system", -// "ipsec tunnel", -// "ipsec user", -// "timestamping", -// "ocsp signing", -// "microsoft sgc", -// "netscape sgc" -// +kubebuilder:validation:Enum="signing";"digital signature";"content commitment";"key encipherment";"key agreement";"data encipherment";"cert sign";"crl sign";"encipher only";"decipher only";"any";"server auth";"client auth";"code signing";"email protection";"s/mime";"ipsec end system";"ipsec tunnel";"ipsec user";"timestamping";"ocsp signing";"microsoft sgc";"netscape sgc" -type KeyUsage string - -const ( - UsageSigning KeyUsage = "signing" - UsageDigitalSignature KeyUsage = "digital signature" - UsageContentCommitment KeyUsage = "content commitment" - UsageKeyEncipherment KeyUsage = "key encipherment" - UsageKeyAgreement KeyUsage = "key agreement" - UsageDataEncipherment KeyUsage = "data encipherment" - UsageCertSign KeyUsage = "cert sign" - UsageCRLSign KeyUsage = "crl sign" - UsageEncipherOnly KeyUsage = "encipher only" - UsageDecipherOnly KeyUsage = "decipher only" - UsageAny KeyUsage = "any" - UsageServerAuth KeyUsage = "server auth" - UsageClientAuth KeyUsage = "client auth" - UsageCodeSigning KeyUsage = "code signing" - UsageEmailProtection KeyUsage = "email protection" - UsageSMIME KeyUsage = "s/mime" - UsageIPsecEndSystem KeyUsage = "ipsec end system" - UsageIPsecTunnel KeyUsage = "ipsec tunnel" - UsageIPsecUser KeyUsage = "ipsec user" - UsageTimestamping KeyUsage = "timestamping" - UsageOCSPSigning KeyUsage = "ocsp signing" - UsageMicrosoftSGC KeyUsage = "microsoft sgc" - UsageNetscapeSGC KeyUsage = "netscape sgc" -) diff --git a/internal/apis/certmanager/v1alpha3/types_certificate.go b/internal/apis/certmanager/v1alpha3/types_certificate.go deleted file mode 100644 index 580d00c6187..00000000000 --- a/internal/apis/certmanager/v1alpha3/types_certificate.go +++ /dev/null @@ -1,614 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha3 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// A Certificate resource should be created to ensure an up to date and signed -// x509 certificate is stored in the Kubernetes Secret resource named in `spec.secretName`. -// -// The stored certificate will be renewed before it expires (as configured by `spec.renewBefore`). -// +k8s:openapi-gen=true -type Certificate struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Desired state of the Certificate resource. - Spec CertificateSpec `json:"spec,omitempty"` - - // Status of the Certificate. This is set and managed automatically. - Status CertificateStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CertificateList is a list of Certificates -type CertificateList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []Certificate `json:"items"` -} - -// +kubebuilder:validation:Enum=rsa;ecdsa -type KeyAlgorithm string - -const ( - // Denotes the RSA private key type. - RSAKeyAlgorithm KeyAlgorithm = "rsa" - - // Denotes the ECDSA private key type. - ECDSAKeyAlgorithm KeyAlgorithm = "ecdsa" -) - -// +kubebuilder:validation:Enum=pkcs1;pkcs8 -type KeyEncoding string - -const ( - // PKCS1 key encoding will produce PEM files that include the type of - // private key as part of the PEM header, e.g. `BEGIN RSA PRIVATE KEY`. - // If the keyAlgorithm is set to `ecdsa`, this will produce private keys - // that use the `BEGIN EC PRIVATE KEY` header. - PKCS1 KeyEncoding = "pkcs1" - - // PKCS8 key encoding will produce PEM files with the `BEGIN PRIVATE KEY` - // header. It encodes the keyAlgorithm of the private key as part of the - // DER encoded PEM block. - PKCS8 KeyEncoding = "pkcs8" -) - -// CertificateSpec defines the desired state of Certificate. -// A valid Certificate requires at least one of a CommonName, DNSName, or -// URISAN to be valid. -type CertificateSpec struct { - // Full X509 name specification (https://golang.org/pkg/crypto/x509/pkix/#Name). - // +optional - Subject *X509Subject `json:"subject,omitempty"` - - // Requested X.509 certificate subject, represented using the LDAP "String - // Representation of a Distinguished Name" [1]. - // Important: the LDAP string format also specifies the order of the attributes - // in the subject, this is important when issuing certs for LDAP authentication. - // Example: `CN=foo,DC=corp,DC=example,DC=com` - // More info [1]: https://datatracker.ietf.org/doc/html/rfc4514 - // More info: https://github.com/cert-manager/cert-manager/issues/3203 - // More info: https://github.com/cert-manager/cert-manager/issues/4424 - // - // Cannot be set if the `subject` or `commonName` field is set. - // +optional - LiteralSubject string `json:"literalSubject,omitempty"` - - // CommonName is a common name to be used on the Certificate. - // The CommonName should have a length of 64 characters or fewer to avoid - // generating invalid CSRs. - // This value is ignored by TLS clients when any subject alt name is set. - // This is x509 behaviour: https://tools.ietf.org/html/rfc6125#section-6.4.4 - // +optional - CommonName string `json:"commonName,omitempty"` - - // The requested 'duration' (i.e. lifetime) of the Certificate. This option - // may be ignored/overridden by some issuer types. If unset this defaults to - // 90 days. Certificate will be renewed either 2/3 through its duration or - // `renewBefore` period before its expiry, whichever is later. Minimum - // accepted duration is 1 hour. Value must be in units accepted by Go - // time.ParseDuration https://golang.org/pkg/time/#ParseDuration - // +optional - Duration *metav1.Duration `json:"duration,omitempty"` - - // How long before the currently issued certificate's expiry - // cert-manager should renew the certificate. The default is 2/3 of the - // issued certificate's duration. Minimum accepted value is 5 minutes. - // Value must be in units accepted by Go time.ParseDuration - // https://golang.org/pkg/time/#ParseDuration - // +optional - RenewBefore *metav1.Duration `json:"renewBefore,omitempty"` - - // DNSNames is a list of DNS subjectAltNames to be set on the Certificate. - // +optional - DNSNames []string `json:"dnsNames,omitempty"` - - // IPAddresses is a list of IP address subjectAltNames to be set on the Certificate. - // +optional - IPAddresses []string `json:"ipAddresses,omitempty"` - - // URISANs is a list of URI subjectAltNames to be set on the Certificate. - // +optional - URISANs []string `json:"uriSANs,omitempty"` - - // EmailSANs is a list of email subjectAltNames to be set on the Certificate. - // +optional - EmailSANs []string `json:"emailSANs,omitempty"` - - // `otherNames` is an escape hatch for SAN that allows any type. We currently restrict the support to string like otherNames, cf RFC 5280 p 37 - // Any UTF8 String valued otherName can be passed with by setting the keys oid: x.x.x.x and UTF8Value: somevalue for `otherName`. - // Most commonly this would be UPN set with oid: 1.3.6.1.4.1.311.20.2.3 - // You should ensure that any OID passed is valid for the UTF8String type as we do not explicitly validate this. - // +optional - OtherNames []OtherName `json:"otherNames,omitempty"` - - // SecretName is the name of the secret resource that will be automatically - // created and managed by this Certificate resource. - // It will be populated with a private key and certificate, signed by the - // denoted issuer. - SecretName string `json:"secretName"` - - // SecretTemplate defines annotations and labels to be copied to the - // Certificate's Secret. Labels and annotations on the Secret will be changed - // as they appear on the SecretTemplate when added or removed. SecretTemplate - // annotations are added in conjunction with, and cannot overwrite, the base - // set of annotations cert-manager sets on the Certificate's Secret. - // +optional - SecretTemplate *CertificateSecretTemplate `json:"secretTemplate,omitempty"` - - // Keystores configures additional keystore output formats stored in the - // `secretName` Secret resource. - // +optional - Keystores *CertificateKeystores `json:"keystores,omitempty"` - - // IssuerRef is a reference to the issuer for this certificate. - // If the `kind` field is not set, or set to `Issuer`, an Issuer resource - // with the given name in the same namespace as the Certificate will be used. - // If the `kind` field is set to `ClusterIssuer`, a ClusterIssuer with the - // provided name will be used. - // The `name` field in this stanza is required at all times. - IssuerRef cmmeta.ObjectReference `json:"issuerRef"` - - // IsCA will mark this Certificate as valid for certificate signing. - // This will automatically add the `cert sign` usage to the list of `usages`. - // +optional - IsCA bool `json:"isCA,omitempty"` - - // Usages is the set of x509 usages that are requested for the certificate. - // Defaults to `digital signature` and `key encipherment` if not specified. - // +optional - Usages []KeyUsage `json:"usages,omitempty"` - - // KeySize is the key bit size of the corresponding private key for this certificate. - // If `keyAlgorithm` is set to `rsa`, valid values are `2048`, `4096` or `8192`, - // and will default to `2048` if not specified. - // If `keyAlgorithm` is set to `ecdsa`, valid values are `256`, `384` or `521`, - // and will default to `256` if not specified. - // No other values are allowed. - // +optional - KeySize int `json:"keySize,omitempty"` // Validated by webhook. Be mindful of adding OpenAPI validation- see https://github.com/cert-manager/cert-manager/issues/3644 . - - // KeyAlgorithm is the private key algorithm of the corresponding private key - // for this certificate. If provided, allowed values are either `rsa` or `ecdsa` - // If `keyAlgorithm` is specified and `keySize` is not provided, - // key size of 256 will be used for `ecdsa` key algorithm and - // key size of 2048 will be used for `rsa` key algorithm. - // +optional - KeyAlgorithm KeyAlgorithm `json:"keyAlgorithm,omitempty"` - - // KeyEncoding is the private key cryptography standards (PKCS) - // for this certificate's private key to be encoded in. If provided, allowed - // values are `pkcs1` and `pkcs8` standing for PKCS#1 and PKCS#8, respectively. - // If KeyEncoding is not specified, then `pkcs1` will be used by default. - // +optional - KeyEncoding KeyEncoding `json:"keyEncoding,omitempty"` - - // Options to control private keys used for the Certificate. - // +optional - PrivateKey *CertificatePrivateKey `json:"privateKey,omitempty"` - - // EncodeUsagesInRequest controls whether key usages should be present - // in the CertificateRequest - // +optional - EncodeUsagesInRequest *bool `json:"encodeUsagesInRequest,omitempty"` - - // revisionHistoryLimit is the maximum number of CertificateRequest revisions - // that are maintained in the Certificate's history. Each revision represents - // a single `CertificateRequest` created by this Certificate, either when it - // was created, renewed, or Spec was changed. Revisions will be removed by - // oldest first if the number of revisions exceeds this number. If set, - // revisionHistoryLimit must be a value of `1` or greater. If unset (`nil`), - // revisions will not be garbage collected. Default value is `nil`. - // +kubebuilder:validation:ExclusiveMaximum=false - // +optional - RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` // Validated by the validating webhook. - - // AdditionalOutputFormats defines extra output formats of the private key - // and signed certificate chain to be written to this Certificate's target - // Secret. This is an Alpha Feature and is only enabled with the - // `--feature-gates=AdditionalCertificateOutputFormats=true` option on both - // the controller and webhook components. - // +optional - AdditionalOutputFormats []CertificateAdditionalOutputFormat `json:"additionalOutputFormats,omitempty"` - - // x.509 certificate NameConstraint extension which MUST NOT be used in a non-CA certificate. - // More Info: https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.10 - // - // This is an Alpha Feature and is only enabled with the - // `--feature-gates=NameConstraints=true` option set on both - // the controller and webhook components. - // +optional - NameConstraints *NameConstraints `json:"nameConstraints,omitempty"` -} - -type OtherName struct { - // OID is the object identifier for the otherName SAN. - // The object identifier must be expressed as a dotted string, for - // example, "1.2.840.113556.1.4.221". - OID string `json:"oid,omitempty"` - - // utf8Value is the string value of the otherName SAN. - // The utf8Value accepts any valid UTF8 string to set as value for the otherName SAN. - UTF8Value string `json:"utf8Value,omitempty"` -} - -// CertificatePrivateKey contains configuration options for private keys -// used by the Certificate controller. -// This allows control of how private keys are rotated. -type CertificatePrivateKey struct { - // RotationPolicy controls how private keys should be regenerated when a - // re-issuance is being processed. - // If set to Never, a private key will only be generated if one does not - // already exist in the target `spec.secretName`. If one does exists but it - // does not have the correct algorithm or size, a warning will be raised - // to await user intervention. - // If set to Always, a private key matching the specified requirements - // will be generated whenever a re-issuance occurs. - // Default is 'Never' for backward compatibility. - // +optional - RotationPolicy PrivateKeyRotationPolicy `json:"rotationPolicy,omitempty"` -} - -// Denotes how private keys should be generated or sourced when a Certificate -// is being issued. -type PrivateKeyRotationPolicy string - -var ( - // RotationPolicyNever means a private key will only be generated if one - // does not already exist in the target `spec.secretName`. - // If one does exists but it does not have the correct algorithm or size, - // a warning will be raised to await user intervention. - RotationPolicyNever PrivateKeyRotationPolicy = "Never" - - // RotationPolicyAlways means a private key matching the specified - // requirements will be generated whenever a re-issuance occurs. - RotationPolicyAlways PrivateKeyRotationPolicy = "Always" -) - -// X509Subject Full X509 name specification -type X509Subject struct { - // Organizations to be used on the Certificate. - // +optional - Organizations []string `json:"organizations,omitempty"` - // Countries to be used on the Certificate. - // +optional - Countries []string `json:"countries,omitempty"` - // Organizational Units to be used on the Certificate. - // +optional - OrganizationalUnits []string `json:"organizationalUnits,omitempty"` - // Cities to be used on the Certificate. - // +optional - Localities []string `json:"localities,omitempty"` - // State/Provinces to be used on the Certificate. - // +optional - Provinces []string `json:"provinces,omitempty"` - // Street addresses to be used on the Certificate. - // +optional - StreetAddresses []string `json:"streetAddresses,omitempty"` - // Postal codes to be used on the Certificate. - // +optional - PostalCodes []string `json:"postalCodes,omitempty"` - // Serial number to be used on the Certificate. - // +optional - SerialNumber string `json:"serialNumber,omitempty"` -} - -// CertificateKeystores configures additional keystore output formats to be -// created in the Certificate's output Secret. -type CertificateKeystores struct { - // JKS configures options for storing a JKS keystore in the - // `spec.secretName` Secret resource. - JKS *JKSKeystore `json:"jks,omitempty"` - - // PKCS12 configures options for storing a PKCS12 keystore in the - // `spec.secretName` Secret resource. - PKCS12 *PKCS12Keystore `json:"pkcs12,omitempty"` -} - -// JKS configures options for storing a JKS keystore in the `spec.secretName` -// Secret resource. -type JKSKeystore struct { - // Create enables JKS keystore creation for the Certificate. - // If true, a file named `keystore.jks` will be created in the target - // Secret resource, encrypted using the password stored in - // `passwordSecretRef`. - // The keystore file will only be updated upon re-issuance. - // A file named `truststore.jks` will also be created in the target - // Secret resource, encrypted using the password stored in - // `passwordSecretRef` containing the issuing Certificate Authority. - Create bool `json:"create"` - - // PasswordSecretRef is a reference to a key in a Secret resource - // containing the password used to encrypt the JKS keystore. - PasswordSecretRef cmmeta.SecretKeySelector `json:"passwordSecretRef"` - - // Alias specifies the alias of the key in the keystore, required by the JKS format. - // If not provided, the default alias `certificate` will be used. - // +optional - Alias *string `json:"alias,omitempty"` -} - -// PKCS12 configures options for storing a PKCS12 keystore in the -// `spec.secretName` Secret resource. -type PKCS12Keystore struct { - // Create enables PKCS12 keystore creation for the Certificate. - // If true, a file named `keystore.p12` will be created in the target - // Secret resource, encrypted using the password stored in - // `passwordSecretRef`. - // The keystore file will only be updated upon re-issuance. - // A file named `truststore.p12` will also be created in the target - // Secret resource, encrypted using the password stored in - // `passwordSecretRef` containing the issuing Certificate Authority. - Create bool `json:"create"` - - // PasswordSecretRef is a reference to a key in a Secret resource - // containing the password used to encrypt the PKCS12 keystore. - - PasswordSecretRef cmmeta.SecretKeySelector `json:"passwordSecretRef"` - - // Profile specifies the key and certificate encryption algorithms and the HMAC algorithm - // used to create the PKCS12 keystore. Default value is `LegacyRC2` for backward compatibility. - // - // If provided, allowed values are: - // `LegacyRC2`: Deprecated. Not supported by default in OpenSSL 3 or Java 20. - // `LegacyDES`: Less secure algorithm. Use this option for maximal compatibility. - // `Modern2023`: Secure algorithm. Use this option in case you have to always use secure algorithms - // (eg. because of company policy). Please note that the security of the algorithm is not that important - // in reality, because the unencrypted certificate and private key are also stored in the Secret. - // +optional - Profile PKCS12Profile `json:"profile,omitempty"` -} - -// +kubebuilder:validation:Enum=LegacyRC2;LegacyDES;Modern2023 -type PKCS12Profile string - -const ( - // see: https://pkg.go.dev/software.sslmate.com/src/go-pkcs12#LegacyRC2 - LegacyRC2PKCS12Profile PKCS12Profile = "LegacyRC2" - - // see: https://pkg.go.dev/software.sslmate.com/src/go-pkcs12#LegacyDES - LegacyDESPKCS12Profile PKCS12Profile = "LegacyDES" - - // see: https://pkg.go.dev/software.sslmate.com/src/go-pkcs12#Modern2023 - Modern2023PKCS12Profile PKCS12Profile = "Modern2023" -) - -// CertificateStatus defines the observed state of Certificate -type CertificateStatus struct { - // List of status conditions to indicate the status of certificates. - // Known condition types are `Ready` and `Issuing`. - // +listType=map - // +listMapKey=type - // +optional - Conditions []CertificateCondition `json:"conditions,omitempty"` - - // LastFailureTime is the time as recorded by the Certificate controller - // of the most recent failure to complete a CertificateRequest for this - // Certificate resource. - // If set, cert-manager will not re-request another Certificate until - // 1 hour has elapsed from this time. - // +optional - LastFailureTime *metav1.Time `json:"lastFailureTime,omitempty"` - - // The time after which the certificate stored in the secret named - // by this resource in spec.secretName is valid. - // +optional - NotBefore *metav1.Time `json:"notBefore,omitempty"` - - // The expiration time of the certificate stored in the secret named - // by this resource in `spec.secretName`. - // +optional - NotAfter *metav1.Time `json:"notAfter,omitempty"` - - // RenewalTime is the time at which the certificate will be next - // renewed. - // If not set, no upcoming renewal is scheduled. - // +optional - RenewalTime *metav1.Time `json:"renewalTime,omitempty"` - - // The current 'revision' of the certificate as issued. - // - // When a CertificateRequest resource is created, it will have the - // `cert-manager.io/certificate-revision` set to one greater than the - // current value of this field. - // - // Upon issuance, this field will be set to the value of the annotation - // on the CertificateRequest resource used to issue the certificate. - // - // Persisting the value on the CertificateRequest resource allows the - // certificates controller to know whether a request is part of an old - // issuance or if it is part of the ongoing revision's issuance by - // checking if the revision value in the annotation is greater than this - // field. - // +optional - Revision *int `json:"revision,omitempty"` - - // The name of the Secret resource containing the private key to be used - // for the next certificate iteration. - // The keymanager controller will automatically set this field if the - // `Issuing` condition is set to `True`. - // It will automatically unset this field when the Issuing condition is - // not set or False. - // +optional - NextPrivateKeySecretName *string `json:"nextPrivateKeySecretName,omitempty"` - - // The number of continuous failed issuance attempts up till now. This - // field gets removed (if set) on a successful issuance and gets set to - // 1 if unset and an issuance has failed. If an issuance has failed, the - // delay till the next issuance will be calculated using formula - // time.Hour * 2 ^ (failedIssuanceAttempts - 1). - // +optional - FailedIssuanceAttempts *int `json:"failedIssuanceAttempts,omitempty"` -} - -// CertificateCondition contains condition information for an Certificate. -type CertificateCondition struct { - // Type of the condition, known values are (`Ready`, `Issuing`). - Type CertificateConditionType `json:"type"` - - // Status of the condition, one of (`True`, `False`, `Unknown`). - Status cmmeta.ConditionStatus `json:"status"` - - // LastTransitionTime is the timestamp corresponding to the last status - // change of this condition. - // +optional - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - - // Reason is a brief machine readable explanation for the condition's last - // transition. - // +optional - Reason string `json:"reason,omitempty"` - - // Message is a human readable description of the details of the last - // transition, complementing reason. - // +optional - Message string `json:"message,omitempty"` - - // If set, this represents the .metadata.generation that the condition was - // set based upon. - // For instance, if .metadata.generation is currently 12, but the - // .status.condition[x].observedGeneration is 9, the condition is out of date - // with respect to the current state of the Certificate. - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty"` -} - -// CertificateConditionType represents an Certificate condition value. -type CertificateConditionType string - -const ( - // CertificateConditionReady indicates that a certificate is ready for use. - // This is defined as: - // - The target secret exists - // - The target secret contains a certificate that has not expired - // - The target secret contains a private key valid for the certificate - // - The commonName and dnsNames attributes match those specified on the Certificate - CertificateConditionReady CertificateConditionType = "Ready" - - // A condition added to Certificate resources when an issuance is required. - // This condition will be automatically added and set to true if: - // * No keypair data exists in the target Secret - // * The data stored in the Secret cannot be decoded - // * The private key and certificate do not have matching public keys - // * If a CertificateRequest for the current revision exists and the - // certificate data stored in the Secret does not match the - // `status.certificate` on the CertificateRequest. - // * If no CertificateRequest resource exists for the current revision, - // the options on the Certificate resource are compared against the - // x509 data in the Secret, similar to what's done in earlier versions. - // If there is a mismatch, an issuance is triggered. - // This condition may also be added by external API consumers to trigger - // a re-issuance manually for any other reason. - // - // It will be removed by the 'issuing' controller upon completing issuance. - CertificateConditionIssuing CertificateConditionType = "Issuing" -) - -// CertificateSecretTemplate defines the default labels and annotations -// to be copied to the Kubernetes Secret resource named in `CertificateSpec.secretName`. -type CertificateSecretTemplate struct { - // Annotations is a key value map to be copied to the target Kubernetes Secret. - // +optional - Annotations map[string]string `json:"annotations,omitempty"` - - // Labels is a key value map to be copied to the target Kubernetes Secret. - // +optional - Labels map[string]string `json:"labels,omitempty"` -} - -// CertificateOutputFormatType specifies which additional output formats should -// be written to the Certificate's target Secret. -// Allowed values are `DER` or `CombinedPEM`. -// When Type is set to `DER` an additional entry `key.der` will be written to -// the Secret, containing the binary format of the private key. -// When Type is set to `CombinedPEM` an additional entry `tls-combined.pem` -// will be written to the Secret, containing the PEM formatted private key and -// signed certificate chain (tls.key + tls.crt concatenated). -// +kubebuilder:validation:Enum=DER;CombinedPEM -type CertificateOutputFormatType string - -const ( - // CertificateOutputFormatDER writes the Certificate's private key in DER - // binary format to the `key.der` target Secret Data key. - CertificateOutputFormatDER CertificateOutputFormatType = "DER" - - // CertificateOutputFormatCombinedPEM writes the Certificate's signed - // certificate chain and private key, in PEM format, to the - // `tls-combined.pem` target Secret Data key. The value at this key will - // include the private key PEM document, followed by at least one new line - // character, followed by the chain of signed certificate PEM documents - // (` + \n + `). - CertificateOutputFormatCombinedPEM CertificateOutputFormatType = "CombinedPEM" -) - -// CertificateAdditionalOutputFormat defines an additional output format of a -// Certificate resource. These contain supplementary data formats of the signed -// certificate chain and paired private key. -type CertificateAdditionalOutputFormat struct { - // Type is the name of the format type that should be written to the - // Certificate's target Secret. - Type CertificateOutputFormatType `json:"type"` -} - -// NameConstraints is a type to represent x509 NameConstraints -type NameConstraints struct { - // if true then the name constraints are marked critical. - // - // +optional - Critical bool `json:"critical,omitempty"` - // Permitted contains the constraints in which the names must be located. - // - // +optional - Permitted *NameConstraintItem `json:"permitted,omitempty"` - // Excluded contains the constraints which must be disallowed. Any name matching a - // restriction in the excluded field is invalid regardless - // of information appearing in the permitted - // - // +optional - Excluded *NameConstraintItem `json:"excluded,omitempty"` -} - -type NameConstraintItem struct { - // DNSDomains is a list of DNS domains that are permitted or excluded. - // - // +optional - DNSDomains []string `json:"dnsDomains,omitempty"` - // IPRanges is a list of IP Ranges that are permitted or excluded. - // This should be a valid CIDR notation. - // - // +optional - IPRanges []string `json:"ipRanges,omitempty"` - // EmailAddresses is a list of Email Addresses that are permitted or excluded. - // - // +optional - EmailAddresses []string `json:"emailAddresses,omitempty"` - // URIDomains is a list of URI domains that are permitted or excluded. - // - // +optional - URIDomains []string `json:"uriDomains,omitempty"` -} diff --git a/internal/apis/certmanager/v1alpha3/types_certificaterequest.go b/internal/apis/certmanager/v1alpha3/types_certificaterequest.go deleted file mode 100644 index 4001f2644bd..00000000000 --- a/internal/apis/certmanager/v1alpha3/types_certificaterequest.go +++ /dev/null @@ -1,207 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha3 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" -) - -const ( - // Pending indicates that a CertificateRequest is still in progress. - CertificateRequestReasonPending = "Pending" - - // Failed indicates that a CertificateRequest has failed, either due to - // timing out or some other critical failure. - CertificateRequestReasonFailed = "Failed" - - // Issued indicates that a CertificateRequest has been completed, and that - // the `status.certificate` field is set. - CertificateRequestReasonIssued = "Issued" - - // Denied is a Ready condition reason that indicates that a - // CertificateRequest has been denied, and the CertificateRequest will never - // be issued. - CertificateRequestReasonDenied = "Denied" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// A CertificateRequest is used to request a signed certificate from one of the -// configured issuers. -// -// All fields within the CertificateRequest's `spec` are immutable after creation. -// A CertificateRequest will either succeed or fail, as denoted by its `status.state` -// field. -// -// A CertificateRequest is a one-shot resource, meaning it represents a single -// point in time request for a certificate and cannot be re-used. -// +k8s:openapi-gen=true -type CertificateRequest struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Desired state of the CertificateRequest resource. - Spec CertificateRequestSpec `json:"spec,omitempty"` - - // Status of the CertificateRequest. This is set and managed automatically. - Status CertificateRequestStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CertificateRequestList is a list of Certificates -type CertificateRequestList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []CertificateRequest `json:"items"` -} - -// CertificateRequestSpec defines the desired state of CertificateRequest -type CertificateRequestSpec struct { - // The requested 'duration' (i.e. lifetime) of the Certificate. - // This option may be ignored/overridden by some issuer types. - // +optional - Duration *metav1.Duration `json:"duration,omitempty"` - - // IssuerRef is a reference to the issuer for this CertificateRequest. If - // the `kind` field is not set, or set to `Issuer`, an Issuer resource with - // the given name in the same namespace as the CertificateRequest will be - // used. If the `kind` field is set to `ClusterIssuer`, a ClusterIssuer with - // the provided name will be used. The `name` field in this stanza is - // required at all times. The group field refers to the API group of the - // issuer which defaults to `cert-manager.io` if empty. - IssuerRef cmmeta.ObjectReference `json:"issuerRef"` - - // The PEM-encoded x509 certificate signing request to be submitted to the - // CA for signing. - CSRPEM []byte `json:"csr"` - - // IsCA will request to mark the certificate as valid for certificate signing - // when submitting to the issuer. - // This will automatically add the `cert sign` usage to the list of `usages`. - // +optional - IsCA bool `json:"isCA,omitempty"` - - // Usages is the set of x509 usages that are requested for the certificate. - // Defaults to `digital signature` and `key encipherment` if not specified. - // +optional - Usages []KeyUsage `json:"usages,omitempty"` - - // Username contains the name of the user that created the CertificateRequest. - // Populated by the cert-manager webhook on creation and immutable. - // +optional - Username string `json:"username,omitempty"` - // UID contains the uid of the user that created the CertificateRequest. - // Populated by the cert-manager webhook on creation and immutable. - // +optional - UID string `json:"uid,omitempty"` - // Groups contains group membership of the user that created the CertificateRequest. - // Populated by the cert-manager webhook on creation and immutable. - // +listType=atomic - // +optional - Groups []string `json:"groups,omitempty"` - // Extra contains extra attributes of the user that created the CertificateRequest. - // Populated by the cert-manager webhook on creation and immutable. - // +optional - Extra map[string][]string `json:"extra,omitempty"` -} - -// CertificateRequestStatus defines the observed state of CertificateRequest and -// resulting signed certificate. -type CertificateRequestStatus struct { - // List of status conditions to indicate the status of a CertificateRequest. - // Known condition types are `Ready` and `InvalidRequest`. - // +listType=map - // +listMapKey=type - // +optional - Conditions []CertificateRequestCondition `json:"conditions,omitempty"` - - // The PEM encoded x509 certificate resulting from the certificate - // signing request. - // If not set, the CertificateRequest has either not been completed or has - // failed. More information on failure can be found by checking the - // `conditions` field. - // +optional - Certificate []byte `json:"certificate,omitempty"` - - // The PEM encoded x509 certificate of the signer, also known as the CA - // (Certificate Authority). - // This is set on a best-effort basis by different issuers. - // If not set, the CA is assumed to be unknown/not available. - // +optional - CA []byte `json:"ca,omitempty"` - - // FailureTime stores the time that this CertificateRequest failed. This is - // used to influence garbage collection and back-off. - // +optional - FailureTime *metav1.Time `json:"failureTime,omitempty"` -} - -// CertificateRequestCondition contains condition information for a CertificateRequest. -type CertificateRequestCondition struct { - // Type of the condition, known values are (`Ready`, - // `InvalidRequest`, `Approved`, `Denied`). - Type CertificateRequestConditionType `json:"type"` - - // Status of the condition, one of (`True`, `False`, `Unknown`). - Status cmmeta.ConditionStatus `json:"status"` - - // LastTransitionTime is the timestamp corresponding to the last status - // change of this condition. - // +optional - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - - // Reason is a brief machine readable explanation for the condition's last - // transition. - // +optional - Reason string `json:"reason,omitempty"` - - // Message is a human readable description of the details of the last - // transition, complementing reason. - // +optional - Message string `json:"message,omitempty"` -} - -// CertificateRequestConditionType represents an Certificate condition value. -type CertificateRequestConditionType string - -const ( - // CertificateRequestConditionReady indicates that a certificate is ready for use. - // This is defined as: - // - The target certificate exists in CertificateRequest.Status - CertificateRequestConditionReady CertificateRequestConditionType = "Ready" - - // CertificateRequestConditionInvalidRequest indicates that a certificate - // signer has refused to sign the request due to at least one of the input - // parameters being invalid. Additional information about why the request - // was rejected can be found in the `reason` and `message` fields. - CertificateRequestConditionInvalidRequest CertificateRequestConditionType = "InvalidRequest" - - // CertificateRequestConditionApproved indicates that a certificate request - // is approved and ready for signing. Condition must never have a status of - // `False`, and cannot be modified once set. - CertificateRequestConditionApproved CertificateRequestConditionType = "Approved" - - // CertificateRequestConditionDenied indicates that a certificate request is - // denied, and must never be signed. Condition must never have a status of - // `False`, and cannot be modified once set. - CertificateRequestConditionDenied CertificateRequestConditionType = "Denied" -) diff --git a/internal/apis/certmanager/v1alpha3/types_issuer.go b/internal/apis/certmanager/v1alpha3/types_issuer.go deleted file mode 100644 index 73960254b34..00000000000 --- a/internal/apis/certmanager/v1alpha3/types_issuer.go +++ /dev/null @@ -1,392 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1alpha3 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - cmacme "github.com/cert-manager/cert-manager/internal/apis/acme/v1alpha3" - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// A ClusterIssuer represents a certificate issuing authority which can be -// referenced as part of `issuerRef` fields. -// It is similar to an Issuer, however it is cluster-scoped and therefore can -// be referenced by resources that exist in *any* namespace, not just the same -// namespace as the referent. -type ClusterIssuer struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Desired state of the ClusterIssuer resource. - Spec IssuerSpec `json:"spec,omitempty"` - - // Status of the ClusterIssuer. This is set and managed automatically. - Status IssuerStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterIssuerList is a list of Issuers -type ClusterIssuerList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []ClusterIssuer `json:"items"` -} - -// +genclient -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// An Issuer represents a certificate issuing authority which can be -// referenced as part of `issuerRef` fields. -// It is scoped to a single namespace and can therefore only be referenced by -// resources within the same namespace. -type Issuer struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Desired state of the Issuer resource. - Spec IssuerSpec `json:"spec,omitempty"` - - // Status of the Issuer. This is set and managed automatically. - Status IssuerStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// IssuerList is a list of Issuers -type IssuerList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []Issuer `json:"items"` -} - -// IssuerSpec is the specification of an Issuer. This includes any -// configuration required for the issuer. -type IssuerSpec struct { - IssuerConfig `json:",inline"` -} - -// The configuration for the issuer. -// Only one of these can be set. -type IssuerConfig struct { - // ACME configures this issuer to communicate with a RFC8555 (ACME) server - // to obtain signed x509 certificates. - // +optional - ACME *cmacme.ACMEIssuer `json:"acme,omitempty"` - - // CA configures this issuer to sign certificates using a signing CA keypair - // stored in a Secret resource. - // This is used to build internal PKIs that are managed by cert-manager. - // +optional - CA *CAIssuer `json:"ca,omitempty"` - - // Vault configures this issuer to sign certificates using a HashiCorp Vault - // PKI backend. - // +optional - Vault *VaultIssuer `json:"vault,omitempty"` - - // SelfSigned configures this issuer to 'self sign' certificates using the - // private key used to create the CertificateRequest object. - // +optional - SelfSigned *SelfSignedIssuer `json:"selfSigned,omitempty"` - - // Venafi configures this issuer to sign certificates using a Venafi TPP - // or Venafi Cloud policy zone. - // +optional - Venafi *VenafiIssuer `json:"venafi,omitempty"` -} - -// Configures an issuer to sign certificates using a Venafi TPP -// or Cloud policy zone. -type VenafiIssuer struct { - // Zone is the Venafi Policy Zone to use for this issuer. - // All requests made to the Venafi platform will be restricted by the named - // zone policy. - // This field is required. - Zone string `json:"zone"` - - // TPP specifies Trust Protection Platform configuration settings. - // Only one of TPP or Cloud may be specified. - // +optional - TPP *VenafiTPP `json:"tpp,omitempty"` - - // Cloud specifies the Venafi cloud configuration settings. - // Only one of TPP or Cloud may be specified. - // +optional - Cloud *VenafiCloud `json:"cloud,omitempty"` -} - -// VenafiTPP defines connection configuration details for a Venafi TPP instance -type VenafiTPP struct { - // URL is the base URL for the vedsdk endpoint of the Venafi TPP instance, - // for example: "https://tpp.example.com/vedsdk". - URL string `json:"url"` - - // CredentialsRef is a reference to a Secret containing the username and - // password for the TPP server. - // The secret must contain two keys, 'username' and 'password'. - CredentialsRef cmmeta.LocalObjectReference `json:"credentialsRef"` - - // Base64-encoded bundle of PEM CAs which will be used to validate the certificate - // chain presented by the TPP server. Only used if using HTTPS; ignored for HTTP. - // If undefined, the certificate bundle in the cert-manager controller container - // is used to validate the chain. - // +optional - CABundle []byte `json:"caBundle,omitempty"` -} - -// VenafiCloud defines connection configuration details for Venafi Cloud -type VenafiCloud struct { - // URL is the base URL for Venafi Cloud. - // Defaults to "https://api.venafi.cloud/v1". - // +optional - URL string `json:"url,omitempty"` - - // APITokenSecretRef is a secret key selector for the Venafi Cloud API token. - APITokenSecretRef cmmeta.SecretKeySelector `json:"apiTokenSecretRef"` -} - -// Configures an issuer to 'self sign' certificates using the -// private key used to create the CertificateRequest object. -type SelfSignedIssuer struct { - // The CRL distribution points is an X.509 v3 certificate extension which identifies - // the location of the CRL from which the revocation of this certificate can be checked. - // If not set certificate will be issued without CDP. Values are strings. - // +optional - CRLDistributionPoints []string `json:"crlDistributionPoints,omitempty"` -} - -// Configures an issuer to sign certificates using a HashiCorp Vault -// PKI backend. -type VaultIssuer struct { - // Auth configures how cert-manager authenticates with the Vault server. - Auth VaultAuth `json:"auth"` - - // Server is the connection address for the Vault server, e.g: "https://vault.example.com:8200". - Server string `json:"server"` - - // Path is the mount path of the Vault PKI backend's `sign` endpoint, e.g: - // "my_pki_mount/sign/my-role-name". - Path string `json:"path"` - - // Name of the vault namespace. Namespaces is a set of features within Vault Enterprise that allows Vault environments to support Secure Multi-tenancy. e.g: "ns1" - // More about namespaces can be found here https://www.vaultproject.io/docs/enterprise/namespaces - // +optional - Namespace string `json:"namespace,omitempty"` - - // Base64-encoded bundle of PEM CAs which will be used to validate the certificate - // chain presented by Vault. Only used if using HTTPS to connect to Vault and - // ignored for HTTP connections. - // Mutually exclusive with CABundleSecretRef. - // If neither CABundle nor CABundleSecretRef are defined, the certificate bundle in - // the cert-manager controller container is used to validate the TLS connection. - // +optional - CABundle []byte `json:"caBundle,omitempty"` - - // Reference to a Secret containing a bundle of PEM-encoded CAs to use when - // verifying the certificate chain presented by Vault when using HTTPS. - // Mutually exclusive with CABundle. - // If neither CABundle nor CABundleSecretRef are defined, the certificate bundle in - // the cert-manager controller container is used to validate the TLS connection. - // If no key for the Secret is specified, cert-manager will default to 'ca.crt'. - // +optional - CABundleSecretRef *cmmeta.SecretKeySelector `json:"caBundleSecretRef,omitempty"` - - // Reference to a Secret containing a PEM-encoded Client Certificate to use when the - // Vault server requires mTLS. - // +optional - ClientCertSecretRef *cmmeta.SecretKeySelector `json:"clientCertSecretRef,omitempty"` - - // Reference to a Secret containing a PEM-encoded Client Private Key to use when the - // Vault server requires mTLS. - // +optional - ClientKeySecretRef *cmmeta.SecretKeySelector `json:"clientKeySecretRef,omitempty"` -} - -// Configuration used to authenticate with a Vault server. -// Only one of `tokenSecretRef`, `appRole` or `kubernetes` may be specified. -type VaultAuth struct { - // TokenSecretRef authenticates with Vault by presenting a token. - // +optional - TokenSecretRef *cmmeta.SecretKeySelector `json:"tokenSecretRef,omitempty"` - - // AppRole authenticates with Vault using the App Role auth mechanism, - // with the role and secret stored in a Kubernetes Secret resource. - // +optional - AppRole *VaultAppRole `json:"appRole,omitempty"` - - // Kubernetes authenticates with Vault by passing the ServiceAccount - // token stored in the named Secret resource to the Vault server. - // +optional - Kubernetes *VaultKubernetesAuth `json:"kubernetes,omitempty"` -} - -// VaultAppRole authenticates with Vault using the App Role auth mechanism, -// with the role and secret stored in a Kubernetes Secret resource. -type VaultAppRole struct { - // Path where the App Role authentication backend is mounted in Vault, e.g: - // "approle" - Path string `json:"path"` - - // RoleID configured in the App Role authentication backend when setting - // up the authentication backend in Vault. - RoleId string `json:"roleId"` - - // Reference to a key in a Secret that contains the App Role secret used - // to authenticate with Vault. - // The `key` field must be specified and denotes which entry within the Secret - // resource is used as the app role secret. - SecretRef cmmeta.SecretKeySelector `json:"secretRef"` -} - -// Authenticate against Vault using a Kubernetes ServiceAccount token stored in -// a Secret. -type VaultKubernetesAuth struct { - // The Vault mountPath here is the mount path to use when authenticating with - // Vault. For example, setting a value to `/v1/auth/foo`, will use the path - // `/v1/auth/foo/login` to authenticate with Vault. If unspecified, the - // default value "/v1/auth/kubernetes" will be used. - // +optional - Path string `json:"mountPath,omitempty"` - - // The required Secret field containing a Kubernetes ServiceAccount JWT used - // for authenticating with Vault. Use of 'ambient credentials' is not - // supported. - // +optional - SecretRef cmmeta.SecretKeySelector `json:"secretRef,omitempty"` - - // A reference to a service account that will be used to request a bound - // token (also known as "projected token"). Compared to using "secretRef", - // using this field means that you don't rely on statically bound tokens. To - // use this field, you must configure an RBAC rule to let cert-manager - // request a token. - // +optional - ServiceAccountRef *ServiceAccountRef `json:"serviceAccountRef,omitempty"` - - // A required field containing the Vault Role to assume. A Role binds a - // Kubernetes ServiceAccount with a set of Vault policies. - Role string `json:"role"` -} - -// ServiceAccountRef is a service account used by cert-manager to request a -// token. The audience cannot be configured. The audience is generated by -// cert-manager and takes the form `vault://namespace-name/issuer-name` for an -// Issuer and `vault://issuer-name` for a ClusterIssuer. The expiration of the -// token is also set by cert-manager to 10 minutes. -type ServiceAccountRef struct { - // Name of the ServiceAccount used to request a token. - Name string `json:"name"` - - // TokenAudiences is an option list of extra audiences to include in the token passed to Vault. The default token - // consisting of the issuer's namespace and name is always included. - // +optional - TokenAudiences []string `json:"audiences,omitempty"` -} - -type CAIssuer struct { - // SecretName is the name of the secret used to sign Certificates issued - // by this Issuer. - SecretName string `json:"secretName"` - - // The CRL distribution points is an X.509 v3 certificate extension which identifies - // the location of the CRL from which the revocation of this certificate can be checked. - // If not set, certificates will be issued without distribution points set. - // +optional - CRLDistributionPoints []string `json:"crlDistributionPoints,omitempty"` - - // The OCSP server list is an X.509 v3 extension that defines a list of - // URLs of OCSP responders. The OCSP responders can be queried for the - // revocation status of an issued certificate. If not set, the - // certificate will be issued with no OCSP servers set. For example, an - // OCSP server URL could be "http://ocsp.int-x3.letsencrypt.org". - // +optional - OCSPServers []string `json:"ocspServers,omitempty"` - - // IssuingCertificateURLs is a list of URLs which this issuer should embed into certificates - // it creates. See https://www.rfc-editor.org/rfc/rfc5280#section-4.2.2.1 for more details. - // As an example, such a URL might be "http://ca.domain.com/ca.crt". - // +optional - IssuingCertificateURLs []string `json:"issuingCertificateURLs,omitempty"` -} - -// IssuerStatus contains status information about an Issuer -type IssuerStatus struct { - // List of status conditions to indicate the status of a CertificateRequest. - // Known condition types are `Ready`. - // +listType=map - // +listMapKey=type - // +optional - Conditions []IssuerCondition `json:"conditions,omitempty"` - - // ACME specific status options. - // This field should only be set if the Issuer is configured to use an ACME - // server to issue certificates. - // +optional - ACME *cmacme.ACMEIssuerStatus `json:"acme,omitempty"` -} - -// IssuerCondition contains condition information for an Issuer. -type IssuerCondition struct { - // Type of the condition, known values are (`Ready`). - Type IssuerConditionType `json:"type"` - - // Status of the condition, one of (`True`, `False`, `Unknown`). - Status cmmeta.ConditionStatus `json:"status"` - - // LastTransitionTime is the timestamp corresponding to the last status - // change of this condition. - // +optional - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - - // Reason is a brief machine readable explanation for the condition's last - // transition. - // +optional - Reason string `json:"reason,omitempty"` - - // Message is a human readable description of the details of the last - // transition, complementing reason. - // +optional - Message string `json:"message,omitempty"` - - // If set, this represents the .metadata.generation that the condition was - // set based upon. - // For instance, if .metadata.generation is currently 12, but the - // .status.condition[x].observedGeneration is 9, the condition is out of date - // with respect to the current state of the Issuer. - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty"` -} - -// IssuerConditionType represents an Issuer condition value. -type IssuerConditionType string - -const ( - // IssuerConditionReady represents the fact that a given Issuer condition - // is in ready state and able to issue certificates. - // If the `status` of this condition is `False`, CertificateRequest controllers - // should prevent attempts to sign certificates. - IssuerConditionReady IssuerConditionType = "Ready" -) diff --git a/internal/apis/certmanager/v1alpha3/zz_generated.conversion.go b/internal/apis/certmanager/v1alpha3/zz_generated.conversion.go deleted file mode 100644 index c0d2b8aebef..00000000000 --- a/internal/apis/certmanager/v1alpha3/zz_generated.conversion.go +++ /dev/null @@ -1,1787 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The cert-manager 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 conversion-gen. DO NOT EDIT. - -package v1alpha3 - -import ( - unsafe "unsafe" - - acme "github.com/cert-manager/cert-manager/internal/apis/acme" - acmev1alpha3 "github.com/cert-manager/cert-manager/internal/apis/acme/v1alpha3" - certmanager "github.com/cert-manager/cert-manager/internal/apis/certmanager" - meta "github.com/cert-manager/cert-manager/internal/apis/meta" - apismetav1 "github.com/cert-manager/cert-manager/internal/apis/meta/v1" - metav1 "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*CAIssuer)(nil), (*certmanager.CAIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_CAIssuer_To_certmanager_CAIssuer(a.(*CAIssuer), b.(*certmanager.CAIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CAIssuer)(nil), (*CAIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CAIssuer_To_v1alpha3_CAIssuer(a.(*certmanager.CAIssuer), b.(*CAIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Certificate)(nil), (*certmanager.Certificate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_Certificate_To_certmanager_Certificate(a.(*Certificate), b.(*certmanager.Certificate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.Certificate)(nil), (*Certificate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_Certificate_To_v1alpha3_Certificate(a.(*certmanager.Certificate), b.(*Certificate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateAdditionalOutputFormat)(nil), (*certmanager.CertificateAdditionalOutputFormat)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_CertificateAdditionalOutputFormat_To_certmanager_CertificateAdditionalOutputFormat(a.(*CertificateAdditionalOutputFormat), b.(*certmanager.CertificateAdditionalOutputFormat), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateAdditionalOutputFormat)(nil), (*CertificateAdditionalOutputFormat)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateAdditionalOutputFormat_To_v1alpha3_CertificateAdditionalOutputFormat(a.(*certmanager.CertificateAdditionalOutputFormat), b.(*CertificateAdditionalOutputFormat), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateCondition)(nil), (*certmanager.CertificateCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_CertificateCondition_To_certmanager_CertificateCondition(a.(*CertificateCondition), b.(*certmanager.CertificateCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateCondition)(nil), (*CertificateCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateCondition_To_v1alpha3_CertificateCondition(a.(*certmanager.CertificateCondition), b.(*CertificateCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateKeystores)(nil), (*certmanager.CertificateKeystores)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_CertificateKeystores_To_certmanager_CertificateKeystores(a.(*CertificateKeystores), b.(*certmanager.CertificateKeystores), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateKeystores)(nil), (*CertificateKeystores)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateKeystores_To_v1alpha3_CertificateKeystores(a.(*certmanager.CertificateKeystores), b.(*CertificateKeystores), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateList)(nil), (*certmanager.CertificateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_CertificateList_To_certmanager_CertificateList(a.(*CertificateList), b.(*certmanager.CertificateList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateList)(nil), (*CertificateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateList_To_v1alpha3_CertificateList(a.(*certmanager.CertificateList), b.(*CertificateList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificatePrivateKey)(nil), (*certmanager.CertificatePrivateKey)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_CertificatePrivateKey_To_certmanager_CertificatePrivateKey(a.(*CertificatePrivateKey), b.(*certmanager.CertificatePrivateKey), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateRequest)(nil), (*certmanager.CertificateRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_CertificateRequest_To_certmanager_CertificateRequest(a.(*CertificateRequest), b.(*certmanager.CertificateRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateRequest)(nil), (*CertificateRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateRequest_To_v1alpha3_CertificateRequest(a.(*certmanager.CertificateRequest), b.(*CertificateRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateRequestCondition)(nil), (*certmanager.CertificateRequestCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_CertificateRequestCondition_To_certmanager_CertificateRequestCondition(a.(*CertificateRequestCondition), b.(*certmanager.CertificateRequestCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateRequestCondition)(nil), (*CertificateRequestCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateRequestCondition_To_v1alpha3_CertificateRequestCondition(a.(*certmanager.CertificateRequestCondition), b.(*CertificateRequestCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateRequestList)(nil), (*certmanager.CertificateRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_CertificateRequestList_To_certmanager_CertificateRequestList(a.(*CertificateRequestList), b.(*certmanager.CertificateRequestList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateRequestList)(nil), (*CertificateRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateRequestList_To_v1alpha3_CertificateRequestList(a.(*certmanager.CertificateRequestList), b.(*CertificateRequestList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateRequestStatus)(nil), (*certmanager.CertificateRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_CertificateRequestStatus_To_certmanager_CertificateRequestStatus(a.(*CertificateRequestStatus), b.(*certmanager.CertificateRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateRequestStatus)(nil), (*CertificateRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateRequestStatus_To_v1alpha3_CertificateRequestStatus(a.(*certmanager.CertificateRequestStatus), b.(*CertificateRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateSecretTemplate)(nil), (*certmanager.CertificateSecretTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_CertificateSecretTemplate_To_certmanager_CertificateSecretTemplate(a.(*CertificateSecretTemplate), b.(*certmanager.CertificateSecretTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateSecretTemplate)(nil), (*CertificateSecretTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateSecretTemplate_To_v1alpha3_CertificateSecretTemplate(a.(*certmanager.CertificateSecretTemplate), b.(*CertificateSecretTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateStatus)(nil), (*certmanager.CertificateStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_CertificateStatus_To_certmanager_CertificateStatus(a.(*CertificateStatus), b.(*certmanager.CertificateStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateStatus)(nil), (*CertificateStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateStatus_To_v1alpha3_CertificateStatus(a.(*certmanager.CertificateStatus), b.(*CertificateStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ClusterIssuer)(nil), (*certmanager.ClusterIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ClusterIssuer_To_certmanager_ClusterIssuer(a.(*ClusterIssuer), b.(*certmanager.ClusterIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.ClusterIssuer)(nil), (*ClusterIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_ClusterIssuer_To_v1alpha3_ClusterIssuer(a.(*certmanager.ClusterIssuer), b.(*ClusterIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ClusterIssuerList)(nil), (*certmanager.ClusterIssuerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ClusterIssuerList_To_certmanager_ClusterIssuerList(a.(*ClusterIssuerList), b.(*certmanager.ClusterIssuerList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.ClusterIssuerList)(nil), (*ClusterIssuerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_ClusterIssuerList_To_v1alpha3_ClusterIssuerList(a.(*certmanager.ClusterIssuerList), b.(*ClusterIssuerList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Issuer)(nil), (*certmanager.Issuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_Issuer_To_certmanager_Issuer(a.(*Issuer), b.(*certmanager.Issuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.Issuer)(nil), (*Issuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_Issuer_To_v1alpha3_Issuer(a.(*certmanager.Issuer), b.(*Issuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*IssuerCondition)(nil), (*certmanager.IssuerCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_IssuerCondition_To_certmanager_IssuerCondition(a.(*IssuerCondition), b.(*certmanager.IssuerCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.IssuerCondition)(nil), (*IssuerCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_IssuerCondition_To_v1alpha3_IssuerCondition(a.(*certmanager.IssuerCondition), b.(*IssuerCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*IssuerConfig)(nil), (*certmanager.IssuerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_IssuerConfig_To_certmanager_IssuerConfig(a.(*IssuerConfig), b.(*certmanager.IssuerConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.IssuerConfig)(nil), (*IssuerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_IssuerConfig_To_v1alpha3_IssuerConfig(a.(*certmanager.IssuerConfig), b.(*IssuerConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*IssuerList)(nil), (*certmanager.IssuerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_IssuerList_To_certmanager_IssuerList(a.(*IssuerList), b.(*certmanager.IssuerList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.IssuerList)(nil), (*IssuerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_IssuerList_To_v1alpha3_IssuerList(a.(*certmanager.IssuerList), b.(*IssuerList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*IssuerSpec)(nil), (*certmanager.IssuerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_IssuerSpec_To_certmanager_IssuerSpec(a.(*IssuerSpec), b.(*certmanager.IssuerSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.IssuerSpec)(nil), (*IssuerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_IssuerSpec_To_v1alpha3_IssuerSpec(a.(*certmanager.IssuerSpec), b.(*IssuerSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*IssuerStatus)(nil), (*certmanager.IssuerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_IssuerStatus_To_certmanager_IssuerStatus(a.(*IssuerStatus), b.(*certmanager.IssuerStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.IssuerStatus)(nil), (*IssuerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_IssuerStatus_To_v1alpha3_IssuerStatus(a.(*certmanager.IssuerStatus), b.(*IssuerStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*JKSKeystore)(nil), (*certmanager.JKSKeystore)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_JKSKeystore_To_certmanager_JKSKeystore(a.(*JKSKeystore), b.(*certmanager.JKSKeystore), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.JKSKeystore)(nil), (*JKSKeystore)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_JKSKeystore_To_v1alpha3_JKSKeystore(a.(*certmanager.JKSKeystore), b.(*JKSKeystore), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NameConstraintItem)(nil), (*certmanager.NameConstraintItem)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NameConstraintItem_To_certmanager_NameConstraintItem(a.(*NameConstraintItem), b.(*certmanager.NameConstraintItem), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.NameConstraintItem)(nil), (*NameConstraintItem)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_NameConstraintItem_To_v1alpha3_NameConstraintItem(a.(*certmanager.NameConstraintItem), b.(*NameConstraintItem), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NameConstraints)(nil), (*certmanager.NameConstraints)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NameConstraints_To_certmanager_NameConstraints(a.(*NameConstraints), b.(*certmanager.NameConstraints), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.NameConstraints)(nil), (*NameConstraints)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_NameConstraints_To_v1alpha3_NameConstraints(a.(*certmanager.NameConstraints), b.(*NameConstraints), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OtherName)(nil), (*certmanager.OtherName)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_OtherName_To_certmanager_OtherName(a.(*OtherName), b.(*certmanager.OtherName), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.OtherName)(nil), (*OtherName)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_OtherName_To_v1alpha3_OtherName(a.(*certmanager.OtherName), b.(*OtherName), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*PKCS12Keystore)(nil), (*certmanager.PKCS12Keystore)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_PKCS12Keystore_To_certmanager_PKCS12Keystore(a.(*PKCS12Keystore), b.(*certmanager.PKCS12Keystore), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.PKCS12Keystore)(nil), (*PKCS12Keystore)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_PKCS12Keystore_To_v1alpha3_PKCS12Keystore(a.(*certmanager.PKCS12Keystore), b.(*PKCS12Keystore), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*SelfSignedIssuer)(nil), (*certmanager.SelfSignedIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_SelfSignedIssuer_To_certmanager_SelfSignedIssuer(a.(*SelfSignedIssuer), b.(*certmanager.SelfSignedIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.SelfSignedIssuer)(nil), (*SelfSignedIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_SelfSignedIssuer_To_v1alpha3_SelfSignedIssuer(a.(*certmanager.SelfSignedIssuer), b.(*SelfSignedIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ServiceAccountRef)(nil), (*certmanager.ServiceAccountRef)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ServiceAccountRef_To_certmanager_ServiceAccountRef(a.(*ServiceAccountRef), b.(*certmanager.ServiceAccountRef), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.ServiceAccountRef)(nil), (*ServiceAccountRef)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_ServiceAccountRef_To_v1alpha3_ServiceAccountRef(a.(*certmanager.ServiceAccountRef), b.(*ServiceAccountRef), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VaultAppRole)(nil), (*certmanager.VaultAppRole)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VaultAppRole_To_certmanager_VaultAppRole(a.(*VaultAppRole), b.(*certmanager.VaultAppRole), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.VaultAppRole)(nil), (*VaultAppRole)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_VaultAppRole_To_v1alpha3_VaultAppRole(a.(*certmanager.VaultAppRole), b.(*VaultAppRole), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VaultAuth)(nil), (*certmanager.VaultAuth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VaultAuth_To_certmanager_VaultAuth(a.(*VaultAuth), b.(*certmanager.VaultAuth), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.VaultAuth)(nil), (*VaultAuth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_VaultAuth_To_v1alpha3_VaultAuth(a.(*certmanager.VaultAuth), b.(*VaultAuth), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VaultIssuer)(nil), (*certmanager.VaultIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VaultIssuer_To_certmanager_VaultIssuer(a.(*VaultIssuer), b.(*certmanager.VaultIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.VaultIssuer)(nil), (*VaultIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_VaultIssuer_To_v1alpha3_VaultIssuer(a.(*certmanager.VaultIssuer), b.(*VaultIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VaultKubernetesAuth)(nil), (*certmanager.VaultKubernetesAuth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VaultKubernetesAuth_To_certmanager_VaultKubernetesAuth(a.(*VaultKubernetesAuth), b.(*certmanager.VaultKubernetesAuth), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VenafiCloud)(nil), (*certmanager.VenafiCloud)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VenafiCloud_To_certmanager_VenafiCloud(a.(*VenafiCloud), b.(*certmanager.VenafiCloud), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.VenafiCloud)(nil), (*VenafiCloud)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_VenafiCloud_To_v1alpha3_VenafiCloud(a.(*certmanager.VenafiCloud), b.(*VenafiCloud), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VenafiIssuer)(nil), (*certmanager.VenafiIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VenafiIssuer_To_certmanager_VenafiIssuer(a.(*VenafiIssuer), b.(*certmanager.VenafiIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.VenafiIssuer)(nil), (*VenafiIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_VenafiIssuer_To_v1alpha3_VenafiIssuer(a.(*certmanager.VenafiIssuer), b.(*VenafiIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VenafiTPP)(nil), (*certmanager.VenafiTPP)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VenafiTPP_To_certmanager_VenafiTPP(a.(*VenafiTPP), b.(*certmanager.VenafiTPP), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.VenafiTPP)(nil), (*VenafiTPP)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_VenafiTPP_To_v1alpha3_VenafiTPP(a.(*certmanager.VenafiTPP), b.(*VenafiTPP), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*X509Subject)(nil), (*certmanager.X509Subject)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_X509Subject_To_certmanager_X509Subject(a.(*X509Subject), b.(*certmanager.X509Subject), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*certmanager.CertificatePrivateKey)(nil), (*CertificatePrivateKey)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificatePrivateKey_To_v1alpha3_CertificatePrivateKey(a.(*certmanager.CertificatePrivateKey), b.(*CertificatePrivateKey), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*certmanager.CertificateRequestSpec)(nil), (*CertificateRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateRequestSpec_To_v1alpha3_CertificateRequestSpec(a.(*certmanager.CertificateRequestSpec), b.(*CertificateRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*certmanager.CertificateSpec)(nil), (*CertificateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateSpec_To_v1alpha3_CertificateSpec(a.(*certmanager.CertificateSpec), b.(*CertificateSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*certmanager.VaultKubernetesAuth)(nil), (*VaultKubernetesAuth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_VaultKubernetesAuth_To_v1alpha3_VaultKubernetesAuth(a.(*certmanager.VaultKubernetesAuth), b.(*VaultKubernetesAuth), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*certmanager.X509Subject)(nil), (*X509Subject)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_X509Subject_To_v1alpha3_X509Subject(a.(*certmanager.X509Subject), b.(*X509Subject), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*CertificateRequestSpec)(nil), (*certmanager.CertificateRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_CertificateRequestSpec_To_certmanager_CertificateRequestSpec(a.(*CertificateRequestSpec), b.(*certmanager.CertificateRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*CertificateSpec)(nil), (*certmanager.CertificateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_CertificateSpec_To_certmanager_CertificateSpec(a.(*CertificateSpec), b.(*certmanager.CertificateSpec), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha3_CAIssuer_To_certmanager_CAIssuer(in *CAIssuer, out *certmanager.CAIssuer, s conversion.Scope) error { - out.SecretName = in.SecretName - out.CRLDistributionPoints = *(*[]string)(unsafe.Pointer(&in.CRLDistributionPoints)) - out.OCSPServers = *(*[]string)(unsafe.Pointer(&in.OCSPServers)) - out.IssuingCertificateURLs = *(*[]string)(unsafe.Pointer(&in.IssuingCertificateURLs)) - return nil -} - -// Convert_v1alpha3_CAIssuer_To_certmanager_CAIssuer is an autogenerated conversion function. -func Convert_v1alpha3_CAIssuer_To_certmanager_CAIssuer(in *CAIssuer, out *certmanager.CAIssuer, s conversion.Scope) error { - return autoConvert_v1alpha3_CAIssuer_To_certmanager_CAIssuer(in, out, s) -} - -func autoConvert_certmanager_CAIssuer_To_v1alpha3_CAIssuer(in *certmanager.CAIssuer, out *CAIssuer, s conversion.Scope) error { - out.SecretName = in.SecretName - out.CRLDistributionPoints = *(*[]string)(unsafe.Pointer(&in.CRLDistributionPoints)) - out.OCSPServers = *(*[]string)(unsafe.Pointer(&in.OCSPServers)) - out.IssuingCertificateURLs = *(*[]string)(unsafe.Pointer(&in.IssuingCertificateURLs)) - return nil -} - -// Convert_certmanager_CAIssuer_To_v1alpha3_CAIssuer is an autogenerated conversion function. -func Convert_certmanager_CAIssuer_To_v1alpha3_CAIssuer(in *certmanager.CAIssuer, out *CAIssuer, s conversion.Scope) error { - return autoConvert_certmanager_CAIssuer_To_v1alpha3_CAIssuer(in, out, s) -} - -func autoConvert_v1alpha3_Certificate_To_certmanager_Certificate(in *Certificate, out *certmanager.Certificate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_CertificateSpec_To_certmanager_CertificateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_CertificateStatus_To_certmanager_CertificateStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_Certificate_To_certmanager_Certificate is an autogenerated conversion function. -func Convert_v1alpha3_Certificate_To_certmanager_Certificate(in *Certificate, out *certmanager.Certificate, s conversion.Scope) error { - return autoConvert_v1alpha3_Certificate_To_certmanager_Certificate(in, out, s) -} - -func autoConvert_certmanager_Certificate_To_v1alpha3_Certificate(in *certmanager.Certificate, out *Certificate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_certmanager_CertificateSpec_To_v1alpha3_CertificateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_certmanager_CertificateStatus_To_v1alpha3_CertificateStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_Certificate_To_v1alpha3_Certificate is an autogenerated conversion function. -func Convert_certmanager_Certificate_To_v1alpha3_Certificate(in *certmanager.Certificate, out *Certificate, s conversion.Scope) error { - return autoConvert_certmanager_Certificate_To_v1alpha3_Certificate(in, out, s) -} - -func autoConvert_v1alpha3_CertificateAdditionalOutputFormat_To_certmanager_CertificateAdditionalOutputFormat(in *CertificateAdditionalOutputFormat, out *certmanager.CertificateAdditionalOutputFormat, s conversion.Scope) error { - out.Type = certmanager.CertificateOutputFormatType(in.Type) - return nil -} - -// Convert_v1alpha3_CertificateAdditionalOutputFormat_To_certmanager_CertificateAdditionalOutputFormat is an autogenerated conversion function. -func Convert_v1alpha3_CertificateAdditionalOutputFormat_To_certmanager_CertificateAdditionalOutputFormat(in *CertificateAdditionalOutputFormat, out *certmanager.CertificateAdditionalOutputFormat, s conversion.Scope) error { - return autoConvert_v1alpha3_CertificateAdditionalOutputFormat_To_certmanager_CertificateAdditionalOutputFormat(in, out, s) -} - -func autoConvert_certmanager_CertificateAdditionalOutputFormat_To_v1alpha3_CertificateAdditionalOutputFormat(in *certmanager.CertificateAdditionalOutputFormat, out *CertificateAdditionalOutputFormat, s conversion.Scope) error { - out.Type = CertificateOutputFormatType(in.Type) - return nil -} - -// Convert_certmanager_CertificateAdditionalOutputFormat_To_v1alpha3_CertificateAdditionalOutputFormat is an autogenerated conversion function. -func Convert_certmanager_CertificateAdditionalOutputFormat_To_v1alpha3_CertificateAdditionalOutputFormat(in *certmanager.CertificateAdditionalOutputFormat, out *CertificateAdditionalOutputFormat, s conversion.Scope) error { - return autoConvert_certmanager_CertificateAdditionalOutputFormat_To_v1alpha3_CertificateAdditionalOutputFormat(in, out, s) -} - -func autoConvert_v1alpha3_CertificateCondition_To_certmanager_CertificateCondition(in *CertificateCondition, out *certmanager.CertificateCondition, s conversion.Scope) error { - out.Type = certmanager.CertificateConditionType(in.Type) - out.Status = meta.ConditionStatus(in.Status) - out.LastTransitionTime = (*v1.Time)(unsafe.Pointer(in.LastTransitionTime)) - out.Reason = in.Reason - out.Message = in.Message - out.ObservedGeneration = in.ObservedGeneration - return nil -} - -// Convert_v1alpha3_CertificateCondition_To_certmanager_CertificateCondition is an autogenerated conversion function. -func Convert_v1alpha3_CertificateCondition_To_certmanager_CertificateCondition(in *CertificateCondition, out *certmanager.CertificateCondition, s conversion.Scope) error { - return autoConvert_v1alpha3_CertificateCondition_To_certmanager_CertificateCondition(in, out, s) -} - -func autoConvert_certmanager_CertificateCondition_To_v1alpha3_CertificateCondition(in *certmanager.CertificateCondition, out *CertificateCondition, s conversion.Scope) error { - out.Type = CertificateConditionType(in.Type) - out.Status = metav1.ConditionStatus(in.Status) - out.LastTransitionTime = (*v1.Time)(unsafe.Pointer(in.LastTransitionTime)) - out.Reason = in.Reason - out.Message = in.Message - out.ObservedGeneration = in.ObservedGeneration - return nil -} - -// Convert_certmanager_CertificateCondition_To_v1alpha3_CertificateCondition is an autogenerated conversion function. -func Convert_certmanager_CertificateCondition_To_v1alpha3_CertificateCondition(in *certmanager.CertificateCondition, out *CertificateCondition, s conversion.Scope) error { - return autoConvert_certmanager_CertificateCondition_To_v1alpha3_CertificateCondition(in, out, s) -} - -func autoConvert_v1alpha3_CertificateKeystores_To_certmanager_CertificateKeystores(in *CertificateKeystores, out *certmanager.CertificateKeystores, s conversion.Scope) error { - if in.JKS != nil { - in, out := &in.JKS, &out.JKS - *out = new(certmanager.JKSKeystore) - if err := Convert_v1alpha3_JKSKeystore_To_certmanager_JKSKeystore(*in, *out, s); err != nil { - return err - } - } else { - out.JKS = nil - } - if in.PKCS12 != nil { - in, out := &in.PKCS12, &out.PKCS12 - *out = new(certmanager.PKCS12Keystore) - if err := Convert_v1alpha3_PKCS12Keystore_To_certmanager_PKCS12Keystore(*in, *out, s); err != nil { - return err - } - } else { - out.PKCS12 = nil - } - return nil -} - -// Convert_v1alpha3_CertificateKeystores_To_certmanager_CertificateKeystores is an autogenerated conversion function. -func Convert_v1alpha3_CertificateKeystores_To_certmanager_CertificateKeystores(in *CertificateKeystores, out *certmanager.CertificateKeystores, s conversion.Scope) error { - return autoConvert_v1alpha3_CertificateKeystores_To_certmanager_CertificateKeystores(in, out, s) -} - -func autoConvert_certmanager_CertificateKeystores_To_v1alpha3_CertificateKeystores(in *certmanager.CertificateKeystores, out *CertificateKeystores, s conversion.Scope) error { - if in.JKS != nil { - in, out := &in.JKS, &out.JKS - *out = new(JKSKeystore) - if err := Convert_certmanager_JKSKeystore_To_v1alpha3_JKSKeystore(*in, *out, s); err != nil { - return err - } - } else { - out.JKS = nil - } - if in.PKCS12 != nil { - in, out := &in.PKCS12, &out.PKCS12 - *out = new(PKCS12Keystore) - if err := Convert_certmanager_PKCS12Keystore_To_v1alpha3_PKCS12Keystore(*in, *out, s); err != nil { - return err - } - } else { - out.PKCS12 = nil - } - return nil -} - -// Convert_certmanager_CertificateKeystores_To_v1alpha3_CertificateKeystores is an autogenerated conversion function. -func Convert_certmanager_CertificateKeystores_To_v1alpha3_CertificateKeystores(in *certmanager.CertificateKeystores, out *CertificateKeystores, s conversion.Scope) error { - return autoConvert_certmanager_CertificateKeystores_To_v1alpha3_CertificateKeystores(in, out, s) -} - -func autoConvert_v1alpha3_CertificateList_To_certmanager_CertificateList(in *CertificateList, out *certmanager.CertificateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]certmanager.Certificate, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_Certificate_To_certmanager_Certificate(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_CertificateList_To_certmanager_CertificateList is an autogenerated conversion function. -func Convert_v1alpha3_CertificateList_To_certmanager_CertificateList(in *CertificateList, out *certmanager.CertificateList, s conversion.Scope) error { - return autoConvert_v1alpha3_CertificateList_To_certmanager_CertificateList(in, out, s) -} - -func autoConvert_certmanager_CertificateList_To_v1alpha3_CertificateList(in *certmanager.CertificateList, out *CertificateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Certificate, len(*in)) - for i := range *in { - if err := Convert_certmanager_Certificate_To_v1alpha3_Certificate(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_certmanager_CertificateList_To_v1alpha3_CertificateList is an autogenerated conversion function. -func Convert_certmanager_CertificateList_To_v1alpha3_CertificateList(in *certmanager.CertificateList, out *CertificateList, s conversion.Scope) error { - return autoConvert_certmanager_CertificateList_To_v1alpha3_CertificateList(in, out, s) -} - -func autoConvert_v1alpha3_CertificatePrivateKey_To_certmanager_CertificatePrivateKey(in *CertificatePrivateKey, out *certmanager.CertificatePrivateKey, s conversion.Scope) error { - out.RotationPolicy = certmanager.PrivateKeyRotationPolicy(in.RotationPolicy) - return nil -} - -// Convert_v1alpha3_CertificatePrivateKey_To_certmanager_CertificatePrivateKey is an autogenerated conversion function. -func Convert_v1alpha3_CertificatePrivateKey_To_certmanager_CertificatePrivateKey(in *CertificatePrivateKey, out *certmanager.CertificatePrivateKey, s conversion.Scope) error { - return autoConvert_v1alpha3_CertificatePrivateKey_To_certmanager_CertificatePrivateKey(in, out, s) -} - -func autoConvert_certmanager_CertificatePrivateKey_To_v1alpha3_CertificatePrivateKey(in *certmanager.CertificatePrivateKey, out *CertificatePrivateKey, s conversion.Scope) error { - out.RotationPolicy = PrivateKeyRotationPolicy(in.RotationPolicy) - // WARNING: in.Encoding requires manual conversion: does not exist in peer-type - // WARNING: in.Algorithm requires manual conversion: does not exist in peer-type - // WARNING: in.Size requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_CertificateRequest_To_certmanager_CertificateRequest(in *CertificateRequest, out *certmanager.CertificateRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_CertificateRequestSpec_To_certmanager_CertificateRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_CertificateRequestStatus_To_certmanager_CertificateRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_CertificateRequest_To_certmanager_CertificateRequest is an autogenerated conversion function. -func Convert_v1alpha3_CertificateRequest_To_certmanager_CertificateRequest(in *CertificateRequest, out *certmanager.CertificateRequest, s conversion.Scope) error { - return autoConvert_v1alpha3_CertificateRequest_To_certmanager_CertificateRequest(in, out, s) -} - -func autoConvert_certmanager_CertificateRequest_To_v1alpha3_CertificateRequest(in *certmanager.CertificateRequest, out *CertificateRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_certmanager_CertificateRequestSpec_To_v1alpha3_CertificateRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_certmanager_CertificateRequestStatus_To_v1alpha3_CertificateRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_CertificateRequest_To_v1alpha3_CertificateRequest is an autogenerated conversion function. -func Convert_certmanager_CertificateRequest_To_v1alpha3_CertificateRequest(in *certmanager.CertificateRequest, out *CertificateRequest, s conversion.Scope) error { - return autoConvert_certmanager_CertificateRequest_To_v1alpha3_CertificateRequest(in, out, s) -} - -func autoConvert_v1alpha3_CertificateRequestCondition_To_certmanager_CertificateRequestCondition(in *CertificateRequestCondition, out *certmanager.CertificateRequestCondition, s conversion.Scope) error { - out.Type = certmanager.CertificateRequestConditionType(in.Type) - out.Status = meta.ConditionStatus(in.Status) - out.LastTransitionTime = (*v1.Time)(unsafe.Pointer(in.LastTransitionTime)) - out.Reason = in.Reason - out.Message = in.Message - return nil -} - -// Convert_v1alpha3_CertificateRequestCondition_To_certmanager_CertificateRequestCondition is an autogenerated conversion function. -func Convert_v1alpha3_CertificateRequestCondition_To_certmanager_CertificateRequestCondition(in *CertificateRequestCondition, out *certmanager.CertificateRequestCondition, s conversion.Scope) error { - return autoConvert_v1alpha3_CertificateRequestCondition_To_certmanager_CertificateRequestCondition(in, out, s) -} - -func autoConvert_certmanager_CertificateRequestCondition_To_v1alpha3_CertificateRequestCondition(in *certmanager.CertificateRequestCondition, out *CertificateRequestCondition, s conversion.Scope) error { - out.Type = CertificateRequestConditionType(in.Type) - out.Status = metav1.ConditionStatus(in.Status) - out.LastTransitionTime = (*v1.Time)(unsafe.Pointer(in.LastTransitionTime)) - out.Reason = in.Reason - out.Message = in.Message - return nil -} - -// Convert_certmanager_CertificateRequestCondition_To_v1alpha3_CertificateRequestCondition is an autogenerated conversion function. -func Convert_certmanager_CertificateRequestCondition_To_v1alpha3_CertificateRequestCondition(in *certmanager.CertificateRequestCondition, out *CertificateRequestCondition, s conversion.Scope) error { - return autoConvert_certmanager_CertificateRequestCondition_To_v1alpha3_CertificateRequestCondition(in, out, s) -} - -func autoConvert_v1alpha3_CertificateRequestList_To_certmanager_CertificateRequestList(in *CertificateRequestList, out *certmanager.CertificateRequestList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]certmanager.CertificateRequest, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_CertificateRequest_To_certmanager_CertificateRequest(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_CertificateRequestList_To_certmanager_CertificateRequestList is an autogenerated conversion function. -func Convert_v1alpha3_CertificateRequestList_To_certmanager_CertificateRequestList(in *CertificateRequestList, out *certmanager.CertificateRequestList, s conversion.Scope) error { - return autoConvert_v1alpha3_CertificateRequestList_To_certmanager_CertificateRequestList(in, out, s) -} - -func autoConvert_certmanager_CertificateRequestList_To_v1alpha3_CertificateRequestList(in *certmanager.CertificateRequestList, out *CertificateRequestList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CertificateRequest, len(*in)) - for i := range *in { - if err := Convert_certmanager_CertificateRequest_To_v1alpha3_CertificateRequest(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_certmanager_CertificateRequestList_To_v1alpha3_CertificateRequestList is an autogenerated conversion function. -func Convert_certmanager_CertificateRequestList_To_v1alpha3_CertificateRequestList(in *certmanager.CertificateRequestList, out *CertificateRequestList, s conversion.Scope) error { - return autoConvert_certmanager_CertificateRequestList_To_v1alpha3_CertificateRequestList(in, out, s) -} - -func autoConvert_v1alpha3_CertificateRequestSpec_To_certmanager_CertificateRequestSpec(in *CertificateRequestSpec, out *certmanager.CertificateRequestSpec, s conversion.Scope) error { - out.Duration = (*v1.Duration)(unsafe.Pointer(in.Duration)) - if err := apismetav1.Convert_v1_ObjectReference_To_meta_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - // WARNING: in.CSRPEM requires manual conversion: does not exist in peer-type - out.IsCA = in.IsCA - out.Usages = *(*[]certmanager.KeyUsage)(unsafe.Pointer(&in.Usages)) - out.Username = in.Username - out.UID = in.UID - out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) - out.Extra = *(*map[string][]string)(unsafe.Pointer(&in.Extra)) - return nil -} - -func autoConvert_certmanager_CertificateRequestSpec_To_v1alpha3_CertificateRequestSpec(in *certmanager.CertificateRequestSpec, out *CertificateRequestSpec, s conversion.Scope) error { - out.Duration = (*v1.Duration)(unsafe.Pointer(in.Duration)) - if err := apismetav1.Convert_meta_ObjectReference_To_v1_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - // WARNING: in.Request requires manual conversion: does not exist in peer-type - out.IsCA = in.IsCA - out.Usages = *(*[]KeyUsage)(unsafe.Pointer(&in.Usages)) - out.Username = in.Username - out.UID = in.UID - out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) - out.Extra = *(*map[string][]string)(unsafe.Pointer(&in.Extra)) - return nil -} - -func autoConvert_v1alpha3_CertificateRequestStatus_To_certmanager_CertificateRequestStatus(in *CertificateRequestStatus, out *certmanager.CertificateRequestStatus, s conversion.Scope) error { - out.Conditions = *(*[]certmanager.CertificateRequestCondition)(unsafe.Pointer(&in.Conditions)) - out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) - out.CA = *(*[]byte)(unsafe.Pointer(&in.CA)) - out.FailureTime = (*v1.Time)(unsafe.Pointer(in.FailureTime)) - return nil -} - -// Convert_v1alpha3_CertificateRequestStatus_To_certmanager_CertificateRequestStatus is an autogenerated conversion function. -func Convert_v1alpha3_CertificateRequestStatus_To_certmanager_CertificateRequestStatus(in *CertificateRequestStatus, out *certmanager.CertificateRequestStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_CertificateRequestStatus_To_certmanager_CertificateRequestStatus(in, out, s) -} - -func autoConvert_certmanager_CertificateRequestStatus_To_v1alpha3_CertificateRequestStatus(in *certmanager.CertificateRequestStatus, out *CertificateRequestStatus, s conversion.Scope) error { - out.Conditions = *(*[]CertificateRequestCondition)(unsafe.Pointer(&in.Conditions)) - out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) - out.CA = *(*[]byte)(unsafe.Pointer(&in.CA)) - out.FailureTime = (*v1.Time)(unsafe.Pointer(in.FailureTime)) - return nil -} - -// Convert_certmanager_CertificateRequestStatus_To_v1alpha3_CertificateRequestStatus is an autogenerated conversion function. -func Convert_certmanager_CertificateRequestStatus_To_v1alpha3_CertificateRequestStatus(in *certmanager.CertificateRequestStatus, out *CertificateRequestStatus, s conversion.Scope) error { - return autoConvert_certmanager_CertificateRequestStatus_To_v1alpha3_CertificateRequestStatus(in, out, s) -} - -func autoConvert_v1alpha3_CertificateSecretTemplate_To_certmanager_CertificateSecretTemplate(in *CertificateSecretTemplate, out *certmanager.CertificateSecretTemplate, s conversion.Scope) error { - out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - return nil -} - -// Convert_v1alpha3_CertificateSecretTemplate_To_certmanager_CertificateSecretTemplate is an autogenerated conversion function. -func Convert_v1alpha3_CertificateSecretTemplate_To_certmanager_CertificateSecretTemplate(in *CertificateSecretTemplate, out *certmanager.CertificateSecretTemplate, s conversion.Scope) error { - return autoConvert_v1alpha3_CertificateSecretTemplate_To_certmanager_CertificateSecretTemplate(in, out, s) -} - -func autoConvert_certmanager_CertificateSecretTemplate_To_v1alpha3_CertificateSecretTemplate(in *certmanager.CertificateSecretTemplate, out *CertificateSecretTemplate, s conversion.Scope) error { - out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - return nil -} - -// Convert_certmanager_CertificateSecretTemplate_To_v1alpha3_CertificateSecretTemplate is an autogenerated conversion function. -func Convert_certmanager_CertificateSecretTemplate_To_v1alpha3_CertificateSecretTemplate(in *certmanager.CertificateSecretTemplate, out *CertificateSecretTemplate, s conversion.Scope) error { - return autoConvert_certmanager_CertificateSecretTemplate_To_v1alpha3_CertificateSecretTemplate(in, out, s) -} - -func autoConvert_v1alpha3_CertificateSpec_To_certmanager_CertificateSpec(in *CertificateSpec, out *certmanager.CertificateSpec, s conversion.Scope) error { - if in.Subject != nil { - in, out := &in.Subject, &out.Subject - *out = new(certmanager.X509Subject) - if err := Convert_v1alpha3_X509Subject_To_certmanager_X509Subject(*in, *out, s); err != nil { - return err - } - } else { - out.Subject = nil - } - out.LiteralSubject = in.LiteralSubject - out.CommonName = in.CommonName - out.Duration = (*v1.Duration)(unsafe.Pointer(in.Duration)) - out.RenewBefore = (*v1.Duration)(unsafe.Pointer(in.RenewBefore)) - out.DNSNames = *(*[]string)(unsafe.Pointer(&in.DNSNames)) - out.IPAddresses = *(*[]string)(unsafe.Pointer(&in.IPAddresses)) - // WARNING: in.URISANs requires manual conversion: does not exist in peer-type - // WARNING: in.EmailSANs requires manual conversion: does not exist in peer-type - out.OtherNames = *(*[]certmanager.OtherName)(unsafe.Pointer(&in.OtherNames)) - out.SecretName = in.SecretName - out.SecretTemplate = (*certmanager.CertificateSecretTemplate)(unsafe.Pointer(in.SecretTemplate)) - if in.Keystores != nil { - in, out := &in.Keystores, &out.Keystores - *out = new(certmanager.CertificateKeystores) - if err := Convert_v1alpha3_CertificateKeystores_To_certmanager_CertificateKeystores(*in, *out, s); err != nil { - return err - } - } else { - out.Keystores = nil - } - if err := apismetav1.Convert_v1_ObjectReference_To_meta_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - out.IsCA = in.IsCA - out.Usages = *(*[]certmanager.KeyUsage)(unsafe.Pointer(&in.Usages)) - // WARNING: in.KeySize requires manual conversion: does not exist in peer-type - // WARNING: in.KeyAlgorithm requires manual conversion: does not exist in peer-type - // WARNING: in.KeyEncoding requires manual conversion: does not exist in peer-type - if in.PrivateKey != nil { - in, out := &in.PrivateKey, &out.PrivateKey - *out = new(certmanager.CertificatePrivateKey) - if err := Convert_v1alpha3_CertificatePrivateKey_To_certmanager_CertificatePrivateKey(*in, *out, s); err != nil { - return err - } - } else { - out.PrivateKey = nil - } - out.EncodeUsagesInRequest = (*bool)(unsafe.Pointer(in.EncodeUsagesInRequest)) - out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit)) - out.AdditionalOutputFormats = *(*[]certmanager.CertificateAdditionalOutputFormat)(unsafe.Pointer(&in.AdditionalOutputFormats)) - out.NameConstraints = (*certmanager.NameConstraints)(unsafe.Pointer(in.NameConstraints)) - return nil -} - -func autoConvert_certmanager_CertificateSpec_To_v1alpha3_CertificateSpec(in *certmanager.CertificateSpec, out *CertificateSpec, s conversion.Scope) error { - if in.Subject != nil { - in, out := &in.Subject, &out.Subject - *out = new(X509Subject) - if err := Convert_certmanager_X509Subject_To_v1alpha3_X509Subject(*in, *out, s); err != nil { - return err - } - } else { - out.Subject = nil - } - out.LiteralSubject = in.LiteralSubject - out.CommonName = in.CommonName - out.Duration = (*v1.Duration)(unsafe.Pointer(in.Duration)) - out.RenewBefore = (*v1.Duration)(unsafe.Pointer(in.RenewBefore)) - out.DNSNames = *(*[]string)(unsafe.Pointer(&in.DNSNames)) - out.IPAddresses = *(*[]string)(unsafe.Pointer(&in.IPAddresses)) - // WARNING: in.URIs requires manual conversion: does not exist in peer-type - // WARNING: in.EmailAddresses requires manual conversion: does not exist in peer-type - out.OtherNames = *(*[]OtherName)(unsafe.Pointer(&in.OtherNames)) - out.SecretName = in.SecretName - out.SecretTemplate = (*CertificateSecretTemplate)(unsafe.Pointer(in.SecretTemplate)) - if in.Keystores != nil { - in, out := &in.Keystores, &out.Keystores - *out = new(CertificateKeystores) - if err := Convert_certmanager_CertificateKeystores_To_v1alpha3_CertificateKeystores(*in, *out, s); err != nil { - return err - } - } else { - out.Keystores = nil - } - if err := apismetav1.Convert_meta_ObjectReference_To_v1_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - out.IsCA = in.IsCA - out.Usages = *(*[]KeyUsage)(unsafe.Pointer(&in.Usages)) - if in.PrivateKey != nil { - in, out := &in.PrivateKey, &out.PrivateKey - *out = new(CertificatePrivateKey) - if err := Convert_certmanager_CertificatePrivateKey_To_v1alpha3_CertificatePrivateKey(*in, *out, s); err != nil { - return err - } - } else { - out.PrivateKey = nil - } - out.EncodeUsagesInRequest = (*bool)(unsafe.Pointer(in.EncodeUsagesInRequest)) - out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit)) - out.AdditionalOutputFormats = *(*[]CertificateAdditionalOutputFormat)(unsafe.Pointer(&in.AdditionalOutputFormats)) - out.NameConstraints = (*NameConstraints)(unsafe.Pointer(in.NameConstraints)) - return nil -} - -func autoConvert_v1alpha3_CertificateStatus_To_certmanager_CertificateStatus(in *CertificateStatus, out *certmanager.CertificateStatus, s conversion.Scope) error { - out.Conditions = *(*[]certmanager.CertificateCondition)(unsafe.Pointer(&in.Conditions)) - out.LastFailureTime = (*v1.Time)(unsafe.Pointer(in.LastFailureTime)) - out.NotBefore = (*v1.Time)(unsafe.Pointer(in.NotBefore)) - out.NotAfter = (*v1.Time)(unsafe.Pointer(in.NotAfter)) - out.RenewalTime = (*v1.Time)(unsafe.Pointer(in.RenewalTime)) - out.Revision = (*int)(unsafe.Pointer(in.Revision)) - out.NextPrivateKeySecretName = (*string)(unsafe.Pointer(in.NextPrivateKeySecretName)) - out.FailedIssuanceAttempts = (*int)(unsafe.Pointer(in.FailedIssuanceAttempts)) - return nil -} - -// Convert_v1alpha3_CertificateStatus_To_certmanager_CertificateStatus is an autogenerated conversion function. -func Convert_v1alpha3_CertificateStatus_To_certmanager_CertificateStatus(in *CertificateStatus, out *certmanager.CertificateStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_CertificateStatus_To_certmanager_CertificateStatus(in, out, s) -} - -func autoConvert_certmanager_CertificateStatus_To_v1alpha3_CertificateStatus(in *certmanager.CertificateStatus, out *CertificateStatus, s conversion.Scope) error { - out.Conditions = *(*[]CertificateCondition)(unsafe.Pointer(&in.Conditions)) - out.LastFailureTime = (*v1.Time)(unsafe.Pointer(in.LastFailureTime)) - out.NotBefore = (*v1.Time)(unsafe.Pointer(in.NotBefore)) - out.NotAfter = (*v1.Time)(unsafe.Pointer(in.NotAfter)) - out.RenewalTime = (*v1.Time)(unsafe.Pointer(in.RenewalTime)) - out.Revision = (*int)(unsafe.Pointer(in.Revision)) - out.NextPrivateKeySecretName = (*string)(unsafe.Pointer(in.NextPrivateKeySecretName)) - out.FailedIssuanceAttempts = (*int)(unsafe.Pointer(in.FailedIssuanceAttempts)) - return nil -} - -// Convert_certmanager_CertificateStatus_To_v1alpha3_CertificateStatus is an autogenerated conversion function. -func Convert_certmanager_CertificateStatus_To_v1alpha3_CertificateStatus(in *certmanager.CertificateStatus, out *CertificateStatus, s conversion.Scope) error { - return autoConvert_certmanager_CertificateStatus_To_v1alpha3_CertificateStatus(in, out, s) -} - -func autoConvert_v1alpha3_ClusterIssuer_To_certmanager_ClusterIssuer(in *ClusterIssuer, out *certmanager.ClusterIssuer, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_IssuerSpec_To_certmanager_IssuerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_IssuerStatus_To_certmanager_IssuerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_ClusterIssuer_To_certmanager_ClusterIssuer is an autogenerated conversion function. -func Convert_v1alpha3_ClusterIssuer_To_certmanager_ClusterIssuer(in *ClusterIssuer, out *certmanager.ClusterIssuer, s conversion.Scope) error { - return autoConvert_v1alpha3_ClusterIssuer_To_certmanager_ClusterIssuer(in, out, s) -} - -func autoConvert_certmanager_ClusterIssuer_To_v1alpha3_ClusterIssuer(in *certmanager.ClusterIssuer, out *ClusterIssuer, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_certmanager_IssuerSpec_To_v1alpha3_IssuerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_certmanager_IssuerStatus_To_v1alpha3_IssuerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_ClusterIssuer_To_v1alpha3_ClusterIssuer is an autogenerated conversion function. -func Convert_certmanager_ClusterIssuer_To_v1alpha3_ClusterIssuer(in *certmanager.ClusterIssuer, out *ClusterIssuer, s conversion.Scope) error { - return autoConvert_certmanager_ClusterIssuer_To_v1alpha3_ClusterIssuer(in, out, s) -} - -func autoConvert_v1alpha3_ClusterIssuerList_To_certmanager_ClusterIssuerList(in *ClusterIssuerList, out *certmanager.ClusterIssuerList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]certmanager.ClusterIssuer, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_ClusterIssuer_To_certmanager_ClusterIssuer(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_ClusterIssuerList_To_certmanager_ClusterIssuerList is an autogenerated conversion function. -func Convert_v1alpha3_ClusterIssuerList_To_certmanager_ClusterIssuerList(in *ClusterIssuerList, out *certmanager.ClusterIssuerList, s conversion.Scope) error { - return autoConvert_v1alpha3_ClusterIssuerList_To_certmanager_ClusterIssuerList(in, out, s) -} - -func autoConvert_certmanager_ClusterIssuerList_To_v1alpha3_ClusterIssuerList(in *certmanager.ClusterIssuerList, out *ClusterIssuerList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterIssuer, len(*in)) - for i := range *in { - if err := Convert_certmanager_ClusterIssuer_To_v1alpha3_ClusterIssuer(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_certmanager_ClusterIssuerList_To_v1alpha3_ClusterIssuerList is an autogenerated conversion function. -func Convert_certmanager_ClusterIssuerList_To_v1alpha3_ClusterIssuerList(in *certmanager.ClusterIssuerList, out *ClusterIssuerList, s conversion.Scope) error { - return autoConvert_certmanager_ClusterIssuerList_To_v1alpha3_ClusterIssuerList(in, out, s) -} - -func autoConvert_v1alpha3_Issuer_To_certmanager_Issuer(in *Issuer, out *certmanager.Issuer, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_IssuerSpec_To_certmanager_IssuerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_IssuerStatus_To_certmanager_IssuerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_Issuer_To_certmanager_Issuer is an autogenerated conversion function. -func Convert_v1alpha3_Issuer_To_certmanager_Issuer(in *Issuer, out *certmanager.Issuer, s conversion.Scope) error { - return autoConvert_v1alpha3_Issuer_To_certmanager_Issuer(in, out, s) -} - -func autoConvert_certmanager_Issuer_To_v1alpha3_Issuer(in *certmanager.Issuer, out *Issuer, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_certmanager_IssuerSpec_To_v1alpha3_IssuerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_certmanager_IssuerStatus_To_v1alpha3_IssuerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_Issuer_To_v1alpha3_Issuer is an autogenerated conversion function. -func Convert_certmanager_Issuer_To_v1alpha3_Issuer(in *certmanager.Issuer, out *Issuer, s conversion.Scope) error { - return autoConvert_certmanager_Issuer_To_v1alpha3_Issuer(in, out, s) -} - -func autoConvert_v1alpha3_IssuerCondition_To_certmanager_IssuerCondition(in *IssuerCondition, out *certmanager.IssuerCondition, s conversion.Scope) error { - out.Type = certmanager.IssuerConditionType(in.Type) - out.Status = meta.ConditionStatus(in.Status) - out.LastTransitionTime = (*v1.Time)(unsafe.Pointer(in.LastTransitionTime)) - out.Reason = in.Reason - out.Message = in.Message - out.ObservedGeneration = in.ObservedGeneration - return nil -} - -// Convert_v1alpha3_IssuerCondition_To_certmanager_IssuerCondition is an autogenerated conversion function. -func Convert_v1alpha3_IssuerCondition_To_certmanager_IssuerCondition(in *IssuerCondition, out *certmanager.IssuerCondition, s conversion.Scope) error { - return autoConvert_v1alpha3_IssuerCondition_To_certmanager_IssuerCondition(in, out, s) -} - -func autoConvert_certmanager_IssuerCondition_To_v1alpha3_IssuerCondition(in *certmanager.IssuerCondition, out *IssuerCondition, s conversion.Scope) error { - out.Type = IssuerConditionType(in.Type) - out.Status = metav1.ConditionStatus(in.Status) - out.LastTransitionTime = (*v1.Time)(unsafe.Pointer(in.LastTransitionTime)) - out.Reason = in.Reason - out.Message = in.Message - out.ObservedGeneration = in.ObservedGeneration - return nil -} - -// Convert_certmanager_IssuerCondition_To_v1alpha3_IssuerCondition is an autogenerated conversion function. -func Convert_certmanager_IssuerCondition_To_v1alpha3_IssuerCondition(in *certmanager.IssuerCondition, out *IssuerCondition, s conversion.Scope) error { - return autoConvert_certmanager_IssuerCondition_To_v1alpha3_IssuerCondition(in, out, s) -} - -func autoConvert_v1alpha3_IssuerConfig_To_certmanager_IssuerConfig(in *IssuerConfig, out *certmanager.IssuerConfig, s conversion.Scope) error { - if in.ACME != nil { - in, out := &in.ACME, &out.ACME - *out = new(acme.ACMEIssuer) - if err := acmev1alpha3.Convert_v1alpha3_ACMEIssuer_To_acme_ACMEIssuer(*in, *out, s); err != nil { - return err - } - } else { - out.ACME = nil - } - out.CA = (*certmanager.CAIssuer)(unsafe.Pointer(in.CA)) - if in.Vault != nil { - in, out := &in.Vault, &out.Vault - *out = new(certmanager.VaultIssuer) - if err := Convert_v1alpha3_VaultIssuer_To_certmanager_VaultIssuer(*in, *out, s); err != nil { - return err - } - } else { - out.Vault = nil - } - out.SelfSigned = (*certmanager.SelfSignedIssuer)(unsafe.Pointer(in.SelfSigned)) - if in.Venafi != nil { - in, out := &in.Venafi, &out.Venafi - *out = new(certmanager.VenafiIssuer) - if err := Convert_v1alpha3_VenafiIssuer_To_certmanager_VenafiIssuer(*in, *out, s); err != nil { - return err - } - } else { - out.Venafi = nil - } - return nil -} - -// Convert_v1alpha3_IssuerConfig_To_certmanager_IssuerConfig is an autogenerated conversion function. -func Convert_v1alpha3_IssuerConfig_To_certmanager_IssuerConfig(in *IssuerConfig, out *certmanager.IssuerConfig, s conversion.Scope) error { - return autoConvert_v1alpha3_IssuerConfig_To_certmanager_IssuerConfig(in, out, s) -} - -func autoConvert_certmanager_IssuerConfig_To_v1alpha3_IssuerConfig(in *certmanager.IssuerConfig, out *IssuerConfig, s conversion.Scope) error { - if in.ACME != nil { - in, out := &in.ACME, &out.ACME - *out = new(acmev1alpha3.ACMEIssuer) - if err := acmev1alpha3.Convert_acme_ACMEIssuer_To_v1alpha3_ACMEIssuer(*in, *out, s); err != nil { - return err - } - } else { - out.ACME = nil - } - out.CA = (*CAIssuer)(unsafe.Pointer(in.CA)) - if in.Vault != nil { - in, out := &in.Vault, &out.Vault - *out = new(VaultIssuer) - if err := Convert_certmanager_VaultIssuer_To_v1alpha3_VaultIssuer(*in, *out, s); err != nil { - return err - } - } else { - out.Vault = nil - } - out.SelfSigned = (*SelfSignedIssuer)(unsafe.Pointer(in.SelfSigned)) - if in.Venafi != nil { - in, out := &in.Venafi, &out.Venafi - *out = new(VenafiIssuer) - if err := Convert_certmanager_VenafiIssuer_To_v1alpha3_VenafiIssuer(*in, *out, s); err != nil { - return err - } - } else { - out.Venafi = nil - } - return nil -} - -// Convert_certmanager_IssuerConfig_To_v1alpha3_IssuerConfig is an autogenerated conversion function. -func Convert_certmanager_IssuerConfig_To_v1alpha3_IssuerConfig(in *certmanager.IssuerConfig, out *IssuerConfig, s conversion.Scope) error { - return autoConvert_certmanager_IssuerConfig_To_v1alpha3_IssuerConfig(in, out, s) -} - -func autoConvert_v1alpha3_IssuerList_To_certmanager_IssuerList(in *IssuerList, out *certmanager.IssuerList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]certmanager.Issuer, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_Issuer_To_certmanager_Issuer(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_IssuerList_To_certmanager_IssuerList is an autogenerated conversion function. -func Convert_v1alpha3_IssuerList_To_certmanager_IssuerList(in *IssuerList, out *certmanager.IssuerList, s conversion.Scope) error { - return autoConvert_v1alpha3_IssuerList_To_certmanager_IssuerList(in, out, s) -} - -func autoConvert_certmanager_IssuerList_To_v1alpha3_IssuerList(in *certmanager.IssuerList, out *IssuerList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Issuer, len(*in)) - for i := range *in { - if err := Convert_certmanager_Issuer_To_v1alpha3_Issuer(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_certmanager_IssuerList_To_v1alpha3_IssuerList is an autogenerated conversion function. -func Convert_certmanager_IssuerList_To_v1alpha3_IssuerList(in *certmanager.IssuerList, out *IssuerList, s conversion.Scope) error { - return autoConvert_certmanager_IssuerList_To_v1alpha3_IssuerList(in, out, s) -} - -func autoConvert_v1alpha3_IssuerSpec_To_certmanager_IssuerSpec(in *IssuerSpec, out *certmanager.IssuerSpec, s conversion.Scope) error { - if err := Convert_v1alpha3_IssuerConfig_To_certmanager_IssuerConfig(&in.IssuerConfig, &out.IssuerConfig, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_IssuerSpec_To_certmanager_IssuerSpec is an autogenerated conversion function. -func Convert_v1alpha3_IssuerSpec_To_certmanager_IssuerSpec(in *IssuerSpec, out *certmanager.IssuerSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_IssuerSpec_To_certmanager_IssuerSpec(in, out, s) -} - -func autoConvert_certmanager_IssuerSpec_To_v1alpha3_IssuerSpec(in *certmanager.IssuerSpec, out *IssuerSpec, s conversion.Scope) error { - if err := Convert_certmanager_IssuerConfig_To_v1alpha3_IssuerConfig(&in.IssuerConfig, &out.IssuerConfig, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_IssuerSpec_To_v1alpha3_IssuerSpec is an autogenerated conversion function. -func Convert_certmanager_IssuerSpec_To_v1alpha3_IssuerSpec(in *certmanager.IssuerSpec, out *IssuerSpec, s conversion.Scope) error { - return autoConvert_certmanager_IssuerSpec_To_v1alpha3_IssuerSpec(in, out, s) -} - -func autoConvert_v1alpha3_IssuerStatus_To_certmanager_IssuerStatus(in *IssuerStatus, out *certmanager.IssuerStatus, s conversion.Scope) error { - out.Conditions = *(*[]certmanager.IssuerCondition)(unsafe.Pointer(&in.Conditions)) - out.ACME = (*acme.ACMEIssuerStatus)(unsafe.Pointer(in.ACME)) - return nil -} - -// Convert_v1alpha3_IssuerStatus_To_certmanager_IssuerStatus is an autogenerated conversion function. -func Convert_v1alpha3_IssuerStatus_To_certmanager_IssuerStatus(in *IssuerStatus, out *certmanager.IssuerStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_IssuerStatus_To_certmanager_IssuerStatus(in, out, s) -} - -func autoConvert_certmanager_IssuerStatus_To_v1alpha3_IssuerStatus(in *certmanager.IssuerStatus, out *IssuerStatus, s conversion.Scope) error { - out.Conditions = *(*[]IssuerCondition)(unsafe.Pointer(&in.Conditions)) - out.ACME = (*acmev1alpha3.ACMEIssuerStatus)(unsafe.Pointer(in.ACME)) - return nil -} - -// Convert_certmanager_IssuerStatus_To_v1alpha3_IssuerStatus is an autogenerated conversion function. -func Convert_certmanager_IssuerStatus_To_v1alpha3_IssuerStatus(in *certmanager.IssuerStatus, out *IssuerStatus, s conversion.Scope) error { - return autoConvert_certmanager_IssuerStatus_To_v1alpha3_IssuerStatus(in, out, s) -} - -func autoConvert_v1alpha3_JKSKeystore_To_certmanager_JKSKeystore(in *JKSKeystore, out *certmanager.JKSKeystore, s conversion.Scope) error { - out.Create = in.Create - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.PasswordSecretRef, &out.PasswordSecretRef, s); err != nil { - return err - } - out.Alias = (*string)(unsafe.Pointer(in.Alias)) - return nil -} - -// Convert_v1alpha3_JKSKeystore_To_certmanager_JKSKeystore is an autogenerated conversion function. -func Convert_v1alpha3_JKSKeystore_To_certmanager_JKSKeystore(in *JKSKeystore, out *certmanager.JKSKeystore, s conversion.Scope) error { - return autoConvert_v1alpha3_JKSKeystore_To_certmanager_JKSKeystore(in, out, s) -} - -func autoConvert_certmanager_JKSKeystore_To_v1alpha3_JKSKeystore(in *certmanager.JKSKeystore, out *JKSKeystore, s conversion.Scope) error { - out.Create = in.Create - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.PasswordSecretRef, &out.PasswordSecretRef, s); err != nil { - return err - } - out.Alias = (*string)(unsafe.Pointer(in.Alias)) - return nil -} - -// Convert_certmanager_JKSKeystore_To_v1alpha3_JKSKeystore is an autogenerated conversion function. -func Convert_certmanager_JKSKeystore_To_v1alpha3_JKSKeystore(in *certmanager.JKSKeystore, out *JKSKeystore, s conversion.Scope) error { - return autoConvert_certmanager_JKSKeystore_To_v1alpha3_JKSKeystore(in, out, s) -} - -func autoConvert_v1alpha3_NameConstraintItem_To_certmanager_NameConstraintItem(in *NameConstraintItem, out *certmanager.NameConstraintItem, s conversion.Scope) error { - out.DNSDomains = *(*[]string)(unsafe.Pointer(&in.DNSDomains)) - out.IPRanges = *(*[]string)(unsafe.Pointer(&in.IPRanges)) - out.EmailAddresses = *(*[]string)(unsafe.Pointer(&in.EmailAddresses)) - out.URIDomains = *(*[]string)(unsafe.Pointer(&in.URIDomains)) - return nil -} - -// Convert_v1alpha3_NameConstraintItem_To_certmanager_NameConstraintItem is an autogenerated conversion function. -func Convert_v1alpha3_NameConstraintItem_To_certmanager_NameConstraintItem(in *NameConstraintItem, out *certmanager.NameConstraintItem, s conversion.Scope) error { - return autoConvert_v1alpha3_NameConstraintItem_To_certmanager_NameConstraintItem(in, out, s) -} - -func autoConvert_certmanager_NameConstraintItem_To_v1alpha3_NameConstraintItem(in *certmanager.NameConstraintItem, out *NameConstraintItem, s conversion.Scope) error { - out.DNSDomains = *(*[]string)(unsafe.Pointer(&in.DNSDomains)) - out.IPRanges = *(*[]string)(unsafe.Pointer(&in.IPRanges)) - out.EmailAddresses = *(*[]string)(unsafe.Pointer(&in.EmailAddresses)) - out.URIDomains = *(*[]string)(unsafe.Pointer(&in.URIDomains)) - return nil -} - -// Convert_certmanager_NameConstraintItem_To_v1alpha3_NameConstraintItem is an autogenerated conversion function. -func Convert_certmanager_NameConstraintItem_To_v1alpha3_NameConstraintItem(in *certmanager.NameConstraintItem, out *NameConstraintItem, s conversion.Scope) error { - return autoConvert_certmanager_NameConstraintItem_To_v1alpha3_NameConstraintItem(in, out, s) -} - -func autoConvert_v1alpha3_NameConstraints_To_certmanager_NameConstraints(in *NameConstraints, out *certmanager.NameConstraints, s conversion.Scope) error { - out.Critical = in.Critical - out.Permitted = (*certmanager.NameConstraintItem)(unsafe.Pointer(in.Permitted)) - out.Excluded = (*certmanager.NameConstraintItem)(unsafe.Pointer(in.Excluded)) - return nil -} - -// Convert_v1alpha3_NameConstraints_To_certmanager_NameConstraints is an autogenerated conversion function. -func Convert_v1alpha3_NameConstraints_To_certmanager_NameConstraints(in *NameConstraints, out *certmanager.NameConstraints, s conversion.Scope) error { - return autoConvert_v1alpha3_NameConstraints_To_certmanager_NameConstraints(in, out, s) -} - -func autoConvert_certmanager_NameConstraints_To_v1alpha3_NameConstraints(in *certmanager.NameConstraints, out *NameConstraints, s conversion.Scope) error { - out.Critical = in.Critical - out.Permitted = (*NameConstraintItem)(unsafe.Pointer(in.Permitted)) - out.Excluded = (*NameConstraintItem)(unsafe.Pointer(in.Excluded)) - return nil -} - -// Convert_certmanager_NameConstraints_To_v1alpha3_NameConstraints is an autogenerated conversion function. -func Convert_certmanager_NameConstraints_To_v1alpha3_NameConstraints(in *certmanager.NameConstraints, out *NameConstraints, s conversion.Scope) error { - return autoConvert_certmanager_NameConstraints_To_v1alpha3_NameConstraints(in, out, s) -} - -func autoConvert_v1alpha3_OtherName_To_certmanager_OtherName(in *OtherName, out *certmanager.OtherName, s conversion.Scope) error { - out.OID = in.OID - out.UTF8Value = in.UTF8Value - return nil -} - -// Convert_v1alpha3_OtherName_To_certmanager_OtherName is an autogenerated conversion function. -func Convert_v1alpha3_OtherName_To_certmanager_OtherName(in *OtherName, out *certmanager.OtherName, s conversion.Scope) error { - return autoConvert_v1alpha3_OtherName_To_certmanager_OtherName(in, out, s) -} - -func autoConvert_certmanager_OtherName_To_v1alpha3_OtherName(in *certmanager.OtherName, out *OtherName, s conversion.Scope) error { - out.OID = in.OID - out.UTF8Value = in.UTF8Value - return nil -} - -// Convert_certmanager_OtherName_To_v1alpha3_OtherName is an autogenerated conversion function. -func Convert_certmanager_OtherName_To_v1alpha3_OtherName(in *certmanager.OtherName, out *OtherName, s conversion.Scope) error { - return autoConvert_certmanager_OtherName_To_v1alpha3_OtherName(in, out, s) -} - -func autoConvert_v1alpha3_PKCS12Keystore_To_certmanager_PKCS12Keystore(in *PKCS12Keystore, out *certmanager.PKCS12Keystore, s conversion.Scope) error { - out.Create = in.Create - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.PasswordSecretRef, &out.PasswordSecretRef, s); err != nil { - return err - } - out.Profile = certmanager.PKCS12Profile(in.Profile) - return nil -} - -// Convert_v1alpha3_PKCS12Keystore_To_certmanager_PKCS12Keystore is an autogenerated conversion function. -func Convert_v1alpha3_PKCS12Keystore_To_certmanager_PKCS12Keystore(in *PKCS12Keystore, out *certmanager.PKCS12Keystore, s conversion.Scope) error { - return autoConvert_v1alpha3_PKCS12Keystore_To_certmanager_PKCS12Keystore(in, out, s) -} - -func autoConvert_certmanager_PKCS12Keystore_To_v1alpha3_PKCS12Keystore(in *certmanager.PKCS12Keystore, out *PKCS12Keystore, s conversion.Scope) error { - out.Create = in.Create - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.PasswordSecretRef, &out.PasswordSecretRef, s); err != nil { - return err - } - out.Profile = PKCS12Profile(in.Profile) - return nil -} - -// Convert_certmanager_PKCS12Keystore_To_v1alpha3_PKCS12Keystore is an autogenerated conversion function. -func Convert_certmanager_PKCS12Keystore_To_v1alpha3_PKCS12Keystore(in *certmanager.PKCS12Keystore, out *PKCS12Keystore, s conversion.Scope) error { - return autoConvert_certmanager_PKCS12Keystore_To_v1alpha3_PKCS12Keystore(in, out, s) -} - -func autoConvert_v1alpha3_SelfSignedIssuer_To_certmanager_SelfSignedIssuer(in *SelfSignedIssuer, out *certmanager.SelfSignedIssuer, s conversion.Scope) error { - out.CRLDistributionPoints = *(*[]string)(unsafe.Pointer(&in.CRLDistributionPoints)) - return nil -} - -// Convert_v1alpha3_SelfSignedIssuer_To_certmanager_SelfSignedIssuer is an autogenerated conversion function. -func Convert_v1alpha3_SelfSignedIssuer_To_certmanager_SelfSignedIssuer(in *SelfSignedIssuer, out *certmanager.SelfSignedIssuer, s conversion.Scope) error { - return autoConvert_v1alpha3_SelfSignedIssuer_To_certmanager_SelfSignedIssuer(in, out, s) -} - -func autoConvert_certmanager_SelfSignedIssuer_To_v1alpha3_SelfSignedIssuer(in *certmanager.SelfSignedIssuer, out *SelfSignedIssuer, s conversion.Scope) error { - out.CRLDistributionPoints = *(*[]string)(unsafe.Pointer(&in.CRLDistributionPoints)) - return nil -} - -// Convert_certmanager_SelfSignedIssuer_To_v1alpha3_SelfSignedIssuer is an autogenerated conversion function. -func Convert_certmanager_SelfSignedIssuer_To_v1alpha3_SelfSignedIssuer(in *certmanager.SelfSignedIssuer, out *SelfSignedIssuer, s conversion.Scope) error { - return autoConvert_certmanager_SelfSignedIssuer_To_v1alpha3_SelfSignedIssuer(in, out, s) -} - -func autoConvert_v1alpha3_ServiceAccountRef_To_certmanager_ServiceAccountRef(in *ServiceAccountRef, out *certmanager.ServiceAccountRef, s conversion.Scope) error { - out.Name = in.Name - out.TokenAudiences = *(*[]string)(unsafe.Pointer(&in.TokenAudiences)) - return nil -} - -// Convert_v1alpha3_ServiceAccountRef_To_certmanager_ServiceAccountRef is an autogenerated conversion function. -func Convert_v1alpha3_ServiceAccountRef_To_certmanager_ServiceAccountRef(in *ServiceAccountRef, out *certmanager.ServiceAccountRef, s conversion.Scope) error { - return autoConvert_v1alpha3_ServiceAccountRef_To_certmanager_ServiceAccountRef(in, out, s) -} - -func autoConvert_certmanager_ServiceAccountRef_To_v1alpha3_ServiceAccountRef(in *certmanager.ServiceAccountRef, out *ServiceAccountRef, s conversion.Scope) error { - out.Name = in.Name - out.TokenAudiences = *(*[]string)(unsafe.Pointer(&in.TokenAudiences)) - return nil -} - -// Convert_certmanager_ServiceAccountRef_To_v1alpha3_ServiceAccountRef is an autogenerated conversion function. -func Convert_certmanager_ServiceAccountRef_To_v1alpha3_ServiceAccountRef(in *certmanager.ServiceAccountRef, out *ServiceAccountRef, s conversion.Scope) error { - return autoConvert_certmanager_ServiceAccountRef_To_v1alpha3_ServiceAccountRef(in, out, s) -} - -func autoConvert_v1alpha3_VaultAppRole_To_certmanager_VaultAppRole(in *VaultAppRole, out *certmanager.VaultAppRole, s conversion.Scope) error { - out.Path = in.Path - out.RoleId = in.RoleId - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.SecretRef, &out.SecretRef, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_VaultAppRole_To_certmanager_VaultAppRole is an autogenerated conversion function. -func Convert_v1alpha3_VaultAppRole_To_certmanager_VaultAppRole(in *VaultAppRole, out *certmanager.VaultAppRole, s conversion.Scope) error { - return autoConvert_v1alpha3_VaultAppRole_To_certmanager_VaultAppRole(in, out, s) -} - -func autoConvert_certmanager_VaultAppRole_To_v1alpha3_VaultAppRole(in *certmanager.VaultAppRole, out *VaultAppRole, s conversion.Scope) error { - out.Path = in.Path - out.RoleId = in.RoleId - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.SecretRef, &out.SecretRef, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_VaultAppRole_To_v1alpha3_VaultAppRole is an autogenerated conversion function. -func Convert_certmanager_VaultAppRole_To_v1alpha3_VaultAppRole(in *certmanager.VaultAppRole, out *VaultAppRole, s conversion.Scope) error { - return autoConvert_certmanager_VaultAppRole_To_v1alpha3_VaultAppRole(in, out, s) -} - -func autoConvert_v1alpha3_VaultAuth_To_certmanager_VaultAuth(in *VaultAuth, out *certmanager.VaultAuth, s conversion.Scope) error { - if in.TokenSecretRef != nil { - in, out := &in.TokenSecretRef, &out.TokenSecretRef - *out = new(meta.SecretKeySelector) - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.TokenSecretRef = nil - } - if in.AppRole != nil { - in, out := &in.AppRole, &out.AppRole - *out = new(certmanager.VaultAppRole) - if err := Convert_v1alpha3_VaultAppRole_To_certmanager_VaultAppRole(*in, *out, s); err != nil { - return err - } - } else { - out.AppRole = nil - } - if in.Kubernetes != nil { - in, out := &in.Kubernetes, &out.Kubernetes - *out = new(certmanager.VaultKubernetesAuth) - if err := Convert_v1alpha3_VaultKubernetesAuth_To_certmanager_VaultKubernetesAuth(*in, *out, s); err != nil { - return err - } - } else { - out.Kubernetes = nil - } - return nil -} - -// Convert_v1alpha3_VaultAuth_To_certmanager_VaultAuth is an autogenerated conversion function. -func Convert_v1alpha3_VaultAuth_To_certmanager_VaultAuth(in *VaultAuth, out *certmanager.VaultAuth, s conversion.Scope) error { - return autoConvert_v1alpha3_VaultAuth_To_certmanager_VaultAuth(in, out, s) -} - -func autoConvert_certmanager_VaultAuth_To_v1alpha3_VaultAuth(in *certmanager.VaultAuth, out *VaultAuth, s conversion.Scope) error { - if in.TokenSecretRef != nil { - in, out := &in.TokenSecretRef, &out.TokenSecretRef - *out = new(metav1.SecretKeySelector) - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.TokenSecretRef = nil - } - if in.AppRole != nil { - in, out := &in.AppRole, &out.AppRole - *out = new(VaultAppRole) - if err := Convert_certmanager_VaultAppRole_To_v1alpha3_VaultAppRole(*in, *out, s); err != nil { - return err - } - } else { - out.AppRole = nil - } - if in.Kubernetes != nil { - in, out := &in.Kubernetes, &out.Kubernetes - *out = new(VaultKubernetesAuth) - if err := Convert_certmanager_VaultKubernetesAuth_To_v1alpha3_VaultKubernetesAuth(*in, *out, s); err != nil { - return err - } - } else { - out.Kubernetes = nil - } - return nil -} - -// Convert_certmanager_VaultAuth_To_v1alpha3_VaultAuth is an autogenerated conversion function. -func Convert_certmanager_VaultAuth_To_v1alpha3_VaultAuth(in *certmanager.VaultAuth, out *VaultAuth, s conversion.Scope) error { - return autoConvert_certmanager_VaultAuth_To_v1alpha3_VaultAuth(in, out, s) -} - -func autoConvert_v1alpha3_VaultIssuer_To_certmanager_VaultIssuer(in *VaultIssuer, out *certmanager.VaultIssuer, s conversion.Scope) error { - if err := Convert_v1alpha3_VaultAuth_To_certmanager_VaultAuth(&in.Auth, &out.Auth, s); err != nil { - return err - } - out.Server = in.Server - out.Path = in.Path - out.Namespace = in.Namespace - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - if in.CABundleSecretRef != nil { - in, out := &in.CABundleSecretRef, &out.CABundleSecretRef - *out = new(meta.SecretKeySelector) - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.CABundleSecretRef = nil - } - if in.ClientCertSecretRef != nil { - in, out := &in.ClientCertSecretRef, &out.ClientCertSecretRef - *out = new(meta.SecretKeySelector) - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ClientCertSecretRef = nil - } - if in.ClientKeySecretRef != nil { - in, out := &in.ClientKeySecretRef, &out.ClientKeySecretRef - *out = new(meta.SecretKeySelector) - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ClientKeySecretRef = nil - } - return nil -} - -// Convert_v1alpha3_VaultIssuer_To_certmanager_VaultIssuer is an autogenerated conversion function. -func Convert_v1alpha3_VaultIssuer_To_certmanager_VaultIssuer(in *VaultIssuer, out *certmanager.VaultIssuer, s conversion.Scope) error { - return autoConvert_v1alpha3_VaultIssuer_To_certmanager_VaultIssuer(in, out, s) -} - -func autoConvert_certmanager_VaultIssuer_To_v1alpha3_VaultIssuer(in *certmanager.VaultIssuer, out *VaultIssuer, s conversion.Scope) error { - if err := Convert_certmanager_VaultAuth_To_v1alpha3_VaultAuth(&in.Auth, &out.Auth, s); err != nil { - return err - } - out.Server = in.Server - out.Path = in.Path - out.Namespace = in.Namespace - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - if in.CABundleSecretRef != nil { - in, out := &in.CABundleSecretRef, &out.CABundleSecretRef - *out = new(metav1.SecretKeySelector) - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.CABundleSecretRef = nil - } - if in.ClientCertSecretRef != nil { - in, out := &in.ClientCertSecretRef, &out.ClientCertSecretRef - *out = new(metav1.SecretKeySelector) - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ClientCertSecretRef = nil - } - if in.ClientKeySecretRef != nil { - in, out := &in.ClientKeySecretRef, &out.ClientKeySecretRef - *out = new(metav1.SecretKeySelector) - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ClientKeySecretRef = nil - } - return nil -} - -// Convert_certmanager_VaultIssuer_To_v1alpha3_VaultIssuer is an autogenerated conversion function. -func Convert_certmanager_VaultIssuer_To_v1alpha3_VaultIssuer(in *certmanager.VaultIssuer, out *VaultIssuer, s conversion.Scope) error { - return autoConvert_certmanager_VaultIssuer_To_v1alpha3_VaultIssuer(in, out, s) -} - -func autoConvert_v1alpha3_VaultKubernetesAuth_To_certmanager_VaultKubernetesAuth(in *VaultKubernetesAuth, out *certmanager.VaultKubernetesAuth, s conversion.Scope) error { - out.Path = in.Path - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.SecretRef, &out.SecretRef, s); err != nil { - return err - } - out.ServiceAccountRef = (*certmanager.ServiceAccountRef)(unsafe.Pointer(in.ServiceAccountRef)) - out.Role = in.Role - return nil -} - -// Convert_v1alpha3_VaultKubernetesAuth_To_certmanager_VaultKubernetesAuth is an autogenerated conversion function. -func Convert_v1alpha3_VaultKubernetesAuth_To_certmanager_VaultKubernetesAuth(in *VaultKubernetesAuth, out *certmanager.VaultKubernetesAuth, s conversion.Scope) error { - return autoConvert_v1alpha3_VaultKubernetesAuth_To_certmanager_VaultKubernetesAuth(in, out, s) -} - -func autoConvert_certmanager_VaultKubernetesAuth_To_v1alpha3_VaultKubernetesAuth(in *certmanager.VaultKubernetesAuth, out *VaultKubernetesAuth, s conversion.Scope) error { - out.Path = in.Path - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.SecretRef, &out.SecretRef, s); err != nil { - return err - } - out.ServiceAccountRef = (*ServiceAccountRef)(unsafe.Pointer(in.ServiceAccountRef)) - out.Role = in.Role - return nil -} - -func autoConvert_v1alpha3_VenafiCloud_To_certmanager_VenafiCloud(in *VenafiCloud, out *certmanager.VenafiCloud, s conversion.Scope) error { - out.URL = in.URL - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.APITokenSecretRef, &out.APITokenSecretRef, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_VenafiCloud_To_certmanager_VenafiCloud is an autogenerated conversion function. -func Convert_v1alpha3_VenafiCloud_To_certmanager_VenafiCloud(in *VenafiCloud, out *certmanager.VenafiCloud, s conversion.Scope) error { - return autoConvert_v1alpha3_VenafiCloud_To_certmanager_VenafiCloud(in, out, s) -} - -func autoConvert_certmanager_VenafiCloud_To_v1alpha3_VenafiCloud(in *certmanager.VenafiCloud, out *VenafiCloud, s conversion.Scope) error { - out.URL = in.URL - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.APITokenSecretRef, &out.APITokenSecretRef, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_VenafiCloud_To_v1alpha3_VenafiCloud is an autogenerated conversion function. -func Convert_certmanager_VenafiCloud_To_v1alpha3_VenafiCloud(in *certmanager.VenafiCloud, out *VenafiCloud, s conversion.Scope) error { - return autoConvert_certmanager_VenafiCloud_To_v1alpha3_VenafiCloud(in, out, s) -} - -func autoConvert_v1alpha3_VenafiIssuer_To_certmanager_VenafiIssuer(in *VenafiIssuer, out *certmanager.VenafiIssuer, s conversion.Scope) error { - out.Zone = in.Zone - if in.TPP != nil { - in, out := &in.TPP, &out.TPP - *out = new(certmanager.VenafiTPP) - if err := Convert_v1alpha3_VenafiTPP_To_certmanager_VenafiTPP(*in, *out, s); err != nil { - return err - } - } else { - out.TPP = nil - } - if in.Cloud != nil { - in, out := &in.Cloud, &out.Cloud - *out = new(certmanager.VenafiCloud) - if err := Convert_v1alpha3_VenafiCloud_To_certmanager_VenafiCloud(*in, *out, s); err != nil { - return err - } - } else { - out.Cloud = nil - } - return nil -} - -// Convert_v1alpha3_VenafiIssuer_To_certmanager_VenafiIssuer is an autogenerated conversion function. -func Convert_v1alpha3_VenafiIssuer_To_certmanager_VenafiIssuer(in *VenafiIssuer, out *certmanager.VenafiIssuer, s conversion.Scope) error { - return autoConvert_v1alpha3_VenafiIssuer_To_certmanager_VenafiIssuer(in, out, s) -} - -func autoConvert_certmanager_VenafiIssuer_To_v1alpha3_VenafiIssuer(in *certmanager.VenafiIssuer, out *VenafiIssuer, s conversion.Scope) error { - out.Zone = in.Zone - if in.TPP != nil { - in, out := &in.TPP, &out.TPP - *out = new(VenafiTPP) - if err := Convert_certmanager_VenafiTPP_To_v1alpha3_VenafiTPP(*in, *out, s); err != nil { - return err - } - } else { - out.TPP = nil - } - if in.Cloud != nil { - in, out := &in.Cloud, &out.Cloud - *out = new(VenafiCloud) - if err := Convert_certmanager_VenafiCloud_To_v1alpha3_VenafiCloud(*in, *out, s); err != nil { - return err - } - } else { - out.Cloud = nil - } - return nil -} - -// Convert_certmanager_VenafiIssuer_To_v1alpha3_VenafiIssuer is an autogenerated conversion function. -func Convert_certmanager_VenafiIssuer_To_v1alpha3_VenafiIssuer(in *certmanager.VenafiIssuer, out *VenafiIssuer, s conversion.Scope) error { - return autoConvert_certmanager_VenafiIssuer_To_v1alpha3_VenafiIssuer(in, out, s) -} - -func autoConvert_v1alpha3_VenafiTPP_To_certmanager_VenafiTPP(in *VenafiTPP, out *certmanager.VenafiTPP, s conversion.Scope) error { - out.URL = in.URL - if err := apismetav1.Convert_v1_LocalObjectReference_To_meta_LocalObjectReference(&in.CredentialsRef, &out.CredentialsRef, s); err != nil { - return err - } - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - return nil -} - -// Convert_v1alpha3_VenafiTPP_To_certmanager_VenafiTPP is an autogenerated conversion function. -func Convert_v1alpha3_VenafiTPP_To_certmanager_VenafiTPP(in *VenafiTPP, out *certmanager.VenafiTPP, s conversion.Scope) error { - return autoConvert_v1alpha3_VenafiTPP_To_certmanager_VenafiTPP(in, out, s) -} - -func autoConvert_certmanager_VenafiTPP_To_v1alpha3_VenafiTPP(in *certmanager.VenafiTPP, out *VenafiTPP, s conversion.Scope) error { - out.URL = in.URL - if err := apismetav1.Convert_meta_LocalObjectReference_To_v1_LocalObjectReference(&in.CredentialsRef, &out.CredentialsRef, s); err != nil { - return err - } - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - return nil -} - -// Convert_certmanager_VenafiTPP_To_v1alpha3_VenafiTPP is an autogenerated conversion function. -func Convert_certmanager_VenafiTPP_To_v1alpha3_VenafiTPP(in *certmanager.VenafiTPP, out *VenafiTPP, s conversion.Scope) error { - return autoConvert_certmanager_VenafiTPP_To_v1alpha3_VenafiTPP(in, out, s) -} - -func autoConvert_v1alpha3_X509Subject_To_certmanager_X509Subject(in *X509Subject, out *certmanager.X509Subject, s conversion.Scope) error { - out.Organizations = *(*[]string)(unsafe.Pointer(&in.Organizations)) - out.Countries = *(*[]string)(unsafe.Pointer(&in.Countries)) - out.OrganizationalUnits = *(*[]string)(unsafe.Pointer(&in.OrganizationalUnits)) - out.Localities = *(*[]string)(unsafe.Pointer(&in.Localities)) - out.Provinces = *(*[]string)(unsafe.Pointer(&in.Provinces)) - out.StreetAddresses = *(*[]string)(unsafe.Pointer(&in.StreetAddresses)) - out.PostalCodes = *(*[]string)(unsafe.Pointer(&in.PostalCodes)) - out.SerialNumber = in.SerialNumber - return nil -} - -// Convert_v1alpha3_X509Subject_To_certmanager_X509Subject is an autogenerated conversion function. -func Convert_v1alpha3_X509Subject_To_certmanager_X509Subject(in *X509Subject, out *certmanager.X509Subject, s conversion.Scope) error { - return autoConvert_v1alpha3_X509Subject_To_certmanager_X509Subject(in, out, s) -} - -func autoConvert_certmanager_X509Subject_To_v1alpha3_X509Subject(in *certmanager.X509Subject, out *X509Subject, s conversion.Scope) error { - out.Organizations = *(*[]string)(unsafe.Pointer(&in.Organizations)) - out.Countries = *(*[]string)(unsafe.Pointer(&in.Countries)) - out.OrganizationalUnits = *(*[]string)(unsafe.Pointer(&in.OrganizationalUnits)) - out.Localities = *(*[]string)(unsafe.Pointer(&in.Localities)) - out.Provinces = *(*[]string)(unsafe.Pointer(&in.Provinces)) - out.StreetAddresses = *(*[]string)(unsafe.Pointer(&in.StreetAddresses)) - out.PostalCodes = *(*[]string)(unsafe.Pointer(&in.PostalCodes)) - out.SerialNumber = in.SerialNumber - return nil -} diff --git a/internal/apis/certmanager/v1alpha3/zz_generated.deepcopy.go b/internal/apis/certmanager/v1alpha3/zz_generated.deepcopy.go deleted file mode 100644 index 3e02b1843fc..00000000000 --- a/internal/apis/certmanager/v1alpha3/zz_generated.deepcopy.go +++ /dev/null @@ -1,1160 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The cert-manager 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 v1alpha3 - -import ( - acmev1alpha3 "github.com/cert-manager/cert-manager/internal/apis/acme/v1alpha3" - metav1 "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CAIssuer) DeepCopyInto(out *CAIssuer) { - *out = *in - if in.CRLDistributionPoints != nil { - in, out := &in.CRLDistributionPoints, &out.CRLDistributionPoints - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.OCSPServers != nil { - in, out := &in.OCSPServers, &out.OCSPServers - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.IssuingCertificateURLs != nil { - in, out := &in.IssuingCertificateURLs, &out.IssuingCertificateURLs - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAIssuer. -func (in *CAIssuer) DeepCopy() *CAIssuer { - if in == nil { - return nil - } - out := new(CAIssuer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Certificate) DeepCopyInto(out *Certificate) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Certificate. -func (in *Certificate) DeepCopy() *Certificate { - if in == nil { - return nil - } - out := new(Certificate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Certificate) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateAdditionalOutputFormat) DeepCopyInto(out *CertificateAdditionalOutputFormat) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateAdditionalOutputFormat. -func (in *CertificateAdditionalOutputFormat) DeepCopy() *CertificateAdditionalOutputFormat { - if in == nil { - return nil - } - out := new(CertificateAdditionalOutputFormat) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateCondition) DeepCopyInto(out *CertificateCondition) { - *out = *in - if in.LastTransitionTime != nil { - in, out := &in.LastTransitionTime, &out.LastTransitionTime - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateCondition. -func (in *CertificateCondition) DeepCopy() *CertificateCondition { - if in == nil { - return nil - } - out := new(CertificateCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateKeystores) DeepCopyInto(out *CertificateKeystores) { - *out = *in - if in.JKS != nil { - in, out := &in.JKS, &out.JKS - *out = new(JKSKeystore) - (*in).DeepCopyInto(*out) - } - if in.PKCS12 != nil { - in, out := &in.PKCS12, &out.PKCS12 - *out = new(PKCS12Keystore) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateKeystores. -func (in *CertificateKeystores) DeepCopy() *CertificateKeystores { - if in == nil { - return nil - } - out := new(CertificateKeystores) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateList) DeepCopyInto(out *CertificateList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Certificate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateList. -func (in *CertificateList) DeepCopy() *CertificateList { - if in == nil { - return nil - } - out := new(CertificateList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CertificateList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificatePrivateKey) DeepCopyInto(out *CertificatePrivateKey) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificatePrivateKey. -func (in *CertificatePrivateKey) DeepCopy() *CertificatePrivateKey { - if in == nil { - return nil - } - out := new(CertificatePrivateKey) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateRequest) DeepCopyInto(out *CertificateRequest) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateRequest. -func (in *CertificateRequest) DeepCopy() *CertificateRequest { - if in == nil { - return nil - } - out := new(CertificateRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CertificateRequest) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateRequestCondition) DeepCopyInto(out *CertificateRequestCondition) { - *out = *in - if in.LastTransitionTime != nil { - in, out := &in.LastTransitionTime, &out.LastTransitionTime - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateRequestCondition. -func (in *CertificateRequestCondition) DeepCopy() *CertificateRequestCondition { - if in == nil { - return nil - } - out := new(CertificateRequestCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateRequestList) DeepCopyInto(out *CertificateRequestList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CertificateRequest, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateRequestList. -func (in *CertificateRequestList) DeepCopy() *CertificateRequestList { - if in == nil { - return nil - } - out := new(CertificateRequestList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CertificateRequestList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateRequestSpec) DeepCopyInto(out *CertificateRequestSpec) { - *out = *in - if in.Duration != nil { - in, out := &in.Duration, &out.Duration - *out = new(v1.Duration) - **out = **in - } - out.IssuerRef = in.IssuerRef - if in.CSRPEM != nil { - in, out := &in.CSRPEM, &out.CSRPEM - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.Usages != nil { - in, out := &in.Usages, &out.Usages - *out = make([]KeyUsage, len(*in)) - copy(*out, *in) - } - if in.Groups != nil { - in, out := &in.Groups, &out.Groups - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Extra != nil { - in, out := &in.Extra, &out.Extra - *out = make(map[string][]string, len(*in)) - for key, val := range *in { - var outVal []string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make([]string, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateRequestSpec. -func (in *CertificateRequestSpec) DeepCopy() *CertificateRequestSpec { - if in == nil { - return nil - } - out := new(CertificateRequestSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateRequestStatus) DeepCopyInto(out *CertificateRequestStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]CertificateRequestCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Certificate != nil { - in, out := &in.Certificate, &out.Certificate - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.CA != nil { - in, out := &in.CA, &out.CA - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.FailureTime != nil { - in, out := &in.FailureTime, &out.FailureTime - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateRequestStatus. -func (in *CertificateRequestStatus) DeepCopy() *CertificateRequestStatus { - if in == nil { - return nil - } - out := new(CertificateRequestStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateSecretTemplate) DeepCopyInto(out *CertificateSecretTemplate) { - *out = *in - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSecretTemplate. -func (in *CertificateSecretTemplate) DeepCopy() *CertificateSecretTemplate { - if in == nil { - return nil - } - out := new(CertificateSecretTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateSpec) DeepCopyInto(out *CertificateSpec) { - *out = *in - if in.Subject != nil { - in, out := &in.Subject, &out.Subject - *out = new(X509Subject) - (*in).DeepCopyInto(*out) - } - if in.Duration != nil { - in, out := &in.Duration, &out.Duration - *out = new(v1.Duration) - **out = **in - } - if in.RenewBefore != nil { - in, out := &in.RenewBefore, &out.RenewBefore - *out = new(v1.Duration) - **out = **in - } - if in.DNSNames != nil { - in, out := &in.DNSNames, &out.DNSNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.IPAddresses != nil { - in, out := &in.IPAddresses, &out.IPAddresses - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.URISANs != nil { - in, out := &in.URISANs, &out.URISANs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.EmailSANs != nil { - in, out := &in.EmailSANs, &out.EmailSANs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.OtherNames != nil { - in, out := &in.OtherNames, &out.OtherNames - *out = make([]OtherName, len(*in)) - copy(*out, *in) - } - if in.SecretTemplate != nil { - in, out := &in.SecretTemplate, &out.SecretTemplate - *out = new(CertificateSecretTemplate) - (*in).DeepCopyInto(*out) - } - if in.Keystores != nil { - in, out := &in.Keystores, &out.Keystores - *out = new(CertificateKeystores) - (*in).DeepCopyInto(*out) - } - out.IssuerRef = in.IssuerRef - if in.Usages != nil { - in, out := &in.Usages, &out.Usages - *out = make([]KeyUsage, len(*in)) - copy(*out, *in) - } - if in.PrivateKey != nil { - in, out := &in.PrivateKey, &out.PrivateKey - *out = new(CertificatePrivateKey) - **out = **in - } - if in.EncodeUsagesInRequest != nil { - in, out := &in.EncodeUsagesInRequest, &out.EncodeUsagesInRequest - *out = new(bool) - **out = **in - } - if in.RevisionHistoryLimit != nil { - in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit - *out = new(int32) - **out = **in - } - if in.AdditionalOutputFormats != nil { - in, out := &in.AdditionalOutputFormats, &out.AdditionalOutputFormats - *out = make([]CertificateAdditionalOutputFormat, len(*in)) - copy(*out, *in) - } - if in.NameConstraints != nil { - in, out := &in.NameConstraints, &out.NameConstraints - *out = new(NameConstraints) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSpec. -func (in *CertificateSpec) DeepCopy() *CertificateSpec { - if in == nil { - return nil - } - out := new(CertificateSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateStatus) DeepCopyInto(out *CertificateStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]CertificateCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.LastFailureTime != nil { - in, out := &in.LastFailureTime, &out.LastFailureTime - *out = (*in).DeepCopy() - } - if in.NotBefore != nil { - in, out := &in.NotBefore, &out.NotBefore - *out = (*in).DeepCopy() - } - if in.NotAfter != nil { - in, out := &in.NotAfter, &out.NotAfter - *out = (*in).DeepCopy() - } - if in.RenewalTime != nil { - in, out := &in.RenewalTime, &out.RenewalTime - *out = (*in).DeepCopy() - } - if in.Revision != nil { - in, out := &in.Revision, &out.Revision - *out = new(int) - **out = **in - } - if in.NextPrivateKeySecretName != nil { - in, out := &in.NextPrivateKeySecretName, &out.NextPrivateKeySecretName - *out = new(string) - **out = **in - } - if in.FailedIssuanceAttempts != nil { - in, out := &in.FailedIssuanceAttempts, &out.FailedIssuanceAttempts - *out = new(int) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateStatus. -func (in *CertificateStatus) DeepCopy() *CertificateStatus { - if in == nil { - return nil - } - out := new(CertificateStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterIssuer) DeepCopyInto(out *ClusterIssuer) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterIssuer. -func (in *ClusterIssuer) DeepCopy() *ClusterIssuer { - if in == nil { - return nil - } - out := new(ClusterIssuer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterIssuer) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterIssuerList) DeepCopyInto(out *ClusterIssuerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterIssuer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterIssuerList. -func (in *ClusterIssuerList) DeepCopy() *ClusterIssuerList { - if in == nil { - return nil - } - out := new(ClusterIssuerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterIssuerList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Issuer) DeepCopyInto(out *Issuer) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Issuer. -func (in *Issuer) DeepCopy() *Issuer { - if in == nil { - return nil - } - out := new(Issuer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Issuer) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IssuerCondition) DeepCopyInto(out *IssuerCondition) { - *out = *in - if in.LastTransitionTime != nil { - in, out := &in.LastTransitionTime, &out.LastTransitionTime - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IssuerCondition. -func (in *IssuerCondition) DeepCopy() *IssuerCondition { - if in == nil { - return nil - } - out := new(IssuerCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IssuerConfig) DeepCopyInto(out *IssuerConfig) { - *out = *in - if in.ACME != nil { - in, out := &in.ACME, &out.ACME - *out = new(acmev1alpha3.ACMEIssuer) - (*in).DeepCopyInto(*out) - } - if in.CA != nil { - in, out := &in.CA, &out.CA - *out = new(CAIssuer) - (*in).DeepCopyInto(*out) - } - if in.Vault != nil { - in, out := &in.Vault, &out.Vault - *out = new(VaultIssuer) - (*in).DeepCopyInto(*out) - } - if in.SelfSigned != nil { - in, out := &in.SelfSigned, &out.SelfSigned - *out = new(SelfSignedIssuer) - (*in).DeepCopyInto(*out) - } - if in.Venafi != nil { - in, out := &in.Venafi, &out.Venafi - *out = new(VenafiIssuer) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IssuerConfig. -func (in *IssuerConfig) DeepCopy() *IssuerConfig { - if in == nil { - return nil - } - out := new(IssuerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IssuerList) DeepCopyInto(out *IssuerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Issuer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IssuerList. -func (in *IssuerList) DeepCopy() *IssuerList { - if in == nil { - return nil - } - out := new(IssuerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IssuerList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IssuerSpec) DeepCopyInto(out *IssuerSpec) { - *out = *in - in.IssuerConfig.DeepCopyInto(&out.IssuerConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IssuerSpec. -func (in *IssuerSpec) DeepCopy() *IssuerSpec { - if in == nil { - return nil - } - out := new(IssuerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IssuerStatus) DeepCopyInto(out *IssuerStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]IssuerCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ACME != nil { - in, out := &in.ACME, &out.ACME - *out = new(acmev1alpha3.ACMEIssuerStatus) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IssuerStatus. -func (in *IssuerStatus) DeepCopy() *IssuerStatus { - if in == nil { - return nil - } - out := new(IssuerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JKSKeystore) DeepCopyInto(out *JKSKeystore) { - *out = *in - out.PasswordSecretRef = in.PasswordSecretRef - if in.Alias != nil { - in, out := &in.Alias, &out.Alias - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JKSKeystore. -func (in *JKSKeystore) DeepCopy() *JKSKeystore { - if in == nil { - return nil - } - out := new(JKSKeystore) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NameConstraintItem) DeepCopyInto(out *NameConstraintItem) { - *out = *in - if in.DNSDomains != nil { - in, out := &in.DNSDomains, &out.DNSDomains - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.IPRanges != nil { - in, out := &in.IPRanges, &out.IPRanges - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.EmailAddresses != nil { - in, out := &in.EmailAddresses, &out.EmailAddresses - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.URIDomains != nil { - in, out := &in.URIDomains, &out.URIDomains - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NameConstraintItem. -func (in *NameConstraintItem) DeepCopy() *NameConstraintItem { - if in == nil { - return nil - } - out := new(NameConstraintItem) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NameConstraints) DeepCopyInto(out *NameConstraints) { - *out = *in - if in.Permitted != nil { - in, out := &in.Permitted, &out.Permitted - *out = new(NameConstraintItem) - (*in).DeepCopyInto(*out) - } - if in.Excluded != nil { - in, out := &in.Excluded, &out.Excluded - *out = new(NameConstraintItem) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NameConstraints. -func (in *NameConstraints) DeepCopy() *NameConstraints { - if in == nil { - return nil - } - out := new(NameConstraints) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OtherName) DeepCopyInto(out *OtherName) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OtherName. -func (in *OtherName) DeepCopy() *OtherName { - if in == nil { - return nil - } - out := new(OtherName) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PKCS12Keystore) DeepCopyInto(out *PKCS12Keystore) { - *out = *in - out.PasswordSecretRef = in.PasswordSecretRef - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PKCS12Keystore. -func (in *PKCS12Keystore) DeepCopy() *PKCS12Keystore { - if in == nil { - return nil - } - out := new(PKCS12Keystore) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SelfSignedIssuer) DeepCopyInto(out *SelfSignedIssuer) { - *out = *in - if in.CRLDistributionPoints != nil { - in, out := &in.CRLDistributionPoints, &out.CRLDistributionPoints - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSignedIssuer. -func (in *SelfSignedIssuer) DeepCopy() *SelfSignedIssuer { - if in == nil { - return nil - } - out := new(SelfSignedIssuer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceAccountRef) DeepCopyInto(out *ServiceAccountRef) { - *out = *in - if in.TokenAudiences != nil { - in, out := &in.TokenAudiences, &out.TokenAudiences - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountRef. -func (in *ServiceAccountRef) DeepCopy() *ServiceAccountRef { - if in == nil { - return nil - } - out := new(ServiceAccountRef) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VaultAppRole) DeepCopyInto(out *VaultAppRole) { - *out = *in - out.SecretRef = in.SecretRef - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultAppRole. -func (in *VaultAppRole) DeepCopy() *VaultAppRole { - if in == nil { - return nil - } - out := new(VaultAppRole) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VaultAuth) DeepCopyInto(out *VaultAuth) { - *out = *in - if in.TokenSecretRef != nil { - in, out := &in.TokenSecretRef, &out.TokenSecretRef - *out = new(metav1.SecretKeySelector) - **out = **in - } - if in.AppRole != nil { - in, out := &in.AppRole, &out.AppRole - *out = new(VaultAppRole) - **out = **in - } - if in.Kubernetes != nil { - in, out := &in.Kubernetes, &out.Kubernetes - *out = new(VaultKubernetesAuth) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultAuth. -func (in *VaultAuth) DeepCopy() *VaultAuth { - if in == nil { - return nil - } - out := new(VaultAuth) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VaultIssuer) DeepCopyInto(out *VaultIssuer) { - *out = *in - in.Auth.DeepCopyInto(&out.Auth) - if in.CABundle != nil { - in, out := &in.CABundle, &out.CABundle - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.CABundleSecretRef != nil { - in, out := &in.CABundleSecretRef, &out.CABundleSecretRef - *out = new(metav1.SecretKeySelector) - **out = **in - } - if in.ClientCertSecretRef != nil { - in, out := &in.ClientCertSecretRef, &out.ClientCertSecretRef - *out = new(metav1.SecretKeySelector) - **out = **in - } - if in.ClientKeySecretRef != nil { - in, out := &in.ClientKeySecretRef, &out.ClientKeySecretRef - *out = new(metav1.SecretKeySelector) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultIssuer. -func (in *VaultIssuer) DeepCopy() *VaultIssuer { - if in == nil { - return nil - } - out := new(VaultIssuer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VaultKubernetesAuth) DeepCopyInto(out *VaultKubernetesAuth) { - *out = *in - out.SecretRef = in.SecretRef - if in.ServiceAccountRef != nil { - in, out := &in.ServiceAccountRef, &out.ServiceAccountRef - *out = new(ServiceAccountRef) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultKubernetesAuth. -func (in *VaultKubernetesAuth) DeepCopy() *VaultKubernetesAuth { - if in == nil { - return nil - } - out := new(VaultKubernetesAuth) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VenafiCloud) DeepCopyInto(out *VenafiCloud) { - *out = *in - out.APITokenSecretRef = in.APITokenSecretRef - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VenafiCloud. -func (in *VenafiCloud) DeepCopy() *VenafiCloud { - if in == nil { - return nil - } - out := new(VenafiCloud) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VenafiIssuer) DeepCopyInto(out *VenafiIssuer) { - *out = *in - if in.TPP != nil { - in, out := &in.TPP, &out.TPP - *out = new(VenafiTPP) - (*in).DeepCopyInto(*out) - } - if in.Cloud != nil { - in, out := &in.Cloud, &out.Cloud - *out = new(VenafiCloud) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VenafiIssuer. -func (in *VenafiIssuer) DeepCopy() *VenafiIssuer { - if in == nil { - return nil - } - out := new(VenafiIssuer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VenafiTPP) DeepCopyInto(out *VenafiTPP) { - *out = *in - out.CredentialsRef = in.CredentialsRef - if in.CABundle != nil { - in, out := &in.CABundle, &out.CABundle - *out = make([]byte, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VenafiTPP. -func (in *VenafiTPP) DeepCopy() *VenafiTPP { - if in == nil { - return nil - } - out := new(VenafiTPP) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *X509Subject) DeepCopyInto(out *X509Subject) { - *out = *in - if in.Organizations != nil { - in, out := &in.Organizations, &out.Organizations - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Countries != nil { - in, out := &in.Countries, &out.Countries - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.OrganizationalUnits != nil { - in, out := &in.OrganizationalUnits, &out.OrganizationalUnits - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Localities != nil { - in, out := &in.Localities, &out.Localities - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Provinces != nil { - in, out := &in.Provinces, &out.Provinces - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.StreetAddresses != nil { - in, out := &in.StreetAddresses, &out.StreetAddresses - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.PostalCodes != nil { - in, out := &in.PostalCodes, &out.PostalCodes - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new X509Subject. -func (in *X509Subject) DeepCopy() *X509Subject { - if in == nil { - return nil - } - out := new(X509Subject) - in.DeepCopyInto(out) - return out -} diff --git a/internal/apis/certmanager/v1alpha3/zz_generated.defaults.go b/internal/apis/certmanager/v1alpha3/zz_generated.defaults.go deleted file mode 100644 index 17fd22729d1..00000000000 --- a/internal/apis/certmanager/v1alpha3/zz_generated.defaults.go +++ /dev/null @@ -1,33 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The cert-manager 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 defaulter-gen. DO NOT EDIT. - -package v1alpha3 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - return nil -} diff --git a/internal/apis/certmanager/v1beta1/const.go b/internal/apis/certmanager/v1beta1/const.go deleted file mode 100644 index 7901c21ad01..00000000000 --- a/internal/apis/certmanager/v1beta1/const.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1beta1 - -import "time" - -const ( - // minimum permitted certificate duration by cert-manager - MinimumCertificateDuration = time.Hour - - // default certificate duration if Issuer.spec.duration is not set - DefaultCertificateDuration = time.Hour * 24 * 90 - - // minimum certificate duration before certificate expiration - MinimumRenewBefore = time.Minute * 5 - - // Deprecated: the default is now 2/3 of Certificate's duration - DefaultRenewBefore = time.Hour * 24 * 30 -) - -const ( - // Default index key for the Secret reference for Token authentication - DefaultVaultTokenAuthSecretKey = "token" - - // Default mount path location for Kubernetes ServiceAccount authentication - // (/v1/auth/kubernetes). The endpoint will then be called at `/login`, so - // left as the default, `/v1/auth/kubernetes/login` will be called. - DefaultVaultKubernetesAuthMountPath = "/v1/auth/kubernetes" -) diff --git a/internal/apis/certmanager/v1beta1/conversion.go b/internal/apis/certmanager/v1beta1/conversion.go deleted file mode 100644 index bbf488395b5..00000000000 --- a/internal/apis/certmanager/v1beta1/conversion.go +++ /dev/null @@ -1,45 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1beta1 - -import ( - "k8s.io/apimachinery/pkg/conversion" - - "github.com/cert-manager/cert-manager/internal/apis/certmanager" -) - -func Convert_v1beta1_CertificateSpec_To_certmanager_CertificateSpec(in *CertificateSpec, out *certmanager.CertificateSpec, s conversion.Scope) error { - if err := autoConvert_v1beta1_CertificateSpec_To_certmanager_CertificateSpec(in, out, s); err != nil { - return err - } - - out.EmailAddresses = in.EmailSANs - out.URIs = in.URISANs - - return nil -} - -func Convert_certmanager_CertificateSpec_To_v1beta1_CertificateSpec(in *certmanager.CertificateSpec, out *CertificateSpec, s conversion.Scope) error { - if err := autoConvert_certmanager_CertificateSpec_To_v1beta1_CertificateSpec(in, out, s); err != nil { - return err - } - - out.EmailSANs = in.EmailAddresses - out.URISANs = in.URIs - - return nil -} diff --git a/internal/apis/certmanager/v1beta1/defaults.go b/internal/apis/certmanager/v1beta1/defaults.go deleted file mode 100644 index 7f5a9bfc623..00000000000 --- a/internal/apis/certmanager/v1beta1/defaults.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1beta1 - -import ( - "k8s.io/apimachinery/pkg/runtime" -) - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} diff --git a/internal/apis/certmanager/v1beta1/doc.go b/internal/apis/certmanager/v1beta1/doc.go deleted file mode 100644 index 750300e6315..00000000000 --- a/internal/apis/certmanager/v1beta1/doc.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2020 The cert-manager 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:conversion-gen=github.com/cert-manager/cert-manager/internal/apis/certmanager -// +k8s:conversion-gen-external-types=github.com/cert-manager/cert-manager/internal/apis/certmanager/v1beta1 -// +k8s:defaulter-gen=TypeMeta -// +k8s:deepcopy-gen=package,register - -// +groupName=cert-manager.io -package v1beta1 diff --git a/internal/apis/certmanager/v1beta1/register.go b/internal/apis/certmanager/v1beta1/register.go deleted file mode 100644 index 4527804d801..00000000000 --- a/internal/apis/certmanager/v1beta1/register.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1beta1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - "github.com/cert-manager/cert-manager/pkg/apis/certmanager" -) - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: certmanager.GroupName, Version: "v1beta1"} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addDefaultingFuncs) - - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes) -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &Certificate{}, - &CertificateList{}, - &Issuer{}, - &IssuerList{}, - &ClusterIssuer{}, - &ClusterIssuerList{}, - &CertificateRequest{}, - &CertificateRequestList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/internal/apis/certmanager/v1beta1/types.go b/internal/apis/certmanager/v1beta1/types.go deleted file mode 100644 index 2cd2b24a2d4..00000000000 --- a/internal/apis/certmanager/v1beta1/types.go +++ /dev/null @@ -1,195 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1beta1 - -// Common annotation keys added to resources. -const ( - // Annotation key for DNS subjectAltNames. - AltNamesAnnotationKey = "cert-manager.io/alt-names" - - // Annotation key for IP subjectAltNames. - IPSANAnnotationKey = "cert-manager.io/ip-sans" - - // Annotation key for URI subjectAltNames. - URISANAnnotationKey = "cert-manager.io/uri-sans" - - // Annotation key for certificate common name. - CommonNameAnnotationKey = "cert-manager.io/common-name" - - // Annotation key the 'name' of the Issuer resource. - IssuerNameAnnotationKey = "cert-manager.io/issuer-name" - - // Annotation key for the 'kind' of the Issuer resource. - IssuerKindAnnotationKey = "cert-manager.io/issuer-kind" - - // Annotation key for the 'group' of the Issuer resource. - IssuerGroupAnnotationKey = "cert-manager.io/issuer-group" - - // Annotation key for the name of the certificate that a resource is related to. - CertificateNameKey = "cert-manager.io/certificate-name" - - // Annotation key used to denote whether a Secret is named on a Certificate - // as a 'next private key' Secret resource. - IsNextPrivateKeySecretLabelKey = "cert-manager.io/next-private-key" -) - -// Deprecated annotation names for Secrets -// These will be removed in a future release. -const ( - DeprecatedIssuerNameAnnotationKey = "certmanager.k8s.io/issuer-name" - DeprecatedIssuerKindAnnotationKey = "certmanager.k8s.io/issuer-kind" -) - -const ( - // issuerNameAnnotation can be used to override the issuer specified on the - // created Certificate resource. - IngressIssuerNameAnnotationKey = "cert-manager.io/issuer" - // clusterIssuerNameAnnotation can be used to override the issuer specified on the - // created Certificate resource. The Certificate will reference the - // specified *ClusterIssuer* instead of normal issuer. - IngressClusterIssuerNameAnnotationKey = "cert-manager.io/cluster-issuer" - // acmeIssuerHTTP01IngressClassAnnotation can be used to override the http01 ingressClass - // if the challenge type is set to http01 - IngressACMEIssuerHTTP01IngressClassAnnotationKey = "acme.cert-manager.io/http01-ingress-class" - - // IngressClassAnnotationKey picks a specific "class" for the Ingress. The - // controller only processes Ingresses with this annotation either unset, or - // set to either the configured value or the empty string. - IngressClassAnnotationKey = "kubernetes.io/ingress.class" -) - -// Annotation names for CertificateRequests -const ( - // Annotation added to CertificateRequest resources to denote the name of - // a Secret resource containing the private key used to sign the CSR stored - // on the resource. - // This annotation *may* not be present, and is used by the 'self signing' - // issuer type to self-sign certificates. - CertificateRequestPrivateKeyAnnotationKey = "cert-manager.io/private-key-secret-name" - - // Annotation to declare the CertificateRequest "revision", belonging to a Certificate Resource - CertificateRequestRevisionAnnotationKey = "cert-manager.io/certificate-revision" -) - -const ( - // IssueTemporaryCertificateAnnotation is an annotation that can be added to - // Certificate resources. - // If it is present, a temporary internally signed certificate will be - // stored in the target Secret resource whilst the real Issuer is processing - // the certificate request. - IssueTemporaryCertificateAnnotation = "cert-manager.io/issue-temporary-certificate" -) - -// Common/known resource kinds. -const ( - ClusterIssuerKind = "ClusterIssuer" - IssuerKind = "Issuer" - CertificateKind = "Certificate" - CertificateRequestKind = "CertificateRequest" -) - -const ( - // WantInjectAnnotation is the annotation that specifies that a particular - // object wants injection of CAs. It takes the form of a reference to a certificate - // as namespace/name. The certificate is expected to have the is-serving-for annotations. - WantInjectAnnotation = "cert-manager.io/inject-ca-from" - - // WantInjectAPIServerCAAnnotation, if set to "true", will make the cainjector - // inject the CA certificate for the Kubernetes apiserver into the resource. - // It discovers the apiserver's CA by inspecting the service account credentials - // mounted into the cainjector pod. - WantInjectAPIServerCAAnnotation = "cert-manager.io/inject-apiserver-ca" - - // WantInjectFromSecretAnnotation is the annotation that specifies that a particular - // object wants injection of CAs. It takes the form of a reference to a Secret - // as namespace/name. - WantInjectFromSecretAnnotation = "cert-manager.io/inject-ca-from-secret" - - // AllowsInjectionFromSecretAnnotation is an annotation that must be added - // to Secret resource that want to denote that they can be directly - // injected into injectables that have a `inject-ca-from-secret` annotation. - // If an injectable references a Secret that does NOT have this annotation, - // the cainjector will refuse to inject the secret. - AllowsInjectionFromSecretAnnotation = "cert-manager.io/allow-direct-injection" -) - -// Issuer specific Annotations -const ( - // VenafiCustomFieldsAnnotationKey is the annotation that passes on JSON encoded custom fields to the Venafi issuer - // This will only work with Venafi TPP v19.3 and higher - // The value is an array with objects containing the name and value keys - // for example: `[{"name": "custom-field", "value": "custom-value"}]` - VenafiCustomFieldsAnnotationKey = "venafi.cert-manager.io/custom-fields" -) - -// KeyUsage specifies valid usage contexts for keys. -// See: -// https://tools.ietf.org/html/rfc5280#section-4.2.1.3 -// https://tools.ietf.org/html/rfc5280#section-4.2.1.12 -// -// Valid KeyUsage values are as follows: -// "signing", -// "digital signature", -// "content commitment", -// "key encipherment", -// "key agreement", -// "data encipherment", -// "cert sign", -// "crl sign", -// "encipher only", -// "decipher only", -// "any", -// "server auth", -// "client auth", -// "code signing", -// "email protection", -// "s/mime", -// "ipsec end system", -// "ipsec tunnel", -// "ipsec user", -// "timestamping", -// "ocsp signing", -// "microsoft sgc", -// "netscape sgc" -// +kubebuilder:validation:Enum="signing";"digital signature";"content commitment";"key encipherment";"key agreement";"data encipherment";"cert sign";"crl sign";"encipher only";"decipher only";"any";"server auth";"client auth";"code signing";"email protection";"s/mime";"ipsec end system";"ipsec tunnel";"ipsec user";"timestamping";"ocsp signing";"microsoft sgc";"netscape sgc" -type KeyUsage string - -const ( - UsageSigning KeyUsage = "signing" - UsageDigitalSignature KeyUsage = "digital signature" - UsageContentCommitment KeyUsage = "content commitment" - UsageKeyEncipherment KeyUsage = "key encipherment" - UsageKeyAgreement KeyUsage = "key agreement" - UsageDataEncipherment KeyUsage = "data encipherment" - UsageCertSign KeyUsage = "cert sign" - UsageCRLSign KeyUsage = "crl sign" - UsageEncipherOnly KeyUsage = "encipher only" - UsageDecipherOnly KeyUsage = "decipher only" - UsageAny KeyUsage = "any" - UsageServerAuth KeyUsage = "server auth" - UsageClientAuth KeyUsage = "client auth" - UsageCodeSigning KeyUsage = "code signing" - UsageEmailProtection KeyUsage = "email protection" - UsageSMIME KeyUsage = "s/mime" - UsageIPsecEndSystem KeyUsage = "ipsec end system" - UsageIPsecTunnel KeyUsage = "ipsec tunnel" - UsageIPsecUser KeyUsage = "ipsec user" - UsageTimestamping KeyUsage = "timestamping" - UsageOCSPSigning KeyUsage = "ocsp signing" - UsageMicrosoftSGC KeyUsage = "microsoft sgc" - UsageNetscapeSGC KeyUsage = "netscape sgc" -) diff --git a/internal/apis/certmanager/v1beta1/types_certificate.go b/internal/apis/certmanager/v1beta1/types_certificate.go deleted file mode 100644 index 14404b5f907..00000000000 --- a/internal/apis/certmanager/v1beta1/types_certificate.go +++ /dev/null @@ -1,611 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1beta1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// A Certificate resource should be created to ensure an up to date and signed -// x509 certificate is stored in the Kubernetes Secret resource named in `spec.secretName`. -// -// The stored certificate will be renewed before it expires (as configured by `spec.renewBefore`). -// +k8s:openapi-gen=true -type Certificate struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Desired state of the Certificate resource. - Spec CertificateSpec `json:"spec"` - - // Status of the Certificate. This is set and managed automatically. - // +optional - Status CertificateStatus `json:"status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CertificateList is a list of Certificates -type CertificateList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []Certificate `json:"items"` -} - -// +kubebuilder:validation:Enum=RSA;ECDSA -type PrivateKeyAlgorithm string - -const ( - // Denotes the RSA private key type. - RSAKeyAlgorithm PrivateKeyAlgorithm = "RSA" - - // Denotes the ECDSA private key type. - ECDSAKeyAlgorithm PrivateKeyAlgorithm = "ECDSA" -) - -// +kubebuilder:validation:Enum=PKCS1;PKCS8 -type PrivateKeyEncoding string - -const ( - // PKCS1 key encoding will produce PEM files that include the type of - // private key as part of the PEM header, e.g. `BEGIN RSA PRIVATE KEY`. - // If the keyAlgorithm is set to 'ECDSA', this will produce private keys - // that use the `BEGIN EC PRIVATE KEY` header. - PKCS1 PrivateKeyEncoding = "PKCS1" - - // PKCS8 key encoding will produce PEM files with the `BEGIN PRIVATE KEY` - // header. It encodes the keyAlgorithm of the private key as part of the - // DER encoded PEM block. - PKCS8 PrivateKeyEncoding = "PKCS8" -) - -// CertificateSpec defines the desired state of Certificate. -// A valid Certificate requires at least one of a CommonName, DNSName, or -// URISAN to be valid. -type CertificateSpec struct { - // Full X509 name specification (https://golang.org/pkg/crypto/x509/pkix/#Name). - // +optional - Subject *X509Subject `json:"subject,omitempty"` - - // Requested X.509 certificate subject, represented using the LDAP "String - // Representation of a Distinguished Name" [1]. - // Important: the LDAP string format also specifies the order of the attributes - // in the subject, this is important when issuing certs for LDAP authentication. - // Example: `CN=foo,DC=corp,DC=example,DC=com` - // More info [1]: https://datatracker.ietf.org/doc/html/rfc4514 - // More info: https://github.com/cert-manager/cert-manager/issues/3203 - // More info: https://github.com/cert-manager/cert-manager/issues/4424 - // - // Cannot be set if the `subject` or `commonName` field is set. - // +optional - LiteralSubject string `json:"literalSubject,omitempty"` - - // CommonName is a common name to be used on the Certificate. - // The CommonName should have a length of 64 characters or fewer to avoid - // generating invalid CSRs. - // This value is ignored by TLS clients when any subject alt name is set. - // This is x509 behaviour: https://tools.ietf.org/html/rfc6125#section-6.4.4 - // +optional - CommonName string `json:"commonName,omitempty"` - - // The requested 'duration' (i.e. lifetime) of the Certificate. This option - // may be ignored/overridden by some issuer types. If unset this defaults to - // 90 days. Certificate will be renewed either 2/3 through its duration or - // `renewBefore` period before its expiry, whichever is later. Minimum - // accepted duration is 1 hour. Value must be in units accepted by Go - // time.ParseDuration https://golang.org/pkg/time/#ParseDuration - // +optional - Duration *metav1.Duration `json:"duration,omitempty"` - - // How long before the currently issued certificate's expiry - // cert-manager should renew the certificate. The default is 2/3 of the - // issued certificate's duration. Minimum accepted value is 5 minutes. - // Value must be in units accepted by Go time.ParseDuration - // https://golang.org/pkg/time/#ParseDuration - // +optional - RenewBefore *metav1.Duration `json:"renewBefore,omitempty"` - - // DNSNames is a list of DNS subjectAltNames to be set on the Certificate. - // +optional - DNSNames []string `json:"dnsNames,omitempty"` - - // IPAddresses is a list of IP address subjectAltNames to be set on the Certificate. - // +optional - IPAddresses []string `json:"ipAddresses,omitempty"` - - // URISANs is a list of URI subjectAltNames to be set on the Certificate. - // +optional - URISANs []string `json:"uriSANs,omitempty"` - - // EmailSANs is a list of email subjectAltNames to be set on the Certificate. - // +optional - EmailSANs []string `json:"emailSANs,omitempty"` - - // `otherNames` is an escape hatch for SAN that allows any type. We currently restrict the support to string like otherNames, cf RFC 5280 p 37 - // Any UTF8 String valued otherName can be passed with by setting the keys oid: x.x.x.x and UTF8Value: somevalue for `otherName`. - // Most commonly this would be UPN set with oid: 1.3.6.1.4.1.311.20.2.3 - // You should ensure that any OID passed is valid for the UTF8String type as we do not explicitly validate this. - // +optional - OtherNames []OtherName `json:"otherNames,omitempty"` - - // SecretName is the name of the secret resource that will be automatically - // created and managed by this Certificate resource. - // It will be populated with a private key and certificate, signed by the - // denoted issuer. - SecretName string `json:"secretName"` - - // SecretTemplate defines annotations and labels to be copied to the - // Certificate's Secret. Labels and annotations on the Secret will be changed - // as they appear on the SecretTemplate when added or removed. SecretTemplate - // annotations are added in conjunction with, and cannot overwrite, the base - // set of annotations cert-manager sets on the Certificate's Secret. - // +optional - SecretTemplate *CertificateSecretTemplate `json:"secretTemplate,omitempty"` - - // Keystores configures additional keystore output formats stored in the - // `secretName` Secret resource. - // +optional - Keystores *CertificateKeystores `json:"keystores,omitempty"` - - // IssuerRef is a reference to the issuer for this certificate. - // If the `kind` field is not set, or set to `Issuer`, an Issuer resource - // with the given name in the same namespace as the Certificate will be used. - // If the `kind` field is set to `ClusterIssuer`, a ClusterIssuer with the - // provided name will be used. - // The `name` field in this stanza is required at all times. - IssuerRef cmmeta.ObjectReference `json:"issuerRef"` - - // IsCA will mark this Certificate as valid for certificate signing. - // This will automatically add the `cert sign` usage to the list of `usages`. - // +optional - IsCA bool `json:"isCA,omitempty"` - - // Usages is the set of x509 usages that are requested for the certificate. - // Defaults to `digital signature` and `key encipherment` if not specified. - // +optional - Usages []KeyUsage `json:"usages,omitempty"` - - // Options to control private keys used for the Certificate. - // +optional - PrivateKey *CertificatePrivateKey `json:"privateKey,omitempty"` - - // EncodeUsagesInRequest controls whether key usages should be present - // in the CertificateRequest - // +optional - EncodeUsagesInRequest *bool `json:"encodeUsagesInRequest,omitempty"` - - // revisionHistoryLimit is the maximum number of CertificateRequest revisions - // that are maintained in the Certificate's history. Each revision represents - // a single `CertificateRequest` created by this Certificate, either when it - // was created, renewed, or Spec was changed. Revisions will be removed by - // oldest first if the number of revisions exceeds this number. If set, - // revisionHistoryLimit must be a value of `1` or greater. If unset (`nil`), - // revisions will not be garbage collected. Default value is `nil`. - // +kubebuilder:validation:ExclusiveMaximum=false - // +optional - RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` // Validated by the validating webhook. - - // AdditionalOutputFormats defines extra output formats of the private key - // and signed certificate chain to be written to this Certificate's target - // Secret. This is an Alpha Feature and is only enabled with the - // `--feature-gates=AdditionalCertificateOutputFormats=true` option on both - // the controller and webhook components. - // +optional - AdditionalOutputFormats []CertificateAdditionalOutputFormat `json:"additionalOutputFormats,omitempty"` - - // x.509 certificate NameConstraint extension which MUST NOT be used in a non-CA certificate. - // More Info: https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.10 - // - // This is an Alpha Feature and is only enabled with the - // `--feature-gates=NameConstraints=true` option set on both - // the controller and webhook components. - // +optional - NameConstraints *NameConstraints `json:"nameConstraints,omitempty"` -} - -type OtherName struct { - // OID is the object identifier for the otherName SAN. - // The object identifier must be expressed as a dotted string, for - // example, "1.2.840.113556.1.4.221". - OID string `json:"oid,omitempty"` - - // utf8Value is the string value of the otherName SAN. - // The utf8Value accepts any valid UTF8 string to set as value for the otherName SAN. - UTF8Value string `json:"utf8Value,omitempty"` -} - -// CertificatePrivateKey contains configuration options for private keys -// used by the Certificate controller. -// This allows control of how private keys are rotated. -type CertificatePrivateKey struct { - // RotationPolicy controls how private keys should be regenerated when a - // re-issuance is being processed. - // If set to Never, a private key will only be generated if one does not - // already exist in the target `spec.secretName`. If one does exists but it - // does not have the correct algorithm or size, a warning will be raised - // to await user intervention. - // If set to Always, a private key matching the specified requirements - // will be generated whenever a re-issuance occurs. - // Default is 'Never' for backward compatibility. - // +optional - RotationPolicy PrivateKeyRotationPolicy `json:"rotationPolicy,omitempty"` - - // The private key cryptography standards (PKCS) encoding for this - // certificate's private key to be encoded in. - // If provided, allowed values are `PKCS1` and `PKCS8` standing for PKCS#1 - // and PKCS#8, respectively. - // Defaults to `PKCS1` if not specified. - // +optional - Encoding PrivateKeyEncoding `json:"encoding,omitempty"` - - // Algorithm is the private key algorithm of the corresponding private key - // for this certificate. If provided, allowed values are either `RSA` or `ECDSA` - // If `algorithm` is specified and `size` is not provided, - // key size of 256 will be used for `ECDSA` key algorithm and - // key size of 2048 will be used for `RSA` key algorithm. - // +optional - Algorithm PrivateKeyAlgorithm `json:"algorithm,omitempty"` - - // Size is the key bit size of the corresponding private key for this certificate. - // If `algorithm` is set to `RSA`, valid values are `2048`, `4096` or `8192`, - // and will default to `2048` if not specified. - // If `algorithm` is set to `ECDSA`, valid values are `256`, `384` or `521`, - // and will default to `256` if not specified. - // No other values are allowed. - // +optional - Size int `json:"size,omitempty"` // Validated by webhook. Be mindful of adding OpenAPI validation- see https://github.com/cert-manager/cert-manager/issues/3644 . -} - -// Denotes how private keys should be generated or sourced when a Certificate -// is being issued. -type PrivateKeyRotationPolicy string - -var ( - // RotationPolicyNever means a private key will only be generated if one - // does not already exist in the target `spec.secretName`. - // If one does exists but it does not have the correct algorithm or size, - // a warning will be raised to await user intervention. - RotationPolicyNever PrivateKeyRotationPolicy = "Never" - - // RotationPolicyAlways means a private key matching the specified - // requirements will be generated whenever a re-issuance occurs. - RotationPolicyAlways PrivateKeyRotationPolicy = "Always" -) - -// X509Subject Full X509 name specification -type X509Subject struct { - // Organizations to be used on the Certificate. - // +optional - Organizations []string `json:"organizations,omitempty"` - // Countries to be used on the Certificate. - // +optional - Countries []string `json:"countries,omitempty"` - // Organizational Units to be used on the Certificate. - // +optional - OrganizationalUnits []string `json:"organizationalUnits,omitempty"` - // Cities to be used on the Certificate. - // +optional - Localities []string `json:"localities,omitempty"` - // State/Provinces to be used on the Certificate. - // +optional - Provinces []string `json:"provinces,omitempty"` - // Street addresses to be used on the Certificate. - // +optional - StreetAddresses []string `json:"streetAddresses,omitempty"` - // Postal codes to be used on the Certificate. - // +optional - PostalCodes []string `json:"postalCodes,omitempty"` - // Serial number to be used on the Certificate. - // +optional - SerialNumber string `json:"serialNumber,omitempty"` -} - -// CertificateKeystores configures additional keystore output formats to be -// created in the Certificate's output Secret. -type CertificateKeystores struct { - // JKS configures options for storing a JKS keystore in the - // `spec.secretName` Secret resource. - // +optional - JKS *JKSKeystore `json:"jks,omitempty"` - - // PKCS12 configures options for storing a PKCS12 keystore in the - // `spec.secretName` Secret resource. - // +optional - PKCS12 *PKCS12Keystore `json:"pkcs12,omitempty"` -} - -// JKS configures options for storing a JKS keystore in the `spec.secretName` -// Secret resource. -type JKSKeystore struct { - // Create enables JKS keystore creation for the Certificate. - // If true, a file named `keystore.jks` will be created in the target - // Secret resource, encrypted using the password stored in - // `passwordSecretRef`. - // The keystore file will only be updated upon re-issuance. - Create bool `json:"create"` - - // PasswordSecretRef is a reference to a key in a Secret resource - // containing the password used to encrypt the JKS keystore. - PasswordSecretRef cmmeta.SecretKeySelector `json:"passwordSecretRef"` - - // Alias specifies the alias of the key in the keystore, required by the JKS format. - // If not provided, the default alias `certificate` will be used. - // +optional - Alias *string `json:"alias,omitempty"` -} - -// PKCS12 configures options for storing a PKCS12 keystore in the -// `spec.secretName` Secret resource. -type PKCS12Keystore struct { - // Create enables PKCS12 keystore creation for the Certificate. - // If true, a file named `keystore.p12` will be created in the target - // Secret resource, encrypted using the password stored in - // `passwordSecretRef`. - // The keystore file will only be updated upon re-issuance. - Create bool `json:"create"` - - // PasswordSecretRef is a reference to a key in a Secret resource - // containing the password used to encrypt the PKCS12 keystore. - PasswordSecretRef cmmeta.SecretKeySelector `json:"passwordSecretRef"` - - // Profile specifies the key and certificate encryption algorithms and the HMAC algorithm - // used to create the PKCS12 keystore. Default value is `LegacyRC2` for backward compatibility. - // - // If provided, allowed values are: - // `LegacyRC2`: Deprecated. Not supported by default in OpenSSL 3 or Java 20. - // `LegacyDES`: Less secure algorithm. Use this option for maximal compatibility. - // `Modern2023`: Secure algorithm. Use this option in case you have to always use secure algorithms - // (eg. because of company policy). Please note that the security of the algorithm is not that important - // in reality, because the unencrypted certificate and private key are also stored in the Secret. - // +optional - Profile PKCS12Profile `json:"profile,omitempty"` -} - -// +kubebuilder:validation:Enum=LegacyRC2;LegacyDES;Modern2023 -type PKCS12Profile string - -const ( - // see: https://pkg.go.dev/software.sslmate.com/src/go-pkcs12#LegacyRC2 - LegacyRC2PKCS12Profile PKCS12Profile = "LegacyRC2" - - // see: https://pkg.go.dev/software.sslmate.com/src/go-pkcs12#LegacyDES - LegacyDESPKCS12Profile PKCS12Profile = "LegacyDES" - - // see: https://pkg.go.dev/software.sslmate.com/src/go-pkcs12#Modern2023 - Modern2023PKCS12Profile PKCS12Profile = "Modern2023" -) - -// CertificateStatus defines the observed state of Certificate -type CertificateStatus struct { - // List of status conditions to indicate the status of certificates. - // Known condition types are `Ready` and `Issuing`. - // +listType=map - // +listMapKey=type - // +optional - Conditions []CertificateCondition `json:"conditions,omitempty"` - - // LastFailureTime is the time as recorded by the Certificate controller - // of the most recent failure to complete a CertificateRequest for this - // Certificate resource. - // If set, cert-manager will not re-request another Certificate until - // 1 hour has elapsed from this time. - // +optional - LastFailureTime *metav1.Time `json:"lastFailureTime,omitempty"` - - // The time after which the certificate stored in the secret named - // by this resource in spec.secretName is valid. - // +optional - NotBefore *metav1.Time `json:"notBefore,omitempty"` - - // The expiration time of the certificate stored in the secret named - // by this resource in `spec.secretName`. - // +optional - NotAfter *metav1.Time `json:"notAfter,omitempty"` - - // RenewalTime is the time at which the certificate will be next - // renewed. - // If not set, no upcoming renewal is scheduled. - // +optional - RenewalTime *metav1.Time `json:"renewalTime,omitempty"` - - // The current 'revision' of the certificate as issued. - // - // When a CertificateRequest resource is created, it will have the - // `cert-manager.io/certificate-revision` set to one greater than the - // current value of this field. - // - // Upon issuance, this field will be set to the value of the annotation - // on the CertificateRequest resource used to issue the certificate. - // - // Persisting the value on the CertificateRequest resource allows the - // certificates controller to know whether a request is part of an old - // issuance or if it is part of the ongoing revision's issuance by - // checking if the revision value in the annotation is greater than this - // field. - // +optional - Revision *int `json:"revision,omitempty"` - - // The name of the Secret resource containing the private key to be used - // for the next certificate iteration. - // The keymanager controller will automatically set this field if the - // `Issuing` condition is set to `True`. - // It will automatically unset this field when the Issuing condition is - // not set or False. - // +optional - NextPrivateKeySecretName *string `json:"nextPrivateKeySecretName,omitempty"` - - // The number of continuous failed issuance attempts up till now. This - // field gets removed (if set) on a successful issuance and gets set to - // 1 if unset and an issuance has failed. If an issuance has failed, the - // delay till the next issuance will be calculated using formula - // time.Hour * 2 ^ (failedIssuanceAttempts - 1). - // +optional - FailedIssuanceAttempts *int `json:"failedIssuanceAttempts,omitempty"` -} - -// CertificateCondition contains condition information for an Certificate. -type CertificateCondition struct { - // Type of the condition, known values are (`Ready`, `Issuing`). - Type CertificateConditionType `json:"type"` - - // Status of the condition, one of (`True`, `False`, `Unknown`). - Status cmmeta.ConditionStatus `json:"status"` - - // LastTransitionTime is the timestamp corresponding to the last status - // change of this condition. - // +optional - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - - // Reason is a brief machine readable explanation for the condition's last - // transition. - // +optional - Reason string `json:"reason,omitempty"` - - // Message is a human readable description of the details of the last - // transition, complementing reason. - // +optional - Message string `json:"message,omitempty"` - - // If set, this represents the .metadata.generation that the condition was - // set based upon. - // For instance, if .metadata.generation is currently 12, but the - // .status.condition[x].observedGeneration is 9, the condition is out of date - // with respect to the current state of the Certificate. - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty"` -} - -// CertificateConditionType represents an Certificate condition value. -type CertificateConditionType string - -const ( - // CertificateConditionReady indicates that a certificate is ready for use. - // This is defined as: - // - The target secret exists - // - The target secret contains a certificate that has not expired - // - The target secret contains a private key valid for the certificate - // - The commonName and dnsNames attributes match those specified on the Certificate - CertificateConditionReady CertificateConditionType = "Ready" - - // A condition added to Certificate resources when an issuance is required. - // This condition will be automatically added and set to true if: - // * No keypair data exists in the target Secret - // * The data stored in the Secret cannot be decoded - // * The private key and certificate do not have matching public keys - // * If a CertificateRequest for the current revision exists and the - // certificate data stored in the Secret does not match the - // `status.certificate` on the CertificateRequest. - // * If no CertificateRequest resource exists for the current revision, - // the options on the Certificate resource are compared against the - // x509 data in the Secret, similar to what's done in earlier versions. - // If there is a mismatch, an issuance is triggered. - // This condition may also be added by external API consumers to trigger - // a re-issuance manually for any other reason. - // - // It will be removed by the 'issuing' controller upon completing issuance. - CertificateConditionIssuing CertificateConditionType = "Issuing" -) - -// CertificateSecretTemplate defines the default labels and annotations -// to be copied to the Kubernetes Secret resource named in `CertificateSpec.secretName`. -type CertificateSecretTemplate struct { - // Annotations is a key value map to be copied to the target Kubernetes Secret. - // +optional - Annotations map[string]string `json:"annotations,omitempty"` - - // Labels is a key value map to be copied to the target Kubernetes Secret. - // +optional - Labels map[string]string `json:"labels,omitempty"` -} - -// CertificateOutputFormatType specifies which additional output formats should -// be written to the Certificate's target Secret. -// Allowed values are `DER` or `CombinedPEM`. -// When Type is set to `DER` an additional entry `key.der` will be written to -// the Secret, containing the binary format of the private key. -// When Type is set to `CombinedPEM` an additional entry `tls-combined.pem` -// will be written to the Secret, containing the PEM formatted private key and -// signed certificate chain (tls.key + tls.crt concatenated). -// +kubebuilder:validation:Enum=DER;CombinedPEM -type CertificateOutputFormatType string - -const ( - // CertificateOutputFormatDER writes the Certificate's private key in DER - // binary format to the `key.der` target Secret Data key. - CertificateOutputFormatDER CertificateOutputFormatType = "DER" - - // CertificateOutputFormatCombinedPEM writes the Certificate's signed - // certificate chain and private key, in PEM format, to the - // `tls-combined.pem` target Secret Data key. The value at this key will - // include the private key PEM document, followed by at least one new line - // character, followed by the chain of signed certificate PEM documents - // (` + \n + `). - CertificateOutputFormatCombinedPEM CertificateOutputFormatType = "CombinedPEM" -) - -// CertificateAdditionalOutputFormat defines an additional output format of a -// Certificate resource. These contain supplementary data formats of the signed -// certificate chain and paired private key. -type CertificateAdditionalOutputFormat struct { - // Type is the name of the format type that should be written to the - // Certificate's target Secret. - Type CertificateOutputFormatType `json:"type"` -} - -// NameConstraints is a type to represent x509 NameConstraints -type NameConstraints struct { - // if true then the name constraints are marked critical. - // - // +optional - Critical bool `json:"critical,omitempty"` - // Permitted contains the constraints in which the names must be located. - // - // +optional - Permitted *NameConstraintItem `json:"permitted,omitempty"` - // Excluded contains the constraints which must be disallowed. Any name matching a - // restriction in the excluded field is invalid regardless - // of information appearing in the permitted - // - // +optional - Excluded *NameConstraintItem `json:"excluded,omitempty"` -} - -type NameConstraintItem struct { - // DNSDomains is a list of DNS domains that are permitted or excluded. - // - // +optional - DNSDomains []string `json:"dnsDomains,omitempty"` - // IPRanges is a list of IP Ranges that are permitted or excluded. - // This should be a valid CIDR notation. - // - // +optional - IPRanges []string `json:"ipRanges,omitempty"` - // EmailAddresses is a list of Email Addresses that are permitted or excluded. - // - // +optional - EmailAddresses []string `json:"emailAddresses,omitempty"` - // URIDomains is a list of URI domains that are permitted or excluded. - // - // +optional - URIDomains []string `json:"uriDomains,omitempty"` -} diff --git a/internal/apis/certmanager/v1beta1/types_certificaterequest.go b/internal/apis/certmanager/v1beta1/types_certificaterequest.go deleted file mode 100644 index 766e745860c..00000000000 --- a/internal/apis/certmanager/v1beta1/types_certificaterequest.go +++ /dev/null @@ -1,210 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1beta1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" -) - -const ( - // Pending indicates that a CertificateRequest is still in progress. - CertificateRequestReasonPending = "Pending" - - // Failed indicates that a CertificateRequest has failed, either due to - // timing out or some other critical failure. - CertificateRequestReasonFailed = "Failed" - - // Issued indicates that a CertificateRequest has been completed, and that - // the `status.certificate` field is set. - CertificateRequestReasonIssued = "Issued" - - // Denied is a Ready condition reason that indicates that a - // CertificateRequest has been denied, and the CertificateRequest will never - // be issued. - CertificateRequestReasonDenied = "Denied" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// A CertificateRequest is used to request a signed certificate from one of the -// configured issuers. -// -// All fields within the CertificateRequest's `spec` are immutable after creation. -// A CertificateRequest will either succeed or fail, as denoted by its `status.state` -// field. -// -// A CertificateRequest is a one-shot resource, meaning it represents a single -// point in time request for a certificate and cannot be re-used. -// +k8s:openapi-gen=true -type CertificateRequest struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Desired state of the CertificateRequest resource. - Spec CertificateRequestSpec `json:"spec"` - - // Status of the CertificateRequest. This is set and managed automatically. - // +optional - Status CertificateRequestStatus `json:"status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CertificateRequestList is a list of Certificates -type CertificateRequestList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []CertificateRequest `json:"items"` -} - -// CertificateRequestSpec defines the desired state of CertificateRequest -type CertificateRequestSpec struct { - // The requested 'duration' (i.e. lifetime) of the Certificate. - // This option may be ignored/overridden by some issuer types. - // +optional - Duration *metav1.Duration `json:"duration,omitempty"` - - // IssuerRef is a reference to the issuer for this CertificateRequest. If - // the `kind` field is not set, or set to `Issuer`, an Issuer resource with - // the given name in the same namespace as the CertificateRequest will be - // used. If the `kind` field is set to `ClusterIssuer`, a ClusterIssuer with - // the provided name will be used. The `name` field in this stanza is - // required at all times. The group field refers to the API group of the - // issuer which defaults to `cert-manager.io` if empty. - IssuerRef cmmeta.ObjectReference `json:"issuerRef"` - - // The PEM-encoded x509 certificate signing request to be submitted to the - // CA for signing. - Request []byte `json:"request"` - - // IsCA will request to mark the certificate as valid for certificate signing - // when submitting to the issuer. - // This will automatically add the `cert sign` usage to the list of `usages`. - // +optional - IsCA bool `json:"isCA,omitempty"` - - // Usages is the set of x509 usages that are requested for the certificate. - // Defaults to `digital signature` and `key encipherment` if not specified. - // +optional - Usages []KeyUsage `json:"usages,omitempty"` - - // Username contains the name of the user that created the CertificateRequest. - // Populated by the cert-manager webhook on creation and immutable. - // +optional - Username string `json:"username,omitempty"` - // UID contains the uid of the user that created the CertificateRequest. - // Populated by the cert-manager webhook on creation and immutable. - // +optional - UID string `json:"uid,omitempty"` - // Groups contains group membership of the user that created the CertificateRequest. - // Populated by the cert-manager webhook on creation and immutable. - // +listType=atomic - // +optional - Groups []string `json:"groups,omitempty"` - // Extra contains extra attributes of the user that created the CertificateRequest. - // Populated by the cert-manager webhook on creation and immutable. - // +optional - Extra map[string][]string `json:"extra,omitempty"` -} - -// CertificateRequestStatus defines the observed state of CertificateRequest and -// resulting signed certificate. -type CertificateRequestStatus struct { - // List of status conditions to indicate the status of a CertificateRequest. - // Known condition types are `Ready` and `InvalidRequest`. - // +listType=map - // +listMapKey=type - // +optional - Conditions []CertificateRequestCondition `json:"conditions,omitempty"` - - // The PEM encoded x509 certificate resulting from the certificate - // signing request. - // If not set, the CertificateRequest has either not been completed or has - // failed. More information on failure can be found by checking the - // `conditions` field. - // +optional - Certificate []byte `json:"certificate,omitempty"` - - // The PEM encoded x509 certificate of the signer, also known as the CA - // (Certificate Authority). - // This is set on a best-effort basis by different issuers. - // If not set, the CA is assumed to be unknown/not available. - // +optional - CA []byte `json:"ca,omitempty"` - - // FailureTime stores the time that this CertificateRequest failed. This is - // used to influence garbage collection and back-off. - // +optional - FailureTime *metav1.Time `json:"failureTime,omitempty"` -} - -// CertificateRequestCondition contains condition information for a CertificateRequest. -type CertificateRequestCondition struct { - // Type of the condition, known values are (`Ready`, - // `InvalidRequest`, `Approved`, `Denied`). - Type CertificateRequestConditionType `json:"type"` - - // Status of the condition, one of (`True`, `False`, `Unknown`). - Status cmmeta.ConditionStatus `json:"status"` - - // LastTransitionTime is the timestamp corresponding to the last status - // change of this condition. - // +optional - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - - // Reason is a brief machine readable explanation for the condition's last - // transition. - // +optional - Reason string `json:"reason,omitempty"` - - // Message is a human readable description of the details of the last - // transition, complementing reason. - // +optional - Message string `json:"message,omitempty"` -} - -// CertificateRequestConditionType represents an Certificate condition value. -type CertificateRequestConditionType string - -const ( - // CertificateRequestConditionReady indicates that a certificate is ready for use. - // This is defined as: - // - The target certificate exists in CertificateRequest.Status - CertificateRequestConditionReady CertificateRequestConditionType = "Ready" - - // CertificateRequestConditionInvalidRequest indicates that a certificate - // signer has refused to sign the request due to at least one of the input - // parameters being invalid. Additional information about why the request - // was rejected can be found in the `reason` and `message` fields. - CertificateRequestConditionInvalidRequest CertificateRequestConditionType = "InvalidRequest" - - // CertificateRequestConditionApproved indicates that a certificate request - // is approved and ready for signing. Condition must never have a status of - // `False`, and cannot be modified once set. Cannot be set alongside - // `Denied`. - CertificateRequestConditionApproved CertificateRequestConditionType = "Approved" - - // CertificateRequestConditionDenied indicates that a certificate request is - // denied, and must never be signed. Condition must never have a status of - // `False`, and cannot be modified once set. Cannot be set alongside - // `Approved`. - CertificateRequestConditionDenied CertificateRequestConditionType = "Denied" -) diff --git a/internal/apis/certmanager/v1beta1/types_issuer.go b/internal/apis/certmanager/v1beta1/types_issuer.go deleted file mode 100644 index b4e1262e994..00000000000 --- a/internal/apis/certmanager/v1beta1/types_issuer.go +++ /dev/null @@ -1,394 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 v1beta1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - cmacme "github.com/cert-manager/cert-manager/internal/apis/acme/v1beta1" - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// A ClusterIssuer represents a certificate issuing authority which can be -// referenced as part of `issuerRef` fields. -// It is similar to an Issuer, however it is cluster-scoped and therefore can -// be referenced by resources that exist in *any* namespace, not just the same -// namespace as the referent. -type ClusterIssuer struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Desired state of the ClusterIssuer resource. - Spec IssuerSpec `json:"spec"` - - // Status of the ClusterIssuer. This is set and managed automatically. - // +optional - Status IssuerStatus `json:"status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterIssuerList is a list of Issuers -type ClusterIssuerList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []ClusterIssuer `json:"items"` -} - -// +genclient -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// An Issuer represents a certificate issuing authority which can be -// referenced as part of `issuerRef` fields. -// It is scoped to a single namespace and can therefore only be referenced by -// resources within the same namespace. -type Issuer struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Desired state of the Issuer resource. - Spec IssuerSpec `json:"spec"` - - // Status of the Issuer. This is set and managed automatically. - // +optional - Status IssuerStatus `json:"status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// IssuerList is a list of Issuers -type IssuerList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []Issuer `json:"items"` -} - -// IssuerSpec is the specification of an Issuer. This includes any -// configuration required for the issuer. -type IssuerSpec struct { - IssuerConfig `json:",inline"` -} - -// The configuration for the issuer. -// Only one of these can be set. -type IssuerConfig struct { - // ACME configures this issuer to communicate with a RFC8555 (ACME) server - // to obtain signed x509 certificates. - // +optional - ACME *cmacme.ACMEIssuer `json:"acme,omitempty"` - - // CA configures this issuer to sign certificates using a signing CA keypair - // stored in a Secret resource. - // This is used to build internal PKIs that are managed by cert-manager. - // +optional - CA *CAIssuer `json:"ca,omitempty"` - - // Vault configures this issuer to sign certificates using a HashiCorp Vault - // PKI backend. - // +optional - Vault *VaultIssuer `json:"vault,omitempty"` - - // SelfSigned configures this issuer to 'self sign' certificates using the - // private key used to create the CertificateRequest object. - // +optional - SelfSigned *SelfSignedIssuer `json:"selfSigned,omitempty"` - - // Venafi configures this issuer to sign certificates using a Venafi TPP - // or Venafi Cloud policy zone. - // +optional - Venafi *VenafiIssuer `json:"venafi,omitempty"` -} - -// Configures an issuer to sign certificates using a Venafi TPP -// or Cloud policy zone. -type VenafiIssuer struct { - // Zone is the Venafi Policy Zone to use for this issuer. - // All requests made to the Venafi platform will be restricted by the named - // zone policy. - // This field is required. - Zone string `json:"zone"` - - // TPP specifies Trust Protection Platform configuration settings. - // Only one of TPP or Cloud may be specified. - // +optional - TPP *VenafiTPP `json:"tpp,omitempty"` - - // Cloud specifies the Venafi cloud configuration settings. - // Only one of TPP or Cloud may be specified. - // +optional - Cloud *VenafiCloud `json:"cloud,omitempty"` -} - -// VenafiTPP defines connection configuration details for a Venafi TPP instance -type VenafiTPP struct { - // URL is the base URL for the vedsdk endpoint of the Venafi TPP instance, - // for example: "https://tpp.example.com/vedsdk". - URL string `json:"url"` - - // CredentialsRef is a reference to a Secret containing the username and - // password for the TPP server. - // The secret must contain two keys, 'username' and 'password'. - CredentialsRef cmmeta.LocalObjectReference `json:"credentialsRef"` - - // Base64-encoded bundle of PEM CAs which will be used to validate the certificate - // chain presented by the TPP server. Only used if using HTTPS; ignored for HTTP. - // If undefined, the certificate bundle in the cert-manager controller container - // is used to validate the chain. - // +optional - CABundle []byte `json:"caBundle,omitempty"` -} - -// VenafiCloud defines connection configuration details for Venafi Cloud -type VenafiCloud struct { - // URL is the base URL for Venafi Cloud. - // Defaults to "https://api.venafi.cloud/v1". - // +optional - URL string `json:"url,omitempty"` - - // APITokenSecretRef is a secret key selector for the Venafi Cloud API token. - APITokenSecretRef cmmeta.SecretKeySelector `json:"apiTokenSecretRef"` -} - -// Configures an issuer to 'self sign' certificates using the -// private key used to create the CertificateRequest object. -type SelfSignedIssuer struct { - // The CRL distribution points is an X.509 v3 certificate extension which identifies - // the location of the CRL from which the revocation of this certificate can be checked. - // If not set certificate will be issued without CDP. Values are strings. - // +optional - CRLDistributionPoints []string `json:"crlDistributionPoints,omitempty"` -} - -// Configures an issuer to sign certificates using a HashiCorp Vault -// PKI backend. -type VaultIssuer struct { - // Auth configures how cert-manager authenticates with the Vault server. - Auth VaultAuth `json:"auth"` - - // Server is the connection address for the Vault server, e.g: "https://vault.example.com:8200". - Server string `json:"server"` - - // Path is the mount path of the Vault PKI backend's `sign` endpoint, e.g: - // "my_pki_mount/sign/my-role-name". - Path string `json:"path"` - - // Name of the vault namespace. Namespaces is a set of features within Vault Enterprise that allows Vault environments to support Secure Multi-tenancy. e.g: "ns1" - // More about namespaces can be found here https://www.vaultproject.io/docs/enterprise/namespaces - // +optional - Namespace string `json:"namespace,omitempty"` - - // Base64-encoded bundle of PEM CAs which will be used to validate the certificate - // chain presented by Vault. Only used if using HTTPS to connect to Vault and - // ignored for HTTP connections. - // Mutually exclusive with CABundleSecretRef. - // If neither CABundle nor CABundleSecretRef are defined, the certificate bundle in - // the cert-manager controller container is used to validate the TLS connection. - // +optional - CABundle []byte `json:"caBundle,omitempty"` - - // Reference to a Secret containing a bundle of PEM-encoded CAs to use when - // verifying the certificate chain presented by Vault when using HTTPS. - // Mutually exclusive with CABundle. - // If neither CABundle nor CABundleSecretRef are defined, the certificate bundle in - // the cert-manager controller container is used to validate the TLS connection. - // If no key for the Secret is specified, cert-manager will default to 'ca.crt'. - // +optional - CABundleSecretRef *cmmeta.SecretKeySelector `json:"caBundleSecretRef,omitempty"` - - // Reference to a Secret containing a PEM-encoded Client Certificate to use when the - // Vault server requires mTLS. - // +optional - ClientCertSecretRef *cmmeta.SecretKeySelector `json:"clientCertSecretRef,omitempty"` - - // Reference to a Secret containing a PEM-encoded Client Private Key to use when the - // Vault server requires mTLS. - // +optional - ClientKeySecretRef *cmmeta.SecretKeySelector `json:"clientKeySecretRef,omitempty"` -} - -// Configuration used to authenticate with a Vault server. -// Only one of `tokenSecretRef`, `appRole` or `kubernetes` may be specified. -type VaultAuth struct { - // TokenSecretRef authenticates with Vault by presenting a token. - // +optional - TokenSecretRef *cmmeta.SecretKeySelector `json:"tokenSecretRef,omitempty"` - - // AppRole authenticates with Vault using the App Role auth mechanism, - // with the role and secret stored in a Kubernetes Secret resource. - // +optional - AppRole *VaultAppRole `json:"appRole,omitempty"` - - // Kubernetes authenticates with Vault by passing the ServiceAccount - // token stored in the named Secret resource to the Vault server. - // +optional - Kubernetes *VaultKubernetesAuth `json:"kubernetes,omitempty"` -} - -// VaultAppRole authenticates with Vault using the App Role auth mechanism, -// with the role and secret stored in a Kubernetes Secret resource. -type VaultAppRole struct { - // Path where the App Role authentication backend is mounted in Vault, e.g: - // "approle" - Path string `json:"path"` - - // RoleID configured in the App Role authentication backend when setting - // up the authentication backend in Vault. - RoleId string `json:"roleId"` - - // Reference to a key in a Secret that contains the App Role secret used - // to authenticate with Vault. - // The `key` field must be specified and denotes which entry within the Secret - // resource is used as the app role secret. - SecretRef cmmeta.SecretKeySelector `json:"secretRef"` -} - -// Authenticate against Vault using a Kubernetes ServiceAccount token stored in -// a Secret. -type VaultKubernetesAuth struct { - // The Vault mountPath here is the mount path to use when authenticating with - // Vault. For example, setting a value to `/v1/auth/foo`, will use the path - // `/v1/auth/foo/login` to authenticate with Vault. If unspecified, the - // default value "/v1/auth/kubernetes" will be used. - // +optional - Path string `json:"mountPath,omitempty"` - - // The required Secret field containing a Kubernetes ServiceAccount JWT used - // for authenticating with Vault. Use of 'ambient credentials' is not - // supported. - // +optional - SecretRef cmmeta.SecretKeySelector `json:"secretRef,omitempty"` - - // A reference to a service account that will be used to request a bound - // token (also known as "projected token"). Compared to using "secretRef", - // using this field means that you don't rely on statically bound tokens. To - // use this field, you must configure an RBAC rule to let cert-manager - // request a token. - // +optional - ServiceAccountRef *ServiceAccountRef `json:"serviceAccountRef,omitempty"` - - // A required field containing the Vault Role to assume. A Role binds a - // Kubernetes ServiceAccount with a set of Vault policies. - Role string `json:"role"` -} - -// ServiceAccountRef is a service account used by cert-manager to request a -// token. The audience cannot be configured. The audience is generated by -// cert-manager and takes the form `vault://namespace-name/issuer-name` for an -// Issuer and `vault://issuer-name` for a ClusterIssuer. The expiration of the -// token is also set by cert-manager to 1 minute. -type ServiceAccountRef struct { - // Name of the ServiceAccount used to request a token. - Name string `json:"name"` - - // TokenAudiences is an option list of extra audiences to include in the token passed to Vault. The default token - // consisting of the issuer's namespace and name is always included. - // +optional - TokenAudiences []string `json:"audiences,omitempty"` -} - -type CAIssuer struct { - // SecretName is the name of the secret used to sign Certificates issued - // by this Issuer. - SecretName string `json:"secretName"` - - // The CRL distribution points is an X.509 v3 certificate extension which identifies - // the location of the CRL from which the revocation of this certificate can be checked. - // If not set, certificates will be issued without distribution points set. - // +optional - CRLDistributionPoints []string `json:"crlDistributionPoints,omitempty"` - - // The OCSP server list is an X.509 v3 extension that defines a list of - // URLs of OCSP responders. The OCSP responders can be queried for the - // revocation status of an issued certificate. If not set, the - // certificate will be issued with no OCSP servers set. For example, an - // OCSP server URL could be "http://ocsp.int-x3.letsencrypt.org". - // +optional - OCSPServers []string `json:"ocspServers,omitempty"` - - // IssuingCertificateURLs is a list of URLs which this issuer should embed into certificates - // it creates. See https://www.rfc-editor.org/rfc/rfc5280#section-4.2.2.1 for more details. - // As an example, such a URL might be "http://ca.domain.com/ca.crt". - // +optional - IssuingCertificateURLs []string `json:"issuingCertificateURLs,omitempty"` -} - -// IssuerStatus contains status information about an Issuer -type IssuerStatus struct { - // List of status conditions to indicate the status of a CertificateRequest. - // Known condition types are `Ready`. - // +listType=map - // +listMapKey=type - // +optional - Conditions []IssuerCondition `json:"conditions,omitempty"` - - // ACME specific status options. - // This field should only be set if the Issuer is configured to use an ACME - // server to issue certificates. - // +optional - ACME *cmacme.ACMEIssuerStatus `json:"acme,omitempty"` -} - -// IssuerCondition contains condition information for an Issuer. -type IssuerCondition struct { - // Type of the condition, known values are (`Ready`). - Type IssuerConditionType `json:"type"` - - // Status of the condition, one of (`True`, `False`, `Unknown`). - Status cmmeta.ConditionStatus `json:"status"` - - // LastTransitionTime is the timestamp corresponding to the last status - // change of this condition. - // +optional - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - - // Reason is a brief machine readable explanation for the condition's last - // transition. - // +optional - Reason string `json:"reason,omitempty"` - - // Message is a human readable description of the details of the last - // transition, complementing reason. - // +optional - Message string `json:"message,omitempty"` - - // If set, this represents the .metadata.generation that the condition was - // set based upon. - // For instance, if .metadata.generation is currently 12, but the - // .status.condition[x].observedGeneration is 9, the condition is out of date - // with respect to the current state of the Issuer. - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty"` -} - -// IssuerConditionType represents an Issuer condition value. -type IssuerConditionType string - -const ( - // IssuerConditionReady represents the fact that a given Issuer condition - // is in ready state and able to issue certificates. - // If the `status` of this condition is `False`, CertificateRequest controllers - // should prevent attempts to sign certificates. - IssuerConditionReady IssuerConditionType = "Ready" -) diff --git a/internal/apis/certmanager/v1beta1/zz_generated.conversion.go b/internal/apis/certmanager/v1beta1/zz_generated.conversion.go deleted file mode 100644 index 8df77513bc5..00000000000 --- a/internal/apis/certmanager/v1beta1/zz_generated.conversion.go +++ /dev/null @@ -1,1780 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The cert-manager 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 conversion-gen. DO NOT EDIT. - -package v1beta1 - -import ( - unsafe "unsafe" - - acme "github.com/cert-manager/cert-manager/internal/apis/acme" - acmev1beta1 "github.com/cert-manager/cert-manager/internal/apis/acme/v1beta1" - certmanager "github.com/cert-manager/cert-manager/internal/apis/certmanager" - meta "github.com/cert-manager/cert-manager/internal/apis/meta" - apismetav1 "github.com/cert-manager/cert-manager/internal/apis/meta/v1" - metav1 "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*CAIssuer)(nil), (*certmanager.CAIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CAIssuer_To_certmanager_CAIssuer(a.(*CAIssuer), b.(*certmanager.CAIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CAIssuer)(nil), (*CAIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CAIssuer_To_v1beta1_CAIssuer(a.(*certmanager.CAIssuer), b.(*CAIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Certificate)(nil), (*certmanager.Certificate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Certificate_To_certmanager_Certificate(a.(*Certificate), b.(*certmanager.Certificate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.Certificate)(nil), (*Certificate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_Certificate_To_v1beta1_Certificate(a.(*certmanager.Certificate), b.(*Certificate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateAdditionalOutputFormat)(nil), (*certmanager.CertificateAdditionalOutputFormat)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CertificateAdditionalOutputFormat_To_certmanager_CertificateAdditionalOutputFormat(a.(*CertificateAdditionalOutputFormat), b.(*certmanager.CertificateAdditionalOutputFormat), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateAdditionalOutputFormat)(nil), (*CertificateAdditionalOutputFormat)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateAdditionalOutputFormat_To_v1beta1_CertificateAdditionalOutputFormat(a.(*certmanager.CertificateAdditionalOutputFormat), b.(*CertificateAdditionalOutputFormat), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateCondition)(nil), (*certmanager.CertificateCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CertificateCondition_To_certmanager_CertificateCondition(a.(*CertificateCondition), b.(*certmanager.CertificateCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateCondition)(nil), (*CertificateCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateCondition_To_v1beta1_CertificateCondition(a.(*certmanager.CertificateCondition), b.(*CertificateCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateKeystores)(nil), (*certmanager.CertificateKeystores)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CertificateKeystores_To_certmanager_CertificateKeystores(a.(*CertificateKeystores), b.(*certmanager.CertificateKeystores), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateKeystores)(nil), (*CertificateKeystores)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateKeystores_To_v1beta1_CertificateKeystores(a.(*certmanager.CertificateKeystores), b.(*CertificateKeystores), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateList)(nil), (*certmanager.CertificateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CertificateList_To_certmanager_CertificateList(a.(*CertificateList), b.(*certmanager.CertificateList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateList)(nil), (*CertificateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateList_To_v1beta1_CertificateList(a.(*certmanager.CertificateList), b.(*CertificateList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificatePrivateKey)(nil), (*certmanager.CertificatePrivateKey)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CertificatePrivateKey_To_certmanager_CertificatePrivateKey(a.(*CertificatePrivateKey), b.(*certmanager.CertificatePrivateKey), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificatePrivateKey)(nil), (*CertificatePrivateKey)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificatePrivateKey_To_v1beta1_CertificatePrivateKey(a.(*certmanager.CertificatePrivateKey), b.(*CertificatePrivateKey), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateRequest)(nil), (*certmanager.CertificateRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CertificateRequest_To_certmanager_CertificateRequest(a.(*CertificateRequest), b.(*certmanager.CertificateRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateRequest)(nil), (*CertificateRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateRequest_To_v1beta1_CertificateRequest(a.(*certmanager.CertificateRequest), b.(*CertificateRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateRequestCondition)(nil), (*certmanager.CertificateRequestCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CertificateRequestCondition_To_certmanager_CertificateRequestCondition(a.(*CertificateRequestCondition), b.(*certmanager.CertificateRequestCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateRequestCondition)(nil), (*CertificateRequestCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateRequestCondition_To_v1beta1_CertificateRequestCondition(a.(*certmanager.CertificateRequestCondition), b.(*CertificateRequestCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateRequestList)(nil), (*certmanager.CertificateRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CertificateRequestList_To_certmanager_CertificateRequestList(a.(*CertificateRequestList), b.(*certmanager.CertificateRequestList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateRequestList)(nil), (*CertificateRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateRequestList_To_v1beta1_CertificateRequestList(a.(*certmanager.CertificateRequestList), b.(*CertificateRequestList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateRequestSpec)(nil), (*certmanager.CertificateRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CertificateRequestSpec_To_certmanager_CertificateRequestSpec(a.(*CertificateRequestSpec), b.(*certmanager.CertificateRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateRequestSpec)(nil), (*CertificateRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateRequestSpec_To_v1beta1_CertificateRequestSpec(a.(*certmanager.CertificateRequestSpec), b.(*CertificateRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateRequestStatus)(nil), (*certmanager.CertificateRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CertificateRequestStatus_To_certmanager_CertificateRequestStatus(a.(*CertificateRequestStatus), b.(*certmanager.CertificateRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateRequestStatus)(nil), (*CertificateRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateRequestStatus_To_v1beta1_CertificateRequestStatus(a.(*certmanager.CertificateRequestStatus), b.(*CertificateRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateSecretTemplate)(nil), (*certmanager.CertificateSecretTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CertificateSecretTemplate_To_certmanager_CertificateSecretTemplate(a.(*CertificateSecretTemplate), b.(*certmanager.CertificateSecretTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateSecretTemplate)(nil), (*CertificateSecretTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateSecretTemplate_To_v1beta1_CertificateSecretTemplate(a.(*certmanager.CertificateSecretTemplate), b.(*CertificateSecretTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CertificateStatus)(nil), (*certmanager.CertificateStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CertificateStatus_To_certmanager_CertificateStatus(a.(*CertificateStatus), b.(*certmanager.CertificateStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.CertificateStatus)(nil), (*CertificateStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateStatus_To_v1beta1_CertificateStatus(a.(*certmanager.CertificateStatus), b.(*CertificateStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ClusterIssuer)(nil), (*certmanager.ClusterIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ClusterIssuer_To_certmanager_ClusterIssuer(a.(*ClusterIssuer), b.(*certmanager.ClusterIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.ClusterIssuer)(nil), (*ClusterIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_ClusterIssuer_To_v1beta1_ClusterIssuer(a.(*certmanager.ClusterIssuer), b.(*ClusterIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ClusterIssuerList)(nil), (*certmanager.ClusterIssuerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ClusterIssuerList_To_certmanager_ClusterIssuerList(a.(*ClusterIssuerList), b.(*certmanager.ClusterIssuerList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.ClusterIssuerList)(nil), (*ClusterIssuerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_ClusterIssuerList_To_v1beta1_ClusterIssuerList(a.(*certmanager.ClusterIssuerList), b.(*ClusterIssuerList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Issuer)(nil), (*certmanager.Issuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Issuer_To_certmanager_Issuer(a.(*Issuer), b.(*certmanager.Issuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.Issuer)(nil), (*Issuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_Issuer_To_v1beta1_Issuer(a.(*certmanager.Issuer), b.(*Issuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*IssuerCondition)(nil), (*certmanager.IssuerCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_IssuerCondition_To_certmanager_IssuerCondition(a.(*IssuerCondition), b.(*certmanager.IssuerCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.IssuerCondition)(nil), (*IssuerCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_IssuerCondition_To_v1beta1_IssuerCondition(a.(*certmanager.IssuerCondition), b.(*IssuerCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*IssuerConfig)(nil), (*certmanager.IssuerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_IssuerConfig_To_certmanager_IssuerConfig(a.(*IssuerConfig), b.(*certmanager.IssuerConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.IssuerConfig)(nil), (*IssuerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_IssuerConfig_To_v1beta1_IssuerConfig(a.(*certmanager.IssuerConfig), b.(*IssuerConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*IssuerList)(nil), (*certmanager.IssuerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_IssuerList_To_certmanager_IssuerList(a.(*IssuerList), b.(*certmanager.IssuerList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.IssuerList)(nil), (*IssuerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_IssuerList_To_v1beta1_IssuerList(a.(*certmanager.IssuerList), b.(*IssuerList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*IssuerSpec)(nil), (*certmanager.IssuerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_IssuerSpec_To_certmanager_IssuerSpec(a.(*IssuerSpec), b.(*certmanager.IssuerSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.IssuerSpec)(nil), (*IssuerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_IssuerSpec_To_v1beta1_IssuerSpec(a.(*certmanager.IssuerSpec), b.(*IssuerSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*IssuerStatus)(nil), (*certmanager.IssuerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_IssuerStatus_To_certmanager_IssuerStatus(a.(*IssuerStatus), b.(*certmanager.IssuerStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.IssuerStatus)(nil), (*IssuerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_IssuerStatus_To_v1beta1_IssuerStatus(a.(*certmanager.IssuerStatus), b.(*IssuerStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*JKSKeystore)(nil), (*certmanager.JKSKeystore)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_JKSKeystore_To_certmanager_JKSKeystore(a.(*JKSKeystore), b.(*certmanager.JKSKeystore), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.JKSKeystore)(nil), (*JKSKeystore)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_JKSKeystore_To_v1beta1_JKSKeystore(a.(*certmanager.JKSKeystore), b.(*JKSKeystore), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NameConstraintItem)(nil), (*certmanager.NameConstraintItem)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_NameConstraintItem_To_certmanager_NameConstraintItem(a.(*NameConstraintItem), b.(*certmanager.NameConstraintItem), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.NameConstraintItem)(nil), (*NameConstraintItem)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_NameConstraintItem_To_v1beta1_NameConstraintItem(a.(*certmanager.NameConstraintItem), b.(*NameConstraintItem), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NameConstraints)(nil), (*certmanager.NameConstraints)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_NameConstraints_To_certmanager_NameConstraints(a.(*NameConstraints), b.(*certmanager.NameConstraints), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.NameConstraints)(nil), (*NameConstraints)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_NameConstraints_To_v1beta1_NameConstraints(a.(*certmanager.NameConstraints), b.(*NameConstraints), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OtherName)(nil), (*certmanager.OtherName)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_OtherName_To_certmanager_OtherName(a.(*OtherName), b.(*certmanager.OtherName), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.OtherName)(nil), (*OtherName)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_OtherName_To_v1beta1_OtherName(a.(*certmanager.OtherName), b.(*OtherName), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*PKCS12Keystore)(nil), (*certmanager.PKCS12Keystore)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_PKCS12Keystore_To_certmanager_PKCS12Keystore(a.(*PKCS12Keystore), b.(*certmanager.PKCS12Keystore), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.PKCS12Keystore)(nil), (*PKCS12Keystore)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_PKCS12Keystore_To_v1beta1_PKCS12Keystore(a.(*certmanager.PKCS12Keystore), b.(*PKCS12Keystore), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*SelfSignedIssuer)(nil), (*certmanager.SelfSignedIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_SelfSignedIssuer_To_certmanager_SelfSignedIssuer(a.(*SelfSignedIssuer), b.(*certmanager.SelfSignedIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.SelfSignedIssuer)(nil), (*SelfSignedIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_SelfSignedIssuer_To_v1beta1_SelfSignedIssuer(a.(*certmanager.SelfSignedIssuer), b.(*SelfSignedIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ServiceAccountRef)(nil), (*certmanager.ServiceAccountRef)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ServiceAccountRef_To_certmanager_ServiceAccountRef(a.(*ServiceAccountRef), b.(*certmanager.ServiceAccountRef), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.ServiceAccountRef)(nil), (*ServiceAccountRef)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_ServiceAccountRef_To_v1beta1_ServiceAccountRef(a.(*certmanager.ServiceAccountRef), b.(*ServiceAccountRef), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VaultAppRole)(nil), (*certmanager.VaultAppRole)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VaultAppRole_To_certmanager_VaultAppRole(a.(*VaultAppRole), b.(*certmanager.VaultAppRole), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.VaultAppRole)(nil), (*VaultAppRole)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_VaultAppRole_To_v1beta1_VaultAppRole(a.(*certmanager.VaultAppRole), b.(*VaultAppRole), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VaultAuth)(nil), (*certmanager.VaultAuth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VaultAuth_To_certmanager_VaultAuth(a.(*VaultAuth), b.(*certmanager.VaultAuth), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.VaultAuth)(nil), (*VaultAuth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_VaultAuth_To_v1beta1_VaultAuth(a.(*certmanager.VaultAuth), b.(*VaultAuth), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VaultIssuer)(nil), (*certmanager.VaultIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VaultIssuer_To_certmanager_VaultIssuer(a.(*VaultIssuer), b.(*certmanager.VaultIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.VaultIssuer)(nil), (*VaultIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_VaultIssuer_To_v1beta1_VaultIssuer(a.(*certmanager.VaultIssuer), b.(*VaultIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VaultKubernetesAuth)(nil), (*certmanager.VaultKubernetesAuth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VaultKubernetesAuth_To_certmanager_VaultKubernetesAuth(a.(*VaultKubernetesAuth), b.(*certmanager.VaultKubernetesAuth), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.VaultKubernetesAuth)(nil), (*VaultKubernetesAuth)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_VaultKubernetesAuth_To_v1beta1_VaultKubernetesAuth(a.(*certmanager.VaultKubernetesAuth), b.(*VaultKubernetesAuth), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VenafiCloud)(nil), (*certmanager.VenafiCloud)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VenafiCloud_To_certmanager_VenafiCloud(a.(*VenafiCloud), b.(*certmanager.VenafiCloud), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.VenafiCloud)(nil), (*VenafiCloud)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_VenafiCloud_To_v1beta1_VenafiCloud(a.(*certmanager.VenafiCloud), b.(*VenafiCloud), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VenafiIssuer)(nil), (*certmanager.VenafiIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VenafiIssuer_To_certmanager_VenafiIssuer(a.(*VenafiIssuer), b.(*certmanager.VenafiIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.VenafiIssuer)(nil), (*VenafiIssuer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_VenafiIssuer_To_v1beta1_VenafiIssuer(a.(*certmanager.VenafiIssuer), b.(*VenafiIssuer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VenafiTPP)(nil), (*certmanager.VenafiTPP)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VenafiTPP_To_certmanager_VenafiTPP(a.(*VenafiTPP), b.(*certmanager.VenafiTPP), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.VenafiTPP)(nil), (*VenafiTPP)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_VenafiTPP_To_v1beta1_VenafiTPP(a.(*certmanager.VenafiTPP), b.(*VenafiTPP), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*X509Subject)(nil), (*certmanager.X509Subject)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_X509Subject_To_certmanager_X509Subject(a.(*X509Subject), b.(*certmanager.X509Subject), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*certmanager.X509Subject)(nil), (*X509Subject)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_X509Subject_To_v1beta1_X509Subject(a.(*certmanager.X509Subject), b.(*X509Subject), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*certmanager.CertificateSpec)(nil), (*CertificateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_certmanager_CertificateSpec_To_v1beta1_CertificateSpec(a.(*certmanager.CertificateSpec), b.(*CertificateSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*CertificateSpec)(nil), (*certmanager.CertificateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CertificateSpec_To_certmanager_CertificateSpec(a.(*CertificateSpec), b.(*certmanager.CertificateSpec), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1beta1_CAIssuer_To_certmanager_CAIssuer(in *CAIssuer, out *certmanager.CAIssuer, s conversion.Scope) error { - out.SecretName = in.SecretName - out.CRLDistributionPoints = *(*[]string)(unsafe.Pointer(&in.CRLDistributionPoints)) - out.OCSPServers = *(*[]string)(unsafe.Pointer(&in.OCSPServers)) - out.IssuingCertificateURLs = *(*[]string)(unsafe.Pointer(&in.IssuingCertificateURLs)) - return nil -} - -// Convert_v1beta1_CAIssuer_To_certmanager_CAIssuer is an autogenerated conversion function. -func Convert_v1beta1_CAIssuer_To_certmanager_CAIssuer(in *CAIssuer, out *certmanager.CAIssuer, s conversion.Scope) error { - return autoConvert_v1beta1_CAIssuer_To_certmanager_CAIssuer(in, out, s) -} - -func autoConvert_certmanager_CAIssuer_To_v1beta1_CAIssuer(in *certmanager.CAIssuer, out *CAIssuer, s conversion.Scope) error { - out.SecretName = in.SecretName - out.CRLDistributionPoints = *(*[]string)(unsafe.Pointer(&in.CRLDistributionPoints)) - out.OCSPServers = *(*[]string)(unsafe.Pointer(&in.OCSPServers)) - out.IssuingCertificateURLs = *(*[]string)(unsafe.Pointer(&in.IssuingCertificateURLs)) - return nil -} - -// Convert_certmanager_CAIssuer_To_v1beta1_CAIssuer is an autogenerated conversion function. -func Convert_certmanager_CAIssuer_To_v1beta1_CAIssuer(in *certmanager.CAIssuer, out *CAIssuer, s conversion.Scope) error { - return autoConvert_certmanager_CAIssuer_To_v1beta1_CAIssuer(in, out, s) -} - -func autoConvert_v1beta1_Certificate_To_certmanager_Certificate(in *Certificate, out *certmanager.Certificate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_CertificateSpec_To_certmanager_CertificateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_CertificateStatus_To_certmanager_CertificateStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_Certificate_To_certmanager_Certificate is an autogenerated conversion function. -func Convert_v1beta1_Certificate_To_certmanager_Certificate(in *Certificate, out *certmanager.Certificate, s conversion.Scope) error { - return autoConvert_v1beta1_Certificate_To_certmanager_Certificate(in, out, s) -} - -func autoConvert_certmanager_Certificate_To_v1beta1_Certificate(in *certmanager.Certificate, out *Certificate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_certmanager_CertificateSpec_To_v1beta1_CertificateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_certmanager_CertificateStatus_To_v1beta1_CertificateStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_Certificate_To_v1beta1_Certificate is an autogenerated conversion function. -func Convert_certmanager_Certificate_To_v1beta1_Certificate(in *certmanager.Certificate, out *Certificate, s conversion.Scope) error { - return autoConvert_certmanager_Certificate_To_v1beta1_Certificate(in, out, s) -} - -func autoConvert_v1beta1_CertificateAdditionalOutputFormat_To_certmanager_CertificateAdditionalOutputFormat(in *CertificateAdditionalOutputFormat, out *certmanager.CertificateAdditionalOutputFormat, s conversion.Scope) error { - out.Type = certmanager.CertificateOutputFormatType(in.Type) - return nil -} - -// Convert_v1beta1_CertificateAdditionalOutputFormat_To_certmanager_CertificateAdditionalOutputFormat is an autogenerated conversion function. -func Convert_v1beta1_CertificateAdditionalOutputFormat_To_certmanager_CertificateAdditionalOutputFormat(in *CertificateAdditionalOutputFormat, out *certmanager.CertificateAdditionalOutputFormat, s conversion.Scope) error { - return autoConvert_v1beta1_CertificateAdditionalOutputFormat_To_certmanager_CertificateAdditionalOutputFormat(in, out, s) -} - -func autoConvert_certmanager_CertificateAdditionalOutputFormat_To_v1beta1_CertificateAdditionalOutputFormat(in *certmanager.CertificateAdditionalOutputFormat, out *CertificateAdditionalOutputFormat, s conversion.Scope) error { - out.Type = CertificateOutputFormatType(in.Type) - return nil -} - -// Convert_certmanager_CertificateAdditionalOutputFormat_To_v1beta1_CertificateAdditionalOutputFormat is an autogenerated conversion function. -func Convert_certmanager_CertificateAdditionalOutputFormat_To_v1beta1_CertificateAdditionalOutputFormat(in *certmanager.CertificateAdditionalOutputFormat, out *CertificateAdditionalOutputFormat, s conversion.Scope) error { - return autoConvert_certmanager_CertificateAdditionalOutputFormat_To_v1beta1_CertificateAdditionalOutputFormat(in, out, s) -} - -func autoConvert_v1beta1_CertificateCondition_To_certmanager_CertificateCondition(in *CertificateCondition, out *certmanager.CertificateCondition, s conversion.Scope) error { - out.Type = certmanager.CertificateConditionType(in.Type) - out.Status = meta.ConditionStatus(in.Status) - out.LastTransitionTime = (*v1.Time)(unsafe.Pointer(in.LastTransitionTime)) - out.Reason = in.Reason - out.Message = in.Message - out.ObservedGeneration = in.ObservedGeneration - return nil -} - -// Convert_v1beta1_CertificateCondition_To_certmanager_CertificateCondition is an autogenerated conversion function. -func Convert_v1beta1_CertificateCondition_To_certmanager_CertificateCondition(in *CertificateCondition, out *certmanager.CertificateCondition, s conversion.Scope) error { - return autoConvert_v1beta1_CertificateCondition_To_certmanager_CertificateCondition(in, out, s) -} - -func autoConvert_certmanager_CertificateCondition_To_v1beta1_CertificateCondition(in *certmanager.CertificateCondition, out *CertificateCondition, s conversion.Scope) error { - out.Type = CertificateConditionType(in.Type) - out.Status = metav1.ConditionStatus(in.Status) - out.LastTransitionTime = (*v1.Time)(unsafe.Pointer(in.LastTransitionTime)) - out.Reason = in.Reason - out.Message = in.Message - out.ObservedGeneration = in.ObservedGeneration - return nil -} - -// Convert_certmanager_CertificateCondition_To_v1beta1_CertificateCondition is an autogenerated conversion function. -func Convert_certmanager_CertificateCondition_To_v1beta1_CertificateCondition(in *certmanager.CertificateCondition, out *CertificateCondition, s conversion.Scope) error { - return autoConvert_certmanager_CertificateCondition_To_v1beta1_CertificateCondition(in, out, s) -} - -func autoConvert_v1beta1_CertificateKeystores_To_certmanager_CertificateKeystores(in *CertificateKeystores, out *certmanager.CertificateKeystores, s conversion.Scope) error { - if in.JKS != nil { - in, out := &in.JKS, &out.JKS - *out = new(certmanager.JKSKeystore) - if err := Convert_v1beta1_JKSKeystore_To_certmanager_JKSKeystore(*in, *out, s); err != nil { - return err - } - } else { - out.JKS = nil - } - if in.PKCS12 != nil { - in, out := &in.PKCS12, &out.PKCS12 - *out = new(certmanager.PKCS12Keystore) - if err := Convert_v1beta1_PKCS12Keystore_To_certmanager_PKCS12Keystore(*in, *out, s); err != nil { - return err - } - } else { - out.PKCS12 = nil - } - return nil -} - -// Convert_v1beta1_CertificateKeystores_To_certmanager_CertificateKeystores is an autogenerated conversion function. -func Convert_v1beta1_CertificateKeystores_To_certmanager_CertificateKeystores(in *CertificateKeystores, out *certmanager.CertificateKeystores, s conversion.Scope) error { - return autoConvert_v1beta1_CertificateKeystores_To_certmanager_CertificateKeystores(in, out, s) -} - -func autoConvert_certmanager_CertificateKeystores_To_v1beta1_CertificateKeystores(in *certmanager.CertificateKeystores, out *CertificateKeystores, s conversion.Scope) error { - if in.JKS != nil { - in, out := &in.JKS, &out.JKS - *out = new(JKSKeystore) - if err := Convert_certmanager_JKSKeystore_To_v1beta1_JKSKeystore(*in, *out, s); err != nil { - return err - } - } else { - out.JKS = nil - } - if in.PKCS12 != nil { - in, out := &in.PKCS12, &out.PKCS12 - *out = new(PKCS12Keystore) - if err := Convert_certmanager_PKCS12Keystore_To_v1beta1_PKCS12Keystore(*in, *out, s); err != nil { - return err - } - } else { - out.PKCS12 = nil - } - return nil -} - -// Convert_certmanager_CertificateKeystores_To_v1beta1_CertificateKeystores is an autogenerated conversion function. -func Convert_certmanager_CertificateKeystores_To_v1beta1_CertificateKeystores(in *certmanager.CertificateKeystores, out *CertificateKeystores, s conversion.Scope) error { - return autoConvert_certmanager_CertificateKeystores_To_v1beta1_CertificateKeystores(in, out, s) -} - -func autoConvert_v1beta1_CertificateList_To_certmanager_CertificateList(in *CertificateList, out *certmanager.CertificateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]certmanager.Certificate, len(*in)) - for i := range *in { - if err := Convert_v1beta1_Certificate_To_certmanager_Certificate(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_CertificateList_To_certmanager_CertificateList is an autogenerated conversion function. -func Convert_v1beta1_CertificateList_To_certmanager_CertificateList(in *CertificateList, out *certmanager.CertificateList, s conversion.Scope) error { - return autoConvert_v1beta1_CertificateList_To_certmanager_CertificateList(in, out, s) -} - -func autoConvert_certmanager_CertificateList_To_v1beta1_CertificateList(in *certmanager.CertificateList, out *CertificateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Certificate, len(*in)) - for i := range *in { - if err := Convert_certmanager_Certificate_To_v1beta1_Certificate(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_certmanager_CertificateList_To_v1beta1_CertificateList is an autogenerated conversion function. -func Convert_certmanager_CertificateList_To_v1beta1_CertificateList(in *certmanager.CertificateList, out *CertificateList, s conversion.Scope) error { - return autoConvert_certmanager_CertificateList_To_v1beta1_CertificateList(in, out, s) -} - -func autoConvert_v1beta1_CertificatePrivateKey_To_certmanager_CertificatePrivateKey(in *CertificatePrivateKey, out *certmanager.CertificatePrivateKey, s conversion.Scope) error { - out.RotationPolicy = certmanager.PrivateKeyRotationPolicy(in.RotationPolicy) - out.Encoding = certmanager.PrivateKeyEncoding(in.Encoding) - out.Algorithm = certmanager.PrivateKeyAlgorithm(in.Algorithm) - out.Size = in.Size - return nil -} - -// Convert_v1beta1_CertificatePrivateKey_To_certmanager_CertificatePrivateKey is an autogenerated conversion function. -func Convert_v1beta1_CertificatePrivateKey_To_certmanager_CertificatePrivateKey(in *CertificatePrivateKey, out *certmanager.CertificatePrivateKey, s conversion.Scope) error { - return autoConvert_v1beta1_CertificatePrivateKey_To_certmanager_CertificatePrivateKey(in, out, s) -} - -func autoConvert_certmanager_CertificatePrivateKey_To_v1beta1_CertificatePrivateKey(in *certmanager.CertificatePrivateKey, out *CertificatePrivateKey, s conversion.Scope) error { - out.RotationPolicy = PrivateKeyRotationPolicy(in.RotationPolicy) - out.Encoding = PrivateKeyEncoding(in.Encoding) - out.Algorithm = PrivateKeyAlgorithm(in.Algorithm) - out.Size = in.Size - return nil -} - -// Convert_certmanager_CertificatePrivateKey_To_v1beta1_CertificatePrivateKey is an autogenerated conversion function. -func Convert_certmanager_CertificatePrivateKey_To_v1beta1_CertificatePrivateKey(in *certmanager.CertificatePrivateKey, out *CertificatePrivateKey, s conversion.Scope) error { - return autoConvert_certmanager_CertificatePrivateKey_To_v1beta1_CertificatePrivateKey(in, out, s) -} - -func autoConvert_v1beta1_CertificateRequest_To_certmanager_CertificateRequest(in *CertificateRequest, out *certmanager.CertificateRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_CertificateRequestSpec_To_certmanager_CertificateRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_CertificateRequestStatus_To_certmanager_CertificateRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_CertificateRequest_To_certmanager_CertificateRequest is an autogenerated conversion function. -func Convert_v1beta1_CertificateRequest_To_certmanager_CertificateRequest(in *CertificateRequest, out *certmanager.CertificateRequest, s conversion.Scope) error { - return autoConvert_v1beta1_CertificateRequest_To_certmanager_CertificateRequest(in, out, s) -} - -func autoConvert_certmanager_CertificateRequest_To_v1beta1_CertificateRequest(in *certmanager.CertificateRequest, out *CertificateRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_certmanager_CertificateRequestSpec_To_v1beta1_CertificateRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_certmanager_CertificateRequestStatus_To_v1beta1_CertificateRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_CertificateRequest_To_v1beta1_CertificateRequest is an autogenerated conversion function. -func Convert_certmanager_CertificateRequest_To_v1beta1_CertificateRequest(in *certmanager.CertificateRequest, out *CertificateRequest, s conversion.Scope) error { - return autoConvert_certmanager_CertificateRequest_To_v1beta1_CertificateRequest(in, out, s) -} - -func autoConvert_v1beta1_CertificateRequestCondition_To_certmanager_CertificateRequestCondition(in *CertificateRequestCondition, out *certmanager.CertificateRequestCondition, s conversion.Scope) error { - out.Type = certmanager.CertificateRequestConditionType(in.Type) - out.Status = meta.ConditionStatus(in.Status) - out.LastTransitionTime = (*v1.Time)(unsafe.Pointer(in.LastTransitionTime)) - out.Reason = in.Reason - out.Message = in.Message - return nil -} - -// Convert_v1beta1_CertificateRequestCondition_To_certmanager_CertificateRequestCondition is an autogenerated conversion function. -func Convert_v1beta1_CertificateRequestCondition_To_certmanager_CertificateRequestCondition(in *CertificateRequestCondition, out *certmanager.CertificateRequestCondition, s conversion.Scope) error { - return autoConvert_v1beta1_CertificateRequestCondition_To_certmanager_CertificateRequestCondition(in, out, s) -} - -func autoConvert_certmanager_CertificateRequestCondition_To_v1beta1_CertificateRequestCondition(in *certmanager.CertificateRequestCondition, out *CertificateRequestCondition, s conversion.Scope) error { - out.Type = CertificateRequestConditionType(in.Type) - out.Status = metav1.ConditionStatus(in.Status) - out.LastTransitionTime = (*v1.Time)(unsafe.Pointer(in.LastTransitionTime)) - out.Reason = in.Reason - out.Message = in.Message - return nil -} - -// Convert_certmanager_CertificateRequestCondition_To_v1beta1_CertificateRequestCondition is an autogenerated conversion function. -func Convert_certmanager_CertificateRequestCondition_To_v1beta1_CertificateRequestCondition(in *certmanager.CertificateRequestCondition, out *CertificateRequestCondition, s conversion.Scope) error { - return autoConvert_certmanager_CertificateRequestCondition_To_v1beta1_CertificateRequestCondition(in, out, s) -} - -func autoConvert_v1beta1_CertificateRequestList_To_certmanager_CertificateRequestList(in *CertificateRequestList, out *certmanager.CertificateRequestList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]certmanager.CertificateRequest, len(*in)) - for i := range *in { - if err := Convert_v1beta1_CertificateRequest_To_certmanager_CertificateRequest(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_CertificateRequestList_To_certmanager_CertificateRequestList is an autogenerated conversion function. -func Convert_v1beta1_CertificateRequestList_To_certmanager_CertificateRequestList(in *CertificateRequestList, out *certmanager.CertificateRequestList, s conversion.Scope) error { - return autoConvert_v1beta1_CertificateRequestList_To_certmanager_CertificateRequestList(in, out, s) -} - -func autoConvert_certmanager_CertificateRequestList_To_v1beta1_CertificateRequestList(in *certmanager.CertificateRequestList, out *CertificateRequestList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CertificateRequest, len(*in)) - for i := range *in { - if err := Convert_certmanager_CertificateRequest_To_v1beta1_CertificateRequest(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_certmanager_CertificateRequestList_To_v1beta1_CertificateRequestList is an autogenerated conversion function. -func Convert_certmanager_CertificateRequestList_To_v1beta1_CertificateRequestList(in *certmanager.CertificateRequestList, out *CertificateRequestList, s conversion.Scope) error { - return autoConvert_certmanager_CertificateRequestList_To_v1beta1_CertificateRequestList(in, out, s) -} - -func autoConvert_v1beta1_CertificateRequestSpec_To_certmanager_CertificateRequestSpec(in *CertificateRequestSpec, out *certmanager.CertificateRequestSpec, s conversion.Scope) error { - out.Duration = (*v1.Duration)(unsafe.Pointer(in.Duration)) - if err := apismetav1.Convert_v1_ObjectReference_To_meta_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - out.Request = *(*[]byte)(unsafe.Pointer(&in.Request)) - out.IsCA = in.IsCA - out.Usages = *(*[]certmanager.KeyUsage)(unsafe.Pointer(&in.Usages)) - out.Username = in.Username - out.UID = in.UID - out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) - out.Extra = *(*map[string][]string)(unsafe.Pointer(&in.Extra)) - return nil -} - -// Convert_v1beta1_CertificateRequestSpec_To_certmanager_CertificateRequestSpec is an autogenerated conversion function. -func Convert_v1beta1_CertificateRequestSpec_To_certmanager_CertificateRequestSpec(in *CertificateRequestSpec, out *certmanager.CertificateRequestSpec, s conversion.Scope) error { - return autoConvert_v1beta1_CertificateRequestSpec_To_certmanager_CertificateRequestSpec(in, out, s) -} - -func autoConvert_certmanager_CertificateRequestSpec_To_v1beta1_CertificateRequestSpec(in *certmanager.CertificateRequestSpec, out *CertificateRequestSpec, s conversion.Scope) error { - out.Duration = (*v1.Duration)(unsafe.Pointer(in.Duration)) - if err := apismetav1.Convert_meta_ObjectReference_To_v1_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - out.Request = *(*[]byte)(unsafe.Pointer(&in.Request)) - out.IsCA = in.IsCA - out.Usages = *(*[]KeyUsage)(unsafe.Pointer(&in.Usages)) - out.Username = in.Username - out.UID = in.UID - out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) - out.Extra = *(*map[string][]string)(unsafe.Pointer(&in.Extra)) - return nil -} - -// Convert_certmanager_CertificateRequestSpec_To_v1beta1_CertificateRequestSpec is an autogenerated conversion function. -func Convert_certmanager_CertificateRequestSpec_To_v1beta1_CertificateRequestSpec(in *certmanager.CertificateRequestSpec, out *CertificateRequestSpec, s conversion.Scope) error { - return autoConvert_certmanager_CertificateRequestSpec_To_v1beta1_CertificateRequestSpec(in, out, s) -} - -func autoConvert_v1beta1_CertificateRequestStatus_To_certmanager_CertificateRequestStatus(in *CertificateRequestStatus, out *certmanager.CertificateRequestStatus, s conversion.Scope) error { - out.Conditions = *(*[]certmanager.CertificateRequestCondition)(unsafe.Pointer(&in.Conditions)) - out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) - out.CA = *(*[]byte)(unsafe.Pointer(&in.CA)) - out.FailureTime = (*v1.Time)(unsafe.Pointer(in.FailureTime)) - return nil -} - -// Convert_v1beta1_CertificateRequestStatus_To_certmanager_CertificateRequestStatus is an autogenerated conversion function. -func Convert_v1beta1_CertificateRequestStatus_To_certmanager_CertificateRequestStatus(in *CertificateRequestStatus, out *certmanager.CertificateRequestStatus, s conversion.Scope) error { - return autoConvert_v1beta1_CertificateRequestStatus_To_certmanager_CertificateRequestStatus(in, out, s) -} - -func autoConvert_certmanager_CertificateRequestStatus_To_v1beta1_CertificateRequestStatus(in *certmanager.CertificateRequestStatus, out *CertificateRequestStatus, s conversion.Scope) error { - out.Conditions = *(*[]CertificateRequestCondition)(unsafe.Pointer(&in.Conditions)) - out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) - out.CA = *(*[]byte)(unsafe.Pointer(&in.CA)) - out.FailureTime = (*v1.Time)(unsafe.Pointer(in.FailureTime)) - return nil -} - -// Convert_certmanager_CertificateRequestStatus_To_v1beta1_CertificateRequestStatus is an autogenerated conversion function. -func Convert_certmanager_CertificateRequestStatus_To_v1beta1_CertificateRequestStatus(in *certmanager.CertificateRequestStatus, out *CertificateRequestStatus, s conversion.Scope) error { - return autoConvert_certmanager_CertificateRequestStatus_To_v1beta1_CertificateRequestStatus(in, out, s) -} - -func autoConvert_v1beta1_CertificateSecretTemplate_To_certmanager_CertificateSecretTemplate(in *CertificateSecretTemplate, out *certmanager.CertificateSecretTemplate, s conversion.Scope) error { - out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - return nil -} - -// Convert_v1beta1_CertificateSecretTemplate_To_certmanager_CertificateSecretTemplate is an autogenerated conversion function. -func Convert_v1beta1_CertificateSecretTemplate_To_certmanager_CertificateSecretTemplate(in *CertificateSecretTemplate, out *certmanager.CertificateSecretTemplate, s conversion.Scope) error { - return autoConvert_v1beta1_CertificateSecretTemplate_To_certmanager_CertificateSecretTemplate(in, out, s) -} - -func autoConvert_certmanager_CertificateSecretTemplate_To_v1beta1_CertificateSecretTemplate(in *certmanager.CertificateSecretTemplate, out *CertificateSecretTemplate, s conversion.Scope) error { - out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) - out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) - return nil -} - -// Convert_certmanager_CertificateSecretTemplate_To_v1beta1_CertificateSecretTemplate is an autogenerated conversion function. -func Convert_certmanager_CertificateSecretTemplate_To_v1beta1_CertificateSecretTemplate(in *certmanager.CertificateSecretTemplate, out *CertificateSecretTemplate, s conversion.Scope) error { - return autoConvert_certmanager_CertificateSecretTemplate_To_v1beta1_CertificateSecretTemplate(in, out, s) -} - -func autoConvert_v1beta1_CertificateSpec_To_certmanager_CertificateSpec(in *CertificateSpec, out *certmanager.CertificateSpec, s conversion.Scope) error { - out.Subject = (*certmanager.X509Subject)(unsafe.Pointer(in.Subject)) - out.LiteralSubject = in.LiteralSubject - out.CommonName = in.CommonName - out.Duration = (*v1.Duration)(unsafe.Pointer(in.Duration)) - out.RenewBefore = (*v1.Duration)(unsafe.Pointer(in.RenewBefore)) - out.DNSNames = *(*[]string)(unsafe.Pointer(&in.DNSNames)) - out.IPAddresses = *(*[]string)(unsafe.Pointer(&in.IPAddresses)) - // WARNING: in.URISANs requires manual conversion: does not exist in peer-type - // WARNING: in.EmailSANs requires manual conversion: does not exist in peer-type - out.OtherNames = *(*[]certmanager.OtherName)(unsafe.Pointer(&in.OtherNames)) - out.SecretName = in.SecretName - out.SecretTemplate = (*certmanager.CertificateSecretTemplate)(unsafe.Pointer(in.SecretTemplate)) - if in.Keystores != nil { - in, out := &in.Keystores, &out.Keystores - *out = new(certmanager.CertificateKeystores) - if err := Convert_v1beta1_CertificateKeystores_To_certmanager_CertificateKeystores(*in, *out, s); err != nil { - return err - } - } else { - out.Keystores = nil - } - if err := apismetav1.Convert_v1_ObjectReference_To_meta_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - out.IsCA = in.IsCA - out.Usages = *(*[]certmanager.KeyUsage)(unsafe.Pointer(&in.Usages)) - out.PrivateKey = (*certmanager.CertificatePrivateKey)(unsafe.Pointer(in.PrivateKey)) - out.EncodeUsagesInRequest = (*bool)(unsafe.Pointer(in.EncodeUsagesInRequest)) - out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit)) - out.AdditionalOutputFormats = *(*[]certmanager.CertificateAdditionalOutputFormat)(unsafe.Pointer(&in.AdditionalOutputFormats)) - out.NameConstraints = (*certmanager.NameConstraints)(unsafe.Pointer(in.NameConstraints)) - return nil -} - -func autoConvert_certmanager_CertificateSpec_To_v1beta1_CertificateSpec(in *certmanager.CertificateSpec, out *CertificateSpec, s conversion.Scope) error { - out.Subject = (*X509Subject)(unsafe.Pointer(in.Subject)) - out.LiteralSubject = in.LiteralSubject - out.CommonName = in.CommonName - out.Duration = (*v1.Duration)(unsafe.Pointer(in.Duration)) - out.RenewBefore = (*v1.Duration)(unsafe.Pointer(in.RenewBefore)) - out.DNSNames = *(*[]string)(unsafe.Pointer(&in.DNSNames)) - out.IPAddresses = *(*[]string)(unsafe.Pointer(&in.IPAddresses)) - // WARNING: in.URIs requires manual conversion: does not exist in peer-type - // WARNING: in.EmailAddresses requires manual conversion: does not exist in peer-type - out.OtherNames = *(*[]OtherName)(unsafe.Pointer(&in.OtherNames)) - out.SecretName = in.SecretName - out.SecretTemplate = (*CertificateSecretTemplate)(unsafe.Pointer(in.SecretTemplate)) - if in.Keystores != nil { - in, out := &in.Keystores, &out.Keystores - *out = new(CertificateKeystores) - if err := Convert_certmanager_CertificateKeystores_To_v1beta1_CertificateKeystores(*in, *out, s); err != nil { - return err - } - } else { - out.Keystores = nil - } - if err := apismetav1.Convert_meta_ObjectReference_To_v1_ObjectReference(&in.IssuerRef, &out.IssuerRef, s); err != nil { - return err - } - out.IsCA = in.IsCA - out.Usages = *(*[]KeyUsage)(unsafe.Pointer(&in.Usages)) - out.PrivateKey = (*CertificatePrivateKey)(unsafe.Pointer(in.PrivateKey)) - out.EncodeUsagesInRequest = (*bool)(unsafe.Pointer(in.EncodeUsagesInRequest)) - out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit)) - out.AdditionalOutputFormats = *(*[]CertificateAdditionalOutputFormat)(unsafe.Pointer(&in.AdditionalOutputFormats)) - out.NameConstraints = (*NameConstraints)(unsafe.Pointer(in.NameConstraints)) - return nil -} - -func autoConvert_v1beta1_CertificateStatus_To_certmanager_CertificateStatus(in *CertificateStatus, out *certmanager.CertificateStatus, s conversion.Scope) error { - out.Conditions = *(*[]certmanager.CertificateCondition)(unsafe.Pointer(&in.Conditions)) - out.LastFailureTime = (*v1.Time)(unsafe.Pointer(in.LastFailureTime)) - out.NotBefore = (*v1.Time)(unsafe.Pointer(in.NotBefore)) - out.NotAfter = (*v1.Time)(unsafe.Pointer(in.NotAfter)) - out.RenewalTime = (*v1.Time)(unsafe.Pointer(in.RenewalTime)) - out.Revision = (*int)(unsafe.Pointer(in.Revision)) - out.NextPrivateKeySecretName = (*string)(unsafe.Pointer(in.NextPrivateKeySecretName)) - out.FailedIssuanceAttempts = (*int)(unsafe.Pointer(in.FailedIssuanceAttempts)) - return nil -} - -// Convert_v1beta1_CertificateStatus_To_certmanager_CertificateStatus is an autogenerated conversion function. -func Convert_v1beta1_CertificateStatus_To_certmanager_CertificateStatus(in *CertificateStatus, out *certmanager.CertificateStatus, s conversion.Scope) error { - return autoConvert_v1beta1_CertificateStatus_To_certmanager_CertificateStatus(in, out, s) -} - -func autoConvert_certmanager_CertificateStatus_To_v1beta1_CertificateStatus(in *certmanager.CertificateStatus, out *CertificateStatus, s conversion.Scope) error { - out.Conditions = *(*[]CertificateCondition)(unsafe.Pointer(&in.Conditions)) - out.LastFailureTime = (*v1.Time)(unsafe.Pointer(in.LastFailureTime)) - out.NotBefore = (*v1.Time)(unsafe.Pointer(in.NotBefore)) - out.NotAfter = (*v1.Time)(unsafe.Pointer(in.NotAfter)) - out.RenewalTime = (*v1.Time)(unsafe.Pointer(in.RenewalTime)) - out.Revision = (*int)(unsafe.Pointer(in.Revision)) - out.NextPrivateKeySecretName = (*string)(unsafe.Pointer(in.NextPrivateKeySecretName)) - out.FailedIssuanceAttempts = (*int)(unsafe.Pointer(in.FailedIssuanceAttempts)) - return nil -} - -// Convert_certmanager_CertificateStatus_To_v1beta1_CertificateStatus is an autogenerated conversion function. -func Convert_certmanager_CertificateStatus_To_v1beta1_CertificateStatus(in *certmanager.CertificateStatus, out *CertificateStatus, s conversion.Scope) error { - return autoConvert_certmanager_CertificateStatus_To_v1beta1_CertificateStatus(in, out, s) -} - -func autoConvert_v1beta1_ClusterIssuer_To_certmanager_ClusterIssuer(in *ClusterIssuer, out *certmanager.ClusterIssuer, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_IssuerSpec_To_certmanager_IssuerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_IssuerStatus_To_certmanager_IssuerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_ClusterIssuer_To_certmanager_ClusterIssuer is an autogenerated conversion function. -func Convert_v1beta1_ClusterIssuer_To_certmanager_ClusterIssuer(in *ClusterIssuer, out *certmanager.ClusterIssuer, s conversion.Scope) error { - return autoConvert_v1beta1_ClusterIssuer_To_certmanager_ClusterIssuer(in, out, s) -} - -func autoConvert_certmanager_ClusterIssuer_To_v1beta1_ClusterIssuer(in *certmanager.ClusterIssuer, out *ClusterIssuer, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_certmanager_IssuerSpec_To_v1beta1_IssuerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_certmanager_IssuerStatus_To_v1beta1_IssuerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_ClusterIssuer_To_v1beta1_ClusterIssuer is an autogenerated conversion function. -func Convert_certmanager_ClusterIssuer_To_v1beta1_ClusterIssuer(in *certmanager.ClusterIssuer, out *ClusterIssuer, s conversion.Scope) error { - return autoConvert_certmanager_ClusterIssuer_To_v1beta1_ClusterIssuer(in, out, s) -} - -func autoConvert_v1beta1_ClusterIssuerList_To_certmanager_ClusterIssuerList(in *ClusterIssuerList, out *certmanager.ClusterIssuerList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]certmanager.ClusterIssuer, len(*in)) - for i := range *in { - if err := Convert_v1beta1_ClusterIssuer_To_certmanager_ClusterIssuer(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_ClusterIssuerList_To_certmanager_ClusterIssuerList is an autogenerated conversion function. -func Convert_v1beta1_ClusterIssuerList_To_certmanager_ClusterIssuerList(in *ClusterIssuerList, out *certmanager.ClusterIssuerList, s conversion.Scope) error { - return autoConvert_v1beta1_ClusterIssuerList_To_certmanager_ClusterIssuerList(in, out, s) -} - -func autoConvert_certmanager_ClusterIssuerList_To_v1beta1_ClusterIssuerList(in *certmanager.ClusterIssuerList, out *ClusterIssuerList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterIssuer, len(*in)) - for i := range *in { - if err := Convert_certmanager_ClusterIssuer_To_v1beta1_ClusterIssuer(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_certmanager_ClusterIssuerList_To_v1beta1_ClusterIssuerList is an autogenerated conversion function. -func Convert_certmanager_ClusterIssuerList_To_v1beta1_ClusterIssuerList(in *certmanager.ClusterIssuerList, out *ClusterIssuerList, s conversion.Scope) error { - return autoConvert_certmanager_ClusterIssuerList_To_v1beta1_ClusterIssuerList(in, out, s) -} - -func autoConvert_v1beta1_Issuer_To_certmanager_Issuer(in *Issuer, out *certmanager.Issuer, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_IssuerSpec_To_certmanager_IssuerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_IssuerStatus_To_certmanager_IssuerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_Issuer_To_certmanager_Issuer is an autogenerated conversion function. -func Convert_v1beta1_Issuer_To_certmanager_Issuer(in *Issuer, out *certmanager.Issuer, s conversion.Scope) error { - return autoConvert_v1beta1_Issuer_To_certmanager_Issuer(in, out, s) -} - -func autoConvert_certmanager_Issuer_To_v1beta1_Issuer(in *certmanager.Issuer, out *Issuer, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_certmanager_IssuerSpec_To_v1beta1_IssuerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_certmanager_IssuerStatus_To_v1beta1_IssuerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_Issuer_To_v1beta1_Issuer is an autogenerated conversion function. -func Convert_certmanager_Issuer_To_v1beta1_Issuer(in *certmanager.Issuer, out *Issuer, s conversion.Scope) error { - return autoConvert_certmanager_Issuer_To_v1beta1_Issuer(in, out, s) -} - -func autoConvert_v1beta1_IssuerCondition_To_certmanager_IssuerCondition(in *IssuerCondition, out *certmanager.IssuerCondition, s conversion.Scope) error { - out.Type = certmanager.IssuerConditionType(in.Type) - out.Status = meta.ConditionStatus(in.Status) - out.LastTransitionTime = (*v1.Time)(unsafe.Pointer(in.LastTransitionTime)) - out.Reason = in.Reason - out.Message = in.Message - out.ObservedGeneration = in.ObservedGeneration - return nil -} - -// Convert_v1beta1_IssuerCondition_To_certmanager_IssuerCondition is an autogenerated conversion function. -func Convert_v1beta1_IssuerCondition_To_certmanager_IssuerCondition(in *IssuerCondition, out *certmanager.IssuerCondition, s conversion.Scope) error { - return autoConvert_v1beta1_IssuerCondition_To_certmanager_IssuerCondition(in, out, s) -} - -func autoConvert_certmanager_IssuerCondition_To_v1beta1_IssuerCondition(in *certmanager.IssuerCondition, out *IssuerCondition, s conversion.Scope) error { - out.Type = IssuerConditionType(in.Type) - out.Status = metav1.ConditionStatus(in.Status) - out.LastTransitionTime = (*v1.Time)(unsafe.Pointer(in.LastTransitionTime)) - out.Reason = in.Reason - out.Message = in.Message - out.ObservedGeneration = in.ObservedGeneration - return nil -} - -// Convert_certmanager_IssuerCondition_To_v1beta1_IssuerCondition is an autogenerated conversion function. -func Convert_certmanager_IssuerCondition_To_v1beta1_IssuerCondition(in *certmanager.IssuerCondition, out *IssuerCondition, s conversion.Scope) error { - return autoConvert_certmanager_IssuerCondition_To_v1beta1_IssuerCondition(in, out, s) -} - -func autoConvert_v1beta1_IssuerConfig_To_certmanager_IssuerConfig(in *IssuerConfig, out *certmanager.IssuerConfig, s conversion.Scope) error { - if in.ACME != nil { - in, out := &in.ACME, &out.ACME - *out = new(acme.ACMEIssuer) - if err := acmev1beta1.Convert_v1beta1_ACMEIssuer_To_acme_ACMEIssuer(*in, *out, s); err != nil { - return err - } - } else { - out.ACME = nil - } - out.CA = (*certmanager.CAIssuer)(unsafe.Pointer(in.CA)) - if in.Vault != nil { - in, out := &in.Vault, &out.Vault - *out = new(certmanager.VaultIssuer) - if err := Convert_v1beta1_VaultIssuer_To_certmanager_VaultIssuer(*in, *out, s); err != nil { - return err - } - } else { - out.Vault = nil - } - out.SelfSigned = (*certmanager.SelfSignedIssuer)(unsafe.Pointer(in.SelfSigned)) - if in.Venafi != nil { - in, out := &in.Venafi, &out.Venafi - *out = new(certmanager.VenafiIssuer) - if err := Convert_v1beta1_VenafiIssuer_To_certmanager_VenafiIssuer(*in, *out, s); err != nil { - return err - } - } else { - out.Venafi = nil - } - return nil -} - -// Convert_v1beta1_IssuerConfig_To_certmanager_IssuerConfig is an autogenerated conversion function. -func Convert_v1beta1_IssuerConfig_To_certmanager_IssuerConfig(in *IssuerConfig, out *certmanager.IssuerConfig, s conversion.Scope) error { - return autoConvert_v1beta1_IssuerConfig_To_certmanager_IssuerConfig(in, out, s) -} - -func autoConvert_certmanager_IssuerConfig_To_v1beta1_IssuerConfig(in *certmanager.IssuerConfig, out *IssuerConfig, s conversion.Scope) error { - if in.ACME != nil { - in, out := &in.ACME, &out.ACME - *out = new(acmev1beta1.ACMEIssuer) - if err := acmev1beta1.Convert_acme_ACMEIssuer_To_v1beta1_ACMEIssuer(*in, *out, s); err != nil { - return err - } - } else { - out.ACME = nil - } - out.CA = (*CAIssuer)(unsafe.Pointer(in.CA)) - if in.Vault != nil { - in, out := &in.Vault, &out.Vault - *out = new(VaultIssuer) - if err := Convert_certmanager_VaultIssuer_To_v1beta1_VaultIssuer(*in, *out, s); err != nil { - return err - } - } else { - out.Vault = nil - } - out.SelfSigned = (*SelfSignedIssuer)(unsafe.Pointer(in.SelfSigned)) - if in.Venafi != nil { - in, out := &in.Venafi, &out.Venafi - *out = new(VenafiIssuer) - if err := Convert_certmanager_VenafiIssuer_To_v1beta1_VenafiIssuer(*in, *out, s); err != nil { - return err - } - } else { - out.Venafi = nil - } - return nil -} - -// Convert_certmanager_IssuerConfig_To_v1beta1_IssuerConfig is an autogenerated conversion function. -func Convert_certmanager_IssuerConfig_To_v1beta1_IssuerConfig(in *certmanager.IssuerConfig, out *IssuerConfig, s conversion.Scope) error { - return autoConvert_certmanager_IssuerConfig_To_v1beta1_IssuerConfig(in, out, s) -} - -func autoConvert_v1beta1_IssuerList_To_certmanager_IssuerList(in *IssuerList, out *certmanager.IssuerList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]certmanager.Issuer, len(*in)) - for i := range *in { - if err := Convert_v1beta1_Issuer_To_certmanager_Issuer(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_IssuerList_To_certmanager_IssuerList is an autogenerated conversion function. -func Convert_v1beta1_IssuerList_To_certmanager_IssuerList(in *IssuerList, out *certmanager.IssuerList, s conversion.Scope) error { - return autoConvert_v1beta1_IssuerList_To_certmanager_IssuerList(in, out, s) -} - -func autoConvert_certmanager_IssuerList_To_v1beta1_IssuerList(in *certmanager.IssuerList, out *IssuerList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Issuer, len(*in)) - for i := range *in { - if err := Convert_certmanager_Issuer_To_v1beta1_Issuer(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_certmanager_IssuerList_To_v1beta1_IssuerList is an autogenerated conversion function. -func Convert_certmanager_IssuerList_To_v1beta1_IssuerList(in *certmanager.IssuerList, out *IssuerList, s conversion.Scope) error { - return autoConvert_certmanager_IssuerList_To_v1beta1_IssuerList(in, out, s) -} - -func autoConvert_v1beta1_IssuerSpec_To_certmanager_IssuerSpec(in *IssuerSpec, out *certmanager.IssuerSpec, s conversion.Scope) error { - if err := Convert_v1beta1_IssuerConfig_To_certmanager_IssuerConfig(&in.IssuerConfig, &out.IssuerConfig, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_IssuerSpec_To_certmanager_IssuerSpec is an autogenerated conversion function. -func Convert_v1beta1_IssuerSpec_To_certmanager_IssuerSpec(in *IssuerSpec, out *certmanager.IssuerSpec, s conversion.Scope) error { - return autoConvert_v1beta1_IssuerSpec_To_certmanager_IssuerSpec(in, out, s) -} - -func autoConvert_certmanager_IssuerSpec_To_v1beta1_IssuerSpec(in *certmanager.IssuerSpec, out *IssuerSpec, s conversion.Scope) error { - if err := Convert_certmanager_IssuerConfig_To_v1beta1_IssuerConfig(&in.IssuerConfig, &out.IssuerConfig, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_IssuerSpec_To_v1beta1_IssuerSpec is an autogenerated conversion function. -func Convert_certmanager_IssuerSpec_To_v1beta1_IssuerSpec(in *certmanager.IssuerSpec, out *IssuerSpec, s conversion.Scope) error { - return autoConvert_certmanager_IssuerSpec_To_v1beta1_IssuerSpec(in, out, s) -} - -func autoConvert_v1beta1_IssuerStatus_To_certmanager_IssuerStatus(in *IssuerStatus, out *certmanager.IssuerStatus, s conversion.Scope) error { - out.Conditions = *(*[]certmanager.IssuerCondition)(unsafe.Pointer(&in.Conditions)) - out.ACME = (*acme.ACMEIssuerStatus)(unsafe.Pointer(in.ACME)) - return nil -} - -// Convert_v1beta1_IssuerStatus_To_certmanager_IssuerStatus is an autogenerated conversion function. -func Convert_v1beta1_IssuerStatus_To_certmanager_IssuerStatus(in *IssuerStatus, out *certmanager.IssuerStatus, s conversion.Scope) error { - return autoConvert_v1beta1_IssuerStatus_To_certmanager_IssuerStatus(in, out, s) -} - -func autoConvert_certmanager_IssuerStatus_To_v1beta1_IssuerStatus(in *certmanager.IssuerStatus, out *IssuerStatus, s conversion.Scope) error { - out.Conditions = *(*[]IssuerCondition)(unsafe.Pointer(&in.Conditions)) - out.ACME = (*acmev1beta1.ACMEIssuerStatus)(unsafe.Pointer(in.ACME)) - return nil -} - -// Convert_certmanager_IssuerStatus_To_v1beta1_IssuerStatus is an autogenerated conversion function. -func Convert_certmanager_IssuerStatus_To_v1beta1_IssuerStatus(in *certmanager.IssuerStatus, out *IssuerStatus, s conversion.Scope) error { - return autoConvert_certmanager_IssuerStatus_To_v1beta1_IssuerStatus(in, out, s) -} - -func autoConvert_v1beta1_JKSKeystore_To_certmanager_JKSKeystore(in *JKSKeystore, out *certmanager.JKSKeystore, s conversion.Scope) error { - out.Create = in.Create - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.PasswordSecretRef, &out.PasswordSecretRef, s); err != nil { - return err - } - out.Alias = (*string)(unsafe.Pointer(in.Alias)) - return nil -} - -// Convert_v1beta1_JKSKeystore_To_certmanager_JKSKeystore is an autogenerated conversion function. -func Convert_v1beta1_JKSKeystore_To_certmanager_JKSKeystore(in *JKSKeystore, out *certmanager.JKSKeystore, s conversion.Scope) error { - return autoConvert_v1beta1_JKSKeystore_To_certmanager_JKSKeystore(in, out, s) -} - -func autoConvert_certmanager_JKSKeystore_To_v1beta1_JKSKeystore(in *certmanager.JKSKeystore, out *JKSKeystore, s conversion.Scope) error { - out.Create = in.Create - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.PasswordSecretRef, &out.PasswordSecretRef, s); err != nil { - return err - } - out.Alias = (*string)(unsafe.Pointer(in.Alias)) - return nil -} - -// Convert_certmanager_JKSKeystore_To_v1beta1_JKSKeystore is an autogenerated conversion function. -func Convert_certmanager_JKSKeystore_To_v1beta1_JKSKeystore(in *certmanager.JKSKeystore, out *JKSKeystore, s conversion.Scope) error { - return autoConvert_certmanager_JKSKeystore_To_v1beta1_JKSKeystore(in, out, s) -} - -func autoConvert_v1beta1_NameConstraintItem_To_certmanager_NameConstraintItem(in *NameConstraintItem, out *certmanager.NameConstraintItem, s conversion.Scope) error { - out.DNSDomains = *(*[]string)(unsafe.Pointer(&in.DNSDomains)) - out.IPRanges = *(*[]string)(unsafe.Pointer(&in.IPRanges)) - out.EmailAddresses = *(*[]string)(unsafe.Pointer(&in.EmailAddresses)) - out.URIDomains = *(*[]string)(unsafe.Pointer(&in.URIDomains)) - return nil -} - -// Convert_v1beta1_NameConstraintItem_To_certmanager_NameConstraintItem is an autogenerated conversion function. -func Convert_v1beta1_NameConstraintItem_To_certmanager_NameConstraintItem(in *NameConstraintItem, out *certmanager.NameConstraintItem, s conversion.Scope) error { - return autoConvert_v1beta1_NameConstraintItem_To_certmanager_NameConstraintItem(in, out, s) -} - -func autoConvert_certmanager_NameConstraintItem_To_v1beta1_NameConstraintItem(in *certmanager.NameConstraintItem, out *NameConstraintItem, s conversion.Scope) error { - out.DNSDomains = *(*[]string)(unsafe.Pointer(&in.DNSDomains)) - out.IPRanges = *(*[]string)(unsafe.Pointer(&in.IPRanges)) - out.EmailAddresses = *(*[]string)(unsafe.Pointer(&in.EmailAddresses)) - out.URIDomains = *(*[]string)(unsafe.Pointer(&in.URIDomains)) - return nil -} - -// Convert_certmanager_NameConstraintItem_To_v1beta1_NameConstraintItem is an autogenerated conversion function. -func Convert_certmanager_NameConstraintItem_To_v1beta1_NameConstraintItem(in *certmanager.NameConstraintItem, out *NameConstraintItem, s conversion.Scope) error { - return autoConvert_certmanager_NameConstraintItem_To_v1beta1_NameConstraintItem(in, out, s) -} - -func autoConvert_v1beta1_NameConstraints_To_certmanager_NameConstraints(in *NameConstraints, out *certmanager.NameConstraints, s conversion.Scope) error { - out.Critical = in.Critical - out.Permitted = (*certmanager.NameConstraintItem)(unsafe.Pointer(in.Permitted)) - out.Excluded = (*certmanager.NameConstraintItem)(unsafe.Pointer(in.Excluded)) - return nil -} - -// Convert_v1beta1_NameConstraints_To_certmanager_NameConstraints is an autogenerated conversion function. -func Convert_v1beta1_NameConstraints_To_certmanager_NameConstraints(in *NameConstraints, out *certmanager.NameConstraints, s conversion.Scope) error { - return autoConvert_v1beta1_NameConstraints_To_certmanager_NameConstraints(in, out, s) -} - -func autoConvert_certmanager_NameConstraints_To_v1beta1_NameConstraints(in *certmanager.NameConstraints, out *NameConstraints, s conversion.Scope) error { - out.Critical = in.Critical - out.Permitted = (*NameConstraintItem)(unsafe.Pointer(in.Permitted)) - out.Excluded = (*NameConstraintItem)(unsafe.Pointer(in.Excluded)) - return nil -} - -// Convert_certmanager_NameConstraints_To_v1beta1_NameConstraints is an autogenerated conversion function. -func Convert_certmanager_NameConstraints_To_v1beta1_NameConstraints(in *certmanager.NameConstraints, out *NameConstraints, s conversion.Scope) error { - return autoConvert_certmanager_NameConstraints_To_v1beta1_NameConstraints(in, out, s) -} - -func autoConvert_v1beta1_OtherName_To_certmanager_OtherName(in *OtherName, out *certmanager.OtherName, s conversion.Scope) error { - out.OID = in.OID - out.UTF8Value = in.UTF8Value - return nil -} - -// Convert_v1beta1_OtherName_To_certmanager_OtherName is an autogenerated conversion function. -func Convert_v1beta1_OtherName_To_certmanager_OtherName(in *OtherName, out *certmanager.OtherName, s conversion.Scope) error { - return autoConvert_v1beta1_OtherName_To_certmanager_OtherName(in, out, s) -} - -func autoConvert_certmanager_OtherName_To_v1beta1_OtherName(in *certmanager.OtherName, out *OtherName, s conversion.Scope) error { - out.OID = in.OID - out.UTF8Value = in.UTF8Value - return nil -} - -// Convert_certmanager_OtherName_To_v1beta1_OtherName is an autogenerated conversion function. -func Convert_certmanager_OtherName_To_v1beta1_OtherName(in *certmanager.OtherName, out *OtherName, s conversion.Scope) error { - return autoConvert_certmanager_OtherName_To_v1beta1_OtherName(in, out, s) -} - -func autoConvert_v1beta1_PKCS12Keystore_To_certmanager_PKCS12Keystore(in *PKCS12Keystore, out *certmanager.PKCS12Keystore, s conversion.Scope) error { - out.Create = in.Create - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.PasswordSecretRef, &out.PasswordSecretRef, s); err != nil { - return err - } - out.Profile = certmanager.PKCS12Profile(in.Profile) - return nil -} - -// Convert_v1beta1_PKCS12Keystore_To_certmanager_PKCS12Keystore is an autogenerated conversion function. -func Convert_v1beta1_PKCS12Keystore_To_certmanager_PKCS12Keystore(in *PKCS12Keystore, out *certmanager.PKCS12Keystore, s conversion.Scope) error { - return autoConvert_v1beta1_PKCS12Keystore_To_certmanager_PKCS12Keystore(in, out, s) -} - -func autoConvert_certmanager_PKCS12Keystore_To_v1beta1_PKCS12Keystore(in *certmanager.PKCS12Keystore, out *PKCS12Keystore, s conversion.Scope) error { - out.Create = in.Create - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.PasswordSecretRef, &out.PasswordSecretRef, s); err != nil { - return err - } - out.Profile = PKCS12Profile(in.Profile) - return nil -} - -// Convert_certmanager_PKCS12Keystore_To_v1beta1_PKCS12Keystore is an autogenerated conversion function. -func Convert_certmanager_PKCS12Keystore_To_v1beta1_PKCS12Keystore(in *certmanager.PKCS12Keystore, out *PKCS12Keystore, s conversion.Scope) error { - return autoConvert_certmanager_PKCS12Keystore_To_v1beta1_PKCS12Keystore(in, out, s) -} - -func autoConvert_v1beta1_SelfSignedIssuer_To_certmanager_SelfSignedIssuer(in *SelfSignedIssuer, out *certmanager.SelfSignedIssuer, s conversion.Scope) error { - out.CRLDistributionPoints = *(*[]string)(unsafe.Pointer(&in.CRLDistributionPoints)) - return nil -} - -// Convert_v1beta1_SelfSignedIssuer_To_certmanager_SelfSignedIssuer is an autogenerated conversion function. -func Convert_v1beta1_SelfSignedIssuer_To_certmanager_SelfSignedIssuer(in *SelfSignedIssuer, out *certmanager.SelfSignedIssuer, s conversion.Scope) error { - return autoConvert_v1beta1_SelfSignedIssuer_To_certmanager_SelfSignedIssuer(in, out, s) -} - -func autoConvert_certmanager_SelfSignedIssuer_To_v1beta1_SelfSignedIssuer(in *certmanager.SelfSignedIssuer, out *SelfSignedIssuer, s conversion.Scope) error { - out.CRLDistributionPoints = *(*[]string)(unsafe.Pointer(&in.CRLDistributionPoints)) - return nil -} - -// Convert_certmanager_SelfSignedIssuer_To_v1beta1_SelfSignedIssuer is an autogenerated conversion function. -func Convert_certmanager_SelfSignedIssuer_To_v1beta1_SelfSignedIssuer(in *certmanager.SelfSignedIssuer, out *SelfSignedIssuer, s conversion.Scope) error { - return autoConvert_certmanager_SelfSignedIssuer_To_v1beta1_SelfSignedIssuer(in, out, s) -} - -func autoConvert_v1beta1_ServiceAccountRef_To_certmanager_ServiceAccountRef(in *ServiceAccountRef, out *certmanager.ServiceAccountRef, s conversion.Scope) error { - out.Name = in.Name - out.TokenAudiences = *(*[]string)(unsafe.Pointer(&in.TokenAudiences)) - return nil -} - -// Convert_v1beta1_ServiceAccountRef_To_certmanager_ServiceAccountRef is an autogenerated conversion function. -func Convert_v1beta1_ServiceAccountRef_To_certmanager_ServiceAccountRef(in *ServiceAccountRef, out *certmanager.ServiceAccountRef, s conversion.Scope) error { - return autoConvert_v1beta1_ServiceAccountRef_To_certmanager_ServiceAccountRef(in, out, s) -} - -func autoConvert_certmanager_ServiceAccountRef_To_v1beta1_ServiceAccountRef(in *certmanager.ServiceAccountRef, out *ServiceAccountRef, s conversion.Scope) error { - out.Name = in.Name - out.TokenAudiences = *(*[]string)(unsafe.Pointer(&in.TokenAudiences)) - return nil -} - -// Convert_certmanager_ServiceAccountRef_To_v1beta1_ServiceAccountRef is an autogenerated conversion function. -func Convert_certmanager_ServiceAccountRef_To_v1beta1_ServiceAccountRef(in *certmanager.ServiceAccountRef, out *ServiceAccountRef, s conversion.Scope) error { - return autoConvert_certmanager_ServiceAccountRef_To_v1beta1_ServiceAccountRef(in, out, s) -} - -func autoConvert_v1beta1_VaultAppRole_To_certmanager_VaultAppRole(in *VaultAppRole, out *certmanager.VaultAppRole, s conversion.Scope) error { - out.Path = in.Path - out.RoleId = in.RoleId - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.SecretRef, &out.SecretRef, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VaultAppRole_To_certmanager_VaultAppRole is an autogenerated conversion function. -func Convert_v1beta1_VaultAppRole_To_certmanager_VaultAppRole(in *VaultAppRole, out *certmanager.VaultAppRole, s conversion.Scope) error { - return autoConvert_v1beta1_VaultAppRole_To_certmanager_VaultAppRole(in, out, s) -} - -func autoConvert_certmanager_VaultAppRole_To_v1beta1_VaultAppRole(in *certmanager.VaultAppRole, out *VaultAppRole, s conversion.Scope) error { - out.Path = in.Path - out.RoleId = in.RoleId - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.SecretRef, &out.SecretRef, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_VaultAppRole_To_v1beta1_VaultAppRole is an autogenerated conversion function. -func Convert_certmanager_VaultAppRole_To_v1beta1_VaultAppRole(in *certmanager.VaultAppRole, out *VaultAppRole, s conversion.Scope) error { - return autoConvert_certmanager_VaultAppRole_To_v1beta1_VaultAppRole(in, out, s) -} - -func autoConvert_v1beta1_VaultAuth_To_certmanager_VaultAuth(in *VaultAuth, out *certmanager.VaultAuth, s conversion.Scope) error { - if in.TokenSecretRef != nil { - in, out := &in.TokenSecretRef, &out.TokenSecretRef - *out = new(meta.SecretKeySelector) - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.TokenSecretRef = nil - } - if in.AppRole != nil { - in, out := &in.AppRole, &out.AppRole - *out = new(certmanager.VaultAppRole) - if err := Convert_v1beta1_VaultAppRole_To_certmanager_VaultAppRole(*in, *out, s); err != nil { - return err - } - } else { - out.AppRole = nil - } - if in.Kubernetes != nil { - in, out := &in.Kubernetes, &out.Kubernetes - *out = new(certmanager.VaultKubernetesAuth) - if err := Convert_v1beta1_VaultKubernetesAuth_To_certmanager_VaultKubernetesAuth(*in, *out, s); err != nil { - return err - } - } else { - out.Kubernetes = nil - } - return nil -} - -// Convert_v1beta1_VaultAuth_To_certmanager_VaultAuth is an autogenerated conversion function. -func Convert_v1beta1_VaultAuth_To_certmanager_VaultAuth(in *VaultAuth, out *certmanager.VaultAuth, s conversion.Scope) error { - return autoConvert_v1beta1_VaultAuth_To_certmanager_VaultAuth(in, out, s) -} - -func autoConvert_certmanager_VaultAuth_To_v1beta1_VaultAuth(in *certmanager.VaultAuth, out *VaultAuth, s conversion.Scope) error { - if in.TokenSecretRef != nil { - in, out := &in.TokenSecretRef, &out.TokenSecretRef - *out = new(metav1.SecretKeySelector) - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.TokenSecretRef = nil - } - if in.AppRole != nil { - in, out := &in.AppRole, &out.AppRole - *out = new(VaultAppRole) - if err := Convert_certmanager_VaultAppRole_To_v1beta1_VaultAppRole(*in, *out, s); err != nil { - return err - } - } else { - out.AppRole = nil - } - if in.Kubernetes != nil { - in, out := &in.Kubernetes, &out.Kubernetes - *out = new(VaultKubernetesAuth) - if err := Convert_certmanager_VaultKubernetesAuth_To_v1beta1_VaultKubernetesAuth(*in, *out, s); err != nil { - return err - } - } else { - out.Kubernetes = nil - } - return nil -} - -// Convert_certmanager_VaultAuth_To_v1beta1_VaultAuth is an autogenerated conversion function. -func Convert_certmanager_VaultAuth_To_v1beta1_VaultAuth(in *certmanager.VaultAuth, out *VaultAuth, s conversion.Scope) error { - return autoConvert_certmanager_VaultAuth_To_v1beta1_VaultAuth(in, out, s) -} - -func autoConvert_v1beta1_VaultIssuer_To_certmanager_VaultIssuer(in *VaultIssuer, out *certmanager.VaultIssuer, s conversion.Scope) error { - if err := Convert_v1beta1_VaultAuth_To_certmanager_VaultAuth(&in.Auth, &out.Auth, s); err != nil { - return err - } - out.Server = in.Server - out.Path = in.Path - out.Namespace = in.Namespace - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - if in.CABundleSecretRef != nil { - in, out := &in.CABundleSecretRef, &out.CABundleSecretRef - *out = new(meta.SecretKeySelector) - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.CABundleSecretRef = nil - } - if in.ClientCertSecretRef != nil { - in, out := &in.ClientCertSecretRef, &out.ClientCertSecretRef - *out = new(meta.SecretKeySelector) - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ClientCertSecretRef = nil - } - if in.ClientKeySecretRef != nil { - in, out := &in.ClientKeySecretRef, &out.ClientKeySecretRef - *out = new(meta.SecretKeySelector) - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ClientKeySecretRef = nil - } - return nil -} - -// Convert_v1beta1_VaultIssuer_To_certmanager_VaultIssuer is an autogenerated conversion function. -func Convert_v1beta1_VaultIssuer_To_certmanager_VaultIssuer(in *VaultIssuer, out *certmanager.VaultIssuer, s conversion.Scope) error { - return autoConvert_v1beta1_VaultIssuer_To_certmanager_VaultIssuer(in, out, s) -} - -func autoConvert_certmanager_VaultIssuer_To_v1beta1_VaultIssuer(in *certmanager.VaultIssuer, out *VaultIssuer, s conversion.Scope) error { - if err := Convert_certmanager_VaultAuth_To_v1beta1_VaultAuth(&in.Auth, &out.Auth, s); err != nil { - return err - } - out.Server = in.Server - out.Path = in.Path - out.Namespace = in.Namespace - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - if in.CABundleSecretRef != nil { - in, out := &in.CABundleSecretRef, &out.CABundleSecretRef - *out = new(metav1.SecretKeySelector) - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.CABundleSecretRef = nil - } - if in.ClientCertSecretRef != nil { - in, out := &in.ClientCertSecretRef, &out.ClientCertSecretRef - *out = new(metav1.SecretKeySelector) - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ClientCertSecretRef = nil - } - if in.ClientKeySecretRef != nil { - in, out := &in.ClientKeySecretRef, &out.ClientKeySecretRef - *out = new(metav1.SecretKeySelector) - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil { - return err - } - } else { - out.ClientKeySecretRef = nil - } - return nil -} - -// Convert_certmanager_VaultIssuer_To_v1beta1_VaultIssuer is an autogenerated conversion function. -func Convert_certmanager_VaultIssuer_To_v1beta1_VaultIssuer(in *certmanager.VaultIssuer, out *VaultIssuer, s conversion.Scope) error { - return autoConvert_certmanager_VaultIssuer_To_v1beta1_VaultIssuer(in, out, s) -} - -func autoConvert_v1beta1_VaultKubernetesAuth_To_certmanager_VaultKubernetesAuth(in *VaultKubernetesAuth, out *certmanager.VaultKubernetesAuth, s conversion.Scope) error { - out.Path = in.Path - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.SecretRef, &out.SecretRef, s); err != nil { - return err - } - out.ServiceAccountRef = (*certmanager.ServiceAccountRef)(unsafe.Pointer(in.ServiceAccountRef)) - out.Role = in.Role - return nil -} - -// Convert_v1beta1_VaultKubernetesAuth_To_certmanager_VaultKubernetesAuth is an autogenerated conversion function. -func Convert_v1beta1_VaultKubernetesAuth_To_certmanager_VaultKubernetesAuth(in *VaultKubernetesAuth, out *certmanager.VaultKubernetesAuth, s conversion.Scope) error { - return autoConvert_v1beta1_VaultKubernetesAuth_To_certmanager_VaultKubernetesAuth(in, out, s) -} - -func autoConvert_certmanager_VaultKubernetesAuth_To_v1beta1_VaultKubernetesAuth(in *certmanager.VaultKubernetesAuth, out *VaultKubernetesAuth, s conversion.Scope) error { - out.Path = in.Path - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.SecretRef, &out.SecretRef, s); err != nil { - return err - } - out.ServiceAccountRef = (*ServiceAccountRef)(unsafe.Pointer(in.ServiceAccountRef)) - out.Role = in.Role - return nil -} - -// Convert_certmanager_VaultKubernetesAuth_To_v1beta1_VaultKubernetesAuth is an autogenerated conversion function. -func Convert_certmanager_VaultKubernetesAuth_To_v1beta1_VaultKubernetesAuth(in *certmanager.VaultKubernetesAuth, out *VaultKubernetesAuth, s conversion.Scope) error { - return autoConvert_certmanager_VaultKubernetesAuth_To_v1beta1_VaultKubernetesAuth(in, out, s) -} - -func autoConvert_v1beta1_VenafiCloud_To_certmanager_VenafiCloud(in *VenafiCloud, out *certmanager.VenafiCloud, s conversion.Scope) error { - out.URL = in.URL - if err := apismetav1.Convert_v1_SecretKeySelector_To_meta_SecretKeySelector(&in.APITokenSecretRef, &out.APITokenSecretRef, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VenafiCloud_To_certmanager_VenafiCloud is an autogenerated conversion function. -func Convert_v1beta1_VenafiCloud_To_certmanager_VenafiCloud(in *VenafiCloud, out *certmanager.VenafiCloud, s conversion.Scope) error { - return autoConvert_v1beta1_VenafiCloud_To_certmanager_VenafiCloud(in, out, s) -} - -func autoConvert_certmanager_VenafiCloud_To_v1beta1_VenafiCloud(in *certmanager.VenafiCloud, out *VenafiCloud, s conversion.Scope) error { - out.URL = in.URL - if err := apismetav1.Convert_meta_SecretKeySelector_To_v1_SecretKeySelector(&in.APITokenSecretRef, &out.APITokenSecretRef, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_VenafiCloud_To_v1beta1_VenafiCloud is an autogenerated conversion function. -func Convert_certmanager_VenafiCloud_To_v1beta1_VenafiCloud(in *certmanager.VenafiCloud, out *VenafiCloud, s conversion.Scope) error { - return autoConvert_certmanager_VenafiCloud_To_v1beta1_VenafiCloud(in, out, s) -} - -func autoConvert_v1beta1_VenafiIssuer_To_certmanager_VenafiIssuer(in *VenafiIssuer, out *certmanager.VenafiIssuer, s conversion.Scope) error { - out.Zone = in.Zone - if in.TPP != nil { - in, out := &in.TPP, &out.TPP - *out = new(certmanager.VenafiTPP) - if err := Convert_v1beta1_VenafiTPP_To_certmanager_VenafiTPP(*in, *out, s); err != nil { - return err - } - } else { - out.TPP = nil - } - if in.Cloud != nil { - in, out := &in.Cloud, &out.Cloud - *out = new(certmanager.VenafiCloud) - if err := Convert_v1beta1_VenafiCloud_To_certmanager_VenafiCloud(*in, *out, s); err != nil { - return err - } - } else { - out.Cloud = nil - } - return nil -} - -// Convert_v1beta1_VenafiIssuer_To_certmanager_VenafiIssuer is an autogenerated conversion function. -func Convert_v1beta1_VenafiIssuer_To_certmanager_VenafiIssuer(in *VenafiIssuer, out *certmanager.VenafiIssuer, s conversion.Scope) error { - return autoConvert_v1beta1_VenafiIssuer_To_certmanager_VenafiIssuer(in, out, s) -} - -func autoConvert_certmanager_VenafiIssuer_To_v1beta1_VenafiIssuer(in *certmanager.VenafiIssuer, out *VenafiIssuer, s conversion.Scope) error { - out.Zone = in.Zone - if in.TPP != nil { - in, out := &in.TPP, &out.TPP - *out = new(VenafiTPP) - if err := Convert_certmanager_VenafiTPP_To_v1beta1_VenafiTPP(*in, *out, s); err != nil { - return err - } - } else { - out.TPP = nil - } - if in.Cloud != nil { - in, out := &in.Cloud, &out.Cloud - *out = new(VenafiCloud) - if err := Convert_certmanager_VenafiCloud_To_v1beta1_VenafiCloud(*in, *out, s); err != nil { - return err - } - } else { - out.Cloud = nil - } - return nil -} - -// Convert_certmanager_VenafiIssuer_To_v1beta1_VenafiIssuer is an autogenerated conversion function. -func Convert_certmanager_VenafiIssuer_To_v1beta1_VenafiIssuer(in *certmanager.VenafiIssuer, out *VenafiIssuer, s conversion.Scope) error { - return autoConvert_certmanager_VenafiIssuer_To_v1beta1_VenafiIssuer(in, out, s) -} - -func autoConvert_v1beta1_VenafiTPP_To_certmanager_VenafiTPP(in *VenafiTPP, out *certmanager.VenafiTPP, s conversion.Scope) error { - out.URL = in.URL - if err := apismetav1.Convert_v1_LocalObjectReference_To_meta_LocalObjectReference(&in.CredentialsRef, &out.CredentialsRef, s); err != nil { - return err - } - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - return nil -} - -// Convert_v1beta1_VenafiTPP_To_certmanager_VenafiTPP is an autogenerated conversion function. -func Convert_v1beta1_VenafiTPP_To_certmanager_VenafiTPP(in *VenafiTPP, out *certmanager.VenafiTPP, s conversion.Scope) error { - return autoConvert_v1beta1_VenafiTPP_To_certmanager_VenafiTPP(in, out, s) -} - -func autoConvert_certmanager_VenafiTPP_To_v1beta1_VenafiTPP(in *certmanager.VenafiTPP, out *VenafiTPP, s conversion.Scope) error { - out.URL = in.URL - if err := apismetav1.Convert_meta_LocalObjectReference_To_v1_LocalObjectReference(&in.CredentialsRef, &out.CredentialsRef, s); err != nil { - return err - } - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - return nil -} - -// Convert_certmanager_VenafiTPP_To_v1beta1_VenafiTPP is an autogenerated conversion function. -func Convert_certmanager_VenafiTPP_To_v1beta1_VenafiTPP(in *certmanager.VenafiTPP, out *VenafiTPP, s conversion.Scope) error { - return autoConvert_certmanager_VenafiTPP_To_v1beta1_VenafiTPP(in, out, s) -} - -func autoConvert_v1beta1_X509Subject_To_certmanager_X509Subject(in *X509Subject, out *certmanager.X509Subject, s conversion.Scope) error { - out.Organizations = *(*[]string)(unsafe.Pointer(&in.Organizations)) - out.Countries = *(*[]string)(unsafe.Pointer(&in.Countries)) - out.OrganizationalUnits = *(*[]string)(unsafe.Pointer(&in.OrganizationalUnits)) - out.Localities = *(*[]string)(unsafe.Pointer(&in.Localities)) - out.Provinces = *(*[]string)(unsafe.Pointer(&in.Provinces)) - out.StreetAddresses = *(*[]string)(unsafe.Pointer(&in.StreetAddresses)) - out.PostalCodes = *(*[]string)(unsafe.Pointer(&in.PostalCodes)) - out.SerialNumber = in.SerialNumber - return nil -} - -// Convert_v1beta1_X509Subject_To_certmanager_X509Subject is an autogenerated conversion function. -func Convert_v1beta1_X509Subject_To_certmanager_X509Subject(in *X509Subject, out *certmanager.X509Subject, s conversion.Scope) error { - return autoConvert_v1beta1_X509Subject_To_certmanager_X509Subject(in, out, s) -} - -func autoConvert_certmanager_X509Subject_To_v1beta1_X509Subject(in *certmanager.X509Subject, out *X509Subject, s conversion.Scope) error { - out.Organizations = *(*[]string)(unsafe.Pointer(&in.Organizations)) - out.Countries = *(*[]string)(unsafe.Pointer(&in.Countries)) - out.OrganizationalUnits = *(*[]string)(unsafe.Pointer(&in.OrganizationalUnits)) - out.Localities = *(*[]string)(unsafe.Pointer(&in.Localities)) - out.Provinces = *(*[]string)(unsafe.Pointer(&in.Provinces)) - out.StreetAddresses = *(*[]string)(unsafe.Pointer(&in.StreetAddresses)) - out.PostalCodes = *(*[]string)(unsafe.Pointer(&in.PostalCodes)) - out.SerialNumber = in.SerialNumber - return nil -} - -// Convert_certmanager_X509Subject_To_v1beta1_X509Subject is an autogenerated conversion function. -func Convert_certmanager_X509Subject_To_v1beta1_X509Subject(in *certmanager.X509Subject, out *X509Subject, s conversion.Scope) error { - return autoConvert_certmanager_X509Subject_To_v1beta1_X509Subject(in, out, s) -} diff --git a/internal/apis/certmanager/v1beta1/zz_generated.deepcopy.go b/internal/apis/certmanager/v1beta1/zz_generated.deepcopy.go deleted file mode 100644 index 59492f6ae0b..00000000000 --- a/internal/apis/certmanager/v1beta1/zz_generated.deepcopy.go +++ /dev/null @@ -1,1160 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The cert-manager 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 v1beta1 - -import ( - acmev1beta1 "github.com/cert-manager/cert-manager/internal/apis/acme/v1beta1" - metav1 "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CAIssuer) DeepCopyInto(out *CAIssuer) { - *out = *in - if in.CRLDistributionPoints != nil { - in, out := &in.CRLDistributionPoints, &out.CRLDistributionPoints - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.OCSPServers != nil { - in, out := &in.OCSPServers, &out.OCSPServers - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.IssuingCertificateURLs != nil { - in, out := &in.IssuingCertificateURLs, &out.IssuingCertificateURLs - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAIssuer. -func (in *CAIssuer) DeepCopy() *CAIssuer { - if in == nil { - return nil - } - out := new(CAIssuer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Certificate) DeepCopyInto(out *Certificate) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Certificate. -func (in *Certificate) DeepCopy() *Certificate { - if in == nil { - return nil - } - out := new(Certificate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Certificate) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateAdditionalOutputFormat) DeepCopyInto(out *CertificateAdditionalOutputFormat) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateAdditionalOutputFormat. -func (in *CertificateAdditionalOutputFormat) DeepCopy() *CertificateAdditionalOutputFormat { - if in == nil { - return nil - } - out := new(CertificateAdditionalOutputFormat) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateCondition) DeepCopyInto(out *CertificateCondition) { - *out = *in - if in.LastTransitionTime != nil { - in, out := &in.LastTransitionTime, &out.LastTransitionTime - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateCondition. -func (in *CertificateCondition) DeepCopy() *CertificateCondition { - if in == nil { - return nil - } - out := new(CertificateCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateKeystores) DeepCopyInto(out *CertificateKeystores) { - *out = *in - if in.JKS != nil { - in, out := &in.JKS, &out.JKS - *out = new(JKSKeystore) - (*in).DeepCopyInto(*out) - } - if in.PKCS12 != nil { - in, out := &in.PKCS12, &out.PKCS12 - *out = new(PKCS12Keystore) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateKeystores. -func (in *CertificateKeystores) DeepCopy() *CertificateKeystores { - if in == nil { - return nil - } - out := new(CertificateKeystores) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateList) DeepCopyInto(out *CertificateList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Certificate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateList. -func (in *CertificateList) DeepCopy() *CertificateList { - if in == nil { - return nil - } - out := new(CertificateList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CertificateList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificatePrivateKey) DeepCopyInto(out *CertificatePrivateKey) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificatePrivateKey. -func (in *CertificatePrivateKey) DeepCopy() *CertificatePrivateKey { - if in == nil { - return nil - } - out := new(CertificatePrivateKey) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateRequest) DeepCopyInto(out *CertificateRequest) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateRequest. -func (in *CertificateRequest) DeepCopy() *CertificateRequest { - if in == nil { - return nil - } - out := new(CertificateRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CertificateRequest) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateRequestCondition) DeepCopyInto(out *CertificateRequestCondition) { - *out = *in - if in.LastTransitionTime != nil { - in, out := &in.LastTransitionTime, &out.LastTransitionTime - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateRequestCondition. -func (in *CertificateRequestCondition) DeepCopy() *CertificateRequestCondition { - if in == nil { - return nil - } - out := new(CertificateRequestCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateRequestList) DeepCopyInto(out *CertificateRequestList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CertificateRequest, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateRequestList. -func (in *CertificateRequestList) DeepCopy() *CertificateRequestList { - if in == nil { - return nil - } - out := new(CertificateRequestList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CertificateRequestList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateRequestSpec) DeepCopyInto(out *CertificateRequestSpec) { - *out = *in - if in.Duration != nil { - in, out := &in.Duration, &out.Duration - *out = new(v1.Duration) - **out = **in - } - out.IssuerRef = in.IssuerRef - if in.Request != nil { - in, out := &in.Request, &out.Request - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.Usages != nil { - in, out := &in.Usages, &out.Usages - *out = make([]KeyUsage, len(*in)) - copy(*out, *in) - } - if in.Groups != nil { - in, out := &in.Groups, &out.Groups - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Extra != nil { - in, out := &in.Extra, &out.Extra - *out = make(map[string][]string, len(*in)) - for key, val := range *in { - var outVal []string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make([]string, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateRequestSpec. -func (in *CertificateRequestSpec) DeepCopy() *CertificateRequestSpec { - if in == nil { - return nil - } - out := new(CertificateRequestSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateRequestStatus) DeepCopyInto(out *CertificateRequestStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]CertificateRequestCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Certificate != nil { - in, out := &in.Certificate, &out.Certificate - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.CA != nil { - in, out := &in.CA, &out.CA - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.FailureTime != nil { - in, out := &in.FailureTime, &out.FailureTime - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateRequestStatus. -func (in *CertificateRequestStatus) DeepCopy() *CertificateRequestStatus { - if in == nil { - return nil - } - out := new(CertificateRequestStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateSecretTemplate) DeepCopyInto(out *CertificateSecretTemplate) { - *out = *in - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSecretTemplate. -func (in *CertificateSecretTemplate) DeepCopy() *CertificateSecretTemplate { - if in == nil { - return nil - } - out := new(CertificateSecretTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateSpec) DeepCopyInto(out *CertificateSpec) { - *out = *in - if in.Subject != nil { - in, out := &in.Subject, &out.Subject - *out = new(X509Subject) - (*in).DeepCopyInto(*out) - } - if in.Duration != nil { - in, out := &in.Duration, &out.Duration - *out = new(v1.Duration) - **out = **in - } - if in.RenewBefore != nil { - in, out := &in.RenewBefore, &out.RenewBefore - *out = new(v1.Duration) - **out = **in - } - if in.DNSNames != nil { - in, out := &in.DNSNames, &out.DNSNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.IPAddresses != nil { - in, out := &in.IPAddresses, &out.IPAddresses - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.URISANs != nil { - in, out := &in.URISANs, &out.URISANs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.EmailSANs != nil { - in, out := &in.EmailSANs, &out.EmailSANs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.OtherNames != nil { - in, out := &in.OtherNames, &out.OtherNames - *out = make([]OtherName, len(*in)) - copy(*out, *in) - } - if in.SecretTemplate != nil { - in, out := &in.SecretTemplate, &out.SecretTemplate - *out = new(CertificateSecretTemplate) - (*in).DeepCopyInto(*out) - } - if in.Keystores != nil { - in, out := &in.Keystores, &out.Keystores - *out = new(CertificateKeystores) - (*in).DeepCopyInto(*out) - } - out.IssuerRef = in.IssuerRef - if in.Usages != nil { - in, out := &in.Usages, &out.Usages - *out = make([]KeyUsage, len(*in)) - copy(*out, *in) - } - if in.PrivateKey != nil { - in, out := &in.PrivateKey, &out.PrivateKey - *out = new(CertificatePrivateKey) - **out = **in - } - if in.EncodeUsagesInRequest != nil { - in, out := &in.EncodeUsagesInRequest, &out.EncodeUsagesInRequest - *out = new(bool) - **out = **in - } - if in.RevisionHistoryLimit != nil { - in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit - *out = new(int32) - **out = **in - } - if in.AdditionalOutputFormats != nil { - in, out := &in.AdditionalOutputFormats, &out.AdditionalOutputFormats - *out = make([]CertificateAdditionalOutputFormat, len(*in)) - copy(*out, *in) - } - if in.NameConstraints != nil { - in, out := &in.NameConstraints, &out.NameConstraints - *out = new(NameConstraints) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSpec. -func (in *CertificateSpec) DeepCopy() *CertificateSpec { - if in == nil { - return nil - } - out := new(CertificateSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateStatus) DeepCopyInto(out *CertificateStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]CertificateCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.LastFailureTime != nil { - in, out := &in.LastFailureTime, &out.LastFailureTime - *out = (*in).DeepCopy() - } - if in.NotBefore != nil { - in, out := &in.NotBefore, &out.NotBefore - *out = (*in).DeepCopy() - } - if in.NotAfter != nil { - in, out := &in.NotAfter, &out.NotAfter - *out = (*in).DeepCopy() - } - if in.RenewalTime != nil { - in, out := &in.RenewalTime, &out.RenewalTime - *out = (*in).DeepCopy() - } - if in.Revision != nil { - in, out := &in.Revision, &out.Revision - *out = new(int) - **out = **in - } - if in.NextPrivateKeySecretName != nil { - in, out := &in.NextPrivateKeySecretName, &out.NextPrivateKeySecretName - *out = new(string) - **out = **in - } - if in.FailedIssuanceAttempts != nil { - in, out := &in.FailedIssuanceAttempts, &out.FailedIssuanceAttempts - *out = new(int) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateStatus. -func (in *CertificateStatus) DeepCopy() *CertificateStatus { - if in == nil { - return nil - } - out := new(CertificateStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterIssuer) DeepCopyInto(out *ClusterIssuer) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterIssuer. -func (in *ClusterIssuer) DeepCopy() *ClusterIssuer { - if in == nil { - return nil - } - out := new(ClusterIssuer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterIssuer) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterIssuerList) DeepCopyInto(out *ClusterIssuerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterIssuer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterIssuerList. -func (in *ClusterIssuerList) DeepCopy() *ClusterIssuerList { - if in == nil { - return nil - } - out := new(ClusterIssuerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterIssuerList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Issuer) DeepCopyInto(out *Issuer) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Issuer. -func (in *Issuer) DeepCopy() *Issuer { - if in == nil { - return nil - } - out := new(Issuer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Issuer) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IssuerCondition) DeepCopyInto(out *IssuerCondition) { - *out = *in - if in.LastTransitionTime != nil { - in, out := &in.LastTransitionTime, &out.LastTransitionTime - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IssuerCondition. -func (in *IssuerCondition) DeepCopy() *IssuerCondition { - if in == nil { - return nil - } - out := new(IssuerCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IssuerConfig) DeepCopyInto(out *IssuerConfig) { - *out = *in - if in.ACME != nil { - in, out := &in.ACME, &out.ACME - *out = new(acmev1beta1.ACMEIssuer) - (*in).DeepCopyInto(*out) - } - if in.CA != nil { - in, out := &in.CA, &out.CA - *out = new(CAIssuer) - (*in).DeepCopyInto(*out) - } - if in.Vault != nil { - in, out := &in.Vault, &out.Vault - *out = new(VaultIssuer) - (*in).DeepCopyInto(*out) - } - if in.SelfSigned != nil { - in, out := &in.SelfSigned, &out.SelfSigned - *out = new(SelfSignedIssuer) - (*in).DeepCopyInto(*out) - } - if in.Venafi != nil { - in, out := &in.Venafi, &out.Venafi - *out = new(VenafiIssuer) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IssuerConfig. -func (in *IssuerConfig) DeepCopy() *IssuerConfig { - if in == nil { - return nil - } - out := new(IssuerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IssuerList) DeepCopyInto(out *IssuerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Issuer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IssuerList. -func (in *IssuerList) DeepCopy() *IssuerList { - if in == nil { - return nil - } - out := new(IssuerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IssuerList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IssuerSpec) DeepCopyInto(out *IssuerSpec) { - *out = *in - in.IssuerConfig.DeepCopyInto(&out.IssuerConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IssuerSpec. -func (in *IssuerSpec) DeepCopy() *IssuerSpec { - if in == nil { - return nil - } - out := new(IssuerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IssuerStatus) DeepCopyInto(out *IssuerStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]IssuerCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ACME != nil { - in, out := &in.ACME, &out.ACME - *out = new(acmev1beta1.ACMEIssuerStatus) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IssuerStatus. -func (in *IssuerStatus) DeepCopy() *IssuerStatus { - if in == nil { - return nil - } - out := new(IssuerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JKSKeystore) DeepCopyInto(out *JKSKeystore) { - *out = *in - out.PasswordSecretRef = in.PasswordSecretRef - if in.Alias != nil { - in, out := &in.Alias, &out.Alias - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JKSKeystore. -func (in *JKSKeystore) DeepCopy() *JKSKeystore { - if in == nil { - return nil - } - out := new(JKSKeystore) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NameConstraintItem) DeepCopyInto(out *NameConstraintItem) { - *out = *in - if in.DNSDomains != nil { - in, out := &in.DNSDomains, &out.DNSDomains - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.IPRanges != nil { - in, out := &in.IPRanges, &out.IPRanges - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.EmailAddresses != nil { - in, out := &in.EmailAddresses, &out.EmailAddresses - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.URIDomains != nil { - in, out := &in.URIDomains, &out.URIDomains - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NameConstraintItem. -func (in *NameConstraintItem) DeepCopy() *NameConstraintItem { - if in == nil { - return nil - } - out := new(NameConstraintItem) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NameConstraints) DeepCopyInto(out *NameConstraints) { - *out = *in - if in.Permitted != nil { - in, out := &in.Permitted, &out.Permitted - *out = new(NameConstraintItem) - (*in).DeepCopyInto(*out) - } - if in.Excluded != nil { - in, out := &in.Excluded, &out.Excluded - *out = new(NameConstraintItem) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NameConstraints. -func (in *NameConstraints) DeepCopy() *NameConstraints { - if in == nil { - return nil - } - out := new(NameConstraints) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OtherName) DeepCopyInto(out *OtherName) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OtherName. -func (in *OtherName) DeepCopy() *OtherName { - if in == nil { - return nil - } - out := new(OtherName) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PKCS12Keystore) DeepCopyInto(out *PKCS12Keystore) { - *out = *in - out.PasswordSecretRef = in.PasswordSecretRef - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PKCS12Keystore. -func (in *PKCS12Keystore) DeepCopy() *PKCS12Keystore { - if in == nil { - return nil - } - out := new(PKCS12Keystore) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SelfSignedIssuer) DeepCopyInto(out *SelfSignedIssuer) { - *out = *in - if in.CRLDistributionPoints != nil { - in, out := &in.CRLDistributionPoints, &out.CRLDistributionPoints - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSignedIssuer. -func (in *SelfSignedIssuer) DeepCopy() *SelfSignedIssuer { - if in == nil { - return nil - } - out := new(SelfSignedIssuer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceAccountRef) DeepCopyInto(out *ServiceAccountRef) { - *out = *in - if in.TokenAudiences != nil { - in, out := &in.TokenAudiences, &out.TokenAudiences - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountRef. -func (in *ServiceAccountRef) DeepCopy() *ServiceAccountRef { - if in == nil { - return nil - } - out := new(ServiceAccountRef) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VaultAppRole) DeepCopyInto(out *VaultAppRole) { - *out = *in - out.SecretRef = in.SecretRef - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultAppRole. -func (in *VaultAppRole) DeepCopy() *VaultAppRole { - if in == nil { - return nil - } - out := new(VaultAppRole) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VaultAuth) DeepCopyInto(out *VaultAuth) { - *out = *in - if in.TokenSecretRef != nil { - in, out := &in.TokenSecretRef, &out.TokenSecretRef - *out = new(metav1.SecretKeySelector) - **out = **in - } - if in.AppRole != nil { - in, out := &in.AppRole, &out.AppRole - *out = new(VaultAppRole) - **out = **in - } - if in.Kubernetes != nil { - in, out := &in.Kubernetes, &out.Kubernetes - *out = new(VaultKubernetesAuth) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultAuth. -func (in *VaultAuth) DeepCopy() *VaultAuth { - if in == nil { - return nil - } - out := new(VaultAuth) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VaultIssuer) DeepCopyInto(out *VaultIssuer) { - *out = *in - in.Auth.DeepCopyInto(&out.Auth) - if in.CABundle != nil { - in, out := &in.CABundle, &out.CABundle - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.CABundleSecretRef != nil { - in, out := &in.CABundleSecretRef, &out.CABundleSecretRef - *out = new(metav1.SecretKeySelector) - **out = **in - } - if in.ClientCertSecretRef != nil { - in, out := &in.ClientCertSecretRef, &out.ClientCertSecretRef - *out = new(metav1.SecretKeySelector) - **out = **in - } - if in.ClientKeySecretRef != nil { - in, out := &in.ClientKeySecretRef, &out.ClientKeySecretRef - *out = new(metav1.SecretKeySelector) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultIssuer. -func (in *VaultIssuer) DeepCopy() *VaultIssuer { - if in == nil { - return nil - } - out := new(VaultIssuer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VaultKubernetesAuth) DeepCopyInto(out *VaultKubernetesAuth) { - *out = *in - out.SecretRef = in.SecretRef - if in.ServiceAccountRef != nil { - in, out := &in.ServiceAccountRef, &out.ServiceAccountRef - *out = new(ServiceAccountRef) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultKubernetesAuth. -func (in *VaultKubernetesAuth) DeepCopy() *VaultKubernetesAuth { - if in == nil { - return nil - } - out := new(VaultKubernetesAuth) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VenafiCloud) DeepCopyInto(out *VenafiCloud) { - *out = *in - out.APITokenSecretRef = in.APITokenSecretRef - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VenafiCloud. -func (in *VenafiCloud) DeepCopy() *VenafiCloud { - if in == nil { - return nil - } - out := new(VenafiCloud) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VenafiIssuer) DeepCopyInto(out *VenafiIssuer) { - *out = *in - if in.TPP != nil { - in, out := &in.TPP, &out.TPP - *out = new(VenafiTPP) - (*in).DeepCopyInto(*out) - } - if in.Cloud != nil { - in, out := &in.Cloud, &out.Cloud - *out = new(VenafiCloud) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VenafiIssuer. -func (in *VenafiIssuer) DeepCopy() *VenafiIssuer { - if in == nil { - return nil - } - out := new(VenafiIssuer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VenafiTPP) DeepCopyInto(out *VenafiTPP) { - *out = *in - out.CredentialsRef = in.CredentialsRef - if in.CABundle != nil { - in, out := &in.CABundle, &out.CABundle - *out = make([]byte, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VenafiTPP. -func (in *VenafiTPP) DeepCopy() *VenafiTPP { - if in == nil { - return nil - } - out := new(VenafiTPP) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *X509Subject) DeepCopyInto(out *X509Subject) { - *out = *in - if in.Organizations != nil { - in, out := &in.Organizations, &out.Organizations - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Countries != nil { - in, out := &in.Countries, &out.Countries - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.OrganizationalUnits != nil { - in, out := &in.OrganizationalUnits, &out.OrganizationalUnits - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Localities != nil { - in, out := &in.Localities, &out.Localities - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Provinces != nil { - in, out := &in.Provinces, &out.Provinces - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.StreetAddresses != nil { - in, out := &in.StreetAddresses, &out.StreetAddresses - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.PostalCodes != nil { - in, out := &in.PostalCodes, &out.PostalCodes - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new X509Subject. -func (in *X509Subject) DeepCopy() *X509Subject { - if in == nil { - return nil - } - out := new(X509Subject) - in.DeepCopyInto(out) - return out -} diff --git a/internal/apis/certmanager/v1beta1/zz_generated.defaults.go b/internal/apis/certmanager/v1beta1/zz_generated.defaults.go deleted file mode 100644 index 176b36f98d6..00000000000 --- a/internal/apis/certmanager/v1beta1/zz_generated.defaults.go +++ /dev/null @@ -1,33 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The cert-manager 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 defaulter-gen. DO NOT EDIT. - -package v1beta1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - return nil -} diff --git a/internal/apis/certmanager/validation/certificate.go b/internal/apis/certmanager/validation/certificate.go index 20172892f8f..9601bad2b90 100644 --- a/internal/apis/certmanager/validation/certificate.go +++ b/internal/apis/certmanager/validation/certificate.go @@ -21,6 +21,7 @@ import ( "net" "net/mail" "strings" + "time" "unicode/utf8" admissionv1 "k8s.io/api/admission/v1" @@ -322,6 +323,13 @@ func ValidateDuration(crt *internalcmapi.CertificateSpec, fldPath *field.Path) f if duration < cmapi.MinimumCertificateDuration { el = append(el, field.Invalid(fldPath.Child("duration"), duration, fmt.Sprintf("certificate duration must be greater than %s", cmapi.MinimumCertificateDuration))) } + + // Must set at most one of spec.renewBefore or spec.renewBeforePercentage. + if crt.RenewBefore != nil && crt.RenewBeforePercentage != nil { + el = append(el, field.Invalid(fldPath.Child("renewBefore"), crt.RenewBefore.Duration, "renewBefore and renewBeforePercentage are mutually exclusive and cannot both be set")) + el = append(el, field.Invalid(fldPath.Child("renewBeforePercentage"), *crt.RenewBeforePercentage, "renewBefore and renewBeforePercentage are mutually exclusive and cannot both be set")) + } + // If spec.renewBefore is set, check that it is not less than the minimum. if crt.RenewBefore != nil && crt.RenewBefore.Duration < cmapi.MinimumRenewBefore { el = append(el, field.Invalid(fldPath.Child("renewBefore"), crt.RenewBefore.Duration, fmt.Sprintf("certificate renewBefore must be greater than %s", cmapi.MinimumRenewBefore))) @@ -330,6 +338,19 @@ func ValidateDuration(crt *internalcmapi.CertificateSpec, fldPath *field.Path) f if crt.RenewBefore != nil && crt.RenewBefore.Duration >= duration { el = append(el, field.Invalid(fldPath.Child("renewBefore"), crt.RenewBefore.Duration, fmt.Sprintf("certificate duration %s must be greater than renewBefore %s", duration, crt.RenewBefore.Duration))) } + + // If spec.renewBeforePercentage is set, check that it's within the allowed + // range. + if crt.RenewBeforePercentage != nil { + renewBefore := duration * time.Duration(100-*crt.RenewBeforePercentage) / 100 + if renewBefore < cmapi.MinimumRenewBefore { + el = append(el, field.Invalid(fldPath.Child("renewBeforePercentage"), *crt.RenewBeforePercentage, fmt.Sprintf("certificate renewBeforePercentage must result in a renewBefore greater than %s", cmapi.MinimumRenewBefore))) + } + if renewBefore >= duration { + el = append(el, field.Invalid(fldPath.Child("renewBeforePercentage"), *crt.RenewBeforePercentage, "certificate renewBeforePercentage must result in a renewBefore less than duration")) + } + } + return el } diff --git a/internal/apis/certmanager/validation/certificate_test.go b/internal/apis/certmanager/validation/certificate_test.go index b41635cfe75..d455cafa30a 100644 --- a/internal/apis/certmanager/validation/certificate_test.go +++ b/internal/apis/certmanager/validation/certificate_test.go @@ -763,7 +763,7 @@ func TestValidateCertificate(t *testing.T) { } for n, s := range scenarios { t.Run(n, func(t *testing.T) { - defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultMutableFeatureGate, feature.NameConstraints, s.nameConstraintsFeatureEnabled)() + featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultMutableFeatureGate, feature.NameConstraints, s.nameConstraintsFeatureEnabled) errs, warnings := ValidateCertificate(s.a, s.cfg) assert.ElementsMatch(t, errs, s.errs) assert.ElementsMatch(t, warnings, s.warnings) @@ -862,6 +862,64 @@ func TestValidateDuration(t *testing.T) { }, errs: []*field.Error{field.Invalid(fldPath.Child("renewBefore"), usefulDurations["one second"].Duration, fmt.Sprintf("certificate renewBefore must be greater than %s", cmapi.MinimumRenewBefore))}, }, + "renewBefore and renewBeforePercentage both set": { + cfg: &internalcmapi.Certificate{ + Spec: internalcmapi.CertificateSpec{ + RenewBefore: usefulDurations["one month"], + RenewBeforePercentage: ptr.To(int32(95)), + CommonName: "testcn", + SecretName: "abc", + IssuerRef: validIssuerRef, + }, + }, + errs: []*field.Error{ + field.Invalid(fldPath.Child("renewBefore"), usefulDurations["one month"].Duration, "renewBefore and renewBeforePercentage are mutually exclusive and cannot both be set"), + field.Invalid(fldPath.Child("renewBeforePercentage"), int32(95), "renewBefore and renewBeforePercentage are mutually exclusive and cannot both be set"), + }, + }, + "valid duration and renewBeforePercentage": { + cfg: &internalcmapi.Certificate{ + Spec: internalcmapi.CertificateSpec{ + Duration: usefulDurations["one year"], + RenewBeforePercentage: ptr.To(int32(95)), + CommonName: "testcn", + SecretName: "abc", + IssuerRef: validIssuerRef, + }, + }, + }, + "unset duration, valid renewBeforePercentage for default": { + cfg: &internalcmapi.Certificate{ + Spec: internalcmapi.CertificateSpec{ + RenewBeforePercentage: ptr.To(int32(95)), + CommonName: "testcn", + SecretName: "abc", + IssuerRef: validIssuerRef, + }, + }, + }, + "renewBeforePercentage is equal to duration": { + cfg: &internalcmapi.Certificate{ + Spec: internalcmapi.CertificateSpec{ + RenewBeforePercentage: ptr.To(int32(0)), + CommonName: "testcn", + SecretName: "abc", + IssuerRef: validIssuerRef, + }, + }, + errs: []*field.Error{field.Invalid(fldPath.Child("renewBeforePercentage"), int32(0), "certificate renewBeforePercentage must result in a renewBefore less than duration")}, + }, + "renewBeforePercentage results in less than the minimum permitted value": { + cfg: &internalcmapi.Certificate{ + Spec: internalcmapi.CertificateSpec{ + RenewBeforePercentage: ptr.To(int32(100)), + CommonName: "testcn", + SecretName: "abc", + IssuerRef: validIssuerRef, + }, + }, + errs: []*field.Error{field.Invalid(fldPath.Child("renewBeforePercentage"), int32(100), fmt.Sprintf("certificate renewBeforePercentage must result in a renewBefore greater than %s", cmapi.MinimumRenewBefore))}, + }, "duration is less than the minimum permitted value": { cfg: &internalcmapi.Certificate{ Spec: internalcmapi.CertificateSpec{ @@ -876,7 +934,6 @@ func TestValidateDuration(t *testing.T) { }, } for n, s := range scenarios { - s := s // G601: Remove after Go 1.22. https://go.dev/wiki/LoopvarExperiment t.Run(n, func(t *testing.T) { errs := ValidateDuration(&s.cfg.Spec, fldPath) assert.ElementsMatch(t, errs, s.errs) @@ -988,7 +1045,7 @@ func Test_validateAdditionalOutputFormats(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { - defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultMutableFeatureGate, feature.AdditionalCertificateOutputFormats, test.featureEnabled)() + featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultMutableFeatureGate, feature.AdditionalCertificateOutputFormats, test.featureEnabled) gotErr := validateAdditionalOutputFormats(test.spec, field.NewPath("spec")) assert.Equal(t, test.expErr, gotErr) }) @@ -1124,7 +1181,7 @@ func Test_validateLiteralSubject(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { - defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultMutableFeatureGate, feature.LiteralCertificateSubject, test.featureEnabled)() + featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultMutableFeatureGate, feature.LiteralCertificateSubject, test.featureEnabled) errs, warnings := ValidateCertificate(test.a, test.cfg) assert.ElementsMatch(t, errs, test.errs) assert.ElementsMatch(t, warnings, []string{}) diff --git a/internal/apis/certmanager/validation/certificaterequest_test.go b/internal/apis/certmanager/validation/certificaterequest_test.go index 79829b0de9b..b7ef87c2091 100644 --- a/internal/apis/certmanager/validation/certificaterequest_test.go +++ b/internal/apis/certmanager/validation/certificaterequest_test.go @@ -17,11 +17,9 @@ limitations under the License. package validation import ( - "bytes" "crypto/x509" "crypto/x509/pkix" "encoding/asn1" - "encoding/pem" "reflect" "testing" @@ -32,7 +30,6 @@ import ( cminternal "github.com/cert-manager/cert-manager/internal/apis/certmanager" cminternalmeta "github.com/cert-manager/cert-manager/internal/apis/meta" cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" - "github.com/cert-manager/cert-manager/pkg/util/pki" utilpki "github.com/cert-manager/cert-manager/pkg/util/pki" "github.com/cert-manager/cert-manager/test/unit/gen" ) @@ -572,10 +569,12 @@ func TestValidateCertificateRequest(t *testing.T) { cr: &cminternal.CertificateRequest{ Spec: cminternal.CertificateRequestSpec{ // mustGenerateCSR will set the default usages for us - Request: mustGenerateCSR(t, gen.Certificate("test", gen.SetCertificateDNSNames("example.com")), func(cr *x509.CertificateRequest) { + Request: mustGenerateCSR(t, gen.Certificate("test", gen.SetCertificateDNSNames("example.com")), func(cr *x509.CertificateRequest) error { // manually remove extensions that encode default usages cr.Extensions = nil cr.ExtraExtensions = nil + + return nil }), IssuerRef: validIssuerRef, Usages: []cminternal.KeyUsage{cminternal.UsageKeyEncipherment, cminternal.UsageDigitalSignature}, @@ -588,12 +587,12 @@ func TestValidateCertificateRequest(t *testing.T) { cr: &cminternal.CertificateRequest{ Spec: cminternal.CertificateRequestSpec{ // mustGenerateCSR will set the default usages for us - Request: mustGenerateCSR(t, gen.Certificate("test", gen.SetCertificateDNSNames("example.com")), func(cr *x509.CertificateRequest) { + Request: mustGenerateCSR(t, gen.Certificate("test", gen.SetCertificateDNSNames("example.com")), func(cr *x509.CertificateRequest) error { // manually remove extensions that encode default usages cr.Extensions = nil cr.ExtraExtensions = []pkix.Extension{ { - Id: pki.OIDExtensionKeyUsage, + Id: utilpki.OIDExtensionKeyUsage, Critical: false, Value: func(t *testing.T) []byte { asn1KeyUsage, err := asn1.Marshal(asn1.BitString{Bytes: []byte{}, BitLength: 0}) @@ -605,6 +604,8 @@ func TestValidateCertificateRequest(t *testing.T) { }(t), }, } + + return nil }), IssuerRef: validIssuerRef, Usages: []cminternal.KeyUsage{cminternal.UsageKeyEncipherment, cminternal.UsageDigitalSignature}, @@ -877,30 +878,10 @@ func TestValidateCertificateRequest(t *testing.T) { } } -func mustGenerateCSR(t *testing.T, crt *cmapi.Certificate, modifiers ...func(*x509.CertificateRequest)) []byte { - // Create a new private key - pk, err := utilpki.GenerateRSAPrivateKey(2048) - if err != nil { - t.Fatal(err) - } - - x509CSR, err := utilpki.GenerateCSR(crt) +func mustGenerateCSR(t *testing.T, crt *cmapi.Certificate, modifiers ...gen.CSRModifier) []byte { + csrPEM, _, err := gen.CSRForCertificate(crt, modifiers...) if err != nil { t.Fatal(err) } - for _, modifier := range modifiers { - modifier(x509CSR) - } - csrDER, err := utilpki.EncodeCSR(x509CSR, pk) - if err != nil { - t.Fatal(err) - } - - csrPEM := bytes.NewBuffer([]byte{}) - err = pem.Encode(csrPEM, &pem.Block{Type: "CERTIFICATE REQUEST", Bytes: csrDER}) - if err != nil { - t.Fatal(err) - } - - return csrPEM.Bytes() + return csrPEM } diff --git a/internal/apis/certmanager/validation/issuer.go b/internal/apis/certmanager/validation/issuer.go index b8797b0726e..ccf06b0989e 100644 --- a/internal/apis/certmanager/validation/issuer.go +++ b/internal/apis/certmanager/validation/issuer.go @@ -311,6 +311,10 @@ func ValidateVaultIssuerAuth(auth *certmanager.VaultAuth, fldPath *field.Path) f unionCount++ } + if auth.ClientCertificate != nil { + unionCount++ + } + if auth.Kubernetes != nil { unionCount++ @@ -339,7 +343,7 @@ func ValidateVaultIssuerAuth(auth *certmanager.VaultAuth, fldPath *field.Path) f } if unionCount == 0 { - el = append(el, field.Required(fldPath, "please supply one of: appRole, kubernetes, tokenSecretRef")) + el = append(el, field.Required(fldPath, "please supply one of: appRole, kubernetes, tokenSecretRef, clientCertificate")) } // Due to the fact that there has not been any "oneOf" validation on @@ -359,6 +363,25 @@ func ValidateVenafiTPP(tpp *certmanager.VenafiTPP, fldPath *field.Path) (el fiel // TODO: validate CABundle using validateCABundleNotEmpty + // Validate only one of CABundle/CABundleSecretRef is passed + el = append(el, validateVenafiTPPCABundleUnique(tpp, fldPath)...) + + return el +} + +func validateVenafiTPPCABundleUnique(tpp *certmanager.VenafiTPP, fldPath *field.Path) (el field.ErrorList) { + numCAs := 0 + if len(tpp.CABundle) > 0 { + numCAs++ + } + if tpp.CABundleSecretRef != nil { + numCAs++ + } + + if numCAs > 1 { + el = append(el, field.Forbidden(fldPath, "may not specify more than one of caBundle/caBundleSecretRef as TPP CA Bundle")) + } + return el } @@ -505,10 +528,6 @@ func ValidateACMEChallengeSolverDNS01(p *cmacme.ACMEChallengeSolverDNS01, fldPat el = append(el, field.Forbidden(fldPath.Child("route53"), "may not specify more than one provider type")) } else { numProviders++ - // region is the only required field for route53 as ambient credentials can be used instead - if len(p.Route53.Region) == 0 { - el = append(el, field.Required(fldPath.Child("route53", "region"), "")) - } // We don't include a validation here asserting that either the // AccessKeyID or SecretAccessKeyID must be specified, because it is // valid to use neither when using ambient credentials. diff --git a/internal/apis/certmanager/validation/issuer_test.go b/internal/apis/certmanager/validation/issuer_test.go index c13e87c5777..7157835d7de 100644 --- a/internal/apis/certmanager/validation/issuer_test.go +++ b/internal/apis/certmanager/validation/issuer_test.go @@ -105,7 +105,7 @@ func TestValidateVaultIssuerConfig(t *testing.T) { errs: []*field.Error{ field.Required(fldPath.Child("server"), ""), field.Required(fldPath.Child("path"), ""), - field.Required(fldPath.Child("auth"), "please supply one of: appRole, kubernetes, tokenSecretRef"), + field.Required(fldPath.Child("auth"), "please supply one of: appRole, kubernetes, tokenSecretRef, clientCertificate"), }, }, "vault issuer with a CA bundle containing no valid certificates": { @@ -278,6 +278,11 @@ func TestValidateVaultIssuerAuth(t *testing.T) { field.Required(fldPath.Child("appRole").Child("roleId"), ""), }, }, + "valid auth.clientCertificate: all fields can be empty": { + auth: &cmapi.VaultAuth{ + ClientCertificate: &cmapi.VaultClientCertificateAuth{}, + }, + }, // The field auth.kubernetes.secretRef.key defaults to 'token' if // not specified. "valid auth.kubernetes.secretRef: key can be left empty": { @@ -1034,20 +1039,10 @@ func TestValidateACMEIssuerDNS01Config(t *testing.T) { field.Required(fldPath.Child("cloudflare", "email"), ""), }, }, - "missing route53 region": { + "empty route53 field should be valid because ambient credentials and region may be used instead": { cfg: &cmacme.ACMEChallengeSolverDNS01{ Route53: &cmacme.ACMEIssuerDNS01ProviderRoute53{}, }, - errs: []*field.Error{ - field.Required(fldPath.Child("route53", "region"), ""), - }, - }, - "missing route53 accessKeyID and accessKeyIDSecretRef should be valid because ambient credentials may be used instead": { - cfg: &cmacme.ACMEChallengeSolverDNS01{ - Route53: &cmacme.ACMEIssuerDNS01ProviderRoute53{ - Region: "valid", - }, - }, errs: []*field.Error{}, }, "both route53 accessKeyID and accessKeyIDSecretRef specified": { @@ -1646,6 +1641,10 @@ func TestValidateVenafiIssuerConfig(t *testing.T) { } func TestValidateVenafiTPP(t *testing.T) { + caBundle := unitcrypto.MustCreateCryptoBundle(t, + &pubcmapi.Certificate{Spec: pubcmapi.CertificateSpec{CommonName: "test"}}, + clock.RealClock{}, + ).CertBytes fldPath := field.NewPath("test") scenarios := map[string]struct { cfg *cmapi.VenafiTPP @@ -1662,6 +1661,21 @@ func TestValidateVenafiTPP(t *testing.T) { field.Required(fldPath.Child("url"), ""), }, }, + "venafi TPP issuer defines both caBundle and caBundleSecretRef": { + cfg: &cmapi.VenafiTPP{ + URL: "https://tpp.example.com/vedsdk", + CABundle: caBundle, + CABundleSecretRef: &cmmeta.SecretKeySelector{ + Key: "ca.crt", + LocalObjectReference: cmmeta.LocalObjectReference{ + Name: "test-secret", + }, + }, + }, + errs: []*field.Error{ + field.Forbidden(fldPath, "may not specify more than one of caBundle/caBundleSecretRef as TPP CA Bundle"), + }, + }, } for n, s := range scenarios { diff --git a/internal/apis/certmanager/zz_generated.deepcopy.go b/internal/apis/certmanager/zz_generated.deepcopy.go index 49380ee89db..571e8653576 100644 --- a/internal/apis/certmanager/zz_generated.deepcopy.go +++ b/internal/apis/certmanager/zz_generated.deepcopy.go @@ -416,6 +416,11 @@ func (in *CertificateSpec) DeepCopyInto(out *CertificateSpec) { *out = new(v1.Duration) **out = **in } + if in.RenewBeforePercentage != nil { + in, out := &in.RenewBeforePercentage, &out.RenewBeforePercentage + *out = new(int32) + **out = **in + } if in.DNSNames != nil { in, out := &in.DNSNames, &out.DNSNames *out = make([]string, len(*in)) @@ -966,6 +971,11 @@ func (in *VaultAuth) DeepCopyInto(out *VaultAuth) { *out = new(VaultAppRole) **out = **in } + if in.ClientCertificate != nil { + in, out := &in.ClientCertificate, &out.ClientCertificate + *out = new(VaultClientCertificateAuth) + **out = **in + } if in.Kubernetes != nil { in, out := &in.Kubernetes, &out.Kubernetes *out = new(VaultKubernetesAuth) @@ -984,6 +994,22 @@ func (in *VaultAuth) DeepCopy() *VaultAuth { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VaultClientCertificateAuth) DeepCopyInto(out *VaultClientCertificateAuth) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultClientCertificateAuth. +func (in *VaultClientCertificateAuth) DeepCopy() *VaultClientCertificateAuth { + if in == nil { + return nil + } + out := new(VaultClientCertificateAuth) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VaultIssuer) DeepCopyInto(out *VaultIssuer) { *out = *in @@ -1095,6 +1121,11 @@ func (in *VenafiTPP) DeepCopyInto(out *VenafiTPP) { *out = make([]byte, len(*in)) copy(*out, *in) } + if in.CABundleSecretRef != nil { + in, out := &in.CABundleSecretRef, &out.CABundleSecretRef + *out = new(meta.SecretKeySelector) + **out = **in + } return } diff --git a/internal/apis/config/cainjector/fuzzer/fuzzer.go b/internal/apis/config/cainjector/fuzzer/fuzzer.go index 4e99102d29f..7484a94020f 100644 --- a/internal/apis/config/cainjector/fuzzer/fuzzer.go +++ b/internal/apis/config/cainjector/fuzzer/fuzzer.go @@ -46,6 +46,9 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} { if s.LeaderElectionConfig.RetryPeriod == 0 { s.LeaderElectionConfig.RetryPeriod = 1234 } + if s.MetricsListenAddress == "" { + s.MetricsListenAddress = "something:1234" + } logsapi.SetRecommendedLoggingConfiguration(&s.Logging) }, diff --git a/internal/apis/config/cainjector/types.go b/internal/apis/config/cainjector/types.go index 66e76850e44..0845c69e132 100644 --- a/internal/apis/config/cainjector/types.go +++ b/internal/apis/config/cainjector/types.go @@ -33,7 +33,7 @@ type CAInjectorConfiguration struct { // If set, this limits the scope of cert-manager to a single namespace and // ClusterIssuers are disabled. If not specified, all namespaces will be - // watched" + // watched Namespace string // LeaderElectionConfig configures the behaviour of the leader election @@ -61,10 +61,18 @@ type CAInjectorConfiguration struct { // featureGates is a map of feature names to bools that enable or disable experimental // features. FeatureGates map[string]bool + + // The host and port that the metrics endpoint should listen on. + // The value "0" disables the metrics server. + // Defaults to '0.0.0.0:9402'. + MetricsListenAddress string + + // Metrics endpoint TLS config + MetricsTLSConfig shared.TLSConfig } type EnableDataSourceConfig struct { - // Certificates detemines whether cainjector's control loops will watch + // Certificates determines whether cainjector's control loops will watch // cert-manager Certificate resources as potential sources of CA data. Certificates bool } diff --git a/internal/apis/config/cainjector/v1alpha1/defaults.go b/internal/apis/config/cainjector/v1alpha1/defaults.go index 3be6ab374a8..176f188209d 100644 --- a/internal/apis/config/cainjector/v1alpha1/defaults.go +++ b/internal/apis/config/cainjector/v1alpha1/defaults.go @@ -24,6 +24,8 @@ import ( "github.com/cert-manager/cert-manager/pkg/apis/config/cainjector/v1alpha1" ) +const defaultPrometheusMetricsServerAddress = "0.0.0.0:9402" + func addDefaultingFuncs(scheme *runtime.Scheme) error { return RegisterDefaults(scheme) } @@ -33,6 +35,10 @@ func SetDefaults_CAInjectorConfiguration(obj *v1alpha1.CAInjectorConfiguration) obj.PprofAddress = "localhost:6060" } + if obj.MetricsListenAddress == "" { + obj.MetricsListenAddress = defaultPrometheusMetricsServerAddress + } + logsapi.SetRecommendedLoggingConfiguration(&obj.Logging) } diff --git a/internal/apis/config/cainjector/v1alpha1/testdata/defaults.json b/internal/apis/config/cainjector/v1alpha1/testdata/defaults.json index 706ce7b6a01..afb652d6558 100644 --- a/internal/apis/config/cainjector/v1alpha1/testdata/defaults.json +++ b/internal/apis/config/cainjector/v1alpha1/testdata/defaults.json @@ -29,5 +29,12 @@ "infoBufferSize": "0" } } + }, + "metricsListenAddress": "0.0.0.0:9402", + "metricsTLSConfig": { + "filesystem": {}, + "dynamic": { + "leafDuration": "168h0m0s" + } } } \ No newline at end of file diff --git a/internal/apis/config/cainjector/v1alpha1/zz_generated.conversion.go b/internal/apis/config/cainjector/v1alpha1/zz_generated.conversion.go index bd7ed9c2c91..5692706fa92 100644 --- a/internal/apis/config/cainjector/v1alpha1/zz_generated.conversion.go +++ b/internal/apis/config/cainjector/v1alpha1/zz_generated.conversion.go @@ -88,6 +88,10 @@ func autoConvert_v1alpha1_CAInjectorConfiguration_To_cainjector_CAInjectorConfig out.PprofAddress = in.PprofAddress out.Logging = in.Logging out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + out.MetricsListenAddress = in.MetricsListenAddress + if err := sharedv1alpha1.Convert_v1alpha1_TLSConfig_To_shared_TLSConfig(&in.MetricsTLSConfig, &out.MetricsTLSConfig, s); err != nil { + return err + } return nil } @@ -112,6 +116,10 @@ func autoConvert_cainjector_CAInjectorConfiguration_To_v1alpha1_CAInjectorConfig out.PprofAddress = in.PprofAddress out.Logging = in.Logging out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + out.MetricsListenAddress = in.MetricsListenAddress + if err := sharedv1alpha1.Convert_shared_TLSConfig_To_v1alpha1_TLSConfig(&in.MetricsTLSConfig, &out.MetricsTLSConfig, s); err != nil { + return err + } return nil } diff --git a/internal/apis/config/cainjector/v1alpha1/zz_generated.defaults.go b/internal/apis/config/cainjector/v1alpha1/zz_generated.defaults.go index 73beef8e2a0..8c4ddb869cb 100644 --- a/internal/apis/config/cainjector/v1alpha1/zz_generated.defaults.go +++ b/internal/apis/config/cainjector/v1alpha1/zz_generated.defaults.go @@ -42,4 +42,5 @@ func SetObjectDefaults_CAInjectorConfiguration(in *v1alpha1.CAInjectorConfigurat sharedv1alpha1.SetDefaults_LeaderElectionConfig(&in.LeaderElectionConfig) SetDefaults_EnableDataSourceConfig(&in.EnableDataSourceConfig) SetDefaults_EnableInjectableConfig(&in.EnableInjectableConfig) + sharedv1alpha1.SetDefaults_DynamicServingConfig(&in.MetricsTLSConfig.Dynamic) } diff --git a/internal/apis/config/cainjector/zz_generated.deepcopy.go b/internal/apis/config/cainjector/zz_generated.deepcopy.go index 417ac1aa0b9..2e8e4e88ea9 100644 --- a/internal/apis/config/cainjector/zz_generated.deepcopy.go +++ b/internal/apis/config/cainjector/zz_generated.deepcopy.go @@ -40,6 +40,7 @@ func (in *CAInjectorConfiguration) DeepCopyInto(out *CAInjectorConfiguration) { (*out)[key] = val } } + in.MetricsTLSConfig.DeepCopyInto(&out.MetricsTLSConfig) return } diff --git a/internal/apis/config/controller/types.go b/internal/apis/config/controller/types.go index 6b36c2368e7..3ecc2435aba 100644 --- a/internal/apis/config/controller/types.go +++ b/internal/apis/config/controller/types.go @@ -45,7 +45,7 @@ type ControllerConfiguration struct { // If set, this limits the scope of cert-manager to a single namespace and // ClusterIssuers are disabled. If not specified, all namespaces will be - // watched" + // watched Namespace string // Namespace to store resources owned by cluster scoped resources such as ClusterIssuer in. @@ -90,7 +90,7 @@ type ControllerConfiguration struct { // CertificateRequest and Order, as well as from CertificateSigningRequest to // Order, by passing a list of annotation key prefixes. A prefix starting with // a dash(-) specifies an annotation that shouldn't be copied. Example: - // '*,-kubectl.kuberenetes.io/'- all annotations will be copied apart from the + // '*,-kubectl.kubernetes.io/'- all annotations will be copied apart from the // ones where the key is prefixed with 'kubectl.kubernetes.io/'. CopiedAnnotationPrefixes []string @@ -157,7 +157,7 @@ type IngressShimConfig struct { // not specified on the ingress resource. DefaultIssuerGroup string - // The annotation consumed by the ingress-shim controller to indicate a ingress + // The annotation consumed by the ingress-shim controller to indicate an ingress // is requesting a certificate DefaultAutoCertificateAnnotations []string } diff --git a/internal/apis/config/controller/v1alpha1/defaults_test.go b/internal/apis/config/controller/v1alpha1/defaults_test.go index e30809f9224..65effc2d617 100644 --- a/internal/apis/config/controller/v1alpha1/defaults_test.go +++ b/internal/apis/config/controller/v1alpha1/defaults_test.go @@ -52,7 +52,7 @@ func TestControllerConfigurationDefaults(t *testing.T) { if err := os.WriteFile(tt.jsonFilePath, defaultData, 0644); err != nil { t.Fatal(err) } - t.Log("cainjector config api defaults updated") + t.Log("controller config api defaults updated") } expectedData, err := os.ReadFile(tt.jsonFilePath) diff --git a/internal/apis/config/controller/validation/validation_test.go b/internal/apis/config/controller/validation/validation_test.go index ab18d9679cf..cb2b6058596 100644 --- a/internal/apis/config/controller/validation/validation_test.go +++ b/internal/apis/config/controller/validation/validation_test.go @@ -283,7 +283,7 @@ func TestValidateControllerConfiguration(t *testing.T) { nil, }, { - "with inalid acme dns recursive nameserver missing port", + "with invalid acme dns recursive nameserver missing port", &config.ControllerConfiguration{ Logging: logsapi.LoggingConfiguration{ Format: "text", @@ -307,7 +307,7 @@ func TestValidateControllerConfiguration(t *testing.T) { }, }, { - "with inalid acme dns recursive nameserver invalid url", + "with invalid acme dns recursive nameserver invalid url", &config.ControllerConfiguration{ Logging: logsapi.LoggingConfiguration{ Format: "text", diff --git a/internal/apis/config/shared/v1alpha1/conversion.go b/internal/apis/config/shared/v1alpha1/conversion.go index 182ac865da0..17c767161d1 100644 --- a/internal/apis/config/shared/v1alpha1/conversion.go +++ b/internal/apis/config/shared/v1alpha1/conversion.go @@ -17,6 +17,8 @@ limitations under the License. package v1alpha1 import ( + "fmt" + "math" "time" conversion "k8s.io/apimachinery/pkg/conversion" @@ -74,7 +76,11 @@ func Convert_Pointer_int32_To_int(in **int32, out *int, s conversion.Scope) erro } func Convert_int_To_Pointer_int32(in *int, out **int32, s conversion.Scope) error { - temp := int32(*in) + tempIn := *in + if tempIn > math.MaxInt32 || tempIn < math.MinInt32 { + return fmt.Errorf("value %d is out of range for int32 (must be between %d and %d)", tempIn, math.MinInt32, math.MaxInt32) + } + temp := int32(tempIn) *out = &temp return nil } diff --git a/internal/apis/config/webhook/fuzzer/fuzzer.go b/internal/apis/config/webhook/fuzzer/fuzzer.go index b20a4fbd4b8..78c898e2077 100644 --- a/internal/apis/config/webhook/fuzzer/fuzzer.go +++ b/internal/apis/config/webhook/fuzzer/fuzzer.go @@ -33,6 +33,9 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} { if s.PprofAddress == "" { s.PprofAddress = "something:1234" } + if s.MetricsListenAddress == "" { + s.MetricsListenAddress = "something:1234" + } logsapi.SetRecommendedLoggingConfiguration(&s.Logging) }, diff --git a/internal/apis/config/webhook/types.go b/internal/apis/config/webhook/types.go index ebb20730fd3..50c72bd50e8 100644 --- a/internal/apis/config/webhook/types.go +++ b/internal/apis/config/webhook/types.go @@ -62,4 +62,12 @@ type WebhookConfiguration struct { // featureGates is a map of feature names to bools that enable or disable experimental // features. FeatureGates map[string]bool + + // The host and port that the metrics endpoint should listen on. + // The value "0" disables the metrics server. + // Defaults to '0.0.0.0:9402'. + MetricsListenAddress string + + // Metrics endpoint TLS config + MetricsTLSConfig shared.TLSConfig } diff --git a/internal/apis/config/webhook/v1alpha1/defaults.go b/internal/apis/config/webhook/v1alpha1/defaults.go index 700b8aead85..10f87ca762e 100644 --- a/internal/apis/config/webhook/v1alpha1/defaults.go +++ b/internal/apis/config/webhook/v1alpha1/defaults.go @@ -24,6 +24,8 @@ import ( "github.com/cert-manager/cert-manager/pkg/apis/config/webhook/v1alpha1" ) +const defaultPrometheusMetricsServerAddress = "0.0.0.0:9402" + func addDefaultingFuncs(scheme *runtime.Scheme) error { return RegisterDefaults(scheme) } @@ -39,5 +41,9 @@ func SetDefaults_WebhookConfiguration(obj *v1alpha1.WebhookConfiguration) { obj.PprofAddress = "localhost:6060" } + if obj.MetricsListenAddress == "" { + obj.MetricsListenAddress = defaultPrometheusMetricsServerAddress + } + logsapi.SetRecommendedLoggingConfiguration(&obj.Logging) } diff --git a/internal/apis/config/webhook/v1alpha1/defaults_test.go b/internal/apis/config/webhook/v1alpha1/defaults_test.go index efa5f266aa6..e23764180b2 100644 --- a/internal/apis/config/webhook/v1alpha1/defaults_test.go +++ b/internal/apis/config/webhook/v1alpha1/defaults_test.go @@ -51,7 +51,7 @@ func TestWebhookConfigurationDefaults(t *testing.T) { if err := os.WriteFile(tt.jsonFilePath, defaultData, 0644); err != nil { t.Fatal(err) } - t.Log("cainjector config api defaults updated") + t.Log("webhook config api defaults updated") } expectedData, err := os.ReadFile(tt.jsonFilePath) diff --git a/internal/apis/config/webhook/v1alpha1/testdata/defaults.json b/internal/apis/config/webhook/v1alpha1/testdata/defaults.json index 3328d326442..decd2094391 100644 --- a/internal/apis/config/webhook/v1alpha1/testdata/defaults.json +++ b/internal/apis/config/webhook/v1alpha1/testdata/defaults.json @@ -21,5 +21,12 @@ "infoBufferSize": "0" } } + }, + "metricsListenAddress": "0.0.0.0:9402", + "metricsTLSConfig": { + "filesystem": {}, + "dynamic": { + "leafDuration": "168h0m0s" + } } } \ No newline at end of file diff --git a/internal/apis/config/webhook/v1alpha1/zz_generated.conversion.go b/internal/apis/config/webhook/v1alpha1/zz_generated.conversion.go index d23776b65c2..4a5a58d88c9 100644 --- a/internal/apis/config/webhook/v1alpha1/zz_generated.conversion.go +++ b/internal/apis/config/webhook/v1alpha1/zz_generated.conversion.go @@ -68,6 +68,10 @@ func autoConvert_v1alpha1_WebhookConfiguration_To_webhook_WebhookConfiguration(i out.PprofAddress = in.PprofAddress out.Logging = in.Logging out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + out.MetricsListenAddress = in.MetricsListenAddress + if err := sharedv1alpha1.Convert_v1alpha1_TLSConfig_To_shared_TLSConfig(&in.MetricsTLSConfig, &out.MetricsTLSConfig, s); err != nil { + return err + } return nil } @@ -92,6 +96,10 @@ func autoConvert_webhook_WebhookConfiguration_To_v1alpha1_WebhookConfiguration(i out.PprofAddress = in.PprofAddress out.Logging = in.Logging out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + out.MetricsListenAddress = in.MetricsListenAddress + if err := sharedv1alpha1.Convert_shared_TLSConfig_To_v1alpha1_TLSConfig(&in.MetricsTLSConfig, &out.MetricsTLSConfig, s); err != nil { + return err + } return nil } diff --git a/internal/apis/config/webhook/v1alpha1/zz_generated.defaults.go b/internal/apis/config/webhook/v1alpha1/zz_generated.defaults.go index 616dc64db15..b51a5bc52e6 100644 --- a/internal/apis/config/webhook/v1alpha1/zz_generated.defaults.go +++ b/internal/apis/config/webhook/v1alpha1/zz_generated.defaults.go @@ -38,4 +38,5 @@ func RegisterDefaults(scheme *runtime.Scheme) error { func SetObjectDefaults_WebhookConfiguration(in *v1alpha1.WebhookConfiguration) { SetDefaults_WebhookConfiguration(in) sharedv1alpha1.SetDefaults_DynamicServingConfig(&in.TLSConfig.Dynamic) + sharedv1alpha1.SetDefaults_DynamicServingConfig(&in.MetricsTLSConfig.Dynamic) } diff --git a/internal/apis/config/webhook/zz_generated.deepcopy.go b/internal/apis/config/webhook/zz_generated.deepcopy.go index ed819dc7b00..775767f48cf 100644 --- a/internal/apis/config/webhook/zz_generated.deepcopy.go +++ b/internal/apis/config/webhook/zz_generated.deepcopy.go @@ -38,6 +38,7 @@ func (in *WebhookConfiguration) DeepCopyInto(out *WebhookConfiguration) { (*out)[key] = val } } + in.MetricsTLSConfig.DeepCopyInto(&out.MetricsTLSConfig) return } diff --git a/internal/cainjector/feature/features.go b/internal/cainjector/feature/features.go index b773e150afe..34f4a7584ca 100644 --- a/internal/cainjector/feature/features.go +++ b/internal/cainjector/feature/features.go @@ -16,11 +16,12 @@ limitations under the License. // feature contains cainjector feature gate setup code. Do not import this // package into any code that's shared with other components to prevent -// overwriting other component's featue gates, see i.e +// overwriting other component's feature gates, see i.e // https://github.com/cert-manager/cert-manager/issues/6011 package feature import ( + utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/component-base/featuregate" utilfeature "github.com/cert-manager/cert-manager/pkg/util/feature" @@ -48,7 +49,7 @@ const ( ) func init() { - utilfeature.DefaultMutableFeatureGate.Add(cainjectorFeatureGates) + utilruntime.Must(utilfeature.DefaultMutableFeatureGate.Add(cainjectorFeatureGates)) } // cainjectorFeatureGates defines all feature gates for the cainjector component. diff --git a/internal/controller/certificates/apply.go b/internal/controller/certificates/apply.go index c545d7fbf76..ae20a3b325d 100644 --- a/internal/controller/certificates/apply.go +++ b/internal/controller/certificates/apply.go @@ -29,7 +29,7 @@ import ( cmclient "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned" ) -// Apply will make a Apply API call with the given client to the certificates +// Apply will make an Apply API call with the given client to the certificates // resource endpoint. All data in the given Certificate's status field is // dropped. // The given fieldManager is will be used as the FieldManager in the Apply diff --git a/internal/controller/certificates/policies/checks.go b/internal/controller/certificates/policies/checks.go index 921b4d8027d..c01eb50a665 100644 --- a/internal/controller/certificates/policies/checks.go +++ b/internal/controller/certificates/policies/checks.go @@ -18,8 +18,10 @@ package policies import ( "bytes" + "cmp" "crypto/x509" "fmt" + "slices" "strings" "time" @@ -87,10 +89,7 @@ func SecretPrivateKeyMismatchesSpec(input Input) (string, string, bool) { return InvalidKeyPair, fmt.Sprintf("Issuing certificate as Secret contains invalid private key data: %v", err), true } - violations, err := pki.PrivateKeyMatchesSpec(pk, input.Certificate.Spec) - if err != nil { - return SecretMismatch, fmt.Sprintf("Failed to check private key is up to date: %v", err), true - } + violations := pki.PrivateKeyMatchesSpec(pk, input.Certificate.Spec) if len(violations) > 0 { return SecretMismatch, fmt.Sprintf("Existing private key is not up to date for spec: %v", violations), true } @@ -240,14 +239,12 @@ func CurrentCertificateRequestMismatchesSpec(input Input) (string, string, bool) // and is instead called by currentCertificateRequestValidForSpec if no there // is no existing CertificateRequest resource. func currentSecretValidForSpec(input Input) (string, string, bool) { - violations, err := pki.SecretDataAltNamesMatchSpec(input.Secret, input.Certificate.Spec) + x509Cert, err := pki.DecodeX509CertificateBytes(input.Secret.Data[corev1.TLSCertKey]) if err != nil { - // This case should never be reached as we already check the certificate data can - // be parsed in an earlier policy check, but handle it anyway. - // TODO: log a message - return "", "", false + return InvalidCertificate, fmt.Sprintf("Issuing certificate as Secret contains an invalid certificate: %v", err), true } - + // nolint: staticcheck // FuzzyX509AltNamesMatchSpec is used here for backwards compatibility + violations := pki.FuzzyX509AltNamesMatchSpec(x509Cert, input.Certificate.Spec) if len(violations) > 0 { return SecretMismatch, fmt.Sprintf("Issuing certificate as Existing issued Secret is not up to date for spec: %v", violations), true } @@ -273,11 +270,11 @@ func CurrentCertificateNearingExpiry(c clock.Clock) Func { notBefore := metav1.NewTime(x509Cert.NotBefore) notAfter := metav1.NewTime(x509Cert.NotAfter) crt := input.Certificate - renewalTime := pki.RenewalTime(notBefore.Time, notAfter.Time, crt.Spec.RenewBefore) + renewalTime := pki.RenewalTime(notBefore.Time, notAfter.Time, crt.Spec.RenewBefore, crt.Spec.RenewBeforePercentage) renewIn := renewalTime.Time.Sub(c.Now()) if renewIn > 0 { - // renewal time is in future, no need to renew + // renewal time is in the future, no need to renew return "", "", false } @@ -337,25 +334,21 @@ func issuerGroupsEqual(l, r string) bool { // SecretSecretTemplateMismatch will inspect the given Secret's Annotations // and Labels, and compare these maps against those that appear on the given // Certificate's SecretTemplate. -// Returns false if all the Certificate's SecretTemplate Annotations and Labels -// appear on the Secret, or put another way, the Certificate's SecretTemplate -// is a subset of that in the Secret's Annotations/Labels. -// Returns true otherwise. +// NOTE: This function only compares the values of annotations and labels that +// exist both in the Certificate's SecretTemplate and the Secret. Missing and +// extra annotations or labels are detected by the SecretManagedLabelsAndAnnotationsManagedFieldsMismatch +// and SecretSecretTemplateManagedFieldsMismatch functions instead. func SecretSecretTemplateMismatch(input Input) (string, string, bool) { if input.Certificate.Spec.SecretTemplate == nil { return "", "", false } - for kSpec, vSpec := range input.Certificate.Spec.SecretTemplate.Annotations { - if v, ok := input.Secret.Annotations[kSpec]; !ok || v != vSpec { - return SecretTemplateMismatch, "Certificate's SecretTemplate Annotations missing or incorrect value on Secret", true - } + if match, _ := mapsHaveMatchingValues(input.Certificate.Spec.SecretTemplate.Annotations, input.Secret.Annotations); !match { + return SecretTemplateMismatch, "Certificate's SecretTemplate Annotations missing or incorrect value on Secret", true } - for kSpec, vSpec := range input.Certificate.Spec.SecretTemplate.Labels { - if v, ok := input.Secret.Labels[kSpec]; !ok || v != vSpec { - return SecretTemplateMismatch, "Certificate's SecretTemplate Labels missing or incorrect value on Secret", true - } + if match, _ := mapsHaveMatchingValues(input.Certificate.Spec.SecretTemplate.Labels, input.Secret.Labels); !match { + return SecretTemplateMismatch, "Certificate's SecretTemplate Labels missing or incorrect value on Secret", true } return "", "", false @@ -477,21 +470,21 @@ func SecretManagedLabelsAndAnnotationsManagedFieldsMismatch(fieldManager string) if !managedLabels.Equal(expLabels) { missingLabels := expLabels.Difference(managedLabels) if len(missingLabels) > 0 { - return SecretManagedMetadataMismatch, fmt.Sprintf("Secret is missing these Managed Labels: %v", missingLabels.UnsortedList()), true + return SecretManagedMetadataMismatch, fmt.Sprintf("Secret is missing these Managed Labels: %v", sets.List(missingLabels)), true } extraLabels := managedLabels.Difference(expLabels) - return SecretManagedMetadataMismatch, fmt.Sprintf("Secret has these extra Labels: %v", extraLabels.UnsortedList()), true + return SecretManagedMetadataMismatch, fmt.Sprintf("Secret has these extra Labels: %v", sets.List(extraLabels)), true } if !managedAnnotations.Equal(expAnnotations) { missingAnnotations := expAnnotations.Difference(managedAnnotations) if len(missingAnnotations) > 0 { - return SecretManagedMetadataMismatch, fmt.Sprintf("Secret is missing these Managed Annotations: %v", missingAnnotations.UnsortedList()), true + return SecretManagedMetadataMismatch, fmt.Sprintf("Secret is missing these Managed Annotations: %v", sets.List(missingAnnotations)), true } extraAnnotations := managedAnnotations.Difference(expAnnotations) - return SecretManagedMetadataMismatch, fmt.Sprintf("Secret has these extra Annotations: %v", extraAnnotations.UnsortedList()), true + return SecretManagedMetadataMismatch, fmt.Sprintf("Secret has these extra Annotations: %v", sets.List(extraAnnotations)), true } return "", "", false @@ -548,21 +541,21 @@ func SecretSecretTemplateManagedFieldsMismatch(fieldManager string) Func { if !managedLabels.Equal(expLabels) { missingLabels := expLabels.Difference(managedLabels) if len(missingLabels) > 0 { - return SecretTemplateMismatch, fmt.Sprintf("Secret is missing these Template Labels: %v", missingLabels.UnsortedList()), true + return SecretTemplateMismatch, fmt.Sprintf("Secret is missing these Template Labels: %v", sets.List(missingLabels)), true } extraLabels := managedLabels.Difference(expLabels) - return SecretTemplateMismatch, fmt.Sprintf("Secret has these extra Labels: %v", extraLabels.UnsortedList()), true + return SecretTemplateMismatch, fmt.Sprintf("Secret has these extra Labels: %v", sets.List(extraLabels)), true } if !managedAnnotations.Equal(expAnnotations) { missingAnnotations := expAnnotations.Difference(managedAnnotations) if len(missingAnnotations) > 0 { - return SecretTemplateMismatch, fmt.Sprintf("Secret is missing these Template Annotations: %v", missingAnnotations.UnsortedList()), true + return SecretTemplateMismatch, fmt.Sprintf("Secret is missing these Template Annotations: %v", sets.List(missingAnnotations)), true } extraAnnotations := managedAnnotations.Difference(expAnnotations) - return SecretTemplateMismatch, fmt.Sprintf("Secret has these extra Annotations: %v", extraAnnotations.UnsortedList()), true + return SecretTemplateMismatch, fmt.Sprintf("Secret has these extra Annotations: %v", sets.List(extraAnnotations)), true } return "", "", false @@ -585,23 +578,20 @@ func SecretBaseLabelsMismatch(input Input) (string, string, bool) { return SecretManagedMetadataMismatch, fmt.Sprintf("wrong base label %s value %q, expected \"true\"", cmapi.PartOfCertManagerControllerLabelKey, value), true } -// SecretCertificateDetailsAnnotationsMismatch - When the certificate details annotations are -// not matching, the secret is updated. -// NOTE: The presence of the certificate details annotations is checked -// by the SecretManagedLabelsAndAnnotationsManagedFieldsMismatch function. +// SecretCertificateDetailsAnnotationsMismatch returns a validation violation when +// annotations on the Secret do not match the details of the x509 certificate that +// is stored in the Secret. This function will only compare the annotations that +// already exist on the Secret and are also present in the certificate metadata. +// NOTE: Missing and extra annotations are detected by the SecretManagedLabelsAndAnnotationsManagedFieldsMismatch +// function instead. func SecretCertificateDetailsAnnotationsMismatch(input Input) (string, string, bool) { dataAnnotations, err := certificateDataAnnotationsForSecret(input.Secret) if err != nil { return InvalidCertificate, fmt.Sprintf("Failed getting secret annotations: %v", err), true } - for k, v := range dataAnnotations { - existing, ok := input.Secret.Annotations[k] - if !ok || existing == v { - continue - } - - return SecretManagedMetadataMismatch, fmt.Sprintf("Secret metadata %s does not match certificate metadata %s", input.Secret.Annotations[k], v), true + if match, key := mapsHaveMatchingValues(dataAnnotations, input.Secret.Annotations); !match { + return SecretTemplateMismatch, fmt.Sprintf("Secret metadata %s does not match certificate metadata %s", input.Secret.Annotations[key], dataAnnotations[key]), true } return "", "", false @@ -780,3 +770,28 @@ func SecretOwnerReferenceMismatch(ownerRefEnabled bool) Func { return "", "", false } } + +// mapsHaveMatchingValues returns true if the two maps have the same values for +// all common keys. Otherwise, the first key for which the values differ is returned. +// This function is stable and will always return the same key if the maps are +// the same. +func mapsHaveMatchingValues[Key cmp.Ordered, Value comparable](a, b map[Key]Value) (bool, Key) { + keys := make([]Key, 0, len(a)) + for k := range a { + if _, ok := b[k]; !ok { + continue + } + + keys = append(keys, k) + } + slices.Sort(keys) + + for _, k := range keys { + if b[k] != a[k] { + return false, k + } + } + + var zero Key + return true, zero +} diff --git a/internal/controller/certificates/policies/checks_test.go b/internal/controller/certificates/policies/checks_test.go index 0244c5e8941..d083e30ba0e 100644 --- a/internal/controller/certificates/policies/checks_test.go +++ b/internal/controller/certificates/policies/checks_test.go @@ -662,13 +662,14 @@ func Test_SecretManagedLabelsAndAnnotationsManagedFieldsMismatch(t *testing.T) { "f:cert-manager.io/issuer-name": {}, "f:cert-manager.io/issuer-kind": {}, "f:cert-manager.io/issuer-group": {}, - "f:cert-manager.io/uri-sans": {} + "f:cert-manager.io/uri-sans": {}, + "f:cert-manager.io/ip-sans": {} } }}`), }}, }, expReason: SecretManagedMetadataMismatch, - expMessage: "Secret has these extra Annotations: [cert-manager.io/uri-sans]", + expMessage: "Secret has these extra Annotations: [cert-manager.io/ip-sans cert-manager.io/uri-sans]", expViolation: true, }, } @@ -725,7 +726,7 @@ func Test_SecretSecretTemplateMismatch(t *testing.T) { expReason: "", expMessage: "", }, - "if SecretTemplate is non-nil, Secret Annotations match but Labels are nil, return true": { + "if SecretTemplate is non-nil, Secret Annotations match and there are no common Labels, return false": { tmpl: &cmapi.CertificateSecretTemplate{ Annotations: map[string]string{"foo1": "bar1", "foo2": "bar2"}, Labels: map[string]string{"abc": "123", "def": "456"}, @@ -734,11 +735,11 @@ func Test_SecretSecretTemplateMismatch(t *testing.T) { Annotations: map[string]string{"foo1": "bar1", "foo2": "bar2"}, Labels: nil, }}, - expViolation: true, - expReason: SecretTemplateMismatch, - expMessage: "Certificate's SecretTemplate Labels missing or incorrect value on Secret", + expViolation: false, + expReason: "", + expMessage: "", }, - "if SecretTemplate is non-nil, Secret Labels match but Annotations are nil, return true": { + "if SecretTemplate is non-nil, Secret Labels match and there are no common Annotations, return false": { tmpl: &cmapi.CertificateSecretTemplate{ Annotations: map[string]string{"foo1": "bar1", "foo2": "bar2"}, Labels: map[string]string{"abc": "123", "def": "456"}, @@ -747,35 +748,9 @@ func Test_SecretSecretTemplateMismatch(t *testing.T) { Annotations: nil, Labels: map[string]string{"abc": "123", "def": "456"}, }}, - expViolation: true, - expReason: SecretTemplateMismatch, - expMessage: "Certificate's SecretTemplate Annotations missing or incorrect value on Secret", - }, - "if SecretTemplate is non-nil, Secret Labels match but Annotations don't match keys, return true": { - tmpl: &cmapi.CertificateSecretTemplate{ - Annotations: map[string]string{"foo1": "bar1", "foo2": "bar2"}, - Labels: map[string]string{"abc": "123", "def": "456"}, - }, - secret: &corev1.Secret{ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{"foo2": "bar1", "foo1": "bar2"}, - Labels: map[string]string{"abc": "123", "def": "456"}, - }}, - expViolation: true, - expReason: SecretTemplateMismatch, - expMessage: "Certificate's SecretTemplate Annotations missing or incorrect value on Secret", - }, - "if SecretTemplate is non-nil, Secret Annotations match but Labels don't match keys, return true": { - tmpl: &cmapi.CertificateSecretTemplate{ - Annotations: map[string]string{"foo1": "bar1", "foo2": "bar2"}, - Labels: map[string]string{"abc": "123", "def": "456"}, - }, - secret: &corev1.Secret{ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{"foo1": "bar1", "foo2": "bar2"}, - Labels: map[string]string{"def": "123", "abc": "456"}, - }}, - expViolation: true, - expReason: SecretTemplateMismatch, - expMessage: "Certificate's SecretTemplate Labels missing or incorrect value on Secret", + expViolation: false, + expReason: "", + expMessage: "", }, "if SecretTemplate is non-nil, Secret Labels match but Annotations don't match values, return true": { tmpl: &cmapi.CertificateSecretTemplate{ @@ -905,7 +880,7 @@ func Test_SecretSecretTemplateManagedFieldsMismatch(t *testing.T) { }, "if template annotations do not match managed fields, should return true": { tmpl: &cmapi.CertificateSecretTemplate{ - Annotations: map[string]string{"foo1": "bar1", "foo2": "bar2"}, + Annotations: map[string]string{"foo1": "bar1", "foo2": "bar2", "foo4": "bar4"}, Labels: map[string]string{"abc": "123", "def": "456"}, }, secretManagedFields: []metav1.ManagedFieldsEntry{{ @@ -923,13 +898,13 @@ func Test_SecretSecretTemplateManagedFieldsMismatch(t *testing.T) { }}, }, expReason: SecretTemplateMismatch, - expMessage: "Secret is missing these Template Annotations: [foo2]", + expMessage: "Secret is missing these Template Annotations: [foo2 foo4]", expViolation: true, }, "if template labels do not match managed fields, should return true": { tmpl: &cmapi.CertificateSecretTemplate{ Annotations: map[string]string{"foo1": "bar1", "foo2": "bar2"}, - Labels: map[string]string{"abc": "123", "def": "456"}, + Labels: map[string]string{"abc": "123", "def": "456", "ghi": "789"}, }, secretManagedFields: []metav1.ManagedFieldsEntry{{ Manager: fieldManager, FieldsV1: &metav1.FieldsV1{ @@ -946,7 +921,7 @@ func Test_SecretSecretTemplateManagedFieldsMismatch(t *testing.T) { }}, }, expReason: SecretTemplateMismatch, - expMessage: "Secret is missing these Template Labels: [def]", + expMessage: "Secret is missing these Template Labels: [def ghi]", expViolation: true, }, "if template annotations and labels match managed fields, should return false": { @@ -983,7 +958,8 @@ func Test_SecretSecretTemplateManagedFieldsMismatch(t *testing.T) { "f:annotations": { "f:foo1": {}, "f:foo2": {}, - "f:foo3": {} + "f:foo3": {}, + "f:foo4": {} }, "f:labels": { "f:abc": {}, @@ -993,7 +969,7 @@ func Test_SecretSecretTemplateManagedFieldsMismatch(t *testing.T) { }}, }, expReason: SecretTemplateMismatch, - expMessage: "Secret has these extra Annotations: [foo3]", + expMessage: "Secret has these extra Annotations: [foo3 foo4]", expViolation: true, }, "if template labels is a subset of managed fields, return true": { @@ -1011,13 +987,14 @@ func Test_SecretSecretTemplateManagedFieldsMismatch(t *testing.T) { "f:labels": { "f:abc": {}, "f:def": {}, - "f:ghi": {} + "f:ghi": {}, + "f:jkl": {} } }}`), }}, }, expReason: SecretTemplateMismatch, - expMessage: "Secret has these extra Labels: [ghi]", + expMessage: "Secret has these extra Labels: [ghi jkl]", expViolation: true, }, "if managed fields annotations is a subset of template, return true": { diff --git a/internal/controller/certificates/policies/constants.go b/internal/controller/certificates/policies/constants.go index 47dfb0fdb64..8bbffba507b 100644 --- a/internal/controller/certificates/policies/constants.go +++ b/internal/controller/certificates/policies/constants.go @@ -48,7 +48,7 @@ const ( // CertificateRequest not valid for Certificate's spec. RequestChanged string = "RequestChanged" // Renewing is a policy violation reason for a scenario where - // Certificate's renewal time is now or in past. + // Certificate's renewal time is now or in the past. Renewing string = "Renewing" // Expired is a policy violation reason for a scenario where Certificate has // expired. diff --git a/internal/controller/certificates/policies/gatherer_test.go b/internal/controller/certificates/policies/gatherer_test.go index 021db02f06e..93f08cf9630 100644 --- a/internal/controller/certificates/policies/gatherer_test.go +++ b/internal/controller/certificates/policies/gatherer_test.go @@ -163,8 +163,12 @@ func TestDataForCertificate(t *testing.T) { // tests, we "force" the creation of the indexer for the CR // type by registering a fake handler. noop := cache.ResourceEventHandlerFuncs{AddFunc: func(obj interface{}) {}} - test.builder.SharedInformerFactory.Certmanager().V1().CertificateRequests().Informer().AddEventHandler(noop) - test.builder.KubeSharedInformerFactory.Secrets().Informer().AddEventHandler(noop) + if _, err := test.builder.SharedInformerFactory.Certmanager().V1().CertificateRequests().Informer().AddEventHandler(noop); err != nil { + t.Fatalf("failed to add event handler to CertificateRequest informer: %v", err) + } + if _, err := test.builder.KubeSharedInformerFactory.Secrets().Informer().AddEventHandler(noop); err != nil { + t.Fatalf("failed to add event handler to Secret informer: %v", err) + } // Even though we are only relying on listers in this unit test // and do not use the informer event handlers, we still need to diff --git a/internal/controller/certificates/policies/policies.go b/internal/controller/certificates/policies/policies.go index 217ca095c85..f523d28da78 100644 --- a/internal/controller/certificates/policies/policies.go +++ b/internal/controller/certificates/policies/policies.go @@ -63,7 +63,7 @@ func (c Chain) Evaluate(input Input) (string, string, bool) { return "", "", false } -// NewTriggerPolicyChain includes trigger policy checks, which if return true, +// NewTriggerPolicyChain includes trigger policy checks, which if returns true, // should cause a Certificate to be marked for issuance. func NewTriggerPolicyChain(c clock.Clock) Chain { return Chain{ @@ -81,7 +81,7 @@ func NewTriggerPolicyChain(c clock.Clock) Chain { } } -// NewReadinessPolicyChain includes readiness policy checks, which if return +// NewReadinessPolicyChain includes readiness policy checks, which if returns // true, would cause a Certificate to be marked as not ready. func NewReadinessPolicyChain(c clock.Clock) Chain { return Chain{ @@ -106,9 +106,9 @@ func NewSecretPostIssuancePolicyChain(ownerRefEnabled bool, fieldManager string) return Chain{ SecretBaseLabelsMismatch, // Make sure the managed labels have the correct values SecretCertificateDetailsAnnotationsMismatch, // Make sure the managed certificate details annotations have the correct values - SecretManagedLabelsAndAnnotationsManagedFieldsMismatch(fieldManager), // Make sure the only the expected managed labels and annotations exist + SecretManagedLabelsAndAnnotationsManagedFieldsMismatch(fieldManager), // Make sure only the expected managed labels and annotations exist SecretSecretTemplateMismatch, // Make sure the template label and annotation values match the secret - SecretSecretTemplateManagedFieldsMismatch(fieldManager), // Make sure the only the expected template labels and annotations exist + SecretSecretTemplateManagedFieldsMismatch(fieldManager), // Make sure only the expected template labels and annotations exist SecretAdditionalOutputFormatsMismatch, SecretAdditionalOutputFormatsManagedFieldsMismatch(fieldManager), SecretOwnerReferenceMismatch(ownerRefEnabled), diff --git a/internal/controller/challenges/apply.go b/internal/controller/challenges/apply.go index 98e4f77f860..8eed7ba536f 100644 --- a/internal/controller/challenges/apply.go +++ b/internal/controller/challenges/apply.go @@ -29,7 +29,7 @@ import ( cmclient "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned" ) -// Apply will make a Apply API call with the given client to the challenges +// Apply will make an Apply API call with the given client to the challenges // endpoint. All data in the given Challenges object is dropped; expect for the // name, namespace, and spec object. The given fieldManager is will be used as // the FieldManager in the Apply call. Always sets Force Apply to true. @@ -45,7 +45,7 @@ func Apply(ctx context.Context, cl cmclient.Interface, fieldManager string, chal ) } -// ApplyStatus will make a Apply API call with the given client to the +// ApplyStatus will make an Apply API call with the given client to the // challenges status sub-resource endpoint. All data in the given Challenges // object is dropped; expect for the name, namespace, and status object. The // given fieldManager is will be used as the FieldManager in the Apply call. diff --git a/internal/controller/feature/features.go b/internal/controller/feature/features.go index a638faafd08..62850b81175 100644 --- a/internal/controller/feature/features.go +++ b/internal/controller/feature/features.go @@ -16,7 +16,7 @@ limitations under the License. // feature contains controller's feature gate setup functionality. Do not import // this package into any code that's shared with other components to prevent -// overwriting other component's featue gates, see i.e +// overwriting other component's feature gates, see i.e // https://github.com/cert-manager/cert-manager/issues/6011 package feature @@ -137,6 +137,14 @@ const ( // Certificate resources. // Github Issue: https://github.com/cert-manager/cert-manager/issues/6393 OtherNames featuregate.Feature = "OtherNames" + + // Owner: @jsoref + // Alpha: v1.16 + // + // UseDomainQualifiedFinalizer changes the finalizer added to cert-manager created + // resources to acme.cert-manager.io/finalizer instead of finalizer.acme.cert-manager.io. + // GitHub Issue: https://github.com/cert-manager/cert-manager/issues/7266 + UseDomainQualifiedFinalizer featuregate.Feature = "UseDomainQualifiedFinalizer" ) func init() { @@ -160,4 +168,5 @@ var defaultCertManagerFeatureGates = map[featuregate.Feature]featuregate.Feature UseCertificateRequestBasicConstraints: {Default: false, PreRelease: featuregate.Alpha}, NameConstraints: {Default: false, PreRelease: featuregate.Alpha}, OtherNames: {Default: false, PreRelease: featuregate.Alpha}, + UseDomainQualifiedFinalizer: {Default: false, PreRelease: featuregate.Alpha}, } diff --git a/internal/controller/orders/apply.go b/internal/controller/orders/apply.go index dbb0332cc64..bbeab1ede33 100644 --- a/internal/controller/orders/apply.go +++ b/internal/controller/orders/apply.go @@ -29,7 +29,7 @@ import ( cmclient "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned" ) -// ApplyStatus will make a Apply API call with the given client to the order's +// ApplyStatus will make an Apply API call with the given client to the order's // status sub-resource endpoint. All data in the given Order object is dropped; // expect for the name, namespace, and status object. The given fieldManager is // will be used as the FieldManager in the Apply call. diff --git a/internal/informers/core.go b/internal/informers/core.go index 09a14f8e05b..2cca175a79e 100644 --- a/internal/informers/core.go +++ b/internal/informers/core.go @@ -27,7 +27,7 @@ import ( // This file contains common informers functionality such as shared interfaces // The interfaces defined here are mostly a subset of similar interfaces upstream. // Defining our own instead of reusing the upstream ones allows us to: -// - create smaller interfaces that don't have methods that our control loops don't need (thus avoiding to define unnecessary methods in implementations) +// - create smaller interfaces that don't have methods that our control loops don't need (thus avoid defining unnecessary methods in implementations) // - swap embedded upstream interfaces for our own ones var secretsGVR = corev1.SchemeGroupVersion.WithResource("secrets") @@ -67,7 +67,7 @@ type SecretLister interface { // Informer is a subset of client-go SharedIndexInformer https://github.com/kubernetes/client-go/blob/release-1.26/tools/cache/shared_informer.go#L35-L211 type Informer interface { - // AddEventHadler allows reconcile loop to register an event handler so + // AddEventHandler allows the reconcile loop to register an event handler so // it gets triggered when the informer has a new event AddEventHandler(handler cache.ResourceEventHandler) (cache.ResourceEventHandlerRegistration, error) // HasSynced returns true if the informer's cache has synced (at least diff --git a/internal/informers/core_filteredsecrets.go b/internal/informers/core_filteredsecrets.go index aef98b4a5a1..273a76f1ecb 100644 --- a/internal/informers/core_filteredsecrets.go +++ b/internal/informers/core_filteredsecrets.go @@ -104,7 +104,7 @@ func (bf *filteredSecretsFactory) WaitForCacheSync(stopCh <-chan struct{}) map[s partialMetaCaches := bf.metadataInformerFactory.WaitForCacheSync(stopCh) // We have to cast the keys into string type. It is not possible to // create a generic type here as neither of the types returned by - // WaitForCacheSync are valid map key arguments in generics- they aren't + // WaitForCacheSync are valid map key arguments in generics - they aren't // comparable types. for key, val := range typedCaches { caches[key.String()] = val @@ -159,7 +159,7 @@ func (f *filteredSecretInformer) Informer() Informer { metadataInformer := f.metadataInformerFactory.ForResource(secretsGVR).Informer() if err := metadataInformer.SetTransform(partialMetadataRemoveAll); err != nil { - panic(fmt.Sprintf("internal error: error setting transfomer on the metadata informer: %v", err)) + panic(fmt.Sprintf("internal error: error setting transformer on the metadata informer: %v", err)) } return &informer{ typedInformer: typedInformer, @@ -307,7 +307,7 @@ func (snl *secretNamespaceLister) List(selector labels.Selector) ([]*corev1.Secr // here in case we do it sometime in the future at which point // we can see whether the metadata functionality is performant // enough. - log.V(logf.InfoLevel).Info("unexpected behaviour: secrets LISTed from metadata cache. Please open an isue") + log.V(logf.InfoLevel).Info("unexpected behaviour: secrets LISTed from metadata cache. Please open an issue") } // In practice this section will never be used. The only place // where we LIST Secrets is in keymanager controller where we list diff --git a/internal/informers/fakes.go b/internal/informers/fakes.go index b9772a6283e..924aac79621 100644 --- a/internal/informers/fakes.go +++ b/internal/informers/fakes.go @@ -130,7 +130,7 @@ func (fsi FakeSecretInterface) Delete(ctx context.Context, name string, opts met panic("not implemented") } func (fsi FakeSecretInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - panic("not implemeted") + panic("not implemented") } func (fsi FakeSecretInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { panic("not implemented") diff --git a/internal/informers/transfomers.go b/internal/informers/transformers.go similarity index 100% rename from internal/informers/transfomers.go rename to internal/informers/transformers.go diff --git a/internal/vault/fake/client.go b/internal/vault/fake/client.go index 4a8d3827760..36f169a58d3 100644 --- a/internal/vault/fake/client.go +++ b/internal/vault/fake/client.go @@ -39,6 +39,10 @@ func NewFakeClient() *FakeClient { } } +func (c *FakeClient) CloneConfig() *vault.Config { + return vault.DefaultConfig() +} + func (c *FakeClient) WithNewRequest(r *vault.Request) *FakeClient { c.NewRequestS = r return c diff --git a/internal/vault/vault.go b/internal/vault/vault.go index 479023800ca..4b0080a75ee 100644 --- a/internal/vault/vault.go +++ b/internal/vault/vault.go @@ -61,6 +61,7 @@ type Client interface { NewRequest(method, requestPath string) *vault.Request RawRequest(r *vault.Request) (*vault.Response, error) SetToken(v string) + CloneConfig() *vault.Config } // For mocking purposes. @@ -187,7 +188,7 @@ func (v *Vault) setToken(ctx context.Context, client Client) error { // the time of validation, we must still allow multiple authentication methods // to be specified. // In terms of implementation, we will use the first authentication method. - // The order of precedence is: tokenSecretRef, appRole, kubernetes + // The order of precedence is: tokenSecretRef, appRole, clientCertificate, kubernetes tokenRef := v.issuer.GetSpec().Vault.Auth.TokenSecretRef if tokenRef != nil { @@ -211,6 +212,17 @@ func (v *Vault) setToken(ctx context.Context, client Client) error { return nil } + clientCert := v.issuer.GetSpec().Vault.Auth.ClientCertificate + if clientCert != nil { + token, err := v.requestTokenWithClientCertificate(client, clientCert) + if err != nil { + return err + } + client.SetToken(token) + + return nil + } + kubernetesAuth := v.issuer.GetSpec().Vault.Auth.Kubernetes if kubernetesAuth != nil { token, err := v.requestTokenWithKubernetesAuth(ctx, client, kubernetesAuth) @@ -221,7 +233,7 @@ func (v *Vault) setToken(ctx context.Context, client Client) error { return nil } - return cmerrors.NewInvalidData("error initializing Vault client: tokenSecretRef, appRoleSecretRef, or Kubernetes auth role not set") + return cmerrors.NewInvalidData("error initializing Vault client: tokenSecretRef, appRoleSecretRef, clientCertificate, or Kubernetes auth role not set") } func (v *Vault) newConfig() (*vault.Config, error) { @@ -430,6 +442,79 @@ func (v *Vault) requestTokenWithAppRoleRef(client Client, appRole *v1.VaultAppRo return token, nil } +func (v *Vault) requestTokenWithClientCertificate(client Client, clientCertificateAuth *v1.VaultClientCertificateAuth) (string, error) { + // If secretName is set, load client certificate from Secret, otherwise assume that a + // fitting client certificate is loaded in the client already. + if len(clientCertificateAuth.SecretName) != 0 { + secret, err := v.secretsLister.Secrets(v.namespace).Get(clientCertificateAuth.SecretName) + if err != nil { + return "", err + } + + cert, ok := secret.Data["tls.crt"] + if !ok { + return "", fmt.Errorf("no data for tls.crt in secret '%s/%s'", v.namespace, clientCertificateAuth.SecretName) + } + key, ok := secret.Data["tls.key"] + if !ok { + return "", fmt.Errorf("no data for tls.key in secret '%s/%s'", v.namespace, clientCertificateAuth.SecretName) + } + + clientCertificate, err := tls.X509KeyPair(cert, key) + if err != nil { + return "", fmt.Errorf("error reading client certificate: %s", err.Error()) + } + + // Setting up a short lived client with a configured client certificate. + // It is only meant to be used for requesting a Vault token. We clone + // http.Client's Transport separately as it has to be adjusted and does + // not seem to be cloned by CloneConfig. + cfg := client.CloneConfig() + tmpTransport := cfg.HttpClient.Transport.(*http.Transport).Clone() + tmpTransport.TLSClientConfig.Certificates = append(tmpTransport.TLSClientConfig.Certificates, clientCertificate) + cfg.HttpClient.Transport = tmpTransport + client, err = vault.NewClient(cfg) + if err != nil { + return "", fmt.Errorf("error initializing intermediary Vault client: %s", err.Error()) + } + } + + parameters := map[string]string{ + "name": clientCertificateAuth.Name, + } + + mountPath := clientCertificateAuth.Path + if mountPath == "" { + mountPath = v1.DefaultVaultClientCertificateAuthMountPath + } + + url := filepath.Join(mountPath, "login") + request := client.NewRequest("POST", url) + err := request.SetJSONBody(parameters) + if err != nil { + return "", fmt.Errorf("error encoding Vault parameters: %s", err.Error()) + } + + resp, err := client.RawRequest(request) + if err != nil { + return "", fmt.Errorf("error calling Vault server: %s", err.Error()) + } + + defer resp.Body.Close() + vaultResult := vault.Secret{} + err = resp.DecodeJSON(&vaultResult) + if err != nil { + return "", fmt.Errorf("unable to decode JSON payload: %s", err.Error()) + } + + token, err := vaultResult.TokenID() + if err != nil { + return "", fmt.Errorf("unable to read token: %s", err.Error()) + } + + return token, nil +} + func (v *Vault) requestTokenWithKubernetesAuth(ctx context.Context, client Client, kubernetesAuth *v1.VaultKubernetesAuth) (string, error) { var jwt string switch { @@ -474,7 +559,7 @@ func (v *Vault) requestTokenWithKubernetesAuth(ctx context.Context, client Clien // Vault backend can bind the kubernetes auth backend role to the service account and specific namespace of the service account. // Providing additional audiences is not considered a major non-mitigatable security risk // as if someone creates an Issuer in another namespace/globally with the same audiences - // in attempt to highjack the certificate vault (if role config mandates sa:namespace) won't authorise the connection + // in attempt to hijack the certificate vault (if role config mandates sa:namespace) won't authorise the connection // as token subject won't match vault role requirement to have SA originated from the specific namespace. Audiences: audiences, diff --git a/internal/vault/vault_test.go b/internal/vault/vault_test.go index 03838e0a08a..abda61d5e00 100644 --- a/internal/vault/vault_test.go +++ b/internal/vault/vault_test.go @@ -446,7 +446,7 @@ func TestSetToken(t *testing.T) { fakeClient *vaultfake.FakeClient }{ - "if neither token secret ref, app role secret ref, or kube auth then not found then error": { + "if neither token secret ref, app role secret ref, clientCertificate auth or kube auth not found then error": { issuer: gen.Issuer("vault-issuer", gen.SetIssuerVault(cmapi.VaultIssuer{ CABundle: []byte(testLeafCertificate), @@ -456,7 +456,7 @@ func TestSetToken(t *testing.T) { fakeLister: listers.FakeSecretListerFrom(listers.NewFakeSecretLister()), expectedToken: "", expectedErr: errors.New( - "error initializing Vault client: tokenSecretRef, appRoleSecretRef, or Kubernetes auth role not set", + "error initializing Vault client: tokenSecretRef, appRoleSecretRef, clientCertificate, or Kubernetes auth role not set", ), }, @@ -558,6 +558,92 @@ func TestSetToken(t *testing.T) { expectedErr: nil, }, + "if clientCertificate auth is set but referenced secret doesn't exist return error": { + issuer: gen.Issuer("vault-issuer", + gen.SetIssuerVault(cmapi.VaultIssuer{ + CABundle: []byte(testLeafCertificate), + Auth: cmapi.VaultAuth{ + ClientCertificate: &cmapi.VaultClientCertificateAuth{ + SecretName: "secret-ref-name", + }, + }, + }), + ), + fakeLister: listers.FakeSecretListerFrom(listers.NewFakeSecretLister(), + listers.SetFakeSecretNamespaceListerGet(nil, errors.New("secret does not exist")), + ), + fakeClient: vaultfake.NewFakeClient(), + expectedToken: "", + expectedErr: errors.New("secret does not exist"), + }, + + "if clientCertificate auth set but referenced secret doesn't contain tls.crt return error": { + issuer: gen.Issuer("vault-issuer", + gen.SetIssuerVault(cmapi.VaultIssuer{ + CABundle: []byte(testLeafCertificate), + Auth: cmapi.VaultAuth{ + ClientCertificate: &cmapi.VaultClientCertificateAuth{ + SecretName: "secret-ref-name", + }, + }, + }), + ), + fakeLister: listers.FakeSecretListerFrom(listers.NewFakeSecretLister(), + listers.SetFakeSecretNamespaceListerGet(&corev1.Secret{ + Data: map[string][]byte{ + "tls.key": []byte(testLeafCertificate), + }, + }, nil), + ), + fakeClient: vaultfake.NewFakeClient(), + expectedToken: "", + expectedErr: errors.New("no data for tls.crt in secret 'test-namespace/secret-ref-name'"), + }, + + "if clientCertificate auth set but referenced secret doesn't contain tls.key return error": { + issuer: gen.Issuer("vault-issuer", + gen.SetIssuerVault(cmapi.VaultIssuer{ + CABundle: []byte(testLeafCertificate), + Auth: cmapi.VaultAuth{ + ClientCertificate: &cmapi.VaultClientCertificateAuth{ + SecretName: "secret-ref-name", + }, + }, + }), + ), + fakeLister: listers.FakeSecretListerFrom(listers.NewFakeSecretLister(), + listers.SetFakeSecretNamespaceListerGet(&corev1.Secret{ + Data: map[string][]byte{ + "tls.crt": []byte(testLeafCertificate), + }, + }, nil), + ), + fakeClient: vaultfake.NewFakeClient(), + expectedToken: "", + expectedErr: errors.New("no data for tls.key in secret 'test-namespace/secret-ref-name'"), + }, + + "if clientCertificate auth set but there is no secret referenced, do not return error": { + issuer: gen.Issuer("vault-issuer", + gen.SetIssuerVault(cmapi.VaultIssuer{ + CABundle: []byte(testLeafCertificate), + Auth: cmapi.VaultAuth{ + ClientCertificate: &cmapi.VaultClientCertificateAuth{}, + }, + }), + ), + fakeClient: vaultfake.NewFakeClient().WithRawRequest(&vault.Response{ + Response: &http.Response{ + Body: io.NopCloser( + strings.NewReader( + `{"request_id":"","lease_id":"","lease_duration":0,"renewable":false,"data":null,"warnings":null,"data":{"id":"my-token"}}`), + ), + }, + }, nil), + expectedToken: "my-token", + expectedErr: nil, + }, + "if kubernetes role auth set but reference secret doesn't exist return error": { issuer: gen.Issuer("vault-issuer", gen.SetIssuerVault(cmapi.VaultIssuer{ @@ -719,7 +805,7 @@ func TestSetToken(t *testing.T) { } }, fakeClient: vaultfake.NewFakeClient().WithRawRequestFn(func(t *testing.T, req *vault.Request) (*vault.Response, error) { - // Vault exhanges the Kubernetes token with a Vault token. + // Vault exchanges the Kubernetes token with a Vault token. assert.Equal(t, "kube-sa-token", req.Obj.(map[string]string)["jwt"]) assert.Equal(t, "kube-vault-role", req.Obj.(map[string]string)["role"]) return &vault.Response{Response: &http.Response{Body: io.NopCloser(strings.NewReader( @@ -756,7 +842,7 @@ func TestSetToken(t *testing.T) { } }, fakeClient: vaultfake.NewFakeClient().WithRawRequestFn(func(t *testing.T, req *vault.Request) (*vault.Response, error) { - // Vault exhanges the Kubernetes token with a Vault token. + // Vault exchanges the Kubernetes token with a Vault token. assert.Equal(t, "kube-sa-token", req.Obj.(map[string]string)["jwt"]) assert.Equal(t, "kube-vault-role", req.Obj.(map[string]string)["role"]) return &vault.Response{Response: &http.Response{Body: io.NopCloser(strings.NewReader( @@ -798,7 +884,7 @@ func TestSetToken(t *testing.T) { } }, fakeClient: vaultfake.NewFakeClient().WithRawRequestFn(func(t *testing.T, req *vault.Request) (*vault.Response, error) { - // Vault exhanges the Kubernetes token with a Vault token. + // Vault exchanges the Kubernetes token with a Vault token. assert.Equal(t, "kube-sa-token", req.Obj.(map[string]string)["jwt"]) assert.Equal(t, "kube-vault-role", req.Obj.(map[string]string)["role"]) return &vault.Response{Response: &http.Response{Body: io.NopCloser(strings.NewReader( @@ -840,7 +926,7 @@ func TestSetToken(t *testing.T) { } }, fakeClient: vaultfake.NewFakeClient().WithRawRequestFn(func(t *testing.T, req *vault.Request) (*vault.Response, error) { - // Vault exhanges the Kubernetes token with a Vault token. + // Vault exchanges the Kubernetes token with a Vault token. assert.Equal(t, "kube-sa-token", req.Obj.(map[string]string)["jwt"]) assert.Equal(t, "kube-vault-role", req.Obj.(map[string]string)["role"]) return &vault.Response{Response: &http.Response{Body: io.NopCloser(strings.NewReader( @@ -1508,7 +1594,6 @@ func TestNewWithVaultNamespaces(t *testing.T) { } for _, tc := range tests { - tc := tc t.Run(tc.name, func(t *testing.T) { c, err := New( context.TODO(), @@ -1546,7 +1631,7 @@ func TestNewWithVaultNamespaces(t *testing.T) { }) require.NoError(t, err) assert.Equal(t, tc.vaultNS, c.(*Vault).client.(*vault.Client).Namespace(), - "The vault client should have the namespace provided in the Issuer recource") + "The vault client should have the namespace provided in the Issuer resource") assert.Equal(t, "", c.(*Vault).clientSys.(*vault.Client).Namespace(), "The vault sys client should never have a namespace") }) diff --git a/internal/webhook/feature/features.go b/internal/webhook/feature/features.go index b63483b1d40..c475635d844 100644 --- a/internal/webhook/feature/features.go +++ b/internal/webhook/feature/features.go @@ -16,11 +16,12 @@ limitations under the License. // feature contains webhook's feature gate setup functionality. Do not import // this package into any code that's shared with other components to prevent -// overwriting other component's featue gates, see i.e +// overwriting other component's feature gates, see i.e // https://github.com/cert-manager/cert-manager/issues/6011 package feature import ( + utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/component-base/featuregate" utilfeature "github.com/cert-manager/cert-manager/pkg/util/feature" @@ -82,7 +83,7 @@ const ( ) func init() { - utilfeature.DefaultMutableFeatureGate.Add(webhookFeatureGates) + utilruntime.Must(utilfeature.DefaultMutableFeatureGate.Add(webhookFeatureGates)) } // webhookFeatureGates defines all feature gates for the webhook component. diff --git a/internal/webhook/webhook.go b/internal/webhook/webhook.go index f1d8abc8c15..e598eff3383 100644 --- a/internal/webhook/webhook.go +++ b/internal/webhook/webhook.go @@ -27,6 +27,7 @@ import ( "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" + "k8s.io/utils/ptr" crlog "sigs.k8s.io/controller-runtime/pkg/log" acmeinstall "github.com/cert-manager/cert-manager/internal/apis/acme/install" @@ -71,16 +72,20 @@ func NewCertManagerWebhookServer(log logr.Logger, opts config.WebhookConfigurati metainstall.Install(scheme) s := &server.Server{ - ResourceScheme: scheme, - ListenAddr: opts.SecurePort, - HealthzAddr: &opts.HealthzPort, - EnablePprof: opts.EnablePprof, - PprofAddress: opts.PprofAddress, - CertificateSource: buildCertificateSource(log, opts.TLSConfig, restcfg), - CipherSuites: opts.TLSConfig.CipherSuites, - MinTLSVersion: opts.TLSConfig.MinTLSVersion, - ValidationWebhook: admissionHandler, - MutationWebhook: admissionHandler, + ResourceScheme: scheme, + ListenAddr: int(opts.SecurePort), + HealthzAddr: ptr.To(int(opts.HealthzPort)), + EnablePprof: opts.EnablePprof, + PprofAddress: opts.PprofAddress, + CertificateSource: buildCertificateSource(log, opts.TLSConfig, restcfg), + CipherSuites: opts.TLSConfig.CipherSuites, + MinTLSVersion: opts.TLSConfig.MinTLSVersion, + ValidationWebhook: admissionHandler, + MutationWebhook: admissionHandler, + MetricsListenAddress: opts.MetricsListenAddress, + MetricsCertificateSource: buildCertificateSource(log, opts.MetricsTLSConfig, restcfg), + MetricsCipherSuites: opts.MetricsTLSConfig.CipherSuites, + MetricsMinTLSVersion: opts.MetricsTLSConfig.MinTLSVersion, } for _, fn := range optionFunctions { fn(s) diff --git a/klone.yaml b/klone.yaml index 1c4f7184395..6772a84d4ec 100644 --- a/klone.yaml +++ b/klone.yaml @@ -10,35 +10,35 @@ targets: - folder_name: boilerplate repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 7200a66ad8f9488094e3ca72b06b9c0768323286 + repo_hash: 90946d6b57c870ff3d100fc2d7546ee9f453c348 repo_path: modules/boilerplate - folder_name: generate-verify repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 7200a66ad8f9488094e3ca72b06b9c0768323286 + repo_hash: 90946d6b57c870ff3d100fc2d7546ee9f453c348 repo_path: modules/generate-verify - folder_name: go repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 7200a66ad8f9488094e3ca72b06b9c0768323286 + repo_hash: 90946d6b57c870ff3d100fc2d7546ee9f453c348 repo_path: modules/go - folder_name: help repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 7200a66ad8f9488094e3ca72b06b9c0768323286 + repo_hash: 90946d6b57c870ff3d100fc2d7546ee9f453c348 repo_path: modules/help - folder_name: klone repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 7200a66ad8f9488094e3ca72b06b9c0768323286 + repo_hash: 90946d6b57c870ff3d100fc2d7546ee9f453c348 repo_path: modules/klone - folder_name: repository-base repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 7200a66ad8f9488094e3ca72b06b9c0768323286 + repo_hash: 90946d6b57c870ff3d100fc2d7546ee9f453c348 repo_path: modules/repository-base - folder_name: tools repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 7200a66ad8f9488094e3ca72b06b9c0768323286 + repo_hash: 90946d6b57c870ff3d100fc2d7546ee9f453c348 repo_path: modules/tools diff --git a/make/_shared/generate-verify/02_mod.mk b/make/_shared/generate-verify/02_mod.mk index c1ed5e2bb62..f0677298aaf 100644 --- a/make/_shared/generate-verify/02_mod.mk +++ b/make/_shared/generate-verify/02_mod.mk @@ -16,7 +16,7 @@ ## Generate all generate targets. ## @category [shared] Generate/ Verify generate: $$(shared_generate_targets) - @echo "The following targets cannot be run simultaniously with each other or other generate scripts:" + @echo "The following targets cannot be run simultaneously with each other or other generate scripts:" $(foreach TARGET,$(shared_generate_targets_dirty), $(MAKE) $(TARGET)) verify_script := $(dir $(lastword $(MAKEFILE_LIST)))/util/verify.sh diff --git a/make/_shared/generate-verify/util/verify.sh b/make/_shared/generate-verify/util/verify.sh index 4dbaefa269a..83109aa24ae 100755 --- a/make/_shared/generate-verify/util/verify.sh +++ b/make/_shared/generate-verify/util/verify.sh @@ -58,6 +58,6 @@ if ! diff \ then echo echo "Project '${projectdir}' is out of date." - echo "Please run '${*}'" + echo "Please run '${*}' or apply the above diffs" exit 1 fi diff --git a/make/_shared/go/.golangci.override.yaml b/make/_shared/go/.golangci.override.yaml index 86c23375f36..a40c8debc5a 100644 --- a/make/_shared/go/.golangci.override.yaml +++ b/make/_shared/go/.golangci.override.yaml @@ -7,6 +7,7 @@ linters: - bidichk - bodyclose - contextcheck + - copyloopvar - decorder - dogsled - dupword @@ -14,9 +15,7 @@ linters: - errcheck - errchkjson - errname - - execinquery - exhaustive - - exportloopref - forbidigo - gci - ginkgolinter diff --git a/make/_shared/go/01_mod.mk b/make/_shared/go/01_mod.mk index 9a28ed31835..ffacd492eea 100644 --- a/make/_shared/go/01_mod.mk +++ b/make/_shared/go/01_mod.mk @@ -126,6 +126,8 @@ shared_verify_targets_dirty += verify-golangci-lint ## @category [shared] Generate/ Verify fix-golangci-lint: | $(NEEDS_GOLANGCI-LINT) $(NEEDS_YQ) $(NEEDS_GCI) $(bin_dir)/scratch $(GCI) write \ + --skip-generated \ + --skip-vendor \ -s "standard" \ -s "default" \ -s "prefix($(repo_name))" \ diff --git a/make/_shared/go/base/.github/workflows/govulncheck.yaml b/make/_shared/go/base/.github/workflows/govulncheck.yaml index 1a6ffc0ee54..46d88853b6b 100644 --- a/make/_shared/go/base/.github/workflows/govulncheck.yaml +++ b/make/_shared/go/base/.github/workflows/govulncheck.yaml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - id: go-version run: | diff --git a/make/_shared/repository-base/base-dependabot/.github/dependabot.yaml b/make/_shared/repository-base/base-dependabot/.github/dependabot.yaml index 81b92973404..d950a83e37b 100644 --- a/make/_shared/repository-base/base-dependabot/.github/dependabot.yaml +++ b/make/_shared/repository-base/base-dependabot/.github/dependabot.yaml @@ -1,5 +1,5 @@ # THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. -# Edit https://github.com/cert-manager/makefile-modules/blob/main/modules/repository-base/base/.github/dependabot.yaml instead. +# Edit https://github.com/cert-manager/makefile-modules/blob/main/modules/repository-base/base-dependabot/.github/dependabot.yaml instead. # Update Go dependencies and GitHub Actions dependencies daily. version: 2 diff --git a/make/_shared/repository-base/base/.github/workflows/make-self-upgrade.yaml b/make/_shared/repository-base/base/.github/workflows/make-self-upgrade.yaml index 063c3529a3c..ed1a203d911 100644 --- a/make/_shared/repository-base/base/.github/workflows/make-self-upgrade.yaml +++ b/make/_shared/repository-base/base/.github/workflows/make-self-upgrade.yaml @@ -15,6 +15,8 @@ jobs: self_upgrade: runs-on: ubuntu-latest + if: github.repository_owner == 'cert-manager' + permissions: contents: write pull-requests: write @@ -30,7 +32,7 @@ jobs: echo "This workflow should not be run on a non-branch-head." exit 1 - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - id: go-version run: | diff --git a/make/_shared/repository-base/base/Makefile b/make/_shared/repository-base/base/Makefile index 6c5aa12680e..6a1652d4023 100644 --- a/make/_shared/repository-base/base/Makefile +++ b/make/_shared/repository-base/base/Makefile @@ -30,7 +30,7 @@ ################################## # Some modules build their dependencies from variables, we want these to be -# evalutated at the last possible moment. For this we use second expansion to +# evaluated at the last possible moment. For this we use second expansion to # re-evaluate the generate and verify targets a second time. # # See https://www.gnu.org/software/make/manual/html_node/Secondary-Expansion.html diff --git a/make/_shared/tools/00_mod.mk b/make/_shared/tools/00_mod.mk index 8d5ad2c96e1..04918d5be65 100644 --- a/make/_shared/tools/00_mod.mk +++ b/make/_shared/tools/00_mod.mk @@ -36,7 +36,7 @@ for_each_kv = $(foreach item,$2,$(eval $(call $1,$(word 1,$(subst =, ,$(item))), # $(bin_dir)/tools, and the actual binaries are in $(bin_dir)/downloaded. When bumping # the version of the tools, this symlink gets updated. -# Let's have $(bin_dir)/tools in front of the PATH so that we don't inavertedly +# Let's have $(bin_dir)/tools in front of the PATH so that we don't inadvertently # pick up the wrong binary somewhere. Watch out, $(shell echo $$PATH) will # still print the original PATH, since GNU make does not honor exported # variables: https://stackoverflow.com/questions/54726457 @@ -52,57 +52,57 @@ NEEDS_CTR = __require-ctr tools := # https://github.com/helm/helm/releases -tools += helm=v3.14.4 +tools += helm=v3.15.4 # https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl -tools += kubectl=v1.30.0 +tools += kubectl=v1.31.0 # https://github.com/kubernetes-sigs/kind/releases -tools += kind=v0.23.0 +tools += kind=v0.24.0 # https://www.vaultproject.io/downloads -tools += vault=1.16.2 +tools += vault=1.17.3 # https://github.com/Azure/azure-workload-identity/releases -tools += azwi=v1.2.2 +tools += azwi=v1.3.0 # https://github.com/kyverno/kyverno/releases -tools += kyverno=v1.12.1 +tools += kyverno=v1.12.5 # https://github.com/mikefarah/yq/releases -tools += yq=v4.43.1 +tools += yq=v4.44.3 # https://github.com/ko-build/ko/releases -tools += ko=0.15.2 +tools += ko=0.16.0 # https://github.com/protocolbuffers/protobuf/releases -tools += protoc=26.1 +tools += protoc=27.3 # https://github.com/aquasecurity/trivy/releases -tools += trivy=v0.50.4 +tools += trivy=v0.54.1 # https://github.com/vmware-tanzu/carvel-ytt/releases -tools += ytt=v0.49.0 +tools += ytt=v0.50.0 # https://github.com/rclone/rclone/releases -tools += rclone=v1.66.0 +tools += rclone=v1.67.0 ### go packages # https://pkg.go.dev/sigs.k8s.io/controller-tools/cmd/controller-gen?tab=versions -tools += controller-gen=v0.15.0 +tools += controller-gen=v0.16.1 # https://pkg.go.dev/golang.org/x/tools/cmd/goimports?tab=versions -tools += goimports=v0.20.0 +tools += goimports=v0.24.0 # https://pkg.go.dev/github.com/google/go-licenses/licenses?tab=versions tools += go-licenses=706b9c60edd424a8b6d253fe10dfb7b8e942d4a5 # https://pkg.go.dev/gotest.tools/gotestsum?tab=versions -tools += gotestsum=v1.11.0 +tools += gotestsum=v1.12.0 # https://pkg.go.dev/sigs.k8s.io/kustomize/kustomize/v4?tab=versions tools += kustomize=v4.5.7 # https://pkg.go.dev/github.com/itchyny/gojq?tab=versions -tools += gojq=v0.12.15 +tools += gojq=v0.12.16 # https://pkg.go.dev/github.com/google/go-containerregistry/pkg/crane?tab=versions -tools += crane=v0.19.1 +tools += crane=v0.20.2 # https://pkg.go.dev/google.golang.org/protobuf/cmd/protoc-gen-go?tab=versions -tools += protoc-gen-go=v1.34.0 +tools += protoc-gen-go=v1.34.2 # https://pkg.go.dev/github.com/norwoodj/helm-docs/cmd/helm-docs?tab=versions -tools += helm-docs=v1.13.1 +tools += helm-docs=v1.14.2 # https://pkg.go.dev/github.com/sigstore/cosign/v2/cmd/cosign?tab=versions -tools += cosign=v2.2.4 +tools += cosign=v2.4.0 # https://pkg.go.dev/github.com/cert-manager/boilersuite?tab=versions tools += boilersuite=v0.1.0 # https://pkg.go.dev/github.com/princjef/gomarkdoc/cmd/gomarkdoc?tab=versions tools += gomarkdoc=v1.1.0 # https://pkg.go.dev/oras.land/oras/cmd/oras?tab=versions -tools += oras=v1.1.0 +tools += oras=v1.2.0 # https://pkg.go.dev/github.com/onsi/ginkgo/v2/ginkgo?tab=versions # The gingko version should be kept in sync with the version used in code. # If there is no go.mod file (which is only the case for the makefile-modules @@ -111,34 +111,34 @@ tools += oras=v1.1.0 detected_ginkgo_version := $(shell [[ -f go.mod ]] && awk '/ginkgo\/v2/ {print $$2}' go.mod || echo "v2.13.2") tools += ginkgo=$(detected_ginkgo_version) # https://pkg.go.dev/github.com/cert-manager/klone?tab=versions -tools += klone=v0.0.5 +tools += klone=v0.1.0 # https://pkg.go.dev/github.com/goreleaser/goreleaser?tab=versions -tools += goreleaser=v1.25.1 +tools += goreleaser=v1.26.2 # https://pkg.go.dev/github.com/anchore/syft/cmd/syft?tab=versions tools += syft=v0.100.0 # https://github.com/cert-manager/helm-tool -tools += helm-tool=v0.5.1 +tools += helm-tool=v0.5.3 # https://github.com/cert-manager/cmctl -tools += cmctl=v2.0.0 +tools += cmctl=v2.1.0 # https://pkg.go.dev/github.com/cert-manager/release/cmd/cmrel?tab=versions tools += cmrel=e4c3a4dc07df5c7c0379d334c5bb00e172462551 # https://github.com/golangci/golangci-lint/releases -tools += golangci-lint=v1.57.2 +tools += golangci-lint=v1.61.0 # https://pkg.go.dev/golang.org/x/vuln?tab=versions -tools += govulncheck=v1.1.0 +tools += govulncheck=v1.1.3 # https://pkg.go.dev/github.com/operator-framework/operator-sdk/cmd/operator-sdk?tab=versions -tools += operator-sdk=v1.34.1 +tools += operator-sdk=v1.36.1 # https://pkg.go.dev/github.com/cli/cli/v2?tab=versions -tools += gh=v2.49.0 +tools += gh=v2.54.0 # https:///github.com/redhat-openshift-ecosystem/openshift-preflight/releases -tools += preflight=1.9.2 +tools += preflight=1.10.0 # https://github.com/daixiang0/gci/releases tools += gci=v0.13.4 # https://github.com/google/yamlfmt/releases -tools += yamlfmt=v0.12.1 +tools += yamlfmt=v0.13.0 # https://pkg.go.dev/k8s.io/code-generator/cmd?tab=versions -K8S_CODEGEN_VERSION := v0.30.1 +K8S_CODEGEN_VERSION := v0.31.0 tools += client-gen=$(K8S_CODEGEN_VERSION) tools += deepcopy-gen=$(K8S_CODEGEN_VERSION) tools += informer-gen=$(K8S_CODEGEN_VERSION) @@ -147,10 +147,10 @@ tools += applyconfiguration-gen=$(K8S_CODEGEN_VERSION) tools += defaulter-gen=$(K8S_CODEGEN_VERSION) tools += conversion-gen=$(K8S_CODEGEN_VERSION) # https://github.com/kubernetes/kube-openapi -tools += openapi-gen=f0e62f92d13f418e2732b21c952fd17cab771c75 +tools += openapi-gen=91dab695df6fb4696a1ea93e510a5a4c6d10d369 # https://raw.githubusercontent.com/kubernetes-sigs/controller-tools/master/envtest-releases.yaml -KUBEBUILDER_ASSETS_VERSION := v1.30.0 +KUBEBUILDER_ASSETS_VERSION := v1.31.0 tools += etcd=$(KUBEBUILDER_ASSETS_VERSION) tools += kube-apiserver=$(KUBEBUILDER_ASSETS_VERSION) @@ -159,7 +159,7 @@ ADDITIONAL_TOOLS ?= tools += $(ADDITIONAL_TOOLS) # https://go.dev/dl/ -VENDORED_GO_VERSION := 1.22.5 +VENDORED_GO_VERSION := 1.23.2 # Print the go version which can be used in GH actions .PHONY: print-go-version @@ -181,9 +181,13 @@ CURL := curl --silent --show-error --fail --location --retry 10 --retry-connrefu # LN is expected to be an atomic action, meaning that two Make processes # can run the "link $(DOWNLOAD_DIR)/tools/xxx@$(XXX_VERSION)_$(HOST_OS)_$(HOST_ARCH) -# to $(bin_dir)/tools/xxx" operation simulatiously without issues (both +# to $(bin_dir)/tools/xxx" operation simultaneously without issues (both # will perform the action and the second time the link will be overwritten). -LN := ln -fs +# +# -s = Create a symbolic link +# -f = Force the creation of the link (replace existing links) +# -n = If destination already exists, replace it, don't use it as a directory to create a new link inside +LN := ln -fsn upper_map := a:A b:B c:C d:D e:E f:F g:G h:H i:I j:J k:K l:L m:M n:N o:O p:P q:Q r:R s:S t:T u:U v:V w:W x:X y:Y z:Z uc = $(strip \ @@ -374,10 +378,10 @@ $(call for_each_kv,go_dependency,$(go_dependencies)) # File downloads # ################## -go_linux_amd64_SHA256SUM=904b924d435eaea086515bc63235b192ea441bd8c9b198c507e85009e6e4c7f0 -go_linux_arm64_SHA256SUM=8d21325bfcf431be3660527c1a39d3d9ad71535fabdf5041c826e44e31642b5a -go_darwin_amd64_SHA256SUM=95d9933cdcf45f211243c42c7705c37353cccd99f27eb4d8e2d1bf2f4165cb50 -go_darwin_arm64_SHA256SUM=4cd1bcb05be03cecb77bccd765785d5ff69d79adf4dd49790471d00c06b41133 +go_linux_amd64_SHA256SUM=542d3c1705f1c6a1c5a80d5dc62e2e45171af291e755d591c5e6531ef63b454e +go_linux_arm64_SHA256SUM=f626cdd92fc21a88b31c1251f419c17782933a42903db87a174ce74eeecc66a9 +go_darwin_amd64_SHA256SUM=445c0ef19d8692283f4c3a92052cc0568f5a048f4e546105f58e991d4aea54f5 +go_darwin_arm64_SHA256SUM=d87031194fe3e01abdcaf3c7302148ade97a7add6eac3fec26765bcb3207b80f .PRECIOUS: $(DOWNLOAD_DIR)/tools/go@$(VENDORED_GO_VERSION)_$(HOST_OS)_$(HOST_ARCH).tar.gz $(DOWNLOAD_DIR)/tools/go@$(VENDORED_GO_VERSION)_$(HOST_OS)_$(HOST_ARCH).tar.gz: | $(DOWNLOAD_DIR)/tools @@ -385,10 +389,10 @@ $(DOWNLOAD_DIR)/tools/go@$(VENDORED_GO_VERSION)_$(HOST_OS)_$(HOST_ARCH).tar.gz: $(CURL) https://go.dev/dl/go$(VENDORED_GO_VERSION).$(HOST_OS)-$(HOST_ARCH).tar.gz -o $(outfile); \ $(checkhash_script) $(outfile) $(go_$(HOST_OS)_$(HOST_ARCH)_SHA256SUM) -helm_linux_amd64_SHA256SUM=a5844ef2c38ef6ddf3b5a8f7d91e7e0e8ebc39a38bb3fc8013d629c1ef29c259 -helm_linux_arm64_SHA256SUM=113ccc53b7c57c2aba0cd0aa560b5500841b18b5210d78641acfddc53dac8ab2 -helm_darwin_amd64_SHA256SUM=73434aeac36ad068ce2e5582b8851a286dc628eae16494a26e2ad0b24a7199f9 -helm_darwin_arm64_SHA256SUM=61e9c5455f06b2ad0a1280975bf65892e707adc19d766b0cf4e9006e3b7b4b6c +helm_linux_amd64_SHA256SUM=11400fecfc07fd6f034863e4e0c4c4445594673fd2a129e701fe41f31170cfa9 +helm_linux_arm64_SHA256SUM=fa419ecb139442e8a594c242343fafb7a46af3af34041c4eac1efcc49d74e626 +helm_darwin_amd64_SHA256SUM=1bc3f354f7ce4d7fd9cfa5bcc701c1f32c88d27076d96c2792d5b5226062aee5 +helm_darwin_arm64_SHA256SUM=88115846a1fb58f8eb8f64fec5c343d95ca394f1be811602fa54a887c98730ac .PRECIOUS: $(DOWNLOAD_DIR)/tools/helm@$(HELM_VERSION)_$(HOST_OS)_$(HOST_ARCH) $(DOWNLOAD_DIR)/tools/helm@$(HELM_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD_DIR)/tools @@ -399,10 +403,10 @@ $(DOWNLOAD_DIR)/tools/helm@$(HELM_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD chmod +x $(outfile); \ rm -f $(outfile).tar.gz -kubectl_linux_amd64_SHA256SUM=7c3807c0f5c1b30110a2ff1e55da1d112a6d0096201f1beb81b269f582b5d1c5 -kubectl_linux_arm64_SHA256SUM=669af0cf520757298ea60a8b6eb6b719ba443a9c7d35f36d3fb2fd7513e8c7d2 -kubectl_darwin_amd64_SHA256SUM=bcfa57d020b8d07d0ea77235ce8012c2c28fefdfd7cb9738f33674a7b16cef08 -kubectl_darwin_arm64_SHA256SUM=45cfa208151320153742062824398f22bb6bfb5a142bf6238476d55dacbd1bdd +kubectl_linux_amd64_SHA256SUM=7c27adc64a84d1c0cc3dcf7bf4b6e916cc00f3f576a2dbac51b318d926032437 +kubectl_linux_arm64_SHA256SUM=f42832db7d77897514639c6df38214a6d8ae1262ee34943364ec1ffaee6c009c +kubectl_darwin_amd64_SHA256SUM=fb6e07a69acc4e16885eda55b524c13b84bfbcf78cfac8d6c378d2bad321e105 +kubectl_darwin_arm64_SHA256SUM=b7472df17a885574ed7273947a8a274c156357db21b981208e8e109b9ed4022d .PRECIOUS: $(DOWNLOAD_DIR)/tools/kubectl@$(KUBECTL_VERSION)_$(HOST_OS)_$(HOST_ARCH) $(DOWNLOAD_DIR)/tools/kubectl@$(KUBECTL_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD_DIR)/tools @@ -411,10 +415,10 @@ $(DOWNLOAD_DIR)/tools/kubectl@$(KUBECTL_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DO $(checkhash_script) $(outfile) $(kubectl_$(HOST_OS)_$(HOST_ARCH)_SHA256SUM); \ chmod +x $(outfile) -kind_linux_amd64_SHA256SUM=1d86e3069ffbe3da9f1a918618aecbc778e00c75f838882d0dfa2d363bc4a68c -kind_linux_arm64_SHA256SUM=a416d6c311882337f0e56910e4a2e1f8c106ec70c22cbf0ac1dd8f33c1e284fe -kind_darwin_amd64_SHA256SUM=81c77f104b4b668812f7930659dc01ad88fa4d1cfc56900863eacdfb2731c457 -kind_darwin_arm64_SHA256SUM=68ec87c1e1ea2a708df883f4b94091150d19552d7b344e80ca59f449b301c2a0 +kind_linux_amd64_SHA256SUM=b89aada5a39d620da3fcd16435b7f28d858927dd53f92cbac77686b0588b600d +kind_linux_arm64_SHA256SUM=2968808d916e12d0a25c56d07c9a1c987163f972513fa8a94a2125a69f9c50eb +kind_darwin_amd64_SHA256SUM=6cf7ba50b37d3446153bbfb8990f03fb8102778898c84502cdb841710b499ed5 +kind_darwin_arm64_SHA256SUM=8e34f2edc7efc5c7c160487251848a954cd60ccd52b56a3fc360eaab33543fc0 .PRECIOUS: $(DOWNLOAD_DIR)/tools/kind@$(KIND_VERSION)_$(HOST_OS)_$(HOST_ARCH) $(DOWNLOAD_DIR)/tools/kind@$(KIND_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD_DIR)/tools @@ -423,10 +427,10 @@ $(DOWNLOAD_DIR)/tools/kind@$(KIND_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD $(checkhash_script) $(outfile) $(kind_$(HOST_OS)_$(HOST_ARCH)_SHA256SUM); \ chmod +x $(outfile) -vault_linux_amd64_SHA256SUM=688ce462b70cb674f84fddb731f75bb710db5ad9e4e5a17659e90e1283a8b4b7 -vault_linux_arm64_SHA256SUM=d5bd42227d295b1dcc4a5889c37e6a8ca945ece4795819718eaf54db87aa6d4f -vault_darwin_amd64_SHA256SUM=e4886d22273dedc579dc2382e114e7be29341049a48592f8f7be8a0020310731 -vault_darwin_arm64_SHA256SUM=ca59c85e7e3d67e25b6bfa505f7e7717b418452e8bfcd602a2a717bc06d5b1ee +vault_linux_amd64_SHA256SUM=146536fd9ef8aa1465894e718a8fe7a9ca13d68761bae900428f01f7ecd83806 +vault_linux_arm64_SHA256SUM=6c7dc39df0058b1fa9e65050227cdb12dc7913153ecd56956911fb973c353590 +vault_darwin_amd64_SHA256SUM=fd7e7c7a467723639cc0b624533a9f7aff0691bfbfe47602abac75af0be4914a +vault_darwin_arm64_SHA256SUM=26f11328a9c9e3b5599ec63efe394aed5fed0879c662f9ca320b8ec63d839582 .PRECIOUS: $(DOWNLOAD_DIR)/tools/vault@$(VAULT_VERSION)_$(HOST_OS)_$(HOST_ARCH) $(DOWNLOAD_DIR)/tools/vault@$(VAULT_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD_DIR)/tools @@ -437,10 +441,10 @@ $(DOWNLOAD_DIR)/tools/vault@$(VAULT_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLO chmod +x $(outfile); \ rm -f $(outfile).zip -azwi_linux_amd64_SHA256SUM=d33aaedbcbcc0ef61d845b3704ab336deaafc192c854e887896e163b99097871 -azwi_linux_arm64_SHA256SUM=7c4b55ef83e62f4b597885e66fbbdf0720cf0e2be3f1a16212f9b41d4b61b454 -azwi_darwin_amd64_SHA256SUM=47a9e99a7e02e531967d1c9a8abf12e73134f88ce3363007f411ba9b83497fd0 -azwi_darwin_arm64_SHA256SUM=19c5cf9fe4e1a7394bc01456d5e314fd898162d2d360c585fc72e46dae930659 +azwi_linux_amd64_SHA256SUM=bbc84c7e5fcaf4c6e3e58064dc66b3b7f70f38a6d8f9cdd07f0669a8499bdd47 +azwi_linux_arm64_SHA256SUM=7c4315ec8e21509641d90cf3160a379ae6ec771963df4bac0f18aa0a3ecef4ba +azwi_darwin_amd64_SHA256SUM=998dfaea81b652a5cbe92bb7dd3f770a391b8129f2a57137966d375c9f135062 +azwi_darwin_arm64_SHA256SUM=b8a4a8ebcba2248b439f43c1d2431f469b023894b2f862879dc0999293dc1154 .PRECIOUS: $(DOWNLOAD_DIR)/tools/azwi@$(AZWI_VERSION)_$(HOST_OS)_$(HOST_ARCH) $(DOWNLOAD_DIR)/tools/azwi@$(AZWI_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD_DIR)/tools @@ -450,10 +454,10 @@ $(DOWNLOAD_DIR)/tools/azwi@$(AZWI_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD tar xfO $(outfile).tar.gz azwi > $(outfile) && chmod 775 $(outfile); \ rm -f $(outfile).tar.gz -kubebuilder_tools_linux_amd64_SHA256SUM=2a9792cb5f1403f524543ce94c3115e3c4a4229f0e86af55fd26c078da448164 -kubebuilder_tools_linux_arm64_SHA256SUM=39cc7274a3075a650a20fcd24b9e2067375732bebaf5356088a8efb35155f068 -kubebuilder_tools_darwin_amd64_SHA256SUM=85890b864330baec88f53aabfc1d5d94a8ca8c17483f34f4823dec0fae7c6e3a -kubebuilder_tools_darwin_arm64_SHA256SUM=849362d26105b64193b4142982c710306d90248272731a81fb83efac27c5a750 +kubebuilder_tools_linux_amd64_SHA256SUM=b72c0c764c797e6b2cfd6d417abdad7b25d4fbc9f8475edeb44c8dd598999b76 +kubebuilder_tools_linux_arm64_SHA256SUM=087123cfb6ac48a1002db19df7ee96949b54d34860805a41397bcb4cd0b5d5e4 +kubebuilder_tools_darwin_amd64_SHA256SUM=e8a3bc6245dd30597aab163239337cd125194037ac13328798aa17b86aff0cb4 +kubebuilder_tools_darwin_arm64_SHA256SUM=9f2d49e16368aa278adaf3802c7f3a3ca73560345e2634f9af13844a3936dc5b .PRECIOUS: $(DOWNLOAD_DIR)/tools/kubebuilder_tools_$(KUBEBUILDER_ASSETS_VERSION)_$(HOST_OS)_$(HOST_ARCH).tar.gz $(DOWNLOAD_DIR)/tools/kubebuilder_tools_$(KUBEBUILDER_ASSETS_VERSION)_$(HOST_OS)_$(HOST_ARCH).tar.gz: | $(DOWNLOAD_DIR)/tools @@ -469,10 +473,10 @@ $(DOWNLOAD_DIR)/tools/kube-apiserver@$(KUBEBUILDER_ASSETS_VERSION)_$(HOST_OS)_$( @source $(lock_script) $@; \ tar xfO $< controller-tools/envtest/kube-apiserver > $(outfile) && chmod 775 $(outfile) -kyverno_linux_amd64_SHA256SUM=a5f6e9070c17acc47168c8ce4db78e45258376551b8bf68ad2d5ed27454cf666 -kyverno_linux_arm64_SHA256SUM=007e828d622e73614365f5f7e8e107e36ae686e97e8982b1eeb53511fb2363c3 -kyverno_darwin_amd64_SHA256SUM=20786eebf45238e8b4a35f4146c3f8dfea35968cf8ef6ca6d6727559f5c0156e -kyverno_darwin_arm64_SHA256SUM=3a454fb0b2bfbca6225d46ff4cc0b702fd4a63e978718c50225472b9631a8015 +kyverno_linux_amd64_SHA256SUM=962c396cdb149eadc7d6cc0cb345d3c01b6980d5265c8bb585c55ecd4b8a76b9 +kyverno_linux_arm64_SHA256SUM=dd66d363656685af142ec2fcbaa8ff997951df3241b25a3dbe3eb890da124121 +kyverno_darwin_amd64_SHA256SUM=f0053827f59aeed7e26b8ab578e9a86d9c002060414c442a46bfa8c49ac8280c +kyverno_darwin_arm64_SHA256SUM=4467e97fafa5a2067b93a5cbc954069ba00c890e3e867d0702b864ac7242ee0e .PRECIOUS: $(DOWNLOAD_DIR)/tools/kyverno@$(KYVERNO_VERSION)_$(HOST_OS)_$(HOST_ARCH) $(DOWNLOAD_DIR)/tools/kyverno@$(KYVERNO_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD_DIR)/tools @@ -485,10 +489,10 @@ $(DOWNLOAD_DIR)/tools/kyverno@$(KYVERNO_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DO chmod +x $(outfile); \ rm -f $(outfile).tar.gz -yq_linux_amd64_SHA256SUM=cfbbb9ba72c9402ef4ab9d8f843439693dfb380927921740e51706d90869c7e1 -yq_linux_arm64_SHA256SUM=a8186efb079673293289f8c31ee252b0d533c7bb8b1ada6a778ddd5ec0f325b6 -yq_darwin_amd64_SHA256SUM=fdc42b132ac460037f4f0f48caea82138772c651d91cfbb735210075ddfdbaed -yq_darwin_arm64_SHA256SUM=9f1063d910698834cb9176593aa288471898031929138d226c2c2de9f262f8e5 +yq_linux_amd64_SHA256SUM=a2c097180dd884a8d50c956ee16a9cec070f30a7947cf4ebf87d5f36213e9ed7 +yq_linux_arm64_SHA256SUM=0e7e1524f68d91b3ff9b089872d185940ab0fa020a5a9052046ef10547023156 +yq_darwin_amd64_SHA256SUM=216ddfa03e7ba0e5aba00b236ec78324b5bfc49b610db254fe92310878baea20 +yq_darwin_arm64_SHA256SUM=559a594ef7a6ebc5b81a67b7717fb3accedd266d8fa7d8352da7fec9e463f48b .PRECIOUS: $(DOWNLOAD_DIR)/tools/yq@$(YQ_VERSION)_$(HOST_OS)_$(HOST_ARCH) $(DOWNLOAD_DIR)/tools/yq@$(YQ_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD_DIR)/tools @@ -497,10 +501,10 @@ $(DOWNLOAD_DIR)/tools/yq@$(YQ_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD_DIR $(checkhash_script) $(outfile) $(yq_$(HOST_OS)_$(HOST_ARCH)_SHA256SUM); \ chmod +x $(outfile) -ko_linux_amd64_SHA256SUM=d11f03f23261d16f9e7802291e9d098e84f5daecc7931e8573bece9025b6a2c5 -ko_linux_arm64_SHA256SUM=8294849c0f12138006cd149dd02bb580c0eea41a6031473705cbf825e021a688 -ko_darwin_amd64_SHA256SUM=314c33154de941bfc4ede5e7283eb182028459bac36eb4223859e0b778254936 -ko_darwin_arm64_SHA256SUM=b6ecd62eb4f9238a0ed0512d7a34648b881aea0774c3830e3e5159370eb6834f +ko_linux_amd64_SHA256SUM=aee2caeced511e60c6889a4cfaf9ebe28ec35acb49531b7a90b09e0a963bcff7 +ko_linux_arm64_SHA256SUM=45b6ba20084b2199c63dcc738c54f7f6c37ea4e9c7f79eefc286d9947b11d0d1 +ko_darwin_amd64_SHA256SUM=5c98d0229fd2a82cc69510705b74a7196fc184641693930b0f9282b6d1f79d95 +ko_darwin_arm64_SHA256SUM=9c75b97f26ba98c62a86f3b39e2c74ced6c97092f301cd73fe4e5b3e16261698 .PRECIOUS: $(DOWNLOAD_DIR)/tools/ko@$(KO_VERSION)_$(HOST_OS)_$(HOST_ARCH) $(DOWNLOAD_DIR)/tools/ko@$(KO_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD_DIR)/tools @@ -514,10 +518,10 @@ $(DOWNLOAD_DIR)/tools/ko@$(KO_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD_DIR chmod +x $(outfile); \ rm -f $(outfile).tar.gz -protoc_linux_amd64_SHA256SUM=a7be2928c0454f132c599e25b79b7ad1b57663f2337d7f7e468a1d59b98ec1b0 -protoc_linux_arm64_SHA256SUM=64a3b3b5f7dac0c8f9cf1cb85b2b1a237eb628644f6bcb0fb8f23db6e0d66181 -protoc_darwin_amd64_SHA256SUM=febd8821c3a2a23f72f4641471e0ab6486f4fb07b68111490a27a31681465b3c -protoc_darwin_arm64_SHA256SUM=26a29befa8891ecc48809958c909d284f2b9539a2eb47f22cadc631fe6abe8fd +protoc_linux_amd64_SHA256SUM=6dab2adab83f915126cab53540d48957c40e9e9023969c3e84d44bfb936c7741 +protoc_linux_arm64_SHA256SUM=bdad36f3ad7472281d90568c4956ea2e203c216e0de005c6bd486f1920f2751c +protoc_darwin_amd64_SHA256SUM=ce282648fed0e7fbd6237d606dc9ec168dd2c1863889b04efa0b19c47da65d1b +protoc_darwin_arm64_SHA256SUM=b22116bd97cdbd7ea25346abe635a9df268515fe5ef5afa93cd9a68fc2513f84 .PRECIOUS: $(DOWNLOAD_DIR)/tools/protoc@$(PROTOC_VERSION)_$(HOST_OS)_$(HOST_ARCH) $(DOWNLOAD_DIR)/tools/protoc@$(PROTOC_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD_DIR)/tools @@ -531,10 +535,10 @@ $(DOWNLOAD_DIR)/tools/protoc@$(PROTOC_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWN chmod +x $(outfile); \ rm -f $(outfile).zip -trivy_linux_amd64_SHA256SUM=b0d135815867246baba52f608f4af84beca90cfeb17a9ce407a21acca760ace1 -trivy_linux_arm64_SHA256SUM=1be1dee3a5e013528374f25391d6ba84e2a10fda59f4e98431e30d9c4975762b -trivy_darwin_amd64_SHA256SUM=744f5e8c5c09c1e5ec6ec6a0570f779d89964c0a91ab60b4e59b284cdd3e1576 -trivy_darwin_arm64_SHA256SUM=e78a0db86f6364e756d5e058316c7815a747fc7fd8e8e984e3baf5830166ec63 +trivy_linux_amd64_SHA256SUM=bbaaf8278b2a9bb49aa848fe23c8bfe19f7db4f5dc7b55a9793357cd78cb5ec5 +trivy_linux_arm64_SHA256SUM=26f8ee5a44ca027082c426d982ce95a37b88cf66defa1e982641eb4497bf1e99 +trivy_darwin_amd64_SHA256SUM=d182c2de5496504120269b8d50b543e88b4837f8c9876055e54248f0a4e93d77 +trivy_darwin_arm64_SHA256SUM=0ea077b074e38c3bce419d3cfaa417581c36e985beb9e571c06c01293158ff6f .PRECIOUS: $(DOWNLOAD_DIR)/tools/trivy@$(TRIVY_VERSION)_$(HOST_OS)_$(HOST_ARCH) $(DOWNLOAD_DIR)/tools/trivy@$(TRIVY_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD_DIR)/tools @@ -548,10 +552,10 @@ $(DOWNLOAD_DIR)/tools/trivy@$(TRIVY_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLO chmod +x $(outfile); \ rm $(outfile).tar.gz -ytt_linux_amd64_SHA256SUM=357ec754446b1eda29dd529e088f617e85809726c686598ab03cfc1c79f43b56 -ytt_linux_arm64_SHA256SUM=a2d195b058884c0e36a918936076965b8efb426f7e00f6b7d7b99b82737c7299 -ytt_darwin_amd64_SHA256SUM=71b5ea38bfc7a9748c35ce0735fd6f806dce46bd5c9039d527050c7682e62a70 -ytt_darwin_arm64_SHA256SUM=0658db4af8263ca091ca31e4b599cb40c324b75934660a4c0ed98ad9b701f7e9 +ytt_linux_amd64_SHA256SUM=61dec6e00131f990db853afc4b7531c318bd3af3ba18f2cfdbc0d5e83a45c445 +ytt_linux_arm64_SHA256SUM=f38290c2666ddcf6feb4907f91033c4f41022b3fb84893c42d1f48948597b82a +ytt_darwin_amd64_SHA256SUM=d79f0b4189403c4142f5c646989de0769a316896a6096dfd1719605d313e8d1e +ytt_darwin_arm64_SHA256SUM=f3ce72031d34f0a3d909b1c971017bb3788bb786d3bb5cba1bf6d699255be643 .PRECIOUS: $(DOWNLOAD_DIR)/tools/ytt@$(YTT_VERSION)_$(HOST_OS)_$(HOST_ARCH) $(DOWNLOAD_DIR)/tools/ytt@$(YTT_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD_DIR)/tools @@ -560,10 +564,10 @@ $(DOWNLOAD_DIR)/tools/ytt@$(YTT_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD_D $(checkhash_script) $(outfile) $(ytt_$(HOST_OS)_$(HOST_ARCH)_SHA256SUM); \ chmod +x $(outfile) -rclone_linux_amd64_SHA256SUM=b4d304b1dc76001b1d3bb820ae8d1ae60a072afbd3296be904a3ee00b3d4fab9 -rclone_linux_arm64_SHA256SUM=c50a3ab93082f21788f9244393b19f2426edeeb896eec2e3e05ffb2e8727e075 -rclone_darwin_amd64_SHA256SUM=5adb4c5fe0675627461000a63156001301ec7cade966c55c8c4ebcfaeb62c5ae -rclone_darwin_arm64_SHA256SUM=b5f4c4d06ff3d426aee99870ad437276c9ddaad55442f2df6a58b918115fe4cf +rclone_linux_amd64_SHA256SUM=07c23d21a94d70113d949253478e13261c54d14d72023bb14d96a8da5f3e7722 +rclone_linux_arm64_SHA256SUM=2b44981a1a7d1f432c53c0f2f0b6bcdd410f6491c47dc55428fdac0b85c763f1 +rclone_darwin_amd64_SHA256SUM=1a1a3b080393b721ba5f38597305be2dbac3b654b43dfac3ebe4630b4e6406c3 +rclone_darwin_arm64_SHA256SUM=4dc6142aea78bb86f1236fe38e570b715990503c09733418c0cd2300e45651e4 .PRECIOUS: $(DOWNLOAD_DIR)/tools/rclone@$(RCLONE_VERSION)_$(HOST_OS)_$(HOST_ARCH) $(DOWNLOAD_DIR)/tools/rclone@$(RCLONE_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD_DIR)/tools @@ -576,10 +580,10 @@ $(DOWNLOAD_DIR)/tools/rclone@$(RCLONE_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWN chmod +x $(outfile); \ rm -f $(outfile).zip -preflight_linux_amd64_SHA256SUM=20f31e4af2004e8e3407844afea4e973975069169d69794e0633f0cb91d45afd -preflight_linux_arm64_SHA256SUM=c42cf4132027d937da88da07760e8fd9b1a8836f9c7795a1b60513d99c6939fe +preflight_linux_amd64_SHA256SUM=97750df31f31200f073e3b2844628a0a3681a403648c76d12319f83c80666104 +preflight_linux_arm64_SHA256SUM=e12b2afe063c07ee75f69f285f8cc56be99b85e2abac99cbef5fb22b91ef0cb7 -# Currently there are no offical releases for darwin, you cannot submit results +# Currently there are no official releases for darwin, you cannot submit results # on non-official binaries, but we can still run tests. # # Once https://github.com/redhat-openshift-ecosystem/openshift-preflight/pull/942 is merged @@ -615,7 +619,8 @@ $(DOWNLOAD_DIR)/tools/preflight@$(PREFLIGHT_VERSION)_linux_$(HOST_ARCH): | $(DOW missing=$(shell (command -v curl >/dev/null || echo curl) \ && (command -v sha256sum >/dev/null || command -v shasum >/dev/null || echo sha256sum) \ && (command -v git >/dev/null || echo git) \ - && (command -v rsync >/dev/null || echo rsync)) + && (command -v rsync >/dev/null || echo rsync) \ + && (command -v bash >/dev/null || echo bash)) ifneq ($(missing),) $(error Missing required tools: $(missing)) endif diff --git a/make/base_images.mk b/make/base_images.mk index 51794639d36..a84cc0bf87b 100644 --- a/make/base_images.mk +++ b/make/base_images.mk @@ -1,12 +1,12 @@ # +skip_license_check # autogenerated by hack/latest-base-images.sh -STATIC_BASE_IMAGE_amd64 := gcr.io/distroless/static-debian12@sha256:262ae336f8e9291f8edc9a71a61d5d568466edc1ea4818752d4af3d230a7f9ef -STATIC_BASE_IMAGE_arm64 := gcr.io/distroless/static-debian12@sha256:f05686e02ba3e9ff0d947c5ec4ec9d8f00a4bfae0309a2704650db7dca8d6c48 -STATIC_BASE_IMAGE_s390x := gcr.io/distroless/static-debian12@sha256:acaf1e1916e104d8d3a53a0275f0ea3ac7cdb264b3516fd20c3a402970f56af1 -STATIC_BASE_IMAGE_arm := gcr.io/distroless/static-debian12@sha256:4d8615d6516c818404e275747ab86ac100f3fc77208b31ec8d528f86c64a3caf -STATIC_BASE_IMAGE_ppc64le := gcr.io/distroless/static-debian12@sha256:79d0937b157ae30ef2b6fba72b0c381a810a7a8e41af64fac82f295d0ef93507 -DYNAMIC_BASE_IMAGE_amd64 := gcr.io/distroless/base-debian12@sha256:a7317ec9f04dbe6b0a3bc1b8ccd21b765548e3f7c79d24b8b80827fd3c531d0e -DYNAMIC_BASE_IMAGE_arm64 := gcr.io/distroless/base-debian12@sha256:e9318eb15bde98ad72ca879dfde33f4a1ad6d336dbcf7c2a0f7d12e5d453e1f4 -DYNAMIC_BASE_IMAGE_s390x := gcr.io/distroless/base-debian12@sha256:a4cbe6fcbd38fc8aae556cf85d12ab082c1dbe4844fdf2136932dca1468c9dc2 -DYNAMIC_BASE_IMAGE_arm := gcr.io/distroless/base-debian12@sha256:abc3f175ed8ef7ff91006532d8007b3cda91b322cc1e2d0440fa7f49e6a5cacd -DYNAMIC_BASE_IMAGE_ppc64le := gcr.io/distroless/base-debian12@sha256:3e9d6b7245aa8858db11bfef3479d0cda2abca912ede1b7788933fec194f8154 +STATIC_BASE_IMAGE_amd64 := gcr.io/distroless/static-debian12@sha256:de2d52749444512ec179baca0ebc4e969b9b140be46737548f35be34b206147b +STATIC_BASE_IMAGE_arm64 := gcr.io/distroless/static-debian12@sha256:966b60e19b802dca061cbda9251564d69e49eb8f1ccf81399fb2228a27d5bee7 +STATIC_BASE_IMAGE_s390x := gcr.io/distroless/static-debian12@sha256:fcf9cf44847b9380b3065d4d55ebf87b41558de36348c0f7f7f94b507a4a7d93 +STATIC_BASE_IMAGE_arm := gcr.io/distroless/static-debian12@sha256:c795c665776ac9340fbbc2c1861d4315c25f8db1a5811c35811fd718dffb8ba7 +STATIC_BASE_IMAGE_ppc64le := gcr.io/distroless/static-debian12@sha256:aff35a21f7a98eb056e0443910913990996818a1363fc1738c53924b463c2fea +DYNAMIC_BASE_IMAGE_amd64 := gcr.io/distroless/base-debian12@sha256:b238d9dfb8ac629b37775dd363c8d29d5208cd6367784ade705a626a40ac345f +DYNAMIC_BASE_IMAGE_arm64 := gcr.io/distroless/base-debian12@sha256:e22199b06d14c3dc1f1a62f8600a71b53901db7b6e34f23b01426352e538bd51 +DYNAMIC_BASE_IMAGE_s390x := gcr.io/distroless/base-debian12@sha256:17c8887c20d1895badc8adae9dc274b8dff527c31a98f0324ebcfe65316489f8 +DYNAMIC_BASE_IMAGE_arm := gcr.io/distroless/base-debian12@sha256:324f9a66022f5f1228092653acbb51ea842125a8347ee98fe550cc2894c30bee +DYNAMIC_BASE_IMAGE_ppc64le := gcr.io/distroless/base-debian12@sha256:50ae2d2c2a2e10f2d27d40ee9c1bcae22d7f0eaa3cfbd46c39b82faa32c10670 diff --git a/make/ci.mk b/make/ci.mk index 81f05bb32f6..cf654e7d34e 100644 --- a/make/ci.mk +++ b/make/ci.mk @@ -19,7 +19,7 @@ verify-modules: | $(NEEDS_CMREL) shared_verify_targets += verify-modules .PHONY: verify-chart -verify-chart: $(bin_dir)/cert-manager-$(VERSION).tgz +verify-chart: $(bin_dir)/cert-manager-$(VERSION).tgz | $(NEEDS_CTR) DOCKER=$(CTR) ./hack/verify-chart-version.sh $< .PHONY: verify-errexit @@ -67,6 +67,22 @@ generate-helm-docs: deploy/charts/cert-manager/README.template.md deploy/charts/ shared_generate_targets += generate-helm-docs +.PHONY: generate-helm-schema +## Generate Helm chart schema. +## @category [shared] Generate/ Verify +generate-helm-schema: | $(NEEDS_HELM-TOOL) $(NEEDS_GOJQ) + $(HELM-TOOL) schema -i deploy/charts/cert-manager/values.yaml | $(GOJQ) > deploy/charts/cert-manager/values.schema.json + +shared_generate_targets += generate-helm-schema + +.PHONY: verify-helm-values +## Verify Helm chart values using helm-tool. +## @category [shared] Generate/ Verify +verify-helm-values: | $(NEEDS_HELM-TOOL) $(NEEDS_GOJQ) + $(HELM-TOOL) lint -i deploy/charts/cert-manager/values.yaml -d deploy/charts/cert-manager/templates -e deploy/charts/cert-manager/values.linter.exceptions + +shared_verify_targets += verify-helm-values + .PHONY: ci-presubmit ## Run all checks (but not Go tests) which should pass before any given pull ## request or change is merged. diff --git a/make/cluster.sh b/make/cluster.sh index 759903e52de..eac7c4c8e9b 100755 --- a/make/cluster.sh +++ b/make/cluster.sh @@ -25,7 +25,7 @@ set -e source ./make/kind_images.sh mode=kind -k8s_version=1.30 +k8s_version=1.31 name=kind help() { @@ -111,6 +111,7 @@ case "$k8s_version" in 1.28*) image=$KIND_IMAGE_K8S_128 ;; 1.29*) image=$KIND_IMAGE_K8S_129 ;; 1.30*) image=$KIND_IMAGE_K8S_130 ;; +1.31*) image=$KIND_IMAGE_K8S_131 ;; v*) printf "${red}${redcross}Error${end}: Kubernetes version must be given without the leading 'v'\n" >&2 && exit 1 ;; *) printf "${red}${redcross}Error${end}: unsupported Kubernetes version ${yel}${k8s_version}${end}\n" >&2 && exit 1 ;; esac diff --git a/make/config/bind/configmap.yaml b/make/config/bind/configmap.yaml index fef8330413d..6480daaa0a3 100644 --- a/make/config/bind/configmap.yaml +++ b/make/config/bind/configmap.yaml @@ -9,8 +9,11 @@ data: directory "/var/cache/bind"; dnssec-validation auto; auth-nxdomain no; # conform to RFC1035 - listen-on { any; }; + listen-on port 8053 { any; }; + max-cache-size 192m; }; + + controls { }; zone "http01.example.com" { type master; diff --git a/make/config/bind/deployment.yaml b/make/config/bind/deployment.yaml index eeef15a19d4..8cc701731c3 100644 --- a/make/config/bind/deployment.yaml +++ b/make/config/bind/deployment.yaml @@ -14,37 +14,42 @@ spec: labels: app: bind spec: + securityContext: + # 101 is the userid of the bind user + runAsUser: 101 + runAsGroup: 101 + fsGroup: 101 containers: - name: bind image: "{IMAGE}" imagePullPolicy: Never - # TODO(wallrj): I couldn't figure out how to run Bind as a non-root user, using this Docker image. - # I think bind expects to start as root and then chown to a non-root BIND user. - # securityContext: - # runAsNonRoot: true command: - /bin/bash - -c - | - rm -rf /etc/bind - mkdir -p /etc/bind - ls -lah /config/ cp -Lr /config/* /etc/bind/ - chown -R "${BIND_USER}:${BIND_USER}" /etc/bind - exec $(which named) -u ${BIND_USER} -g - env: - - name: WEBMIN_ENABLED - value: "false" + exec $(which named) -u bind -g -4 ports: - - containerPort: 53 + - containerPort: 8053 protocol: UDP volumeMounts: - mountPath: /config - name: data + name: config + readOnly: true + - name: tmpfs-volume + mountPath: /etc/bind/ + resources: + requests: + cpu: 10m + memory: 256Mi + limits: + memory: 256Mi volumes: - - name: data + - name: config configMap: name: bind + - name: tmpfs-volume + emptyDir: {} dnsConfig: options: - name: ndots diff --git a/make/config/bind/service.yaml b/make/config/bind/service.yaml index 063dfb3fba3..379eda6168e 100644 --- a/make/config/bind/service.yaml +++ b/make/config/bind/service.yaml @@ -11,7 +11,7 @@ spec: clusterIP: {SERVICE_IP_PREFIX}.16 ports: - port: 53 - targetPort: 53 + targetPort: 8053 protocol: UDP selector: app: bind diff --git a/make/config/lib.sh b/make/config/lib.sh index f599ba8cc45..dc245dda14c 100644 --- a/make/config/lib.sh +++ b/make/config/lib.sh @@ -95,7 +95,7 @@ color() { trace() { # This mysterious awk expression makes sure to double-quote the arguments # that have special characters in them, such as spaces, curly braces (since - # zsh interprets curly braces), interogation marks, simple braces, and "*". + # zsh interprets curly braces), interrogation marks, simple braces, and "*". for arg in "$@"; do echo "$arg"; done \ | awk '{if (NR==1) printf "'"$yel"'%s '"$bold"'",$0; else if ($0 ~ / |\}|\{|\(|\)|\\|\*|\?/) printf "\"%s\" ",$0; else printf "%s ",$0} END {printf "\n"}' diff --git a/make/config/projectcontour/contour.yaml b/make/config/projectcontour/contour.yaml index 533b419195e..4314f9d1530 100644 --- a/make/config/projectcontour/contour.yaml +++ b/make/config/projectcontour/contour.yaml @@ -6,7 +6,9 @@ # # Specify the Gateway API configuration. gateway: - controllerName: projectcontour.io/projectcontour/contour + gatewayRef: + name: acmesolver + namespace: projectcontour # # should contour expect to be running inside a k8s cluster # incluster: true @@ -15,7 +17,7 @@ gateway: # kubeconfig: /path/to/.kube/config # # Disable RFC-compliant behavior to strip "Content-Length" header if -# "Tranfer-Encoding: chunked" is also set. +# "Transfer-Encoding: chunked" is also set. # disableAllowChunkedLength: false # # Disable Envoy's non-standard merge_slashes path transformation option diff --git a/make/config/projectcontour/gateway.yaml b/make/config/projectcontour/gateway.yaml index 695df54c168..40f6d83f80e 100644 --- a/make/config/projectcontour/gateway.yaml +++ b/make/config/projectcontour/gateway.yaml @@ -3,7 +3,7 @@ apiVersion: gateway.networking.k8s.io/v1beta1 metadata: name: acmesolver spec: - controllerName: projectcontour.io/projectcontour/contour + controllerName: projectcontour.io/gateway-controller --- kind: Gateway diff --git a/make/containers.mk b/make/containers.mk index 66b8562e936..820c4c50f3f 100644 --- a/make/containers.mk +++ b/make/containers.mk @@ -54,7 +54,7 @@ all-containers: cert-manager-controller-linux cert-manager-webhook-linux cert-ma .PHONY: cert-manager-controller-linux cert-manager-controller-linux: $(bin_dir)/containers/cert-manager-controller-linux-amd64.tar.gz $(bin_dir)/containers/cert-manager-controller-linux-arm64.tar.gz $(bin_dir)/containers/cert-manager-controller-linux-s390x.tar.gz $(bin_dir)/containers/cert-manager-controller-linux-ppc64le.tar.gz $(bin_dir)/containers/cert-manager-controller-linux-arm.tar.gz -$(bin_dir)/containers/cert-manager-controller-linux-amd64.tar $(bin_dir)/containers/cert-manager-controller-linux-arm64.tar $(bin_dir)/containers/cert-manager-controller-linux-s390x.tar $(bin_dir)/containers/cert-manager-controller-linux-ppc64le.tar $(bin_dir)/containers/cert-manager-controller-linux-arm.tar: $(bin_dir)/containers/cert-manager-controller-linux-%.tar: $(bin_dir)/scratch/build-context/cert-manager-controller-linux-%/controller hack/containers/Containerfile.controller $(bin_dir)/scratch/build-context/cert-manager-controller-linux-%/cert-manager.license $(bin_dir)/scratch/build-context/cert-manager-controller-linux-%/cert-manager.licenses_notice $(bin_dir)/release-version | $(bin_dir)/containers +$(bin_dir)/containers/cert-manager-controller-linux-amd64.tar $(bin_dir)/containers/cert-manager-controller-linux-arm64.tar $(bin_dir)/containers/cert-manager-controller-linux-s390x.tar $(bin_dir)/containers/cert-manager-controller-linux-ppc64le.tar $(bin_dir)/containers/cert-manager-controller-linux-arm.tar: $(bin_dir)/containers/cert-manager-controller-linux-%.tar: $(bin_dir)/scratch/build-context/cert-manager-controller-linux-%/controller hack/containers/Containerfile.controller $(bin_dir)/scratch/build-context/cert-manager-controller-linux-%/cert-manager.license $(bin_dir)/scratch/build-context/cert-manager-controller-linux-%/cert-manager.licenses_notice $(bin_dir)/release-version | $(bin_dir)/containers $(NEEDS_CTR) @$(eval TAG := cert-manager-controller-$*:$(VERSION)) @$(eval BASE := BASE_IMAGE_controller-linux-$*) $(CTR) build --quiet \ @@ -67,7 +67,7 @@ $(bin_dir)/containers/cert-manager-controller-linux-amd64.tar $(bin_dir)/contain .PHONY: cert-manager-webhook-linux cert-manager-webhook-linux: $(bin_dir)/containers/cert-manager-webhook-linux-amd64.tar.gz $(bin_dir)/containers/cert-manager-webhook-linux-arm64.tar.gz $(bin_dir)/containers/cert-manager-webhook-linux-s390x.tar.gz $(bin_dir)/containers/cert-manager-webhook-linux-ppc64le.tar.gz $(bin_dir)/containers/cert-manager-webhook-linux-arm.tar.gz -$(bin_dir)/containers/cert-manager-webhook-linux-amd64.tar $(bin_dir)/containers/cert-manager-webhook-linux-arm64.tar $(bin_dir)/containers/cert-manager-webhook-linux-s390x.tar $(bin_dir)/containers/cert-manager-webhook-linux-ppc64le.tar $(bin_dir)/containers/cert-manager-webhook-linux-arm.tar: $(bin_dir)/containers/cert-manager-webhook-linux-%.tar: $(bin_dir)/scratch/build-context/cert-manager-webhook-linux-%/webhook hack/containers/Containerfile.webhook $(bin_dir)/scratch/build-context/cert-manager-webhook-linux-%/cert-manager.license $(bin_dir)/scratch/build-context/cert-manager-webhook-linux-%/cert-manager.licenses_notice $(bin_dir)/release-version | $(bin_dir)/containers +$(bin_dir)/containers/cert-manager-webhook-linux-amd64.tar $(bin_dir)/containers/cert-manager-webhook-linux-arm64.tar $(bin_dir)/containers/cert-manager-webhook-linux-s390x.tar $(bin_dir)/containers/cert-manager-webhook-linux-ppc64le.tar $(bin_dir)/containers/cert-manager-webhook-linux-arm.tar: $(bin_dir)/containers/cert-manager-webhook-linux-%.tar: $(bin_dir)/scratch/build-context/cert-manager-webhook-linux-%/webhook hack/containers/Containerfile.webhook $(bin_dir)/scratch/build-context/cert-manager-webhook-linux-%/cert-manager.license $(bin_dir)/scratch/build-context/cert-manager-webhook-linux-%/cert-manager.licenses_notice $(bin_dir)/release-version | $(bin_dir)/containers $(NEEDS_CTR) @$(eval TAG := cert-manager-webhook-$*:$(VERSION)) @$(eval BASE := BASE_IMAGE_webhook-linux-$*) $(CTR) build --quiet \ @@ -80,7 +80,7 @@ $(bin_dir)/containers/cert-manager-webhook-linux-amd64.tar $(bin_dir)/containers .PHONY: cert-manager-cainjector-linux cert-manager-cainjector-linux: $(bin_dir)/containers/cert-manager-cainjector-linux-amd64.tar.gz $(bin_dir)/containers/cert-manager-cainjector-linux-arm64.tar.gz $(bin_dir)/containers/cert-manager-cainjector-linux-s390x.tar.gz $(bin_dir)/containers/cert-manager-cainjector-linux-ppc64le.tar.gz $(bin_dir)/containers/cert-manager-cainjector-linux-arm.tar.gz -$(bin_dir)/containers/cert-manager-cainjector-linux-amd64.tar $(bin_dir)/containers/cert-manager-cainjector-linux-arm64.tar $(bin_dir)/containers/cert-manager-cainjector-linux-s390x.tar $(bin_dir)/containers/cert-manager-cainjector-linux-ppc64le.tar $(bin_dir)/containers/cert-manager-cainjector-linux-arm.tar: $(bin_dir)/containers/cert-manager-cainjector-linux-%.tar: $(bin_dir)/scratch/build-context/cert-manager-cainjector-linux-%/cainjector hack/containers/Containerfile.cainjector $(bin_dir)/scratch/build-context/cert-manager-cainjector-linux-%/cert-manager.license $(bin_dir)/scratch/build-context/cert-manager-cainjector-linux-%/cert-manager.licenses_notice $(bin_dir)/release-version | $(bin_dir)/containers +$(bin_dir)/containers/cert-manager-cainjector-linux-amd64.tar $(bin_dir)/containers/cert-manager-cainjector-linux-arm64.tar $(bin_dir)/containers/cert-manager-cainjector-linux-s390x.tar $(bin_dir)/containers/cert-manager-cainjector-linux-ppc64le.tar $(bin_dir)/containers/cert-manager-cainjector-linux-arm.tar: $(bin_dir)/containers/cert-manager-cainjector-linux-%.tar: $(bin_dir)/scratch/build-context/cert-manager-cainjector-linux-%/cainjector hack/containers/Containerfile.cainjector $(bin_dir)/scratch/build-context/cert-manager-cainjector-linux-%/cert-manager.license $(bin_dir)/scratch/build-context/cert-manager-cainjector-linux-%/cert-manager.licenses_notice $(bin_dir)/release-version | $(bin_dir)/containers $(NEEDS_CTR) @$(eval TAG := cert-manager-cainjector-$*:$(VERSION)) @$(eval BASE := BASE_IMAGE_cainjector-linux-$*) $(CTR) build --quiet \ @@ -93,7 +93,7 @@ $(bin_dir)/containers/cert-manager-cainjector-linux-amd64.tar $(bin_dir)/contain .PHONY: cert-manager-acmesolver-linux cert-manager-acmesolver-linux: $(bin_dir)/containers/cert-manager-acmesolver-linux-amd64.tar.gz $(bin_dir)/containers/cert-manager-acmesolver-linux-arm64.tar.gz $(bin_dir)/containers/cert-manager-acmesolver-linux-s390x.tar.gz $(bin_dir)/containers/cert-manager-acmesolver-linux-ppc64le.tar.gz $(bin_dir)/containers/cert-manager-acmesolver-linux-arm.tar.gz -$(bin_dir)/containers/cert-manager-acmesolver-linux-amd64.tar $(bin_dir)/containers/cert-manager-acmesolver-linux-arm64.tar $(bin_dir)/containers/cert-manager-acmesolver-linux-s390x.tar $(bin_dir)/containers/cert-manager-acmesolver-linux-ppc64le.tar $(bin_dir)/containers/cert-manager-acmesolver-linux-arm.tar: $(bin_dir)/containers/cert-manager-acmesolver-linux-%.tar: $(bin_dir)/scratch/build-context/cert-manager-acmesolver-linux-%/acmesolver hack/containers/Containerfile.acmesolver $(bin_dir)/scratch/build-context/cert-manager-acmesolver-linux-%/cert-manager.license $(bin_dir)/scratch/build-context/cert-manager-acmesolver-linux-%/cert-manager.licenses_notice $(bin_dir)/release-version | $(bin_dir)/containers +$(bin_dir)/containers/cert-manager-acmesolver-linux-amd64.tar $(bin_dir)/containers/cert-manager-acmesolver-linux-arm64.tar $(bin_dir)/containers/cert-manager-acmesolver-linux-s390x.tar $(bin_dir)/containers/cert-manager-acmesolver-linux-ppc64le.tar $(bin_dir)/containers/cert-manager-acmesolver-linux-arm.tar: $(bin_dir)/containers/cert-manager-acmesolver-linux-%.tar: $(bin_dir)/scratch/build-context/cert-manager-acmesolver-linux-%/acmesolver hack/containers/Containerfile.acmesolver $(bin_dir)/scratch/build-context/cert-manager-acmesolver-linux-%/cert-manager.license $(bin_dir)/scratch/build-context/cert-manager-acmesolver-linux-%/cert-manager.licenses_notice $(bin_dir)/release-version | $(bin_dir)/containers $(NEEDS_CTR) @$(eval TAG := cert-manager-acmesolver-$*:$(VERSION)) @$(eval BASE := BASE_IMAGE_acmesolver-linux-$*) $(CTR) build --quiet \ @@ -106,7 +106,7 @@ $(bin_dir)/containers/cert-manager-acmesolver-linux-amd64.tar $(bin_dir)/contain .PHONY: cert-manager-startupapicheck-linux cert-manager-startupapicheck-linux: $(bin_dir)/containers/cert-manager-startupapicheck-linux-amd64.tar.gz $(bin_dir)/containers/cert-manager-startupapicheck-linux-arm64.tar.gz $(bin_dir)/containers/cert-manager-startupapicheck-linux-s390x.tar.gz $(bin_dir)/containers/cert-manager-startupapicheck-linux-ppc64le.tar.gz $(bin_dir)/containers/cert-manager-startupapicheck-linux-arm.tar.gz -$(bin_dir)/containers/cert-manager-startupapicheck-linux-amd64.tar $(bin_dir)/containers/cert-manager-startupapicheck-linux-arm64.tar $(bin_dir)/containers/cert-manager-startupapicheck-linux-s390x.tar $(bin_dir)/containers/cert-manager-startupapicheck-linux-ppc64le.tar $(bin_dir)/containers/cert-manager-startupapicheck-linux-arm.tar: $(bin_dir)/containers/cert-manager-startupapicheck-linux-%.tar: $(bin_dir)/scratch/build-context/cert-manager-startupapicheck-linux-%/startupapicheck hack/containers/Containerfile.startupapicheck $(bin_dir)/scratch/build-context/cert-manager-startupapicheck-linux-%/cert-manager.license $(bin_dir)/scratch/build-context/cert-manager-startupapicheck-linux-%/cert-manager.licenses_notice $(bin_dir)/release-version | $(bin_dir)/containers +$(bin_dir)/containers/cert-manager-startupapicheck-linux-amd64.tar $(bin_dir)/containers/cert-manager-startupapicheck-linux-arm64.tar $(bin_dir)/containers/cert-manager-startupapicheck-linux-s390x.tar $(bin_dir)/containers/cert-manager-startupapicheck-linux-ppc64le.tar $(bin_dir)/containers/cert-manager-startupapicheck-linux-arm.tar: $(bin_dir)/containers/cert-manager-startupapicheck-linux-%.tar: $(bin_dir)/scratch/build-context/cert-manager-startupapicheck-linux-%/startupapicheck hack/containers/Containerfile.startupapicheck $(bin_dir)/scratch/build-context/cert-manager-startupapicheck-linux-%/cert-manager.license $(bin_dir)/scratch/build-context/cert-manager-startupapicheck-linux-%/cert-manager.licenses_notice $(bin_dir)/release-version | $(bin_dir)/containers $(NEEDS_CTR) @$(eval TAG := cert-manager-startupapicheck-$*:$(VERSION)) @$(eval BASE := BASE_IMAGE_startupapicheck-linux-$*) $(CTR) build --quiet \ diff --git a/make/e2e-setup.mk b/make/e2e-setup.mk index a24780c98a0..06ae5875076 100644 --- a/make/e2e-setup.mk +++ b/make/e2e-setup.mk @@ -26,22 +26,23 @@ CRI_ARCH := $(HOST_ARCH) # is set in one place only. K8S_VERSION := 1.30 -IMAGE_ingressnginx_amd64 := registry.k8s.io/ingress-nginx/controller:v1.9.4@sha256:0115d7e01987c13e1be90b09c223c3e0d8e9a92e97c0421e712ad3577e2d78e5 -IMAGE_kyverno_amd64 := ghcr.io/kyverno/kyverno:v1.10.3@sha256:031d2da484f3d89c78007cbb1cf1d7ae992e069683a2cdca0a0efb63a63fc735 -IMAGE_kyvernopre_amd64 := ghcr.io/kyverno/kyvernopre:v1.10.3@sha256:5371ead07ebd09ff858f568a07b6807e8568772af61e626c9a0a5137bd7e62db +IMAGE_ingressnginx_amd64 := registry.k8s.io/ingress-nginx/controller:v1.10.1@sha256:959e313aceec9f38e18a329ca3756402959e84e63ae8ba7ac1ee48aec28d51b9 +IMAGE_kyverno_amd64 := ghcr.io/kyverno/kyverno:v1.12.3@sha256:127def0e41f49fea6e260abf7b1662fe7bdfb9f33e8f9047fb74d0162a5697bb +IMAGE_kyvernopre_amd64 := ghcr.io/kyverno/kyvernopre:v1.12.3@sha256:d388cd67b38fb4f55eb5e38107dbbce9e06208b8e3839f0b63f8631f286181be IMAGE_vault_amd64 := docker.io/hashicorp/vault:1.14.1@sha256:436d056e8e2a96c7356720069c29229970466f4f686886289dcc94dfa21d3155 -IMAGE_bind_amd64 := docker.io/eafxx/bind:latest-ccf145d3@sha256:b6ea4da6cb689985a6729f20a1a2775b9211bdaebd2c956f22871624d4925db2 +IMAGE_bind_amd64 := docker.io/ubuntu/bind9:9.18-22.04_beta@sha256:69b27585043985948fb7be88a49c44364f1cb8cfbc2626b2cfedfa2e68db50ee IMAGE_sampleexternalissuer_amd64 := ghcr.io/cert-manager/sample-external-issuer/controller:v0.4.0@sha256:964b378fe0dda7fc38ce3f211c3b24c780e44cef13c39d3206de985bad67f294 -IMAGE_projectcontour_amd64 := ghcr.io/projectcontour/contour:v1.25.2@sha256:1570f04e96fb5e0ad71c2de61fee71c8d55b2fe5b7c827ce65e81bf7cc99bcbd +IMAGE_projectcontour_amd64 := ghcr.io/projectcontour/contour:v1.29.1@sha256:bb7af851ac5832c315e0863d12ed583cee54c495d58a206f1d0897647505ed70 -IMAGE_ingressnginx_arm64 := registry.k8s.io/ingress-nginx/controller:v1.9.4@sha256:3cdc716f0395886008c5e49972297adf1af87eeef472f71ff8de11bf53f25766 -IMAGE_kyverno_arm64 := ghcr.io/kyverno/kyverno:v1.10.3@sha256:acf77f4fd08056941b5640d9489d46f2a1777e29d574e51926eac5250144dbd2 -IMAGE_kyvernopre_arm64 := ghcr.io/kyverno/kyvernopre:v1.10.3@sha256:3ec997a6a26f600e4c2e439c3671e9f21c83a73bf486134eb6732481d0e371ca +IMAGE_ingressnginx_arm64 := registry.k8s.io/ingress-nginx/controller:v1.10.1@sha256:624d1a22b56a52fc4b8e330bef968cd77d49c6eeb36166f20036d50782307341 +IMAGE_kyverno_arm64 := ghcr.io/kyverno/kyverno:v1.12.3@sha256:c076a1ba9e0fb33d8eca3e7499caddfa3bb4f5e52e9dee589d8476ae1688cd34 +IMAGE_kyvernopre_arm64 := ghcr.io/kyverno/kyvernopre:v1.12.3@sha256:d8d750012ed4bb46fd41d8892e92af6fb9fd212317bc23e68a2a47199646b04a IMAGE_vault_arm64 := docker.io/hashicorp/vault:1.14.1@sha256:27dd264f3813c71a66792191db5382f0cf9eeaf1ae91770634911facfcfe4837 -IMAGE_bind_arm64 := docker.io/eafxx/bind:latest-ccf145d3@sha256:a302cff9f7ecfac0c3cfde1b53a614a81d16f93a247c838d3dac43384fefd9b4 +IMAGE_bind_arm64 := docker.io/ubuntu/bind9:9.18-22.04_beta@sha256:912dbb6c360e3ffecbf9b0248a856d670121db5a655173b2781c0c650a979330 IMAGE_sampleexternalissuer_arm64 := ghcr.io/cert-manager/sample-external-issuer/controller:v0.4.0@sha256:bdff00089ec7581c0d12414ce5ad1c6ccf5b6cacbfb0b0804fefe5043a1cb849 -IMAGE_projectcontour_arm64 := ghcr.io/projectcontour/contour:v1.25.2@sha256:abbb2b7fee8eafddfd4ebd8e45510e6c1d86937461bc6934470ffb57211a9a8b +IMAGE_projectcontour_arm64 := ghcr.io/projectcontour/contour:v1.29.1@sha256:dbfec77951e123bf383a09412a51df218b716aaf3fe7b2778bb2f208ac495dc5 +# https://github.com/letsencrypt/pebble/releases PEBBLE_COMMIT = ba5f81dd80fa870cbc19326f2d5a46f45f0b5ee3 LOCALIMAGE_pebble := local/pebble:local @@ -155,10 +156,10 @@ endef # get the message "warning: undefined variable 'CI'". .PHONY: preload-kind-image ifeq ($(shell printenv CI),) -preload-kind-image: +preload-kind-image: | $(NEEDS_CTR) @$(CTR) inspect $(IMAGE_kind_$(CRI_ARCH)) 2>/dev/null >&2 || (set -x; $(CTR) pull $(IMAGE_kind_$(CRI_ARCH))) else -preload-kind-image: $(call image-tar,kind) +preload-kind-image: $(call image-tar,kind) | $(NEEDS_CTR) $(CTR) inspect $(IMAGE_kind_$(CRI_ARCH)) 2>/dev/null >&2 || $(CTR) load -i $< endif @@ -267,14 +268,14 @@ feature_gates_webhook := $(subst $(space),\$(comma),$(filter AllAlpha=% AllBeta= feature_gates_cainjector := $(subst $(space),\$(comma),$(filter AllAlpha=% AllBeta=% ServerSideApply=%, $(subst $(comma),$(space),$(FEATURE_GATES)))) # When testing an published chart the repo can be configured using -# E2E_CERT_MANAGER_REPO +# E2E_CERT_MANAGER_REPO E2E_CERT_MANAGER_REPO ?= https://charts.jetstack.io # When testing an published chart the chart name can be configured using -# E2E_CERT_MANAGER_CHART. This can also be set to a local path to test a +# E2E_CERT_MANAGER_CHART. This can also be set to a local path to test a # downloaded chart E2E_CERT_MANAGER_CHART ?= cert-manager # When testing an published chart, default to the latest release -E2E_CERT_MANAGER_VERSION ?= +E2E_CERT_MANAGER_VERSION ?= # Example running E2E tests against a downloaded chart: # E2E_EXISTING_CHART=true E2E_CERT_MANAGER_CHART=./cert-manager-v1.14.2.tgz make e2e-setup @@ -303,7 +304,7 @@ e2e-setup-certmanager: e2e-setup-gatewayapi $(E2E_SETUP_OPTION_DEPENDENCIES) $(b --wait \ --namespace cert-manager \ --repo $(E2E_CERT_MANAGER_REPO) \ - $(addprefix --version,$(E2E_CERT_MANAGER_VERSION)) \ + $(addprefix --version=,$(E2E_CERT_MANAGER_VERSION)) \ --set crds.enabled=true \ --set featureGates="$(feature_gates_controller)" \ --set "extraArgs={--kube-api-qps=9000,--kube-api-burst=9000,--concurrent-workers=200,--enable-gateway-api}" \ @@ -355,7 +356,7 @@ e2e-setup-gatewayapi: $(bin_dir)/scratch/gateway-api-$(GATEWAY_API_VERSION).yaml # v1 NGINX-Ingress by default only watches Ingresses with Ingress class -# defined. When configuring solver block for ACME HTTTP01 challenge on an +# defined. When configuring solver block for ACME HTTP01 challenge on an # ACME issuer, cert-manager users can currently specify either an Ingress # name or a class. We also e2e test these two ways of creating Ingresses # with ingress-shim. For the ingress controller to watch our Ingresses that @@ -368,7 +369,7 @@ e2e-setup-ingressnginx: $(call image-tar,ingressnginx) load-$(call image-tar,ing $(HELM) upgrade \ --install \ --wait \ - --version 4.7.3 \ + --version 4.10.1 \ --namespace ingress-nginx \ --create-namespace \ --set controller.image.tag=$(TAG) \ @@ -392,17 +393,21 @@ e2e-setup-kyverno: $(call image-tar,kyverno) $(call image-tar,kyvernopre) load-$ --wait \ --namespace kyverno \ --create-namespace \ - --version 3.0.4 \ - --set image.tag=v1.8.1 \ - --set initImage.tag=v1.8.1 \ - --set image.pullPolicy=Never \ - --set initImage.pullPolicy=Never \ + --version 3.2.4 \ + --set webhooksCleanup.enabled=false \ + --set reportsController.enabled=false \ + --set cleanupController.enabled=false \ + --set backgroundController.enabled=false \ + --set admissionController.container.image.tag=$(TAG) \ + --set admissionController.container.image.pullPolicy=Never \ + --set admissionController.initContainer.image.tag=$(TAG) \ + --set admissionController.initContainer.image.pullPolicy=Never \ kyverno kyverno/kyverno >/dev/null @$(KUBECTL) create ns cert-manager >/dev/null 2>&1 || true $(KUBECTL) apply --server-side -f make/config/kyverno/policy.yaml >/dev/null $(bin_dir)/downloaded/pebble-$(PEBBLE_COMMIT).tar.gz: | $(bin_dir)/downloaded - $(CURL) https://github.com/letsencrypt/pebble/archive/$(PEBBLE_COMMIT).tar.gz -o $@ + $(CURL) https://github.com/inteon/pebble/archive/$(PEBBLE_COMMIT).tar.gz -o $@ # We can't use GOBIN with "go install" because cross-compilation is not # possible with go install. That's a problem when cross-compiling for @@ -412,7 +417,7 @@ $(call local-image-tar,pebble).dir/pebble: $(bin_dir)/downloaded/pebble-$(PEBBLE tar xzf $< -C /tmp cd /tmp/pebble-$(PEBBLE_COMMIT) && GOOS=linux GOARCH=$(CRI_ARCH) CGO_ENABLED=$(CGO_ENABLED) GOMAXPROCS=$(GOBUILDPROCS) $(GOBUILD) $(GOFLAGS) -o $(CURDIR)/$@ ./cmd/pebble -$(call local-image-tar,pebble): $(call local-image-tar,pebble).dir/pebble make/config/pebble/Containerfile.pebble +$(call local-image-tar,pebble): $(call local-image-tar,pebble).dir/pebble make/config/pebble/Containerfile.pebble | $(NEEDS_CTR) @$(eval BASE := BASE_IMAGE_controller-linux-$(CRI_ARCH)) $(CTR) build --quiet \ -f make/config/pebble/Containerfile.pebble \ @@ -434,7 +439,7 @@ $(call local-image-tar,samplewebhook).dir/samplewebhook: make/config/samplewebho @mkdir -p $(dir $@) GOOS=linux GOARCH=$(CRI_ARCH) $(GOBUILD) -o $@ $(GOFLAGS) make/config/samplewebhook/sample/main.go -$(call local-image-tar,samplewebhook): $(call local-image-tar,samplewebhook).dir/samplewebhook make/config/samplewebhook/Containerfile.samplewebhook +$(call local-image-tar,samplewebhook): $(call local-image-tar,samplewebhook).dir/samplewebhook make/config/samplewebhook/Containerfile.samplewebhook | $(NEEDS_CTR) @$(eval BASE := BASE_IMAGE_controller-linux-$(CRI_ARCH)) $(CTR) build --quiet \ -f make/config/samplewebhook/Containerfile.samplewebhook \ @@ -462,13 +467,15 @@ e2e-setup-projectcontour: $(call image-tar,projectcontour) load-$(call image-tar $(HELM) upgrade \ --install \ --wait \ - --version 12.2.4 \ + --version 18.2.4 \ --namespace projectcontour \ --create-namespace \ --set contour.ingressClass.create=false \ --set contour.ingressClass.default=false \ - --set image.tag=$(TAG) \ - --set image.pullPolicy=Never \ + --set contour.image.registry=ghcr.io \ + --set contour.image.repository=projectcontour/contour \ + --set contour.image.tag=$(TAG) \ + --set contour.image.pullPolicy=Never \ --set contour.service.type=ClusterIP \ --set contour.service.externalTrafficPolicy="" \ --set envoy.service.type=ClusterIP \ diff --git a/make/e2e.sh b/make/e2e.sh index 946566f8358..5630d8926ac 100755 --- a/make/e2e.sh +++ b/make/e2e.sh @@ -52,7 +52,7 @@ BINDIR=${BINDIR:-$_default_bindir} # | 40 | 26m 26s | 26 | 29m 29s | 3m 3s (hot) | [6][] | # | 50 | interrupted (*) | | | (hot) | [7][] | # -# The startup time is calculated by substracting the "started time" visible +# The startup time is calculated by subtracting the "started time" visible # on the Prow UI with the first line that has a timestamp. This time # depends on whether this Kubernetes node already has a cache or not. # diff --git a/make/kind_images.sh b/make/kind_images.sh index 87ef7bb3042..42fa7847737 100755 --- a/make/kind_images.sh +++ b/make/kind_images.sh @@ -12,11 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -# generated by "./hack/latest-kind-images.sh v0.23.0" +# generated by "./hack/latest-kind-images.sh v0.24.0" +# and manually fixed up to remove duplicates (as kind lists images for e.g. 1.28.13 and 1.28.12) -KIND_IMAGE_K8S_125=docker.io/kindest/node@sha256:5da57dfc290ac3599e775e63b8b6c49c0c85d3fec771cd7d55b45fae14b38d3b -KIND_IMAGE_K8S_126=docker.io/kindest/node@sha256:84333e26cae1d70361bb7339efb568df1871419f2019c80f9a12b7e2d485fe19 -KIND_IMAGE_K8S_127=docker.io/kindest/node@sha256:17439fa5b32290e3ead39ead1250dca1d822d94a10d26f1981756cd51b24b9d8 -KIND_IMAGE_K8S_128=docker.io/kindest/node@sha256:dca54bc6a6079dd34699d53d7d4ffa2e853e46a20cd12d619a09207e35300bd0 -KIND_IMAGE_K8S_129=docker.io/kindest/node@sha256:3abb816a5b1061fb15c6e9e60856ec40d56b7b52bcea5f5f1350bc6e2320b6f8 -KIND_IMAGE_K8S_130=docker.io/kindest/node@sha256:047357ac0cfea04663786a612ba1eaba9702bef25227a794b52890dd8bcd692e +KIND_IMAGE_K8S_125=docker.io/kindest/node@sha256:6110314339b3b44d10da7d27881849a87e092124afab5956f2e10ecdb463b025 +KIND_IMAGE_K8S_126=docker.io/kindest/node@sha256:1cc15d7b1edd2126ef051e359bf864f37bbcf1568e61be4d2ed1df7a3e87b354 +KIND_IMAGE_K8S_127=docker.io/kindest/node@sha256:3fd82731af34efe19cd54ea5c25e882985bafa2c9baefe14f8deab1737d9fabe +KIND_IMAGE_K8S_128=docker.io/kindest/node@sha256:45d319897776e11167e4698f6b14938eb4d52eb381d9e3d7a9086c16c69a8110 +KIND_IMAGE_K8S_129=docker.io/kindest/node@sha256:d46b7aa29567e93b27f7531d258c372e829d7224b25e3fc6ffdefed12476d3aa +KIND_IMAGE_K8S_130=docker.io/kindest/node@sha256:976ea815844d5fa93be213437e3ff5754cd599b040946b5cca43ca45c2047114 +KIND_IMAGE_K8S_131=docker.io/kindest/node@sha256:53df588e04085fd41ae12de0c3fe4c72f7013bba32a20e7325357a1ac94ba865 diff --git a/make/licenses.mk b/make/licenses.mk index 5fff99bcafc..53e2ad4d11e 100644 --- a/make/licenses.mk +++ b/make/licenses.mk @@ -15,7 +15,8 @@ # LICENSE_YEAR is the value which will be substituted into licenses when they're generated # It would be possible to make this more dynamic, but there's seemingly no need: # https://stackoverflow.com/a/2391555/1615417 -# As such, this is hardcoded to avoid needless complexity +# As such, this is hardcoded to avoid needless complexity. There's generally no need to update +# this and create regular diffs which do nothing but update the license year. LICENSE_YEAR=2022 # Creates the boilerplate header for YAML files from the template in hack/ diff --git a/make/manifests.mk b/make/manifests.mk index e424e254fa1..66dd71bb4aa 100644 --- a/make/manifests.mk +++ b/make/manifests.mk @@ -86,7 +86,7 @@ $(bin_dir)/metadata/cert-manager-manifests.tar.gz.metadata.json: $(bin_dir)/rele # These targets provide for building and signing the cert-manager helm chart. -$(bin_dir)/cert-manager-$(VERSION).tgz: $(bin_dir)/helm/cert-manager/README.md $(bin_dir)/helm/cert-manager/Chart.yaml $(bin_dir)/helm/cert-manager/values.yaml $(HELM_TEMPLATE_TARGETS) $(bin_dir)/helm/cert-manager/templates/NOTES.txt $(bin_dir)/helm/cert-manager/templates/_helpers.tpl $(bin_dir)/helm/cert-manager/templates/crds.yaml | $(NEEDS_HELM) $(bin_dir)/helm/cert-manager +$(bin_dir)/cert-manager-$(VERSION).tgz: $(bin_dir)/helm/cert-manager/README.md $(bin_dir)/helm/cert-manager/Chart.yaml $(bin_dir)/helm/cert-manager/values.yaml $(bin_dir)/helm/cert-manager/values.schema.json $(HELM_TEMPLATE_TARGETS) $(bin_dir)/helm/cert-manager/templates/NOTES.txt $(bin_dir)/helm/cert-manager/templates/_helpers.tpl $(bin_dir)/helm/cert-manager/templates/crds.yaml | $(NEEDS_HELM) $(bin_dir)/helm/cert-manager $(HELM) package --app-version=$(VERSION) --version=$(VERSION) --destination "$(dir $@)" ./$(bin_dir)/helm/cert-manager $(bin_dir)/cert-manager-$(VERSION).tgz.prov: $(bin_dir)/cert-manager-$(VERSION).tgz | $(NEEDS_CMREL) $(bin_dir)/helm/cert-manager @@ -110,6 +110,9 @@ $(bin_dir)/helm/cert-manager/templates/crds.yaml: $(CRDS_SOURCES) | $(bin_dir)/h $(bin_dir)/helm/cert-manager/values.yaml: deploy/charts/cert-manager/values.yaml | $(bin_dir)/helm/cert-manager cp $< $@ +$(bin_dir)/helm/cert-manager/values.schema.json: deploy/charts/cert-manager/values.schema.json | $(bin_dir)/helm/cert-manager + cp $< $@ + $(bin_dir)/helm/cert-manager/README.md: deploy/charts/cert-manager/README.template.md | $(bin_dir)/helm/cert-manager sed -e "s:{{RELEASE_VERSION}}:$(VERSION):g" < $< > $@ diff --git a/pkg/acme/accounts/client.go b/pkg/acme/accounts/client.go index d15d5b76d76..a96072f0f82 100644 --- a/pkg/acme/accounts/client.go +++ b/pkg/acme/accounts/client.go @@ -56,14 +56,14 @@ func NewClient(client *http.Client, config cmacme.ACMEIssuer, privateKey *rsa.Pr }) } -// BuildHTTPClient returns a instrumented HTTP client to be used by an ACME client. +// BuildHTTPClient returns an instrumented HTTP client to be used by an ACME client. // For the time being, we construct a new HTTP client on each invocation, because we need // to set the 'skipTLSVerify' flag on the HTTP client itself distinct from the ACME client func BuildHTTPClient(metrics *metrics.Metrics, skipTLSVerify bool) *http.Client { return BuildHTTPClientWithCABundle(metrics, skipTLSVerify, nil) } -// BuildHTTPClientWithCABundle returns a instrumented HTTP client to be used by an ACME +// BuildHTTPClientWithCABundle returns an instrumented HTTP client to be used by an ACME // client, with an optional custom CA bundle set. // For the time being, we construct a new HTTP client on each invocation, because we need // to set the 'skipTLSVerify' flag and the CA bundle on the HTTP client itself, distinct diff --git a/pkg/acme/client/interfaces.go b/pkg/acme/client/interfaces.go index d5a6e92d6f6..ef2d5b140c8 100644 --- a/pkg/acme/client/interfaces.go +++ b/pkg/acme/client/interfaces.go @@ -49,10 +49,10 @@ type Interface interface { WaitAuthorization(ctx context.Context, url string) (*acme.Authorization, error) Register(ctx context.Context, acct *acme.Account, prompt func(tosURL string) bool) (*acme.Account, error) GetReg(ctx context.Context, url string) (*acme.Account, error) - // HTTP01ChallengeResponse will be called once when an cert-manager.io + // HTTP01ChallengeResponse will be called once when a cert-manager.io // Challenge for an http-01 challenge type is being created. HTTP01ChallengeResponse(token string) (string, error) - // DNS01ChallengeResponse will be called once when an cert-manager.io + // DNS01ChallengeResponse will be called once when a cert-manager.io // Challenge for an http-01 challenge type is being created. DNS01ChallengeRecord(token string) (string, error) Discover(ctx context.Context) (acme.Directory, error) diff --git a/pkg/acme/util/util.go b/pkg/acme/util/util.go index 0f2c76f6702..f3f69dfcd13 100644 --- a/pkg/acme/util/util.go +++ b/pkg/acme/util/util.go @@ -43,9 +43,6 @@ func RetryBackoff(n int, r *http.Request, resp *http.Response) time.Duration { // don't retry more than 6 times, if we get 6 nonce mismatches something is quite wrong if n > maxRetries { return -1 - } else if n < 1 { - // n is used for the backoff time below - n = 1 } var jitter time.Duration @@ -53,7 +50,15 @@ func RetryBackoff(n int, r *http.Request, resp *http.Response) time.Duration { jitter = (1 + time.Duration(x.Int64())) * time.Millisecond } - d := time.Duration(1<= 0 { + exponent = uint(temp) + } + + d := time.Duration(1< maxDelay { return maxDelay } diff --git a/pkg/acme/webhook/apis/acme/v1alpha1/types.go b/pkg/acme/webhook/apis/acme/v1alpha1/types.go index d362127c007..7df58ae864b 100644 --- a/pkg/acme/webhook/apis/acme/v1alpha1/types.go +++ b/pkg/acme/webhook/apis/acme/v1alpha1/types.go @@ -112,7 +112,7 @@ type ChallengeRequest struct { } // ChallengeAction represents an action associated with a challenge such as -// 'present' or cleanup'. +// 'present' or 'cleanup'. type ChallengeAction string const ( diff --git a/pkg/acme/webhook/apiserver/apiserver.go b/pkg/acme/webhook/apiserver/apiserver.go index d32cfdb5cd2..59353679ff0 100644 --- a/pkg/acme/webhook/apiserver/apiserver.go +++ b/pkg/acme/webhook/apiserver/apiserver.go @@ -24,10 +24,11 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer" - "k8s.io/apimachinery/pkg/version" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apiserver/pkg/endpoints/openapi" "k8s.io/apiserver/pkg/registry/rest" genericapiserver "k8s.io/apiserver/pkg/server" + utilversion "k8s.io/apiserver/pkg/util/version" restclient "k8s.io/client-go/rest" "github.com/cert-manager/cert-manager/pkg/acme/webhook" @@ -42,7 +43,7 @@ var ( ) func init() { - whapi.AddToScheme(Scheme) + utilruntime.Must(whapi.AddToScheme(Scheme)) // we need to add the options to empty v1 // TODO fix the server code to avoid this @@ -92,21 +93,15 @@ type CompletedConfig struct { // Complete fills in any fields not set that are required to have valid data. It's mutating the receiver. func (c *Config) Complete() CompletedConfig { - completedCfg := completedConfig{ + c.GenericConfig.EffectiveVersion = utilversion.NewEffectiveVersion("1.1") + c.GenericConfig.OpenAPIConfig = genericapiserver.DefaultOpenAPIConfig(cmopenapi.GetOpenAPIDefinitions, openapi.NewDefinitionNamer(Scheme)) + c.GenericConfig.OpenAPIV3Config = genericapiserver.DefaultOpenAPIV3Config(cmopenapi.GetOpenAPIDefinitions, openapi.NewDefinitionNamer(Scheme)) + + return CompletedConfig{&completedConfig{ c.GenericConfig.Complete(), &c.ExtraConfig, c.GenericConfig.ClientConfig, - } - - completedCfg.GenericConfig.Version = &version.Info{ - Major: "1", - Minor: "1", - } - - completedCfg.GenericConfig.OpenAPIConfig = genericapiserver.DefaultOpenAPIConfig(cmopenapi.GetOpenAPIDefinitions, openapi.NewDefinitionNamer(Scheme)) - completedCfg.GenericConfig.OpenAPIV3Config = genericapiserver.DefaultOpenAPIV3Config(cmopenapi.GetOpenAPIDefinitions, openapi.NewDefinitionNamer(Scheme)) - - return CompletedConfig{&completedCfg} + }} } // New returns a new instance of apiserver from the given config. Each of the @@ -167,7 +162,7 @@ func (c completedConfig) New() (*ChallengeServer, error) { } s.GenericAPIServer.AddPostStartHookOrDie(postStartName, func(context genericapiserver.PostStartHookContext) error { - return solver.Initialize(c.restConfig, context.StopCh) + return solver.Initialize(c.restConfig, context.Done()) }, ) } diff --git a/pkg/acme/webhook/cmd/cmd.go b/pkg/acme/webhook/cmd/cmd.go index 2af94726faa..89b93ab61a1 100644 --- a/pkg/acme/webhook/cmd/cmd.go +++ b/pkg/acme/webhook/cmd/cmd.go @@ -30,7 +30,7 @@ import ( logf "github.com/cert-manager/cert-manager/pkg/logs" ) -// RunWebhookServer creates and starts a new apiserver that acts as a external +// RunWebhookServer creates and starts a new apiserver that acts as an external // webhook server for solving DNS challenges using the provided solver // implementations. This can be used as an entry point by external webhook // implementations, see diff --git a/pkg/acme/webhook/cmd/server/start.go b/pkg/acme/webhook/cmd/server/start.go index fce320a1af2..4e1e3e66c7b 100644 --- a/pkg/acme/webhook/cmd/server/start.go +++ b/pkg/acme/webhook/cmd/server/start.go @@ -142,5 +142,5 @@ func (o WebhookServerOptions) RunWebhookServer(ctx context.Context) error { if err != nil { return err } - return server.GenericAPIServer.PrepareRun().Run(ctx.Done()) + return server.GenericAPIServer.PrepareRun().RunWithContext(ctx) } diff --git a/pkg/acme/webhook/openapi/zz_generated.openapi.go b/pkg/acme/webhook/openapi/zz_generated.openapi.go index 89366bd4c38..4ce4ad7aea2 100644 --- a/pkg/acme/webhook/openapi/zz_generated.openapi.go +++ b/pkg/acme/webhook/openapi/zz_generated.openapi.go @@ -70,6 +70,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/apimachinery/pkg/apis/meta/v1.CreateOptions": schema_pkg_apis_meta_v1_CreateOptions(ref), "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions": schema_pkg_apis_meta_v1_DeleteOptions(ref), "k8s.io/apimachinery/pkg/apis/meta/v1.Duration": schema_pkg_apis_meta_v1_Duration(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.FieldSelectorRequirement": schema_pkg_apis_meta_v1_FieldSelectorRequirement(ref), "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1": schema_pkg_apis_meta_v1_FieldsV1(ref), "k8s.io/apimachinery/pkg/apis/meta/v1.GetOptions": schema_pkg_apis_meta_v1_GetOptions(ref), "k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind": schema_pkg_apis_meta_v1_GroupKind(ref), @@ -1507,7 +1508,7 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba }, }, SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-validations describes a list of validation rules written in the CEL expression language. This field is an alpha-level. Using this field requires the feature gate `CustomResourceValidationExpressions` to be enabled.", + Description: "x-kubernetes-validations describes a list of validation rules written in the CEL expression language.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -2418,6 +2419,56 @@ func schema_pkg_apis_meta_v1_Duration(ref common.ReferenceCallback) common.OpenA } } +func schema_pkg_apis_meta_v1_FieldSelectorRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FieldSelectorRequirement is a selector that contains values, a key, and an operator that relates the key and values.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "key": { + SchemaProps: spec.SchemaProps{ + Description: "key is the field selector key that the requirement applies to.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "operator": { + SchemaProps: spec.SchemaProps{ + Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. The list of operators may grow in the future.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "values": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"key", "operator"}, + }, + }, + } +} + func schema_pkg_apis_meta_v1_FieldsV1(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/pkg/acme/webhook/registry/challengepayload/challenge_payload.go b/pkg/acme/webhook/registry/challengepayload/challenge_payload.go index 045667d17ae..de58eba834e 100644 --- a/pkg/acme/webhook/registry/challengepayload/challenge_payload.go +++ b/pkg/acme/webhook/registry/challengepayload/challenge_payload.go @@ -33,7 +33,7 @@ type REST struct { hookFn webhook.Solver } -var _ rest.Creater = &REST{} +var _ rest.Creater = &REST{} // nolint:misspell var _ rest.Scoper = &REST{} var _ rest.GroupVersionKindProvider = &REST{} var _ rest.SingularNameProvider = &REST{} diff --git a/pkg/api/scheme.go b/pkg/api/scheme.go index 0bb0ea33113..75e791611dc 100644 --- a/pkg/api/scheme.go +++ b/pkg/api/scheme.go @@ -23,12 +23,6 @@ import ( "k8s.io/apimachinery/pkg/runtime/serializer" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - cmacmev1alpha2 "github.com/cert-manager/cert-manager/internal/apis/acme/v1alpha2" - cmacmev1alpha3 "github.com/cert-manager/cert-manager/internal/apis/acme/v1alpha3" - cmacmev1beta1 "github.com/cert-manager/cert-manager/internal/apis/acme/v1beta1" - cmapiv1alpha2 "github.com/cert-manager/cert-manager/internal/apis/certmanager/v1alpha2" - cmapiv1alpha3 "github.com/cert-manager/cert-manager/internal/apis/certmanager/v1alpha3" - cmapiv1beta1 "github.com/cert-manager/cert-manager/internal/apis/certmanager/v1beta1" whapi "github.com/cert-manager/cert-manager/pkg/acme/webhook/apis/acme/v1alpha1" cmacmev1 "github.com/cert-manager/cert-manager/pkg/apis/acme/v1" cmapiv1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" @@ -48,13 +42,7 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ - cmapiv1alpha2.AddToScheme, - cmapiv1alpha3.AddToScheme, - cmapiv1beta1.AddToScheme, cmapiv1.AddToScheme, - cmacmev1alpha2.AddToScheme, - cmacmev1alpha3.AddToScheme, - cmacmev1beta1.AddToScheme, cmacmev1.AddToScheme, cmmeta.AddToScheme, whapi.AddToScheme, diff --git a/pkg/api/util/kube.go b/pkg/api/util/kube.go index 1956c337b63..b6a1f7be68e 100644 --- a/pkg/api/util/kube.go +++ b/pkg/api/util/kube.go @@ -69,8 +69,8 @@ func ExtKeyUsageTypeKube(usage certificatesv1.KeyUsage) (x509.ExtKeyUsage, bool) func KubeKeyUsageStrings(usage x509.KeyUsage) []certificatesv1.KeyUsage { var usageStr []certificatesv1.KeyUsage - for i := 0; i < bits.UintSize; i++ { - if v := usage & (1 << uint(i)); v != 0 { + for i := uint(0); i < bits.UintSize; i++ { + if v := usage & (1 << i); v != 0 { usageStr = append(usageStr, kubeKeyUsageString(v)) } } diff --git a/pkg/api/util/names_test.go b/pkg/api/util/names_test.go index b91d47e3259..e1dfcb4c5bd 100644 --- a/pkg/api/util/names_test.go +++ b/pkg/api/util/names_test.go @@ -176,7 +176,6 @@ func TestDNSSafeShortenToNCharacters(t *testing.T) { } for i, test := range tests { - test := test t.Run(fmt.Sprintf("test-%d", i), func(t *testing.T) { out := DNSSafeShortenToNCharacters(test.in, test.maxLength) if out != test.expOut { @@ -267,7 +266,6 @@ func TestComputeSecureUniqueDeterministicNameFromData(t *testing.T) { } for i, test := range tests { - test := test t.Run(fmt.Sprintf("test-%d", i), func(t *testing.T) { out, err := ComputeSecureUniqueDeterministicNameFromData(test.in, test.maxLength) if (err != nil) != test.expErr { diff --git a/pkg/api/util/usages.go b/pkg/api/util/usages.go index 6dc8156a159..3e612dc969b 100644 --- a/pkg/api/util/usages.go +++ b/pkg/api/util/usages.go @@ -68,8 +68,8 @@ func ExtKeyUsageType(usage cmapi.KeyUsage) (x509.ExtKeyUsage, bool) { func KeyUsageStrings(usage x509.KeyUsage) []cmapi.KeyUsage { var usageStr []cmapi.KeyUsage - for i := 0; i < bits.UintSize; i++ { - if v := usage & (1 << uint(i)); v != 0 { + for i := uint(0); i < bits.UintSize; i++ { + if v := usage & (1 << i); v != 0 { usageStr = append(usageStr, keyUsageString(v)) } } diff --git a/pkg/apis/acme/v1/const.go b/pkg/apis/acme/v1/const.go index 287ed2f6d7d..ffc76533ac1 100644 --- a/pkg/apis/acme/v1/const.go +++ b/pkg/apis/acme/v1/const.go @@ -17,5 +17,6 @@ limitations under the License. package v1 const ( - ACMEFinalizer = "finalizer.acme.cert-manager.io" + ACMELegacyFinalizer = "finalizer.acme.cert-manager.io" + ACMEDomainQualifiedFinalizer = "acme.cert-manager.io/finalizer" ) diff --git a/pkg/apis/acme/v1/types_issuer.go b/pkg/apis/acme/v1/types_issuer.go index 0da9444f4b6..04daf9dec5f 100644 --- a/pkg/apis/acme/v1/types_issuer.go +++ b/pkg/apis/acme/v1/types_issuer.go @@ -286,6 +286,11 @@ type ACMEChallengeSolverHTTP01GatewayHTTPRoute struct { // the HTTPRoute. Usually, the parentRef references a Gateway. See: // https://gateway-api.sigs.k8s.io/api-types/httproute/#attaching-to-gateways ParentRefs []gwapi.ParentReference `json:"parentRefs,omitempty"` + + // Optional pod template used to configure the ACME challenge solver pods + // used for HTTP01 challenges. + // +optional + PodTemplate *ACMEChallengeSolverHTTP01IngressPodTemplate `json:"podTemplate,omitempty"` } type ACMEChallengeSolverHTTP01IngressPodTemplate struct { @@ -304,7 +309,7 @@ type ACMEChallengeSolverHTTP01IngressPodTemplate struct { } type ACMEChallengeSolverHTTP01IngressPodObjectMeta struct { - // Annotations that should be added to the create ACME HTTP01 solver pods. + // Annotations that should be added to the created ACME HTTP01 solver pods. // +optional Annotations map[string]string `json:"annotations,omitempty"` @@ -339,6 +344,10 @@ type ACMEChallengeSolverHTTP01IngressPodSpec struct { // If specified, the pod's imagePullSecrets // +optional ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty" patchMergeKey:"name" patchStrategy:"merge"` + + // If specified, the pod's security context + // +optional + SecurityContext *ACMEChallengeSolverHTTP01IngressPodSecurityContext `json:"securityContext,omitempty"` } type ACMEChallengeSolverHTTP01IngressTemplate struct { @@ -409,6 +418,80 @@ type ACMEChallengeSolverDNS01 struct { Webhook *ACMEIssuerDNS01ProviderWebhook `json:"webhook,omitempty"` } +type ACMEChallengeSolverHTTP01IngressPodSecurityContext struct { + // The SELinux context to be applied to all containers. + // If unspecified, the container runtime will allocate a random SELinux context for each + // container. May also be set in SecurityContext. If set in + // both SecurityContext and PodSecurityContext, the value specified in SecurityContext + // takes precedence for that container. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + SELinuxOptions *corev1.SELinuxOptions `json:"seLinuxOptions,omitempty"` + // The UID to run the entrypoint of the container process. + // Defaults to user specified in image metadata if unspecified. + // May also be set in SecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence + // for that container. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + RunAsUser *int64 `json:"runAsUser,omitempty"` + // The GID to run the entrypoint of the container process. + // Uses runtime default if unset. + // May also be set in SecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence + // for that container. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + RunAsGroup *int64 `json:"runAsGroup,omitempty"` + // Indicates that the container must run as a non-root user. + // If true, the Kubelet will validate the image at runtime to ensure that it + // does not run as UID 0 (root) and fail to start the container if it does. + // If unset or false, no such validation will be performed. + // May also be set in SecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence. + // +optional + RunAsNonRoot *bool `json:"runAsNonRoot,omitempty"` + // A list of groups applied to the first process run in each container, in addition + // to the container's primary GID, the fsGroup (if specified), and group memberships + // defined in the container image for the uid of the container process. If unspecified, + // no additional groups are added to any container. Note that group memberships + // defined in the container image for the uid of the container process are still effective, + // even if they are not included in this list. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + SupplementalGroups []int64 `json:"supplementalGroups,omitempty"` + // A special supplemental group that applies to all containers in a pod. + // Some volume types allow the Kubelet to change the ownership of that volume + // to be owned by the pod: + // + // 1. The owning GID will be the FSGroup + // 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) + // 3. The permission bits are OR'd with rw-rw---- + // + // If unset, the Kubelet will not modify the ownership and permissions of any volume. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + FSGroup *int64 `json:"fsGroup,omitempty"` + // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported + // sysctls (by the container runtime) might fail to launch. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + Sysctls []corev1.Sysctl `json:"sysctls,omitempty"` + // fsGroupChangePolicy defines behavior of changing ownership and permission of the volume + // before being exposed inside Pod. This field will only apply to + // volume types which support fsGroup based ownership(and permissions). + // It will have no effect on ephemeral volume types such as: secret, configmaps + // and emptydir. + // Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + FSGroupChangePolicy *corev1.PodFSGroupChangePolicy `json:"fsGroupChangePolicy,omitempty"` + // The seccomp options to use by the containers in this pod. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + SeccompProfile *corev1.SeccompProfile `json:"seccompProfile,omitempty"` +} + // CNAMEStrategy configures how the DNS01 provider should handle CNAME records // when found in DNS zones. // By default, the None strategy will be applied (i.e. do not follow CNAMEs). @@ -512,12 +595,35 @@ type ACMEIssuerDNS01ProviderRoute53 struct { // +optional Role string `json:"role,omitempty"` - // If set, the provider will manage only this zone in Route53 and will not do an lookup using the route53:ListHostedZonesByName api call. + // If set, the provider will manage only this zone in Route53 and will not do a lookup using the route53:ListHostedZonesByName api call. // +optional HostedZoneID string `json:"hostedZoneID,omitempty"` - // Always set the region when using AccessKeyID and SecretAccessKey - Region string `json:"region"` + // Override the AWS region. + // + // Route53 is a global service and does not have regional endpoints but the + // region specified here (or via environment variables) is used as a hint to + // help compute the correct AWS credential scope and partition when it + // connects to Route53. See: + // - [Amazon Route 53 endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/r53.html) + // - [Global services](https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/global-services.html) + // + // If you omit this region field, cert-manager will use the region from + // AWS_REGION and AWS_DEFAULT_REGION environment variables, if they are set + // in the cert-manager controller Pod. + // + // The `region` field is not needed if you use [IAM Roles for Service Accounts (IRSA)](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html). + // Instead an AWS_REGION environment variable is added to the cert-manager controller Pod by: + // [Amazon EKS Pod Identity Webhook](https://github.com/aws/amazon-eks-pod-identity-webhook). + // In this case this `region` field value is ignored. + // + // The `region` field is not needed if you use [EKS Pod Identities](https://docs.aws.amazon.com/eks/latest/userguide/pod-identities.html). + // Instead an AWS_REGION environment variable is added to the cert-manager controller Pod by: + // [Amazon EKS Pod Identity Agent](https://github.com/aws/eks-pod-identity-agent), + // In this case this `region` field value is ignored. + // + // +optional + Region string `json:"region,omitempty"` } // Route53Auth is configuration used to authenticate with a Route53. diff --git a/pkg/apis/acme/v1/types_order.go b/pkg/apis/acme/v1/types_order.go index e9a50a30134..f945a43ff00 100644 --- a/pkg/apis/acme/v1/types_order.go +++ b/pkg/apis/acme/v1/types_order.go @@ -223,7 +223,7 @@ const ( Processing State = "processing" // Invalid signifies that an ACME resource is invalid for some reason. - // If an Order is marked 'invalid', one of its validations be have invalid for some reason. + // If an Order is marked 'invalid', one of its validations must be invalid for some reason. // This is a final state. Invalid State = "invalid" diff --git a/pkg/apis/acme/v1/zz_generated.deepcopy.go b/pkg/apis/acme/v1/zz_generated.deepcopy.go index 655be302a57..09f27f5cc5f 100644 --- a/pkg/apis/acme/v1/zz_generated.deepcopy.go +++ b/pkg/apis/acme/v1/zz_generated.deepcopy.go @@ -207,6 +207,11 @@ func (in *ACMEChallengeSolverHTTP01GatewayHTTPRoute) DeepCopyInto(out *ACMEChall (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.PodTemplate != nil { + in, out := &in.PodTemplate, &out.PodTemplate + *out = new(ACMEChallengeSolverHTTP01IngressPodTemplate) + (*in).DeepCopyInto(*out) + } return } @@ -316,6 +321,67 @@ func (in *ACMEChallengeSolverHTTP01IngressPodObjectMeta) DeepCopy() *ACMEChallen return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ACMEChallengeSolverHTTP01IngressPodSecurityContext) DeepCopyInto(out *ACMEChallengeSolverHTTP01IngressPodSecurityContext) { + *out = *in + if in.SELinuxOptions != nil { + in, out := &in.SELinuxOptions, &out.SELinuxOptions + *out = new(corev1.SELinuxOptions) + **out = **in + } + if in.RunAsUser != nil { + in, out := &in.RunAsUser, &out.RunAsUser + *out = new(int64) + **out = **in + } + if in.RunAsGroup != nil { + in, out := &in.RunAsGroup, &out.RunAsGroup + *out = new(int64) + **out = **in + } + if in.RunAsNonRoot != nil { + in, out := &in.RunAsNonRoot, &out.RunAsNonRoot + *out = new(bool) + **out = **in + } + if in.SupplementalGroups != nil { + in, out := &in.SupplementalGroups, &out.SupplementalGroups + *out = make([]int64, len(*in)) + copy(*out, *in) + } + if in.FSGroup != nil { + in, out := &in.FSGroup, &out.FSGroup + *out = new(int64) + **out = **in + } + if in.Sysctls != nil { + in, out := &in.Sysctls, &out.Sysctls + *out = make([]corev1.Sysctl, len(*in)) + copy(*out, *in) + } + if in.FSGroupChangePolicy != nil { + in, out := &in.FSGroupChangePolicy, &out.FSGroupChangePolicy + *out = new(corev1.PodFSGroupChangePolicy) + **out = **in + } + if in.SeccompProfile != nil { + in, out := &in.SeccompProfile, &out.SeccompProfile + *out = new(corev1.SeccompProfile) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEChallengeSolverHTTP01IngressPodSecurityContext. +func (in *ACMEChallengeSolverHTTP01IngressPodSecurityContext) DeepCopy() *ACMEChallengeSolverHTTP01IngressPodSecurityContext { + if in == nil { + return nil + } + out := new(ACMEChallengeSolverHTTP01IngressPodSecurityContext) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ACMEChallengeSolverHTTP01IngressPodSpec) DeepCopyInto(out *ACMEChallengeSolverHTTP01IngressPodSpec) { *out = *in @@ -343,6 +409,11 @@ func (in *ACMEChallengeSolverHTTP01IngressPodSpec) DeepCopyInto(out *ACMEChallen *out = make([]corev1.LocalObjectReference, len(*in)) copy(*out, *in) } + if in.SecurityContext != nil { + in, out := &in.SecurityContext, &out.SecurityContext + *out = new(ACMEChallengeSolverHTTP01IngressPodSecurityContext) + (*in).DeepCopyInto(*out) + } return } diff --git a/pkg/apis/certmanager/v1/const.go b/pkg/apis/certmanager/v1/const.go index 7b8a8b0b678..9d61baebaf2 100644 --- a/pkg/apis/certmanager/v1/const.go +++ b/pkg/apis/certmanager/v1/const.go @@ -40,4 +40,9 @@ const ( // (/v1/auth/kubernetes). The endpoint will then be called at `/login`, so // left as the default, `/v1/auth/kubernetes/login` will be called. DefaultVaultKubernetesAuthMountPath = "/v1/auth/kubernetes" + + // Default mount path location for client certificate authentication + // (/v1/auth/cert). The endpoint will then be called at `/login`, so + // left as the default, `/v1/auth/cert/login` will be called. + DefaultVaultClientCertificateAuthMountPath = "/v1/auth/cert" ) diff --git a/pkg/apis/certmanager/v1/types.go b/pkg/apis/certmanager/v1/types.go index 31e737c60fa..1afeedf022e 100644 --- a/pkg/apis/certmanager/v1/types.go +++ b/pkg/apis/certmanager/v1/types.go @@ -50,6 +50,9 @@ const ( // Annotation key for certificate renewBefore. RenewBeforeAnnotationKey = "cert-manager.io/renew-before" + // Annotation key for certificate renewBeforePercentage. + RenewBeforePercentageAnnotationKey = "cert-manager.io/renew-before-percentage" + // Annotation key for emails subjectAltNames. EmailsAnnotationKey = "cert-manager.io/email-sans" diff --git a/pkg/apis/certmanager/v1/types_certificate.go b/pkg/apis/certmanager/v1/types_certificate.go index b37cf1b6e25..68e2ccfb753 100644 --- a/pkg/apis/certmanager/v1/types_certificate.go +++ b/pkg/apis/certmanager/v1/types_certificate.go @@ -22,7 +22,7 @@ import ( cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" ) -// NOTE: Be mindful of adding OpenAPI validation- see https://github.com/cert-manager/cert-manager/issues/3644 +// NOTE: Be mindful of adding OpenAPI validation - see https://github.com/cert-manager/cert-manager/issues/3644 // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -164,9 +164,27 @@ type CertificateSpec struct { // If unset, this defaults to 1/3 of the issued certificate's lifetime. // Minimum accepted value is 5 minutes. // Value must be in units accepted by Go time.ParseDuration https://golang.org/pkg/time/#ParseDuration. + // Cannot be set if the `renewBeforePercentage` field is set. // +optional RenewBefore *metav1.Duration `json:"renewBefore,omitempty"` + // `renewBeforePercentage` is like `renewBefore`, except it is a relative percentage + // rather than an absolute duration. For example, if a certificate is valid for 60 + // minutes, and `renewBeforePercentage=25`, cert-manager will begin to attempt to + // renew the certificate 45 minutes after it was issued (i.e. when there are 15 + // minutes (25%) remaining until the certificate is no longer valid). + // + // NOTE: The actual lifetime of the issued certificate is used to determine the + // renewal time. If an issuer returns a certificate with a different lifetime than + // the one requested, cert-manager will use the lifetime of the issued certificate. + // + // Value must be an integer in the range (0,100). The minimum effective + // `renewBefore` derived from the `renewBeforePercentage` and `duration` fields is 5 + // minutes. + // Cannot be set if the `renewBefore` field is set. + // +optional + RenewBeforePercentage *int32 `json:"renewBeforePercentage,omitempty"` + // Requested DNS subject alternative names. // +optional DNSNames []string `json:"dnsNames,omitempty"` @@ -298,7 +316,7 @@ type CertificatePrivateKey struct { // re-issuance is being processed. // // If set to `Never`, a private key will only be generated if one does not - // already exist in the target `spec.secretName`. If one does exists but it + // already exist in the target `spec.secretName`. If one does exist but it // does not have the correct algorithm or size, a warning will be raised // to await user intervention. // If set to `Always`, a private key matching the specified requirements @@ -347,7 +365,7 @@ type PrivateKeyRotationPolicy string var ( // RotationPolicyNever means a private key will only be generated if one // does not already exist in the target `spec.secretName`. - // If one does exists but it does not have the correct algorithm or size, + // If one does exist but it does not have the correct algorithm or size, // a warning will be raised to await user intervention. RotationPolicyNever PrivateKeyRotationPolicy = "Never" @@ -518,7 +536,7 @@ type CertificateStatus struct { // +optional Conditions []CertificateCondition `json:"conditions,omitempty"` - // LastFailureTime is set only if the lastest issuance for this + // LastFailureTime is set only if the latest issuance for this // Certificate failed and contains the time of the failure. If an // issuance has failed, the delay till the next issuance will be // calculated using formula time.Hour * 2 ^ (failedIssuanceAttempts - @@ -577,7 +595,7 @@ type CertificateStatus struct { FailedIssuanceAttempts *int `json:"failedIssuanceAttempts,omitempty"` } -// CertificateCondition contains condition information for an Certificate. +// CertificateCondition contains condition information for a Certificate. type CertificateCondition struct { // Type of the condition, known values are (`Ready`, `Issuing`). Type CertificateConditionType `json:"type"` @@ -609,7 +627,7 @@ type CertificateCondition struct { ObservedGeneration int64 `json:"observedGeneration,omitempty"` } -// CertificateConditionType represents an Certificate condition value. +// CertificateConditionType represents a Certificate condition value. type CertificateConditionType string const ( diff --git a/pkg/apis/certmanager/v1/types_certificaterequest.go b/pkg/apis/certmanager/v1/types_certificaterequest.go index 59797c76c75..8f31d84c0a2 100644 --- a/pkg/apis/certmanager/v1/types_certificaterequest.go +++ b/pkg/apis/certmanager/v1/types_certificaterequest.go @@ -220,7 +220,7 @@ type CertificateRequestCondition struct { Message string `json:"message,omitempty"` } -// CertificateRequestConditionType represents an Certificate condition value. +// CertificateRequestConditionType represents a Certificate condition value. type CertificateRequestConditionType string const ( diff --git a/pkg/apis/certmanager/v1/types_issuer.go b/pkg/apis/certmanager/v1/types_issuer.go index 57645c5c0e7..efb1f5286da 100644 --- a/pkg/apis/certmanager/v1/types_issuer.go +++ b/pkg/apis/certmanager/v1/types_issuer.go @@ -149,9 +149,9 @@ type VenafiTPP struct { // for example: "https://tpp.example.com/vedsdk". URL string `json:"url"` - // CredentialsRef is a reference to a Secret containing the username and - // password for the TPP server. - // The secret must contain two keys, 'username' and 'password'. + // CredentialsRef is a reference to a Secret containing the Venafi TPP API credentials. + // The secret must contain the key 'access-token' for the Access Token Authentication, + // or two keys, 'username' and 'password' for the API Keys Authentication. CredentialsRef cmmeta.LocalObjectReference `json:"credentialsRef"` // Base64-encoded bundle of PEM CAs which will be used to validate the certificate @@ -160,6 +160,14 @@ type VenafiTPP struct { // is used to validate the chain. // +optional CABundle []byte `json:"caBundle,omitempty"` + + // Reference to a Secret containing a base64-encoded bundle of PEM CAs + // which will be used to validate the certificate chain presented by the TPP server. + // Only used if using HTTPS; ignored for HTTP. Mutually exclusive with CABundle. + // If neither CABundle nor CABundleSecretRef is defined, the certificate bundle in + // the cert-manager controller container is used to validate the TLS connection. + // +optional + CABundleSecretRef *cmmeta.SecretKeySelector `json:"caBundleSecretRef,omitempty"` } // VenafiCloud defines connection configuration details for Venafi Cloud @@ -231,7 +239,7 @@ type VaultIssuer struct { } // VaultAuth is configuration used to authenticate with a Vault server. The -// order of precedence is [`tokenSecretRef`, `appRole` or `kubernetes`]. +// order of precedence is [`tokenSecretRef`, `appRole`, `clientCertificate` or `kubernetes`]. type VaultAuth struct { // TokenSecretRef authenticates with Vault by presenting a token. // +optional @@ -242,6 +250,12 @@ type VaultAuth struct { // +optional AppRole *VaultAppRole `json:"appRole,omitempty"` + // ClientCertificate authenticates with Vault by presenting a client + // certificate during the request's TLS handshake. + // Works only when using HTTPS protocol. + // +optional + ClientCertificate *VaultClientCertificateAuth `json:"clientCertificate,omitempty"` + // Kubernetes authenticates with Vault by passing the ServiceAccount // token stored in the named Secret resource to the Vault server. // +optional @@ -266,6 +280,28 @@ type VaultAppRole struct { SecretRef cmmeta.SecretKeySelector `json:"secretRef"` } +// VaultKubernetesAuth is used to authenticate against Vault using a client +// certificate stored in a Secret. +type VaultClientCertificateAuth struct { + // The Vault mountPath here is the mount path to use when authenticating with + // Vault. For example, setting a value to `/v1/auth/foo`, will use the path + // `/v1/auth/foo/login` to authenticate with Vault. If unspecified, the + // default value "/v1/auth/cert" will be used. + // +optional + Path string `json:"mountPath,omitempty"` + + // Reference to Kubernetes Secret of type "kubernetes.io/tls" (hence containing + // tls.crt and tls.key) used to authenticate to Vault using TLS client + // authentication. + // +optional + SecretName string `json:"secretName,omitempty"` + + // Name of the certificate role to authenticate against. + // If not set, matching any certificate role, if available. + // +optional + Name string `json:"name,omitempty"` +} + // Authenticate against Vault using a Kubernetes ServiceAccount token stored in // a Secret. type VaultKubernetesAuth struct { diff --git a/pkg/apis/certmanager/v1/zz_generated.deepcopy.go b/pkg/apis/certmanager/v1/zz_generated.deepcopy.go index 27331ba5942..9c024c6afe6 100644 --- a/pkg/apis/certmanager/v1/zz_generated.deepcopy.go +++ b/pkg/apis/certmanager/v1/zz_generated.deepcopy.go @@ -416,6 +416,11 @@ func (in *CertificateSpec) DeepCopyInto(out *CertificateSpec) { *out = new(metav1.Duration) **out = **in } + if in.RenewBeforePercentage != nil { + in, out := &in.RenewBeforePercentage, &out.RenewBeforePercentage + *out = new(int32) + **out = **in + } if in.DNSNames != nil { in, out := &in.DNSNames, &out.DNSNames *out = make([]string, len(*in)) @@ -966,6 +971,11 @@ func (in *VaultAuth) DeepCopyInto(out *VaultAuth) { *out = new(VaultAppRole) **out = **in } + if in.ClientCertificate != nil { + in, out := &in.ClientCertificate, &out.ClientCertificate + *out = new(VaultClientCertificateAuth) + **out = **in + } if in.Kubernetes != nil { in, out := &in.Kubernetes, &out.Kubernetes *out = new(VaultKubernetesAuth) @@ -984,6 +994,22 @@ func (in *VaultAuth) DeepCopy() *VaultAuth { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VaultClientCertificateAuth) DeepCopyInto(out *VaultClientCertificateAuth) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultClientCertificateAuth. +func (in *VaultClientCertificateAuth) DeepCopy() *VaultClientCertificateAuth { + if in == nil { + return nil + } + out := new(VaultClientCertificateAuth) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VaultIssuer) DeepCopyInto(out *VaultIssuer) { *out = *in @@ -1095,6 +1121,11 @@ func (in *VenafiTPP) DeepCopyInto(out *VenafiTPP) { *out = make([]byte, len(*in)) copy(*out, *in) } + if in.CABundleSecretRef != nil { + in, out := &in.CABundleSecretRef, &out.CABundleSecretRef + *out = new(apismetav1.SecretKeySelector) + **out = **in + } return } diff --git a/pkg/apis/config/cainjector/v1alpha1/types.go b/pkg/apis/config/cainjector/v1alpha1/types.go index deb33771e0a..c1c7303de05 100644 --- a/pkg/apis/config/cainjector/v1alpha1/types.go +++ b/pkg/apis/config/cainjector/v1alpha1/types.go @@ -64,10 +64,18 @@ type CAInjectorConfiguration struct { // features. // +optional FeatureGates map[string]bool `json:"featureGates,omitempty"` + + // The host and port that the metrics endpoint should listen on. + // The value "0" disables the metrics server. + // Defaults to '0.0.0.0:9402'. + MetricsListenAddress string `json:"metricsListenAddress,omitempty"` + + // metricsTLSConfig is used to configure the metrics server TLS settings. + MetricsTLSConfig sharedv1alpha1.TLSConfig `json:"metricsTLSConfig"` } type EnableDataSourceConfig struct { - // Certificates detemines whether cainjector's control loops will watch + // Certificates determines whether cainjector's control loops will watch // cert-manager Certificate resources as potential sources of CA data. // If not set, defaults to true. Certificates *bool `json:"certificates"` diff --git a/pkg/apis/config/cainjector/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/config/cainjector/v1alpha1/zz_generated.deepcopy.go index 684d06dcd29..65191496966 100644 --- a/pkg/apis/config/cainjector/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/config/cainjector/v1alpha1/zz_generated.deepcopy.go @@ -40,6 +40,7 @@ func (in *CAInjectorConfiguration) DeepCopyInto(out *CAInjectorConfiguration) { (*out)[key] = val } } + in.MetricsTLSConfig.DeepCopyInto(&out.MetricsTLSConfig) return } diff --git a/pkg/apis/config/controller/v1alpha1/types.go b/pkg/apis/config/controller/v1alpha1/types.go index 78f8ace55bb..41a51aaad97 100644 --- a/pkg/apis/config/controller/v1alpha1/types.go +++ b/pkg/apis/config/controller/v1alpha1/types.go @@ -45,7 +45,7 @@ type ControllerConfiguration struct { // If set, this limits the scope of cert-manager to a single namespace and // ClusterIssuers are disabled. If not specified, all namespaces will be - // watched" + // watched Namespace string `json:"namespace,omitempty"` // Namespace to store resources owned by cluster scoped resources such as ClusterIssuer in. @@ -90,7 +90,7 @@ type ControllerConfiguration struct { // CertificateRequest and Order, as well as from CertificateSigningRequest to // Order, by passing a list of annotation key prefixes. A prefix starting with // a dash(-) specifies an annotation that shouldn't be copied. Example: - // '*,-kubectl.kuberenetes.io/'- all annotations will be copied apart from the + // '*,-kubectl.kubernetes.io/'- all annotations will be copied apart from the // ones where the key is prefixed with 'kubectl.kubernetes.io/'. CopiedAnnotationPrefixes []string `json:"copiedAnnotationPrefixes,omitempty"` @@ -159,7 +159,7 @@ type IngressShimConfig struct { // not specified on the ingress resource. DefaultIssuerGroup string `json:"defaultIssuerGroup,omitempty"` - // The annotation consumed by the ingress-shim controller to indicate a ingress + // The annotation consumed by the ingress-shim controller to indicate an ingress // is requesting a certificate DefaultAutoCertificateAnnotations []string `json:"defaultAutoCertificateAnnotations,omitempty"` } diff --git a/pkg/apis/config/webhook/v1alpha1/types.go b/pkg/apis/config/webhook/v1alpha1/types.go index 2b5fbb22597..38cecb76157 100644 --- a/pkg/apis/config/webhook/v1alpha1/types.go +++ b/pkg/apis/config/webhook/v1alpha1/types.go @@ -64,4 +64,12 @@ type WebhookConfiguration struct { // features. // +optional FeatureGates map[string]bool `json:"featureGates,omitempty"` + + // The host and port that the metrics endpoint should listen on. + // The value "0" disables the metrics server. + // Defaults to '0.0.0.0:9402'. + MetricsListenAddress string `json:"metricsListenAddress,omitempty"` + + // metricsTLSConfig is used to configure the metrics server TLS settings. + MetricsTLSConfig sharedv1alpha1.TLSConfig `json:"metricsTLSConfig"` } diff --git a/pkg/apis/config/webhook/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/config/webhook/v1alpha1/zz_generated.deepcopy.go index e284758ae86..43f50d78d05 100644 --- a/pkg/apis/config/webhook/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/config/webhook/v1alpha1/zz_generated.deepcopy.go @@ -48,6 +48,7 @@ func (in *WebhookConfiguration) DeepCopyInto(out *WebhookConfiguration) { (*out)[key] = val } } + in.MetricsTLSConfig.DeepCopyInto(&out.MetricsTLSConfig) return } diff --git a/pkg/cainjector/configfile/configfile.go b/pkg/cainjector/configfile/configfile.go index 3fd590845ff..29c26523eab 100644 --- a/pkg/cainjector/configfile/configfile.go +++ b/pkg/cainjector/configfile/configfile.go @@ -79,6 +79,8 @@ func (cfg *CAInjectorConfigFile) GetPathRefs() ([]*string, error) { // passing the configuration to the application. This method must be kept up to date as new fields are added. func CAInjectorConfigurationPathRefs(cfg *config.CAInjectorConfiguration) ([]*string, error) { return []*string{ + &cfg.MetricsTLSConfig.Filesystem.KeyFile, + &cfg.MetricsTLSConfig.Filesystem.CertFile, &cfg.KubeConfig, }, nil } diff --git a/pkg/client/clientset/versioned/fake/clientset_generated.go b/pkg/client/clientset/versioned/fake/clientset_generated.go index ecb72c06d76..53991e1cff5 100644 --- a/pkg/client/clientset/versioned/fake/clientset_generated.go +++ b/pkg/client/clientset/versioned/fake/clientset_generated.go @@ -33,8 +33,12 @@ import ( // 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 +// without applying any field management, validations and/or defaults. It shouldn't be considered a replacement // for a real clientset and is mostly useful in simple unit tests. +// +// DEPRECATED: NewClientset replaces this with support for field management, which significantly improves +// server side apply testing. NewClientset is only available when apply configurations are generated (e.g. +// via --with-applyconfig). func NewSimpleClientset(objects ...runtime.Object) *Clientset { o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) for _, obj := range objects { diff --git a/pkg/client/clientset/versioned/typed/acme/v1/challenge.go b/pkg/client/clientset/versioned/typed/acme/v1/challenge.go index 225f3983fbb..76fc50c1483 100644 --- a/pkg/client/clientset/versioned/typed/acme/v1/challenge.go +++ b/pkg/client/clientset/versioned/typed/acme/v1/challenge.go @@ -20,14 +20,13 @@ package v1 import ( "context" - "time" v1 "github.com/cert-manager/cert-manager/pkg/apis/acme/v1" scheme "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/scheme" metav1 "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" + gentype "k8s.io/client-go/gentype" ) // ChallengesGetter has a method to return a ChallengeInterface. @@ -40,6 +39,7 @@ type ChallengesGetter interface { type ChallengeInterface interface { Create(ctx context.Context, challenge *v1.Challenge, opts metav1.CreateOptions) (*v1.Challenge, error) Update(ctx context.Context, challenge *v1.Challenge, opts metav1.UpdateOptions) (*v1.Challenge, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). UpdateStatus(ctx context.Context, challenge *v1.Challenge, opts metav1.UpdateOptions) (*v1.Challenge, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error @@ -52,144 +52,18 @@ type ChallengeInterface interface { // challenges implements ChallengeInterface type challenges struct { - client rest.Interface - ns string + *gentype.ClientWithList[*v1.Challenge, *v1.ChallengeList] } // newChallenges returns a Challenges func newChallenges(c *AcmeV1Client, namespace string) *challenges { return &challenges{ - client: c.RESTClient(), - ns: namespace, + gentype.NewClientWithList[*v1.Challenge, *v1.ChallengeList]( + "challenges", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *v1.Challenge { return &v1.Challenge{} }, + func() *v1.ChallengeList { return &v1.ChallengeList{} }), } } - -// Get takes name of the challenge, and returns the corresponding challenge object, and an error if there is any. -func (c *challenges) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Challenge, err error) { - result = &v1.Challenge{} - err = c.client.Get(). - Namespace(c.ns). - Resource("challenges"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Challenges that match those selectors. -func (c *challenges) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ChallengeList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.ChallengeList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("challenges"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested challenges. -func (c *challenges) Watch(ctx context.Context, opts metav1.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(ctx) -} - -// 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(ctx context.Context, challenge *v1.Challenge, opts metav1.CreateOptions) (result *v1.Challenge, err error) { - result = &v1.Challenge{} - err = c.client.Post(). - Namespace(c.ns). - Resource("challenges"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(challenge). - Do(ctx). - 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(ctx context.Context, challenge *v1.Challenge, opts metav1.UpdateOptions) (result *v1.Challenge, err error) { - result = &v1.Challenge{} - err = c.client.Put(). - Namespace(c.ns). - Resource("challenges"). - Name(challenge.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(challenge). - Do(ctx). - 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(ctx context.Context, challenge *v1.Challenge, opts metav1.UpdateOptions) (result *v1.Challenge, err error) { - result = &v1.Challenge{} - err = c.client.Put(). - Namespace(c.ns). - Resource("challenges"). - Name(challenge.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(challenge). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the challenge and deletes it. Returns an error if one occurs. -func (c *challenges) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("challenges"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *challenges) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("challenges"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched challenge. -func (c *challenges) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Challenge, err error) { - result = &v1.Challenge{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("challenges"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/clientset/versioned/typed/acme/v1/fake/fake_challenge.go b/pkg/client/clientset/versioned/typed/acme/v1/fake/fake_challenge.go index 2359c31fd4b..b3439d6e942 100644 --- a/pkg/client/clientset/versioned/typed/acme/v1/fake/fake_challenge.go +++ b/pkg/client/clientset/versioned/typed/acme/v1/fake/fake_challenge.go @@ -41,22 +41,24 @@ var challengesKind = v1.SchemeGroupVersion.WithKind("Challenge") // Get takes name of the challenge, and returns the corresponding challenge object, and an error if there is any. func (c *FakeChallenges) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Challenge, err error) { + emptyResult := &v1.Challenge{} obj, err := c.Fake. - Invokes(testing.NewGetAction(challengesResource, c.ns, name), &v1.Challenge{}) + Invokes(testing.NewGetActionWithOptions(challengesResource, c.ns, name, options), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.Challenge), err } // List takes label and field selectors, and returns the list of Challenges that match those selectors. func (c *FakeChallenges) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ChallengeList, err error) { + emptyResult := &v1.ChallengeList{} obj, err := c.Fake. - Invokes(testing.NewListAction(challengesResource, challengesKind, c.ns, opts), &v1.ChallengeList{}) + Invokes(testing.NewListActionWithOptions(challengesResource, challengesKind, c.ns, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } label, _, _ := testing.ExtractFromListOptions(opts) @@ -75,40 +77,43 @@ func (c *FakeChallenges) List(ctx context.Context, opts metav1.ListOptions) (res // Watch returns a watch.Interface that watches the requested challenges. func (c *FakeChallenges) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. - InvokesWatch(testing.NewWatchAction(challengesResource, c.ns, opts)) + InvokesWatch(testing.NewWatchActionWithOptions(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(ctx context.Context, challenge *v1.Challenge, opts metav1.CreateOptions) (result *v1.Challenge, err error) { + emptyResult := &v1.Challenge{} obj, err := c.Fake. - Invokes(testing.NewCreateAction(challengesResource, c.ns, challenge), &v1.Challenge{}) + Invokes(testing.NewCreateActionWithOptions(challengesResource, c.ns, challenge, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.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(ctx context.Context, challenge *v1.Challenge, opts metav1.UpdateOptions) (result *v1.Challenge, err error) { + emptyResult := &v1.Challenge{} obj, err := c.Fake. - Invokes(testing.NewUpdateAction(challengesResource, c.ns, challenge), &v1.Challenge{}) + Invokes(testing.NewUpdateActionWithOptions(challengesResource, c.ns, challenge, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.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(ctx context.Context, challenge *v1.Challenge, opts metav1.UpdateOptions) (*v1.Challenge, error) { +func (c *FakeChallenges) UpdateStatus(ctx context.Context, challenge *v1.Challenge, opts metav1.UpdateOptions) (result *v1.Challenge, err error) { + emptyResult := &v1.Challenge{} obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(challengesResource, "status", c.ns, challenge), &v1.Challenge{}) + Invokes(testing.NewUpdateSubresourceActionWithOptions(challengesResource, "status", c.ns, challenge, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.Challenge), err } @@ -123,7 +128,7 @@ func (c *FakeChallenges) Delete(ctx context.Context, name string, opts metav1.De // DeleteCollection deletes a collection of objects. func (c *FakeChallenges) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionAction(challengesResource, c.ns, listOpts) + action := testing.NewDeleteCollectionActionWithOptions(challengesResource, c.ns, opts, listOpts) _, err := c.Fake.Invokes(action, &v1.ChallengeList{}) return err @@ -131,11 +136,12 @@ func (c *FakeChallenges) DeleteCollection(ctx context.Context, opts metav1.Delet // Patch applies the patch and returns the patched challenge. func (c *FakeChallenges) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Challenge, err error) { + emptyResult := &v1.Challenge{} obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(challengesResource, c.ns, name, pt, data, subresources...), &v1.Challenge{}) + Invokes(testing.NewPatchSubresourceActionWithOptions(challengesResource, c.ns, name, pt, data, opts, subresources...), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.Challenge), err } diff --git a/pkg/client/clientset/versioned/typed/acme/v1/fake/fake_order.go b/pkg/client/clientset/versioned/typed/acme/v1/fake/fake_order.go index 6f0234dcdb0..b56c9e32bfe 100644 --- a/pkg/client/clientset/versioned/typed/acme/v1/fake/fake_order.go +++ b/pkg/client/clientset/versioned/typed/acme/v1/fake/fake_order.go @@ -41,22 +41,24 @@ var ordersKind = v1.SchemeGroupVersion.WithKind("Order") // Get takes name of the order, and returns the corresponding order object, and an error if there is any. func (c *FakeOrders) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Order, err error) { + emptyResult := &v1.Order{} obj, err := c.Fake. - Invokes(testing.NewGetAction(ordersResource, c.ns, name), &v1.Order{}) + Invokes(testing.NewGetActionWithOptions(ordersResource, c.ns, name, options), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.Order), err } // List takes label and field selectors, and returns the list of Orders that match those selectors. func (c *FakeOrders) List(ctx context.Context, opts metav1.ListOptions) (result *v1.OrderList, err error) { + emptyResult := &v1.OrderList{} obj, err := c.Fake. - Invokes(testing.NewListAction(ordersResource, ordersKind, c.ns, opts), &v1.OrderList{}) + Invokes(testing.NewListActionWithOptions(ordersResource, ordersKind, c.ns, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } label, _, _ := testing.ExtractFromListOptions(opts) @@ -75,40 +77,43 @@ func (c *FakeOrders) List(ctx context.Context, opts metav1.ListOptions) (result // Watch returns a watch.Interface that watches the requested orders. func (c *FakeOrders) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. - InvokesWatch(testing.NewWatchAction(ordersResource, c.ns, opts)) + InvokesWatch(testing.NewWatchActionWithOptions(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(ctx context.Context, order *v1.Order, opts metav1.CreateOptions) (result *v1.Order, err error) { + emptyResult := &v1.Order{} obj, err := c.Fake. - Invokes(testing.NewCreateAction(ordersResource, c.ns, order), &v1.Order{}) + Invokes(testing.NewCreateActionWithOptions(ordersResource, c.ns, order, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.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(ctx context.Context, order *v1.Order, opts metav1.UpdateOptions) (result *v1.Order, err error) { + emptyResult := &v1.Order{} obj, err := c.Fake. - Invokes(testing.NewUpdateAction(ordersResource, c.ns, order), &v1.Order{}) + Invokes(testing.NewUpdateActionWithOptions(ordersResource, c.ns, order, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.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(ctx context.Context, order *v1.Order, opts metav1.UpdateOptions) (*v1.Order, error) { +func (c *FakeOrders) UpdateStatus(ctx context.Context, order *v1.Order, opts metav1.UpdateOptions) (result *v1.Order, err error) { + emptyResult := &v1.Order{} obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(ordersResource, "status", c.ns, order), &v1.Order{}) + Invokes(testing.NewUpdateSubresourceActionWithOptions(ordersResource, "status", c.ns, order, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.Order), err } @@ -123,7 +128,7 @@ func (c *FakeOrders) Delete(ctx context.Context, name string, opts metav1.Delete // DeleteCollection deletes a collection of objects. func (c *FakeOrders) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionAction(ordersResource, c.ns, listOpts) + action := testing.NewDeleteCollectionActionWithOptions(ordersResource, c.ns, opts, listOpts) _, err := c.Fake.Invokes(action, &v1.OrderList{}) return err @@ -131,11 +136,12 @@ func (c *FakeOrders) DeleteCollection(ctx context.Context, opts metav1.DeleteOpt // Patch applies the patch and returns the patched order. func (c *FakeOrders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Order, err error) { + emptyResult := &v1.Order{} obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(ordersResource, c.ns, name, pt, data, subresources...), &v1.Order{}) + Invokes(testing.NewPatchSubresourceActionWithOptions(ordersResource, c.ns, name, pt, data, opts, subresources...), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.Order), err } diff --git a/pkg/client/clientset/versioned/typed/acme/v1/order.go b/pkg/client/clientset/versioned/typed/acme/v1/order.go index 35f3f138b26..7ad95fb7a56 100644 --- a/pkg/client/clientset/versioned/typed/acme/v1/order.go +++ b/pkg/client/clientset/versioned/typed/acme/v1/order.go @@ -20,14 +20,13 @@ package v1 import ( "context" - "time" v1 "github.com/cert-manager/cert-manager/pkg/apis/acme/v1" scheme "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/scheme" metav1 "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" + gentype "k8s.io/client-go/gentype" ) // OrdersGetter has a method to return a OrderInterface. @@ -40,6 +39,7 @@ type OrdersGetter interface { type OrderInterface interface { Create(ctx context.Context, order *v1.Order, opts metav1.CreateOptions) (*v1.Order, error) Update(ctx context.Context, order *v1.Order, opts metav1.UpdateOptions) (*v1.Order, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). UpdateStatus(ctx context.Context, order *v1.Order, opts metav1.UpdateOptions) (*v1.Order, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error @@ -52,144 +52,18 @@ type OrderInterface interface { // orders implements OrderInterface type orders struct { - client rest.Interface - ns string + *gentype.ClientWithList[*v1.Order, *v1.OrderList] } // newOrders returns a Orders func newOrders(c *AcmeV1Client, namespace string) *orders { return &orders{ - client: c.RESTClient(), - ns: namespace, + gentype.NewClientWithList[*v1.Order, *v1.OrderList]( + "orders", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *v1.Order { return &v1.Order{} }, + func() *v1.OrderList { return &v1.OrderList{} }), } } - -// Get takes name of the order, and returns the corresponding order object, and an error if there is any. -func (c *orders) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Order, err error) { - result = &v1.Order{} - err = c.client.Get(). - Namespace(c.ns). - Resource("orders"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Orders that match those selectors. -func (c *orders) List(ctx context.Context, opts metav1.ListOptions) (result *v1.OrderList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.OrderList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("orders"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested orders. -func (c *orders) Watch(ctx context.Context, opts metav1.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(ctx) -} - -// 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(ctx context.Context, order *v1.Order, opts metav1.CreateOptions) (result *v1.Order, err error) { - result = &v1.Order{} - err = c.client.Post(). - Namespace(c.ns). - Resource("orders"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(order). - Do(ctx). - 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(ctx context.Context, order *v1.Order, opts metav1.UpdateOptions) (result *v1.Order, err error) { - result = &v1.Order{} - err = c.client.Put(). - Namespace(c.ns). - Resource("orders"). - Name(order.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(order). - Do(ctx). - 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(ctx context.Context, order *v1.Order, opts metav1.UpdateOptions) (result *v1.Order, err error) { - result = &v1.Order{} - err = c.client.Put(). - Namespace(c.ns). - Resource("orders"). - Name(order.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(order). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the order and deletes it. Returns an error if one occurs. -func (c *orders) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("orders"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *orders) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("orders"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched order. -func (c *orders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Order, err error) { - result = &v1.Order{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("orders"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/clientset/versioned/typed/certmanager/v1/certificate.go b/pkg/client/clientset/versioned/typed/certmanager/v1/certificate.go index f7e396186ff..64a1b300491 100644 --- a/pkg/client/clientset/versioned/typed/certmanager/v1/certificate.go +++ b/pkg/client/clientset/versioned/typed/certmanager/v1/certificate.go @@ -20,14 +20,13 @@ package v1 import ( "context" - "time" v1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" scheme "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/scheme" metav1 "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" + gentype "k8s.io/client-go/gentype" ) // CertificatesGetter has a method to return a CertificateInterface. @@ -40,6 +39,7 @@ type CertificatesGetter interface { type CertificateInterface interface { Create(ctx context.Context, certificate *v1.Certificate, opts metav1.CreateOptions) (*v1.Certificate, error) Update(ctx context.Context, certificate *v1.Certificate, opts metav1.UpdateOptions) (*v1.Certificate, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). UpdateStatus(ctx context.Context, certificate *v1.Certificate, opts metav1.UpdateOptions) (*v1.Certificate, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error @@ -52,144 +52,18 @@ type CertificateInterface interface { // certificates implements CertificateInterface type certificates struct { - client rest.Interface - ns string + *gentype.ClientWithList[*v1.Certificate, *v1.CertificateList] } // newCertificates returns a Certificates func newCertificates(c *CertmanagerV1Client, namespace string) *certificates { return &certificates{ - client: c.RESTClient(), - ns: namespace, + gentype.NewClientWithList[*v1.Certificate, *v1.CertificateList]( + "certificates", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *v1.Certificate { return &v1.Certificate{} }, + func() *v1.CertificateList { return &v1.CertificateList{} }), } } - -// Get takes name of the certificate, and returns the corresponding certificate object, and an error if there is any. -func (c *certificates) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Certificate, err error) { - result = &v1.Certificate{} - err = c.client.Get(). - Namespace(c.ns). - Resource("certificates"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Certificates that match those selectors. -func (c *certificates) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CertificateList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.CertificateList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("certificates"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested certificates. -func (c *certificates) Watch(ctx context.Context, opts metav1.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(ctx) -} - -// 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(ctx context.Context, certificate *v1.Certificate, opts metav1.CreateOptions) (result *v1.Certificate, err error) { - result = &v1.Certificate{} - err = c.client.Post(). - Namespace(c.ns). - Resource("certificates"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(certificate). - Do(ctx). - 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(ctx context.Context, certificate *v1.Certificate, opts metav1.UpdateOptions) (result *v1.Certificate, err error) { - result = &v1.Certificate{} - err = c.client.Put(). - Namespace(c.ns). - Resource("certificates"). - Name(certificate.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(certificate). - Do(ctx). - 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(ctx context.Context, certificate *v1.Certificate, opts metav1.UpdateOptions) (result *v1.Certificate, err error) { - result = &v1.Certificate{} - err = c.client.Put(). - Namespace(c.ns). - Resource("certificates"). - Name(certificate.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(certificate). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the certificate and deletes it. Returns an error if one occurs. -func (c *certificates) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("certificates"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *certificates) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("certificates"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched certificate. -func (c *certificates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Certificate, err error) { - result = &v1.Certificate{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("certificates"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/clientset/versioned/typed/certmanager/v1/certificaterequest.go b/pkg/client/clientset/versioned/typed/certmanager/v1/certificaterequest.go index 99633aad070..18e71245a83 100644 --- a/pkg/client/clientset/versioned/typed/certmanager/v1/certificaterequest.go +++ b/pkg/client/clientset/versioned/typed/certmanager/v1/certificaterequest.go @@ -20,14 +20,13 @@ package v1 import ( "context" - "time" v1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" scheme "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/scheme" metav1 "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" + gentype "k8s.io/client-go/gentype" ) // CertificateRequestsGetter has a method to return a CertificateRequestInterface. @@ -40,6 +39,7 @@ type CertificateRequestsGetter interface { type CertificateRequestInterface interface { Create(ctx context.Context, certificateRequest *v1.CertificateRequest, opts metav1.CreateOptions) (*v1.CertificateRequest, error) Update(ctx context.Context, certificateRequest *v1.CertificateRequest, opts metav1.UpdateOptions) (*v1.CertificateRequest, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). UpdateStatus(ctx context.Context, certificateRequest *v1.CertificateRequest, opts metav1.UpdateOptions) (*v1.CertificateRequest, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error @@ -52,144 +52,18 @@ type CertificateRequestInterface interface { // certificateRequests implements CertificateRequestInterface type certificateRequests struct { - client rest.Interface - ns string + *gentype.ClientWithList[*v1.CertificateRequest, *v1.CertificateRequestList] } // newCertificateRequests returns a CertificateRequests func newCertificateRequests(c *CertmanagerV1Client, namespace string) *certificateRequests { return &certificateRequests{ - client: c.RESTClient(), - ns: namespace, + gentype.NewClientWithList[*v1.CertificateRequest, *v1.CertificateRequestList]( + "certificaterequests", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *v1.CertificateRequest { return &v1.CertificateRequest{} }, + func() *v1.CertificateRequestList { return &v1.CertificateRequestList{} }), } } - -// Get takes name of the certificateRequest, and returns the corresponding certificateRequest object, and an error if there is any. -func (c *certificateRequests) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CertificateRequest, err error) { - result = &v1.CertificateRequest{} - err = c.client.Get(). - Namespace(c.ns). - Resource("certificaterequests"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CertificateRequests that match those selectors. -func (c *certificateRequests) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CertificateRequestList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.CertificateRequestList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("certificaterequests"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested certificateRequests. -func (c *certificateRequests) Watch(ctx context.Context, opts metav1.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(ctx) -} - -// 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(ctx context.Context, certificateRequest *v1.CertificateRequest, opts metav1.CreateOptions) (result *v1.CertificateRequest, err error) { - result = &v1.CertificateRequest{} - err = c.client.Post(). - Namespace(c.ns). - Resource("certificaterequests"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(certificateRequest). - Do(ctx). - 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(ctx context.Context, certificateRequest *v1.CertificateRequest, opts metav1.UpdateOptions) (result *v1.CertificateRequest, err error) { - result = &v1.CertificateRequest{} - err = c.client.Put(). - Namespace(c.ns). - Resource("certificaterequests"). - Name(certificateRequest.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(certificateRequest). - Do(ctx). - 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(ctx context.Context, certificateRequest *v1.CertificateRequest, opts metav1.UpdateOptions) (result *v1.CertificateRequest, err error) { - result = &v1.CertificateRequest{} - err = c.client.Put(). - Namespace(c.ns). - Resource("certificaterequests"). - Name(certificateRequest.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(certificateRequest). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the certificateRequest and deletes it. Returns an error if one occurs. -func (c *certificateRequests) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("certificaterequests"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *certificateRequests) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("certificaterequests"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched certificateRequest. -func (c *certificateRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CertificateRequest, err error) { - result = &v1.CertificateRequest{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("certificaterequests"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/clientset/versioned/typed/certmanager/v1/clusterissuer.go b/pkg/client/clientset/versioned/typed/certmanager/v1/clusterissuer.go index 3e8c33984ad..9531b95a0e4 100644 --- a/pkg/client/clientset/versioned/typed/certmanager/v1/clusterissuer.go +++ b/pkg/client/clientset/versioned/typed/certmanager/v1/clusterissuer.go @@ -20,14 +20,13 @@ package v1 import ( "context" - "time" v1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" scheme "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/scheme" metav1 "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" + gentype "k8s.io/client-go/gentype" ) // ClusterIssuersGetter has a method to return a ClusterIssuerInterface. @@ -40,6 +39,7 @@ type ClusterIssuersGetter interface { type ClusterIssuerInterface interface { Create(ctx context.Context, clusterIssuer *v1.ClusterIssuer, opts metav1.CreateOptions) (*v1.ClusterIssuer, error) Update(ctx context.Context, clusterIssuer *v1.ClusterIssuer, opts metav1.UpdateOptions) (*v1.ClusterIssuer, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). UpdateStatus(ctx context.Context, clusterIssuer *v1.ClusterIssuer, opts metav1.UpdateOptions) (*v1.ClusterIssuer, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error @@ -52,133 +52,18 @@ type ClusterIssuerInterface interface { // clusterIssuers implements ClusterIssuerInterface type clusterIssuers struct { - client rest.Interface + *gentype.ClientWithList[*v1.ClusterIssuer, *v1.ClusterIssuerList] } // newClusterIssuers returns a ClusterIssuers func newClusterIssuers(c *CertmanagerV1Client) *clusterIssuers { return &clusterIssuers{ - client: c.RESTClient(), + gentype.NewClientWithList[*v1.ClusterIssuer, *v1.ClusterIssuerList]( + "clusterissuers", + c.RESTClient(), + scheme.ParameterCodec, + "", + func() *v1.ClusterIssuer { return &v1.ClusterIssuer{} }, + func() *v1.ClusterIssuerList { return &v1.ClusterIssuerList{} }), } } - -// Get takes name of the clusterIssuer, and returns the corresponding clusterIssuer object, and an error if there is any. -func (c *clusterIssuers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterIssuer, err error) { - result = &v1.ClusterIssuer{} - err = c.client.Get(). - Resource("clusterissuers"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of ClusterIssuers that match those selectors. -func (c *clusterIssuers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterIssuerList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.ClusterIssuerList{} - err = c.client.Get(). - Resource("clusterissuers"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested clusterIssuers. -func (c *clusterIssuers) Watch(ctx context.Context, opts metav1.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(ctx) -} - -// 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(ctx context.Context, clusterIssuer *v1.ClusterIssuer, opts metav1.CreateOptions) (result *v1.ClusterIssuer, err error) { - result = &v1.ClusterIssuer{} - err = c.client.Post(). - Resource("clusterissuers"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(clusterIssuer). - Do(ctx). - 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(ctx context.Context, clusterIssuer *v1.ClusterIssuer, opts metav1.UpdateOptions) (result *v1.ClusterIssuer, err error) { - result = &v1.ClusterIssuer{} - err = c.client.Put(). - Resource("clusterissuers"). - Name(clusterIssuer.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(clusterIssuer). - Do(ctx). - 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(ctx context.Context, clusterIssuer *v1.ClusterIssuer, opts metav1.UpdateOptions) (result *v1.ClusterIssuer, err error) { - result = &v1.ClusterIssuer{} - err = c.client.Put(). - Resource("clusterissuers"). - Name(clusterIssuer.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(clusterIssuer). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the clusterIssuer and deletes it. Returns an error if one occurs. -func (c *clusterIssuers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("clusterissuers"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *clusterIssuers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("clusterissuers"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched clusterIssuer. -func (c *clusterIssuers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterIssuer, err error) { - result = &v1.ClusterIssuer{} - err = c.client.Patch(pt). - Resource("clusterissuers"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/clientset/versioned/typed/certmanager/v1/fake/fake_certificate.go b/pkg/client/clientset/versioned/typed/certmanager/v1/fake/fake_certificate.go index 5f7b8636842..dbeb4e63f98 100644 --- a/pkg/client/clientset/versioned/typed/certmanager/v1/fake/fake_certificate.go +++ b/pkg/client/clientset/versioned/typed/certmanager/v1/fake/fake_certificate.go @@ -41,22 +41,24 @@ var certificatesKind = v1.SchemeGroupVersion.WithKind("Certificate") // Get takes name of the certificate, and returns the corresponding certificate object, and an error if there is any. func (c *FakeCertificates) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Certificate, err error) { + emptyResult := &v1.Certificate{} obj, err := c.Fake. - Invokes(testing.NewGetAction(certificatesResource, c.ns, name), &v1.Certificate{}) + Invokes(testing.NewGetActionWithOptions(certificatesResource, c.ns, name, options), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.Certificate), err } // List takes label and field selectors, and returns the list of Certificates that match those selectors. func (c *FakeCertificates) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CertificateList, err error) { + emptyResult := &v1.CertificateList{} obj, err := c.Fake. - Invokes(testing.NewListAction(certificatesResource, certificatesKind, c.ns, opts), &v1.CertificateList{}) + Invokes(testing.NewListActionWithOptions(certificatesResource, certificatesKind, c.ns, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } label, _, _ := testing.ExtractFromListOptions(opts) @@ -75,40 +77,43 @@ func (c *FakeCertificates) List(ctx context.Context, opts metav1.ListOptions) (r // Watch returns a watch.Interface that watches the requested certificates. func (c *FakeCertificates) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. - InvokesWatch(testing.NewWatchAction(certificatesResource, c.ns, opts)) + InvokesWatch(testing.NewWatchActionWithOptions(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(ctx context.Context, certificate *v1.Certificate, opts metav1.CreateOptions) (result *v1.Certificate, err error) { + emptyResult := &v1.Certificate{} obj, err := c.Fake. - Invokes(testing.NewCreateAction(certificatesResource, c.ns, certificate), &v1.Certificate{}) + Invokes(testing.NewCreateActionWithOptions(certificatesResource, c.ns, certificate, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.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(ctx context.Context, certificate *v1.Certificate, opts metav1.UpdateOptions) (result *v1.Certificate, err error) { + emptyResult := &v1.Certificate{} obj, err := c.Fake. - Invokes(testing.NewUpdateAction(certificatesResource, c.ns, certificate), &v1.Certificate{}) + Invokes(testing.NewUpdateActionWithOptions(certificatesResource, c.ns, certificate, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.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(ctx context.Context, certificate *v1.Certificate, opts metav1.UpdateOptions) (*v1.Certificate, error) { +func (c *FakeCertificates) UpdateStatus(ctx context.Context, certificate *v1.Certificate, opts metav1.UpdateOptions) (result *v1.Certificate, err error) { + emptyResult := &v1.Certificate{} obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(certificatesResource, "status", c.ns, certificate), &v1.Certificate{}) + Invokes(testing.NewUpdateSubresourceActionWithOptions(certificatesResource, "status", c.ns, certificate, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.Certificate), err } @@ -123,7 +128,7 @@ func (c *FakeCertificates) Delete(ctx context.Context, name string, opts metav1. // DeleteCollection deletes a collection of objects. func (c *FakeCertificates) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionAction(certificatesResource, c.ns, listOpts) + action := testing.NewDeleteCollectionActionWithOptions(certificatesResource, c.ns, opts, listOpts) _, err := c.Fake.Invokes(action, &v1.CertificateList{}) return err @@ -131,11 +136,12 @@ func (c *FakeCertificates) DeleteCollection(ctx context.Context, opts metav1.Del // Patch applies the patch and returns the patched certificate. func (c *FakeCertificates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Certificate, err error) { + emptyResult := &v1.Certificate{} obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(certificatesResource, c.ns, name, pt, data, subresources...), &v1.Certificate{}) + Invokes(testing.NewPatchSubresourceActionWithOptions(certificatesResource, c.ns, name, pt, data, opts, subresources...), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.Certificate), err } diff --git a/pkg/client/clientset/versioned/typed/certmanager/v1/fake/fake_certificaterequest.go b/pkg/client/clientset/versioned/typed/certmanager/v1/fake/fake_certificaterequest.go index 56b55a0ac66..fb62541231e 100644 --- a/pkg/client/clientset/versioned/typed/certmanager/v1/fake/fake_certificaterequest.go +++ b/pkg/client/clientset/versioned/typed/certmanager/v1/fake/fake_certificaterequest.go @@ -41,22 +41,24 @@ var certificaterequestsKind = v1.SchemeGroupVersion.WithKind("CertificateRequest // Get takes name of the certificateRequest, and returns the corresponding certificateRequest object, and an error if there is any. func (c *FakeCertificateRequests) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CertificateRequest, err error) { + emptyResult := &v1.CertificateRequest{} obj, err := c.Fake. - Invokes(testing.NewGetAction(certificaterequestsResource, c.ns, name), &v1.CertificateRequest{}) + Invokes(testing.NewGetActionWithOptions(certificaterequestsResource, c.ns, name, options), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.CertificateRequest), err } // List takes label and field selectors, and returns the list of CertificateRequests that match those selectors. func (c *FakeCertificateRequests) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CertificateRequestList, err error) { + emptyResult := &v1.CertificateRequestList{} obj, err := c.Fake. - Invokes(testing.NewListAction(certificaterequestsResource, certificaterequestsKind, c.ns, opts), &v1.CertificateRequestList{}) + Invokes(testing.NewListActionWithOptions(certificaterequestsResource, certificaterequestsKind, c.ns, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } label, _, _ := testing.ExtractFromListOptions(opts) @@ -75,40 +77,43 @@ func (c *FakeCertificateRequests) List(ctx context.Context, opts metav1.ListOpti // Watch returns a watch.Interface that watches the requested certificateRequests. func (c *FakeCertificateRequests) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. - InvokesWatch(testing.NewWatchAction(certificaterequestsResource, c.ns, opts)) + InvokesWatch(testing.NewWatchActionWithOptions(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(ctx context.Context, certificateRequest *v1.CertificateRequest, opts metav1.CreateOptions) (result *v1.CertificateRequest, err error) { + emptyResult := &v1.CertificateRequest{} obj, err := c.Fake. - Invokes(testing.NewCreateAction(certificaterequestsResource, c.ns, certificateRequest), &v1.CertificateRequest{}) + Invokes(testing.NewCreateActionWithOptions(certificaterequestsResource, c.ns, certificateRequest, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.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(ctx context.Context, certificateRequest *v1.CertificateRequest, opts metav1.UpdateOptions) (result *v1.CertificateRequest, err error) { + emptyResult := &v1.CertificateRequest{} obj, err := c.Fake. - Invokes(testing.NewUpdateAction(certificaterequestsResource, c.ns, certificateRequest), &v1.CertificateRequest{}) + Invokes(testing.NewUpdateActionWithOptions(certificaterequestsResource, c.ns, certificateRequest, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.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(ctx context.Context, certificateRequest *v1.CertificateRequest, opts metav1.UpdateOptions) (*v1.CertificateRequest, error) { +func (c *FakeCertificateRequests) UpdateStatus(ctx context.Context, certificateRequest *v1.CertificateRequest, opts metav1.UpdateOptions) (result *v1.CertificateRequest, err error) { + emptyResult := &v1.CertificateRequest{} obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(certificaterequestsResource, "status", c.ns, certificateRequest), &v1.CertificateRequest{}) + Invokes(testing.NewUpdateSubresourceActionWithOptions(certificaterequestsResource, "status", c.ns, certificateRequest, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.CertificateRequest), err } @@ -123,7 +128,7 @@ func (c *FakeCertificateRequests) Delete(ctx context.Context, name string, opts // DeleteCollection deletes a collection of objects. func (c *FakeCertificateRequests) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionAction(certificaterequestsResource, c.ns, listOpts) + action := testing.NewDeleteCollectionActionWithOptions(certificaterequestsResource, c.ns, opts, listOpts) _, err := c.Fake.Invokes(action, &v1.CertificateRequestList{}) return err @@ -131,11 +136,12 @@ func (c *FakeCertificateRequests) DeleteCollection(ctx context.Context, opts met // Patch applies the patch and returns the patched certificateRequest. func (c *FakeCertificateRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CertificateRequest, err error) { + emptyResult := &v1.CertificateRequest{} obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(certificaterequestsResource, c.ns, name, pt, data, subresources...), &v1.CertificateRequest{}) + Invokes(testing.NewPatchSubresourceActionWithOptions(certificaterequestsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.CertificateRequest), err } diff --git a/pkg/client/clientset/versioned/typed/certmanager/v1/fake/fake_clusterissuer.go b/pkg/client/clientset/versioned/typed/certmanager/v1/fake/fake_clusterissuer.go index d390fe488cb..49c8e049a2c 100644 --- a/pkg/client/clientset/versioned/typed/certmanager/v1/fake/fake_clusterissuer.go +++ b/pkg/client/clientset/versioned/typed/certmanager/v1/fake/fake_clusterissuer.go @@ -40,20 +40,22 @@ var clusterissuersKind = v1.SchemeGroupVersion.WithKind("ClusterIssuer") // Get takes name of the clusterIssuer, and returns the corresponding clusterIssuer object, and an error if there is any. func (c *FakeClusterIssuers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterIssuer, err error) { + emptyResult := &v1.ClusterIssuer{} obj, err := c.Fake. - Invokes(testing.NewRootGetAction(clusterissuersResource, name), &v1.ClusterIssuer{}) + Invokes(testing.NewRootGetActionWithOptions(clusterissuersResource, name, options), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.ClusterIssuer), err } // List takes label and field selectors, and returns the list of ClusterIssuers that match those selectors. func (c *FakeClusterIssuers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterIssuerList, err error) { + emptyResult := &v1.ClusterIssuerList{} obj, err := c.Fake. - Invokes(testing.NewRootListAction(clusterissuersResource, clusterissuersKind, opts), &v1.ClusterIssuerList{}) + Invokes(testing.NewRootListActionWithOptions(clusterissuersResource, clusterissuersKind, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } label, _, _ := testing.ExtractFromListOptions(opts) @@ -72,36 +74,39 @@ func (c *FakeClusterIssuers) List(ctx context.Context, opts metav1.ListOptions) // Watch returns a watch.Interface that watches the requested clusterIssuers. func (c *FakeClusterIssuers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. - InvokesWatch(testing.NewRootWatchAction(clusterissuersResource, opts)) + InvokesWatch(testing.NewRootWatchActionWithOptions(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(ctx context.Context, clusterIssuer *v1.ClusterIssuer, opts metav1.CreateOptions) (result *v1.ClusterIssuer, err error) { + emptyResult := &v1.ClusterIssuer{} obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(clusterissuersResource, clusterIssuer), &v1.ClusterIssuer{}) + Invokes(testing.NewRootCreateActionWithOptions(clusterissuersResource, clusterIssuer, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.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(ctx context.Context, clusterIssuer *v1.ClusterIssuer, opts metav1.UpdateOptions) (result *v1.ClusterIssuer, err error) { + emptyResult := &v1.ClusterIssuer{} obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(clusterissuersResource, clusterIssuer), &v1.ClusterIssuer{}) + Invokes(testing.NewRootUpdateActionWithOptions(clusterissuersResource, clusterIssuer, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.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(ctx context.Context, clusterIssuer *v1.ClusterIssuer, opts metav1.UpdateOptions) (*v1.ClusterIssuer, error) { +func (c *FakeClusterIssuers) UpdateStatus(ctx context.Context, clusterIssuer *v1.ClusterIssuer, opts metav1.UpdateOptions) (result *v1.ClusterIssuer, err error) { + emptyResult := &v1.ClusterIssuer{} obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(clusterissuersResource, "status", clusterIssuer), &v1.ClusterIssuer{}) + Invokes(testing.NewRootUpdateSubresourceActionWithOptions(clusterissuersResource, "status", clusterIssuer, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.ClusterIssuer), err } @@ -115,7 +120,7 @@ func (c *FakeClusterIssuers) Delete(ctx context.Context, name string, opts metav // DeleteCollection deletes a collection of objects. func (c *FakeClusterIssuers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(clusterissuersResource, listOpts) + action := testing.NewRootDeleteCollectionActionWithOptions(clusterissuersResource, opts, listOpts) _, err := c.Fake.Invokes(action, &v1.ClusterIssuerList{}) return err @@ -123,10 +128,11 @@ func (c *FakeClusterIssuers) DeleteCollection(ctx context.Context, opts metav1.D // Patch applies the patch and returns the patched clusterIssuer. func (c *FakeClusterIssuers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterIssuer, err error) { + emptyResult := &v1.ClusterIssuer{} obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(clusterissuersResource, name, pt, data, subresources...), &v1.ClusterIssuer{}) + Invokes(testing.NewRootPatchSubresourceActionWithOptions(clusterissuersResource, name, pt, data, opts, subresources...), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.ClusterIssuer), err } diff --git a/pkg/client/clientset/versioned/typed/certmanager/v1/fake/fake_issuer.go b/pkg/client/clientset/versioned/typed/certmanager/v1/fake/fake_issuer.go index c4a7c49e256..bce3b2950ad 100644 --- a/pkg/client/clientset/versioned/typed/certmanager/v1/fake/fake_issuer.go +++ b/pkg/client/clientset/versioned/typed/certmanager/v1/fake/fake_issuer.go @@ -41,22 +41,24 @@ var issuersKind = v1.SchemeGroupVersion.WithKind("Issuer") // Get takes name of the issuer, and returns the corresponding issuer object, and an error if there is any. func (c *FakeIssuers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Issuer, err error) { + emptyResult := &v1.Issuer{} obj, err := c.Fake. - Invokes(testing.NewGetAction(issuersResource, c.ns, name), &v1.Issuer{}) + Invokes(testing.NewGetActionWithOptions(issuersResource, c.ns, name, options), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.Issuer), err } // List takes label and field selectors, and returns the list of Issuers that match those selectors. func (c *FakeIssuers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.IssuerList, err error) { + emptyResult := &v1.IssuerList{} obj, err := c.Fake. - Invokes(testing.NewListAction(issuersResource, issuersKind, c.ns, opts), &v1.IssuerList{}) + Invokes(testing.NewListActionWithOptions(issuersResource, issuersKind, c.ns, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } label, _, _ := testing.ExtractFromListOptions(opts) @@ -75,40 +77,43 @@ func (c *FakeIssuers) List(ctx context.Context, opts metav1.ListOptions) (result // Watch returns a watch.Interface that watches the requested issuers. func (c *FakeIssuers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. - InvokesWatch(testing.NewWatchAction(issuersResource, c.ns, opts)) + InvokesWatch(testing.NewWatchActionWithOptions(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(ctx context.Context, issuer *v1.Issuer, opts metav1.CreateOptions) (result *v1.Issuer, err error) { + emptyResult := &v1.Issuer{} obj, err := c.Fake. - Invokes(testing.NewCreateAction(issuersResource, c.ns, issuer), &v1.Issuer{}) + Invokes(testing.NewCreateActionWithOptions(issuersResource, c.ns, issuer, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.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(ctx context.Context, issuer *v1.Issuer, opts metav1.UpdateOptions) (result *v1.Issuer, err error) { + emptyResult := &v1.Issuer{} obj, err := c.Fake. - Invokes(testing.NewUpdateAction(issuersResource, c.ns, issuer), &v1.Issuer{}) + Invokes(testing.NewUpdateActionWithOptions(issuersResource, c.ns, issuer, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.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(ctx context.Context, issuer *v1.Issuer, opts metav1.UpdateOptions) (*v1.Issuer, error) { +func (c *FakeIssuers) UpdateStatus(ctx context.Context, issuer *v1.Issuer, opts metav1.UpdateOptions) (result *v1.Issuer, err error) { + emptyResult := &v1.Issuer{} obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(issuersResource, "status", c.ns, issuer), &v1.Issuer{}) + Invokes(testing.NewUpdateSubresourceActionWithOptions(issuersResource, "status", c.ns, issuer, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.Issuer), err } @@ -123,7 +128,7 @@ func (c *FakeIssuers) Delete(ctx context.Context, name string, opts metav1.Delet // DeleteCollection deletes a collection of objects. func (c *FakeIssuers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionAction(issuersResource, c.ns, listOpts) + action := testing.NewDeleteCollectionActionWithOptions(issuersResource, c.ns, opts, listOpts) _, err := c.Fake.Invokes(action, &v1.IssuerList{}) return err @@ -131,11 +136,12 @@ func (c *FakeIssuers) DeleteCollection(ctx context.Context, opts metav1.DeleteOp // Patch applies the patch and returns the patched issuer. func (c *FakeIssuers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Issuer, err error) { + emptyResult := &v1.Issuer{} obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(issuersResource, c.ns, name, pt, data, subresources...), &v1.Issuer{}) + Invokes(testing.NewPatchSubresourceActionWithOptions(issuersResource, c.ns, name, pt, data, opts, subresources...), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1.Issuer), err } diff --git a/pkg/client/clientset/versioned/typed/certmanager/v1/issuer.go b/pkg/client/clientset/versioned/typed/certmanager/v1/issuer.go index 2baeb107b63..6329352a07e 100644 --- a/pkg/client/clientset/versioned/typed/certmanager/v1/issuer.go +++ b/pkg/client/clientset/versioned/typed/certmanager/v1/issuer.go @@ -20,14 +20,13 @@ package v1 import ( "context" - "time" v1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" scheme "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/scheme" metav1 "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" + gentype "k8s.io/client-go/gentype" ) // IssuersGetter has a method to return a IssuerInterface. @@ -40,6 +39,7 @@ type IssuersGetter interface { type IssuerInterface interface { Create(ctx context.Context, issuer *v1.Issuer, opts metav1.CreateOptions) (*v1.Issuer, error) Update(ctx context.Context, issuer *v1.Issuer, opts metav1.UpdateOptions) (*v1.Issuer, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). UpdateStatus(ctx context.Context, issuer *v1.Issuer, opts metav1.UpdateOptions) (*v1.Issuer, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error @@ -52,144 +52,18 @@ type IssuerInterface interface { // issuers implements IssuerInterface type issuers struct { - client rest.Interface - ns string + *gentype.ClientWithList[*v1.Issuer, *v1.IssuerList] } // newIssuers returns a Issuers func newIssuers(c *CertmanagerV1Client, namespace string) *issuers { return &issuers{ - client: c.RESTClient(), - ns: namespace, + gentype.NewClientWithList[*v1.Issuer, *v1.IssuerList]( + "issuers", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *v1.Issuer { return &v1.Issuer{} }, + func() *v1.IssuerList { return &v1.IssuerList{} }), } } - -// Get takes name of the issuer, and returns the corresponding issuer object, and an error if there is any. -func (c *issuers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Issuer, err error) { - result = &v1.Issuer{} - err = c.client.Get(). - Namespace(c.ns). - Resource("issuers"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Issuers that match those selectors. -func (c *issuers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.IssuerList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.IssuerList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("issuers"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested issuers. -func (c *issuers) Watch(ctx context.Context, opts metav1.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(ctx) -} - -// 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(ctx context.Context, issuer *v1.Issuer, opts metav1.CreateOptions) (result *v1.Issuer, err error) { - result = &v1.Issuer{} - err = c.client.Post(). - Namespace(c.ns). - Resource("issuers"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(issuer). - Do(ctx). - 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(ctx context.Context, issuer *v1.Issuer, opts metav1.UpdateOptions) (result *v1.Issuer, err error) { - result = &v1.Issuer{} - err = c.client.Put(). - Namespace(c.ns). - Resource("issuers"). - Name(issuer.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(issuer). - Do(ctx). - 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(ctx context.Context, issuer *v1.Issuer, opts metav1.UpdateOptions) (result *v1.Issuer, err error) { - result = &v1.Issuer{} - err = c.client.Put(). - Namespace(c.ns). - Resource("issuers"). - Name(issuer.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(issuer). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the issuer and deletes it. Returns an error if one occurs. -func (c *issuers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("issuers"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *issuers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("issuers"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched issuer. -func (c *issuers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Issuer, err error) { - result = &v1.Issuer{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("issuers"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/informers/externalversions/factory.go b/pkg/client/informers/externalversions/factory.go index be308feb85b..c59bddf337f 100644 --- a/pkg/client/informers/externalversions/factory.go +++ b/pkg/client/informers/externalversions/factory.go @@ -229,6 +229,7 @@ type SharedInformerFactory interface { // Start initializes all requested informers. They are handled in goroutines // which run until the stop channel gets closed. + // Warning: Start does not block. When run in a go-routine, it will race with a later WaitForCacheSync. Start(stopCh <-chan struct{}) // Shutdown marks a factory as shutting down. At that point no new diff --git a/pkg/client/listers/acme/v1/challenge.go b/pkg/client/listers/acme/v1/challenge.go index 80e8eae7196..b53f8f59e65 100644 --- a/pkg/client/listers/acme/v1/challenge.go +++ b/pkg/client/listers/acme/v1/challenge.go @@ -20,8 +20,8 @@ package v1 import ( v1 "github.com/cert-manager/cert-manager/pkg/apis/acme/v1" - "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/listers" "k8s.io/client-go/tools/cache" ) @@ -38,25 +38,17 @@ type ChallengeLister interface { // challengeLister implements the ChallengeLister interface. type challengeLister struct { - indexer cache.Indexer + listers.ResourceIndexer[*v1.Challenge] } // 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 []*v1.Challenge, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Challenge)) - }) - return ret, err + return &challengeLister{listers.New[*v1.Challenge](indexer, v1.Resource("challenge"))} } // Challenges returns an object that can list and get Challenges. func (s *challengeLister) Challenges(namespace string) ChallengeNamespaceLister { - return challengeNamespaceLister{indexer: s.indexer, namespace: namespace} + return challengeNamespaceLister{listers.NewNamespaced[*v1.Challenge](s.ResourceIndexer, namespace)} } // ChallengeNamespaceLister helps list and get Challenges. @@ -74,26 +66,5 @@ type ChallengeNamespaceLister interface { // 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 []*v1.Challenge, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Challenge)) - }) - return ret, err -} - -// Get retrieves the Challenge from the indexer for a given namespace and name. -func (s challengeNamespaceLister) Get(name string) (*v1.Challenge, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("challenge"), name) - } - return obj.(*v1.Challenge), nil + listers.ResourceIndexer[*v1.Challenge] } diff --git a/pkg/client/listers/acme/v1/order.go b/pkg/client/listers/acme/v1/order.go index c3e32355974..4f9a516f7d9 100644 --- a/pkg/client/listers/acme/v1/order.go +++ b/pkg/client/listers/acme/v1/order.go @@ -20,8 +20,8 @@ package v1 import ( v1 "github.com/cert-manager/cert-manager/pkg/apis/acme/v1" - "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/listers" "k8s.io/client-go/tools/cache" ) @@ -38,25 +38,17 @@ type OrderLister interface { // orderLister implements the OrderLister interface. type orderLister struct { - indexer cache.Indexer + listers.ResourceIndexer[*v1.Order] } // 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 []*v1.Order, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Order)) - }) - return ret, err + return &orderLister{listers.New[*v1.Order](indexer, v1.Resource("order"))} } // Orders returns an object that can list and get Orders. func (s *orderLister) Orders(namespace string) OrderNamespaceLister { - return orderNamespaceLister{indexer: s.indexer, namespace: namespace} + return orderNamespaceLister{listers.NewNamespaced[*v1.Order](s.ResourceIndexer, namespace)} } // OrderNamespaceLister helps list and get Orders. @@ -74,26 +66,5 @@ type OrderNamespaceLister interface { // 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 []*v1.Order, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Order)) - }) - return ret, err -} - -// Get retrieves the Order from the indexer for a given namespace and name. -func (s orderNamespaceLister) Get(name string) (*v1.Order, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("order"), name) - } - return obj.(*v1.Order), nil + listers.ResourceIndexer[*v1.Order] } diff --git a/pkg/client/listers/certmanager/v1/certificate.go b/pkg/client/listers/certmanager/v1/certificate.go index 9990d56dc1a..023902433d4 100644 --- a/pkg/client/listers/certmanager/v1/certificate.go +++ b/pkg/client/listers/certmanager/v1/certificate.go @@ -20,8 +20,8 @@ package v1 import ( v1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" - "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/listers" "k8s.io/client-go/tools/cache" ) @@ -38,25 +38,17 @@ type CertificateLister interface { // certificateLister implements the CertificateLister interface. type certificateLister struct { - indexer cache.Indexer + listers.ResourceIndexer[*v1.Certificate] } // 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 []*v1.Certificate, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Certificate)) - }) - return ret, err + return &certificateLister{listers.New[*v1.Certificate](indexer, v1.Resource("certificate"))} } // Certificates returns an object that can list and get Certificates. func (s *certificateLister) Certificates(namespace string) CertificateNamespaceLister { - return certificateNamespaceLister{indexer: s.indexer, namespace: namespace} + return certificateNamespaceLister{listers.NewNamespaced[*v1.Certificate](s.ResourceIndexer, namespace)} } // CertificateNamespaceLister helps list and get Certificates. @@ -74,26 +66,5 @@ type CertificateNamespaceLister interface { // 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 []*v1.Certificate, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Certificate)) - }) - return ret, err -} - -// Get retrieves the Certificate from the indexer for a given namespace and name. -func (s certificateNamespaceLister) Get(name string) (*v1.Certificate, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("certificate"), name) - } - return obj.(*v1.Certificate), nil + listers.ResourceIndexer[*v1.Certificate] } diff --git a/pkg/client/listers/certmanager/v1/certificaterequest.go b/pkg/client/listers/certmanager/v1/certificaterequest.go index 649c71152eb..41203c0a78d 100644 --- a/pkg/client/listers/certmanager/v1/certificaterequest.go +++ b/pkg/client/listers/certmanager/v1/certificaterequest.go @@ -20,8 +20,8 @@ package v1 import ( v1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" - "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/listers" "k8s.io/client-go/tools/cache" ) @@ -38,25 +38,17 @@ type CertificateRequestLister interface { // certificateRequestLister implements the CertificateRequestLister interface. type certificateRequestLister struct { - indexer cache.Indexer + listers.ResourceIndexer[*v1.CertificateRequest] } // 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 []*v1.CertificateRequest, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.CertificateRequest)) - }) - return ret, err + return &certificateRequestLister{listers.New[*v1.CertificateRequest](indexer, v1.Resource("certificaterequest"))} } // CertificateRequests returns an object that can list and get CertificateRequests. func (s *certificateRequestLister) CertificateRequests(namespace string) CertificateRequestNamespaceLister { - return certificateRequestNamespaceLister{indexer: s.indexer, namespace: namespace} + return certificateRequestNamespaceLister{listers.NewNamespaced[*v1.CertificateRequest](s.ResourceIndexer, namespace)} } // CertificateRequestNamespaceLister helps list and get CertificateRequests. @@ -74,26 +66,5 @@ type CertificateRequestNamespaceLister interface { // 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 []*v1.CertificateRequest, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.CertificateRequest)) - }) - return ret, err -} - -// Get retrieves the CertificateRequest from the indexer for a given namespace and name. -func (s certificateRequestNamespaceLister) Get(name string) (*v1.CertificateRequest, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("certificaterequest"), name) - } - return obj.(*v1.CertificateRequest), nil + listers.ResourceIndexer[*v1.CertificateRequest] } diff --git a/pkg/client/listers/certmanager/v1/clusterissuer.go b/pkg/client/listers/certmanager/v1/clusterissuer.go index a362980b8d6..66f8ec183b4 100644 --- a/pkg/client/listers/certmanager/v1/clusterissuer.go +++ b/pkg/client/listers/certmanager/v1/clusterissuer.go @@ -20,8 +20,8 @@ package v1 import ( v1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" - "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/listers" "k8s.io/client-go/tools/cache" ) @@ -39,30 +39,10 @@ type ClusterIssuerLister interface { // clusterIssuerLister implements the ClusterIssuerLister interface. type clusterIssuerLister struct { - indexer cache.Indexer + listers.ResourceIndexer[*v1.ClusterIssuer] } // 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 []*v1.ClusterIssuer, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.ClusterIssuer)) - }) - return ret, err -} - -// Get retrieves the ClusterIssuer from the index for a given name. -func (s *clusterIssuerLister) Get(name string) (*v1.ClusterIssuer, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("clusterissuer"), name) - } - return obj.(*v1.ClusterIssuer), nil + return &clusterIssuerLister{listers.New[*v1.ClusterIssuer](indexer, v1.Resource("clusterissuer"))} } diff --git a/pkg/client/listers/certmanager/v1/issuer.go b/pkg/client/listers/certmanager/v1/issuer.go index 83e9458515e..a664f075ffe 100644 --- a/pkg/client/listers/certmanager/v1/issuer.go +++ b/pkg/client/listers/certmanager/v1/issuer.go @@ -20,8 +20,8 @@ package v1 import ( v1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" - "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/listers" "k8s.io/client-go/tools/cache" ) @@ -38,25 +38,17 @@ type IssuerLister interface { // issuerLister implements the IssuerLister interface. type issuerLister struct { - indexer cache.Indexer + listers.ResourceIndexer[*v1.Issuer] } // 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 []*v1.Issuer, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Issuer)) - }) - return ret, err + return &issuerLister{listers.New[*v1.Issuer](indexer, v1.Resource("issuer"))} } // Issuers returns an object that can list and get Issuers. func (s *issuerLister) Issuers(namespace string) IssuerNamespaceLister { - return issuerNamespaceLister{indexer: s.indexer, namespace: namespace} + return issuerNamespaceLister{listers.NewNamespaced[*v1.Issuer](s.ResourceIndexer, namespace)} } // IssuerNamespaceLister helps list and get Issuers. @@ -74,26 +66,5 @@ type IssuerNamespaceLister interface { // 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 []*v1.Issuer, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Issuer)) - }) - return ret, err -} - -// Get retrieves the Issuer from the indexer for a given namespace and name. -func (s issuerNamespaceLister) Get(name string) (*v1.Issuer, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("issuer"), name) - } - return obj.(*v1.Issuer), nil + listers.ResourceIndexer[*v1.Issuer] } diff --git a/pkg/controller/acmechallenges/controller.go b/pkg/controller/acmechallenges/controller.go index 7c9cd2bec83..10bf8ef2b95 100644 --- a/pkg/controller/acmechallenges/controller.go +++ b/pkg/controller/acmechallenges/controller.go @@ -18,11 +18,13 @@ package acmechallenges import ( "context" + "fmt" "time" "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" k8sErrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/workqueue" @@ -67,7 +69,7 @@ type controller struct { // maintain a reference to the workqueue for this controller // so the handleOwnedResource method can enqueue resources - queue workqueue.RateLimitingInterface + queue workqueue.TypedRateLimitingInterface[types.NamespacedName] // logger to be used by this controller log logr.Logger @@ -81,12 +83,17 @@ type controller struct { objectUpdater } -func (c *controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitingInterface, []cache.InformerSynced, error) { +func (c *controller) Register(ctx *controllerpkg.Context) (workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { // construct a new named logger to be reused throughout the controller c.log = logf.FromContext(ctx.RootContext, ControllerName) // create a queue used to queue up items to be processed - c.queue = workqueue.NewNamedRateLimitingQueue(workqueue.NewItemExponentialFailureRateLimiter(time.Second*5, time.Minute*30), ControllerName) + c.queue = workqueue.NewTypedRateLimitingQueueWithConfig( + controllerpkg.DefaultACMERateLimiter(), + workqueue.TypedRateLimitingQueueConfig[types.NamespacedName]{ + Name: ControllerName, + }, + ) // obtain references to all the informers used by this controller challengeInformer := ctx.SharedInformerFactory.Acme().V1().Challenges() @@ -128,7 +135,9 @@ func (c *controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitin } // register handler functions - challengeInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: c.queue}) + if _, err := challengeInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: c.queue}); err != nil { + return nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } c.helper = issuer.NewHelper(c.issuerLister, c.clusterIssuerLister) c.scheduler = scheduler.New(logf.NewContext(ctx.RootContext, c.log), c.challengeLister, ctx.SchedulerOptions.MaxConcurrentChallenges) @@ -193,13 +202,9 @@ func (c *controller) runScheduler(ctx context.Context) { } } -func (c *controller) ProcessItem(ctx context.Context, key string) error { +func (c *controller) ProcessItem(ctx context.Context, key types.NamespacedName) error { log := logf.FromContext(ctx) - namespace, name, err := cache.SplitMetaNamespaceKey(key) - if err != nil { - log.Error(err, "invalid resource key") - return nil - } + namespace, name := key.Namespace, key.Name ch, err := c.challengeLister.Challenges(namespace).Get(name) diff --git a/pkg/controller/acmechallenges/finalizer.go b/pkg/controller/acmechallenges/finalizer.go index 86d80b5ff23..e5be9c6e1b6 100644 --- a/pkg/controller/acmechallenges/finalizer.go +++ b/pkg/controller/acmechallenges/finalizer.go @@ -30,6 +30,18 @@ import ( // allowing the garbage collector to remove the challenge. // finalizerRequired returns true if the finalizer is not found on the challenge. +// +// API transition +// We currently only add cmacme.ACMELegacyFinalizer, but a future version will add +// cmacme.ACMEDomainQualifiedFinalizer. +// A finalizer only needs to be added if neither is present. func finalizerRequired(ch *cmacme.Challenge) bool { - return !sets.NewString(ch.Finalizers...).Has(cmacme.ACMEFinalizer) + finalizers := sets.NewString(ch.Finalizers...) + return !finalizers.Has(cmacme.ACMELegacyFinalizer) && + !finalizers.Has(cmacme.ACMEDomainQualifiedFinalizer) +} + +func otherFinalizerPresent(ch *cmacme.Challenge) bool { + return ch.Finalizers[0] != cmacme.ACMELegacyFinalizer && + ch.Finalizers[0] != cmacme.ACMEDomainQualifiedFinalizer } diff --git a/pkg/controller/acmechallenges/finalizer_test.go b/pkg/controller/acmechallenges/finalizer_test.go index c6fae054ca7..f160c1c3664 100644 --- a/pkg/controller/acmechallenges/finalizer_test.go +++ b/pkg/controller/acmechallenges/finalizer_test.go @@ -37,13 +37,33 @@ func Test_finalizerRequired(t *testing.T) { want: true, }, { - name: "only-native-finalizer", - finalizers: []string{cmacme.ACMEFinalizer}, + name: "only-native-legacy-finalizer", + finalizers: []string{cmacme.ACMELegacyFinalizer}, want: false, }, { - name: "some-foreign-finalizers", - finalizers: []string{"f1", "f2", cmacme.ACMEFinalizer, "f3"}, + name: "only-native-domain-qualified-finalizer", + finalizers: []string{cmacme.ACMEDomainQualifiedFinalizer}, + want: false, + }, + { + name: "both-native-finalizers", + finalizers: []string{cmacme.ACMELegacyFinalizer, cmacme.ACMEDomainQualifiedFinalizer}, + want: false, + }, + { + name: "some-foreign-and-legacy-finalizer", + finalizers: []string{"f1", "f2", cmacme.ACMELegacyFinalizer, "f3"}, + want: false, + }, + { + name: "some-foreign-and-domain-qualified-finalizer", + finalizers: []string{"f1", "f2", cmacme.ACMEDomainQualifiedFinalizer, "f3"}, + want: false, + }, + { + name: "some-foreign-and-legacy-finalizer-and-domain-qualified-finalizer", + finalizers: []string{"f1", "f2", cmacme.ACMELegacyFinalizer, cmacme.ACMEDomainQualifiedFinalizer, "f3"}, want: false, }, { diff --git a/pkg/controller/acmechallenges/sync.go b/pkg/controller/acmechallenges/sync.go index 895d046b9ce..bd712ecd6c9 100644 --- a/pkg/controller/acmechallenges/sync.go +++ b/pkg/controller/acmechallenges/sync.go @@ -20,9 +20,12 @@ import ( "context" "errors" "fmt" + "slices" + "time" acmeapi "golang.org/x/crypto/acme" corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" "github.com/cert-manager/cert-manager/internal/controller/feature" @@ -30,7 +33,6 @@ import ( acmecl "github.com/cert-manager/cert-manager/pkg/acme/client" cmacme "github.com/cert-manager/cert-manager/pkg/apis/acme/v1" cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" - controllerpkg "github.com/cert-manager/cert-manager/pkg/controller" dnsutil "github.com/cert-manager/cert-manager/pkg/issuer/acme/dns/util" logf "github.com/cert-manager/cert-manager/pkg/logs" utilfeature "github.com/cert-manager/cert-manager/pkg/util/feature" @@ -42,6 +44,10 @@ const ( reasonPresentError = "PresentError" reasonPresented = "Presented" reasonFailed = "Failed" + + // How long to wait for an authorization response from the ACME server in acceptChallenge() + // before giving up + authorizationTimeout = 20 * time.Second ) // solver solves ACME challenges by presenting the given token and key in an @@ -54,7 +60,7 @@ type solver interface { // CleanUp will remove challenge records for a given solver. // This may involve deleting resources in the Kubernetes API Server, or // communicating with other external components (e.g. DNS providers). - CleanUp(ctx context.Context, issuer cmapi.GenericIssuer, ch *cmacme.Challenge) error + CleanUp(ctx context.Context, ch *cmacme.Challenge) error } // Sync will process this ACME Challenge. @@ -87,8 +93,20 @@ func (c *controller) Sync(ctx context.Context, chOriginal *cmacme.Challenge) (er // This finalizer ensures that the challenge is not garbage collected before // cert-manager has a chance to clean up resources created for the // challenge. + // + // API Transition + // -- Until UseDomainQualifiedFinalizer is active, we add cmacme.ACMELegacyFinalizer. + // -- When it is active we add cmacme.ACMEDomainQualifiedFinalizer instead. + // + // -- Both finalizers are supported, the flag just controls the one we add. + // + // -- We only need to add a finalizer label if no supported finalizer label is present. if finalizerRequired(ch) { - ch.Finalizers = append(ch.Finalizers, cmacme.ACMEFinalizer) + finalizer := cmacme.ACMELegacyFinalizer + if utilfeature.DefaultFeatureGate.Enabled(feature.UseDomainQualifiedFinalizer) { + finalizer = cmacme.ACMEDomainQualifiedFinalizer + } + ch.Finalizers = append(ch.Finalizers, finalizer) return nil } @@ -107,7 +125,7 @@ func (c *controller) Sync(ctx context.Context, chOriginal *cmacme.Challenge) (er return err } - err = solver.CleanUp(ctx, genericIssuer, ch) + err = solver.CleanUp(ctx, ch) if err != nil { c.recorder.Eventf(ch, corev1.EventTypeWarning, reasonCleanUpError, "Error cleaning up challenge: %v", err) ch.Status.Reason = err.Error() @@ -190,13 +208,10 @@ func (c *controller) Sync(ctx context.Context, chOriginal *cmacme.Challenge) (er log.Error(err, "propagation check failed") ch.Status.Reason = fmt.Sprintf("Waiting for %s challenge propagation: %s", ch.Spec.Type, err) - key, err := controllerpkg.KeyFunc(ch) - // This is an unexpected edge case and should never occur - if err != nil { - return err - } - - c.queue.AddAfter(key, c.DNS01CheckRetryPeriod) + c.queue.AddAfter(types.NamespacedName{ + Namespace: ch.Namespace, + Name: ch.Name, + }, c.DNS01CheckRetryPeriod) return nil } @@ -220,6 +235,9 @@ func handleError(ch *cmacme.Challenge, err error) error { var acmeErr *acmeapi.Error var ok bool if acmeErr, ok = err.(*acmeapi.Error); !ok { + ch.Status.State = cmacme.Errored + ch.Status.Reason = fmt.Sprintf("unexpected non-ACME API error: %v", err) + logf.V(logf.ErrorLevel).ErrorS(err, "unexpected non-ACME API error") return err } @@ -251,32 +269,29 @@ func (c *controller) handleFinalizer(ctx context.Context, ch *cmacme.Challenge) if len(ch.Finalizers) == 0 { return nil } - if ch.Finalizers[0] != cmacme.ACMEFinalizer { + if otherFinalizerPresent(ch) { log.V(logf.DebugLevel).Info("waiting to run challenge finalization...") return nil } defer func() { // call Update to remove the metadata.finalizers entry - ch.Finalizers = ch.Finalizers[1:] + ch.Finalizers = slices.DeleteFunc(ch.Finalizers, func(finalizer string) bool { + return finalizer == cmacme.ACMELegacyFinalizer || finalizer == cmacme.ACMEDomainQualifiedFinalizer + }) }() if !ch.Status.Processing { return nil } - genericIssuer, err := c.helper.GetGenericIssuer(ch.Spec.IssuerRef, ch.Namespace) - if err != nil { - return fmt.Errorf("error reading (cluster)issuer %q: %v", ch.Spec.IssuerRef.Name, err) - } - solver, err := c.solverFor(ch.Spec.Type) if err != nil { log.Error(err, "error getting solver for challenge") return nil } - err = solver.CleanUp(ctx, genericIssuer, ch) + err = solver.CleanUp(ctx, ch) if err != nil { c.recorder.Eventf(ch, corev1.EventTypeWarning, reasonCleanUpError, "Error cleaning up challenge: %v", err) ch.Status.Reason = err.Error() @@ -375,7 +390,15 @@ func (c *controller) acceptChallenge(ctx context.Context, cl acmecl.Interface, c } log.V(logf.DebugLevel).Info("waiting for authorization for domain") - authorization, err := cl.WaitAuthorization(ctx, ch.Spec.AuthorizationURL) + // The underlying ACME implementation from golang.org/x/crypto of WaitAuthorization retries on + // response parsing errors. In the event that an ACME server is not returning expected JSON + // responses, the call to WaitAuthorization can and has been seen to not return and loop forever, + // blocking the challenge's processing. Here, we defensively add a timeout for this exchange + // with the ACME server and a "context deadline reached" error will be returned by WaitAuthorization + // in the err variable. + ctxTimeout, cancelAuthorization := context.WithTimeout(ctx, authorizationTimeout) + defer cancelAuthorization() + authorization, err := cl.WaitAuthorization(ctxTimeout, ch.Spec.AuthorizationURL) if err != nil { log.Error(err, "error waiting for authorization") return c.handleAuthorizationError(ch, err) diff --git a/pkg/controller/acmechallenges/sync_test.go b/pkg/controller/acmechallenges/sync_test.go index b831613a810..cbd02e7f058 100644 --- a/pkg/controller/acmechallenges/sync_test.go +++ b/pkg/controller/acmechallenges/sync_test.go @@ -26,7 +26,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" coretesting "k8s.io/client-go/testing" + featuregatetesting "k8s.io/component-base/featuregate/testing" + "github.com/cert-manager/cert-manager/internal/controller/feature" accountstest "github.com/cert-manager/cert-manager/pkg/acme/accounts/test" acmecl "github.com/cert-manager/cert-manager/pkg/acme/client" cmacme "github.com/cert-manager/cert-manager/pkg/apis/acme/v1" @@ -34,6 +36,7 @@ import ( cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" testpkg "github.com/cert-manager/cert-manager/pkg/controller/test" "github.com/cert-manager/cert-manager/pkg/issuer" + utilfeature "github.com/cert-manager/cert-manager/pkg/util/feature" "github.com/cert-manager/cert-manager/test/unit/gen" ) @@ -43,7 +46,7 @@ func (f *fakeSolver) Present(ctx context.Context, issuer v1.GenericIssuer, ch *c } // Check should return Error only if propagation check cannot be performed. -// It MUST return `false, nil` if can contact all relevant services and all is +// It MUST return `false, nil` if it can contact all relevant services and all it is // doing is waiting for propagation func (f *fakeSolver) Check(ctx context.Context, issuer v1.GenericIssuer, ch *cmacme.Challenge) error { return f.fakeCheck(ctx, issuer, ch) @@ -52,14 +55,14 @@ func (f *fakeSolver) Check(ctx context.Context, issuer v1.GenericIssuer, ch *cma // CleanUp will remove challenge records for a given solver. // This may involve deleting resources in the Kubernetes API Server, or // communicating with other external components (e.g. DNS providers). -func (f *fakeSolver) CleanUp(ctx context.Context, issuer v1.GenericIssuer, ch *cmacme.Challenge) error { - return f.fakeCleanUp(ctx, issuer, ch) +func (f *fakeSolver) CleanUp(ctx context.Context, ch *cmacme.Challenge) error { + return f.fakeCleanUp(ctx, ch) } type fakeSolver struct { fakePresent func(ctx context.Context, issuer v1.GenericIssuer, ch *cmacme.Challenge) error fakeCheck func(ctx context.Context, issuer v1.GenericIssuer, ch *cmacme.Challenge) error - fakeCleanUp func(ctx context.Context, issuer v1.GenericIssuer, ch *cmacme.Challenge) error + fakeCleanUp func(ctx context.Context, ch *cmacme.Challenge) error } type testT struct { @@ -71,7 +74,7 @@ type testT struct { acmeClient *acmecl.FakeACME } -func TestSyncHappyPath(t *testing.T) { +func testSyncHappyPathWithFinalizer(t *testing.T, finalizer string, activeFinalizer string) { testIssuerHTTP01Enabled := gen.Issuer("testissuer", gen.SetIssuerACME(cmacme.ACMEIssuer{ Solvers: []cmacme.ACMEChallengeSolver{ { @@ -85,7 +88,7 @@ func TestSyncHappyPath(t *testing.T) { gen.SetChallengeIssuer(cmmeta.ObjectReference{ Name: "testissuer", }), - gen.SetChallengeFinalizers([]string{cmacme.ACMEFinalizer}), + gen.SetChallengeFinalizers([]string{finalizer}), ) deletedChallenge := gen.ChallengeFrom(baseChallenge, gen.SetChallengeDeletionTimestamp(metav1.Now())) @@ -99,7 +102,7 @@ func TestSyncHappyPath(t *testing.T) { gen.SetChallengeType(cmacme.ACMEChallengeTypeHTTP01), ), httpSolver: &fakeSolver{ - fakeCleanUp: func(ctx context.Context, issuer v1.GenericIssuer, ch *cmacme.Challenge) error { + fakeCleanUp: func(ctx context.Context, ch *cmacme.Challenge) error { return nil }, }, @@ -131,7 +134,7 @@ func TestSyncHappyPath(t *testing.T) { gen.SetChallengeType(cmacme.ACMEChallengeTypeHTTP01), ), httpSolver: &fakeSolver{ - fakeCleanUp: func(ctx context.Context, issuer v1.GenericIssuer, ch *cmacme.Challenge) error { + fakeCleanUp: func(context.Context, *cmacme.Challenge) error { return simulatedCleanupError }, }, @@ -188,7 +191,7 @@ func TestSyncHappyPath(t *testing.T) { gen.DefaultTestNamespace, gen.ChallengeFrom(baseChallenge, gen.SetChallengeProcessing(true), - gen.SetChallengeFinalizers([]string{cmacme.ACMEFinalizer})))), + gen.SetChallengeFinalizers([]string{activeFinalizer})))), }, }, expectErr: false, @@ -203,7 +206,17 @@ func TestSyncHappyPath(t *testing.T) { gen.SetChallengeProcessing(true), gen.SetChallengeURL("testurl"), ), testIssuerHTTP01Enabled}, - ExpectedActions: []testpkg.Action{}, + ExpectedActions: []testpkg.Action{ + testpkg.NewAction( + coretesting.NewUpdateSubresourceAction(cmacme.SchemeGroupVersion.WithResource("challenges"), + "status", + gen.DefaultTestNamespace, + gen.ChallengeFrom(baseChallenge, + gen.SetChallengeURL("testurl"), + gen.SetChallengeProcessing(true), + gen.SetChallengeReason("unexpected non-ACME API error: challenge was not present in authorization"), + gen.SetChallengeState(cmacme.Errored)))), + }, }, expectErr: true, acmeClient: &acmecl.FakeACME{ @@ -334,7 +347,7 @@ func TestSyncHappyPath(t *testing.T) { fakeCheck: func(ctx context.Context, issuer v1.GenericIssuer, ch *cmacme.Challenge) error { return nil }, - fakeCleanUp: func(context.Context, v1.GenericIssuer, *cmacme.Challenge) error { + fakeCleanUp: func(context.Context, *cmacme.Challenge) error { return nil }, }, @@ -389,7 +402,7 @@ func TestSyncHappyPath(t *testing.T) { fakeCheck: func(ctx context.Context, issuer v1.GenericIssuer, ch *cmacme.Challenge) error { return nil }, - fakeCleanUp: func(context.Context, v1.GenericIssuer, *cmacme.Challenge) error { + fakeCleanUp: func(context.Context, *cmacme.Challenge) error { return nil }, }, @@ -448,7 +461,7 @@ func TestSyncHappyPath(t *testing.T) { fakeCheck: func(ctx context.Context, issuer v1.GenericIssuer, ch *cmacme.Challenge) error { return nil }, - fakeCleanUp: func(context.Context, v1.GenericIssuer, *cmacme.Challenge) error { + fakeCleanUp: func(context.Context, *cmacme.Challenge) error { return nil }, }, @@ -508,7 +521,7 @@ func TestSyncHappyPath(t *testing.T) { gen.SetChallengePresented(true), ), httpSolver: &fakeSolver{ - fakeCleanUp: func(ctx context.Context, issuer v1.GenericIssuer, ch *cmacme.Challenge) error { + fakeCleanUp: func(context.Context, *cmacme.Challenge) error { return nil }, }, @@ -543,7 +556,7 @@ func TestSyncHappyPath(t *testing.T) { gen.SetChallengePresented(true), ), httpSolver: &fakeSolver{ - fakeCleanUp: func(ctx context.Context, issuer v1.GenericIssuer, ch *cmacme.Challenge) error { + fakeCleanUp: func(context.Context, *cmacme.Challenge) error { return nil }, }, @@ -578,13 +591,35 @@ func TestSyncHappyPath(t *testing.T) { } } +func TestSyncHappyPathFinalizerLegacyToLegacy(t *testing.T) { + featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, feature.UseDomainQualifiedFinalizer, false) + testSyncHappyPathWithFinalizer(t, cmacme.ACMELegacyFinalizer, cmacme.ACMELegacyFinalizer) +} + +func TestSyncHappyPathFinalizerDomainQualifiedToLegacy(t *testing.T) { + featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, feature.UseDomainQualifiedFinalizer, false) + testSyncHappyPathWithFinalizer(t, cmacme.ACMEDomainQualifiedFinalizer, cmacme.ACMELegacyFinalizer) +} + +func TestSyncHappyPathFinalizerLegacyToDomainQualified(t *testing.T) { + featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, feature.UseDomainQualifiedFinalizer, true) + testSyncHappyPathWithFinalizer(t, cmacme.ACMELegacyFinalizer, cmacme.ACMEDomainQualifiedFinalizer) +} + +func TestSyncHappyPathFinalizerDomainQualifiedToDomainQualified(t *testing.T) { + featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, feature.UseDomainQualifiedFinalizer, true) + testSyncHappyPathWithFinalizer(t, cmacme.ACMEDomainQualifiedFinalizer, cmacme.ACMEDomainQualifiedFinalizer) +} + func runTest(t *testing.T, test testT) { test.builder.T = t test.builder.Init() defer test.builder.Stop() c := &controller{} - c.Register(test.builder.Context) + if _, _, err := c.Register(test.builder.Context); err != nil { + t.Fatal(err) + } c.helper = issuer.NewHelper( test.builder.SharedInformerFactory.Certmanager().V1().Issuers().Lister(), test.builder.SharedInformerFactory.Certmanager().V1().ClusterIssuers().Lister(), diff --git a/pkg/controller/acmechallenges/update.go b/pkg/controller/acmechallenges/update.go index a6b274e5664..946e171c373 100644 --- a/pkg/controller/acmechallenges/update.go +++ b/pkg/controller/acmechallenges/update.go @@ -67,7 +67,7 @@ func newObjectUpdater(cl versioned.Interface, fieldManager string) objectUpdater // the UpdateStatus method. // Both updates will be attempted, even if one fails, except in the case where // one of the updates fails with a Not Found error. -// If the any of the API operations results in a Not Found error, updateObject +// If any of the API operations results in a Not Found error, updateObject // will exit without error and the remaining operations will be skipped. // Only the Finalizers and Status fields may be modified. If there are any // modifications to new object, outside of the Finalizers and Status fields, diff --git a/pkg/controller/acmechallenges/update_test.go b/pkg/controller/acmechallenges/update_test.go index ae3149566b8..abac2f5bc13 100644 --- a/pkg/controller/acmechallenges/update_test.go +++ b/pkg/controller/acmechallenges/update_test.go @@ -45,7 +45,7 @@ func TestUpdateObjectSSA(t *testing.T) { "https://github.com/kubernetes/client-go/issues/970", "https://github.com/kubernetes/client-go/issues/992", ) - defer featuretesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, feature.ServerSideApply, true)() + featuretesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, feature.ServerSideApply, true) runUpdateObjectTests(t) } diff --git a/pkg/controller/acmeorders/checks.go b/pkg/controller/acmeorders/checks.go index 379faeef250..755517f4b01 100644 --- a/pkg/controller/acmeorders/checks.go +++ b/pkg/controller/acmeorders/checks.go @@ -20,6 +20,7 @@ import ( "fmt" "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/util/workqueue" @@ -29,7 +30,7 @@ import ( ) func handleGenericIssuerFunc( - queue workqueue.RateLimitingInterface, + queue workqueue.TypedRateLimitingInterface[types.NamespacedName], orderLister cmacmelisters.OrderLister, ) func(interface{}) { return func(obj interface{}) { @@ -45,12 +46,10 @@ func handleGenericIssuerFunc( return } for _, crt := range certs { - key, err := keyFunc(crt) - if err != nil { - runtime.HandleError(err) - continue - } - queue.Add(key) + queue.Add(types.NamespacedName{ + Namespace: crt.Namespace, + Name: crt.Name, + }) } } } diff --git a/pkg/controller/acmeorders/controller.go b/pkg/controller/acmeorders/controller.go index 13350627222..123718158c6 100644 --- a/pkg/controller/acmeorders/controller.go +++ b/pkg/controller/acmeorders/controller.go @@ -18,10 +18,11 @@ package acmeorders import ( "context" - "time" + "fmt" "github.com/go-logr/logr" k8sErrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/workqueue" @@ -29,6 +30,7 @@ import ( internalinformers "github.com/cert-manager/cert-manager/internal/informers" "github.com/cert-manager/cert-manager/pkg/acme/accounts" + cmacme "github.com/cert-manager/cert-manager/pkg/apis/acme/v1" cmclient "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned" cmacmelisters "github.com/cert-manager/cert-manager/pkg/client/listers/acme/v1" cmlisters "github.com/cert-manager/cert-manager/pkg/client/listers/certmanager/v1" @@ -38,8 +40,6 @@ import ( "github.com/cert-manager/cert-manager/pkg/scheduler" ) -var keyFunc = controllerpkg.KeyFunc - type controller struct { // issuer helper is used to obtain references to issuers, used by Sync() helper issuer.Helper @@ -66,10 +66,10 @@ type controller struct { // maintain a reference to the workqueue for this controller // so the handleOwnedResource method can enqueue resources - queue workqueue.RateLimitingInterface + queue workqueue.TypedRateLimitingInterface[types.NamespacedName] // scheduledWorkQueue holds items to be re-queued after a period of time. - scheduledWorkQueue scheduler.ScheduledWorkQueue + scheduledWorkQueue scheduler.ScheduledWorkQueue[types.NamespacedName] } // NewController constructs an orders controller using the provided options. @@ -77,12 +77,14 @@ func NewController( log logr.Logger, ctx *controllerpkg.Context, isNamespaced bool, -) (*controller, workqueue.RateLimitingInterface, []cache.InformerSynced) { +) (*controller, workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { // Create a queue used to queue up Orders to be processed. - queue := workqueue.NewNamedRateLimitingQueue( - workqueue.NewItemExponentialFailureRateLimiter(time.Second*5, time.Minute*30), - ControllerName, + queue := workqueue.NewTypedRateLimitingQueueWithConfig( + controllerpkg.DefaultACMERateLimiter(), + workqueue.TypedRateLimitingQueueConfig[types.NamespacedName]{ + Name: ControllerName, + }, ) // Create a scheduledWorkQueue to schedule Orders for re-processing. @@ -117,21 +119,29 @@ func NewController( mustSync = append(mustSync, clusterIssuerInformer.Informer().HasSynced) clusterIssuerLister = clusterIssuerInformer.Lister() // register handler function for clusterissuer resources - clusterIssuerInformer.Informer().AddEventHandler( + if _, err := clusterIssuerInformer.Informer().AddEventHandler( &controllerpkg.BlockingEventHandler{WorkFunc: handleGenericIssuerFunc(queue, orderLister)}, - ) + ); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } } // register handler functions - orderInformer.Informer().AddEventHandler( + if _, err := orderInformer.Informer().AddEventHandler( &controllerpkg.QueuingEventHandler{Queue: queue}, - ) - issuerInformer.Informer().AddEventHandler( + ); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } + if _, err := issuerInformer.Informer().AddEventHandler( &controllerpkg.BlockingEventHandler{WorkFunc: handleGenericIssuerFunc(queue, orderLister)}, - ) - challengeInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ + ); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } + if _, err := challengeInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ WorkFunc: controllerpkg.HandleOwnedResourceNamespacedFunc(log, queue, orderGvk, orderGetterFunc(orderLister)), - }) + }); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } return &controller{ clock: ctx.Clock, @@ -147,17 +157,13 @@ func NewController( cmClient: ctx.CMClient, accountRegistry: ctx.AccountRegistry, fieldManager: ctx.FieldManager, - }, queue, mustSync + }, queue, mustSync, nil } -func (c *controller) ProcessItem(ctx context.Context, key string) error { +func (c *controller) ProcessItem(ctx context.Context, key types.NamespacedName) error { log := logf.FromContext(ctx) - namespace, name, err := cache.SplitMetaNamespaceKey(key) - if err != nil { - log.Error(err, "invalid resource key") - return nil - } + namespace, name := key.Namespace, key.Name order, err := c.orderLister.Orders(namespace).Get(name) if err != nil { @@ -174,8 +180,8 @@ func (c *controller) ProcessItem(ctx context.Context, key string) error { } // Returns a function that finds a named Order in a particular namespace. -func orderGetterFunc(orderLister cmacmelisters.OrderLister) func(string, string) (interface{}, error) { - return func(namespace, name string) (interface{}, error) { +func orderGetterFunc(orderLister cmacmelisters.OrderLister) func(string, string) (*cmacme.Order, error) { + return func(namespace, name string) (*cmacme.Order, error) { return orderLister.Orders(namespace).Get(name) } } @@ -195,21 +201,21 @@ type controllerWrapper struct { // Register registers a controller, created using the provided context. // It returns the workqueue to be used to enqueue items, a list of // InformerSynced functions that must be synced, or an error. -func (c *controllerWrapper) Register(ctx *controllerpkg.Context) (workqueue.RateLimitingInterface, []cache.InformerSynced, error) { +func (c *controllerWrapper) Register(ctx *controllerpkg.Context) (workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { // Construct a new named logger to be reused throughout the controller. log := logf.FromContext(ctx.RootContext, ControllerName) // If --namespace flag was set thus limiting cert-manager to a single namespace. isNamespaced := ctx.Namespace != "" - ctrl, queue, mustSync := NewController( + ctrl, queue, mustSync, err := NewController( log, ctx, isNamespaced, ) c.controller = ctrl - return queue, mustSync, nil + return queue, mustSync, err } func init() { diff --git a/pkg/controller/acmeorders/sync.go b/pkg/controller/acmeorders/sync.go index 8fb17683ecd..4aa8c8613fd 100644 --- a/pkg/controller/acmeorders/sync.go +++ b/pkg/controller/acmeorders/sync.go @@ -22,6 +22,7 @@ import ( "crypto/x509" "encoding/pem" "fmt" + "net/http" "time" acmeapi "golang.org/x/crypto/acme" @@ -30,9 +31,9 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/client-go/tools/cache" "github.com/cert-manager/cert-manager/internal/controller/feature" internalorders "github.com/cert-manager/cert-manager/internal/controller/orders" @@ -226,18 +227,13 @@ func (c *controller) Sync(ctx context.Context, o *cmacme.Order) (err error) { // This is probably not needed as at this point the Order's status // should already be Pending, but set it anyway to be explicit. c.setOrderState(&o.Status, string(cmacme.Pending)) - key, err := cache.MetaNamespaceKeyFunc(o) - if err != nil { - log.Error(err, "failed to construct key for pending Order") - // We should never end up here as this error would have been - // encountered in informers callback already. This probably cannot - // be fixed by re-queueing. If we do start encountering this - // scenario, we should consider whether the Order should be marked - // as failed here. - return nil - } + // Re-queue the Order to be processed again after 5 seconds. - c.scheduledWorkQueue.Add(key, RequeuePeriod) + c.scheduledWorkQueue.Add(types.NamespacedName{ + Name: o.Name, + Namespace: o.Namespace, + }, RequeuePeriod) + return nil case !anyChallengesFailed(challenges) && allChallengesFinal(challenges): @@ -536,7 +532,7 @@ func (c *controller) finalizeOrder(ctx context.Context, cl acmecl.Interface, o * // finalized in an earlier reconcile, but the reconciler failed // to update the status of the Order CR. // https://datatracker.ietf.org/doc/html/rfc8555#:~:text=A%20request%20to%20finalize%20an%20order%20will%20result%20in%20error,will%20indicate%20what%20action%20the%20client%20should%20take%20(see%20below). - if ok && acmeErr.StatusCode == 403 { + if ok && acmeErr.StatusCode == http.StatusForbidden { acmeOrder, getOrderErr := getACMEOrder(ctx, cl, o) acmeGetOrderErr, ok := getOrderErr.(*acmeapi.Error) diff --git a/pkg/controller/acmeorders/sync_test.go b/pkg/controller/acmeorders/sync_test.go index a0d7e05b489..7387f4224e2 100644 --- a/pkg/controller/acmeorders/sync_test.go +++ b/pkg/controller/acmeorders/sync_test.go @@ -27,6 +27,7 @@ import ( acmeapi "golang.org/x/crypto/acme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" coretesting "k8s.io/client-go/testing" fakeclock "k8s.io/utils/clock/testing" @@ -933,7 +934,7 @@ func runTest(t *testing.T, test testT) { } gotScheduled := false fakeScheduler := schedulertest.FakeScheduler{ - AddFunc: func(obj interface{}, duration time.Duration) { + AddFunc: func(obj types.NamespacedName, duration time.Duration) { gotScheduled = true }, } diff --git a/pkg/controller/cainjector/indexers.go b/pkg/controller/cainjector/indexers.go index cefb46dc2e2..d2a29cb929b 100644 --- a/pkg/controller/cainjector/indexers.go +++ b/pkg/controller/cainjector/indexers.go @@ -20,8 +20,8 @@ import ( "context" "github.com/go-logr/logr" - corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" ctrl "sigs.k8s.io/controller-runtime" @@ -48,7 +48,7 @@ const ( func certFromSecretToInjectableMapFuncBuilder(cl client.Reader, log logr.Logger, config setup) handler.MapFunc { return func(ctx context.Context, obj client.Object) []ctrl.Request { secretName := types.NamespacedName{Name: obj.GetName(), Namespace: obj.GetNamespace()} - certName := owningCertForSecret(obj.(*corev1.Secret)) + certName := owningCertForSecret(obj.(*metav1.PartialObjectMetadata)) if certName == nil { return nil } @@ -128,7 +128,7 @@ func certToInjectableMapFuncBuilder(cl client.Reader, log logr.Logger, config se // secretForInjectableMapFuncBuilder returns a handler.MapFunc that, for a // config for particular injectable type (i.e CRD, APIService) and a Secret, -// returns all injectables that have the inject-ca-from-secret annotion with the +// returns all injectables that have the inject-ca-from-secret annotation with the // given secret name. This will be used in an event handler to ensure that // changes to a Secret triggers a reconcile loop for the relevant injectable. func secretForInjectableMapFuncBuilder(cl client.Reader, log logr.Logger, config setup) handler.MapFunc { diff --git a/pkg/controller/cainjector/reconciler.go b/pkg/controller/cainjector/reconciler.go index 2421749ebf5..cddb1fd36f8 100644 --- a/pkg/controller/cainjector/reconciler.go +++ b/pkg/controller/cainjector/reconciler.go @@ -22,7 +22,6 @@ import ( "strings" "github.com/go-logr/logr" - corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -38,13 +37,13 @@ import ( ) // This file contains logic to create reconcilers. By default a -// reconciler is created for each of the injectables- CustomResourceDefinition, +// reconciler is created for each of the injectables - CustomResourceDefinition, // Validating/MutatingWebhookConfiguration, APIService and gets triggered for // events on those resources as well as on Secrets and Certificates. // reconciler syncs CA data from source to injectable. type reconciler struct { - // newInjectableTarget knows how to create a new injectable targt for + // newInjectableTarget knows how to create a new injectable target for // the injectable being reconciled. newInjectableTarget NewInjectableTarget // sources is a list of available 'data sources' that can be used to extract @@ -163,16 +162,25 @@ func dropNotFound(err error) error { return err } -// owningCertForSecret gets the name of the owning certificate for a -// given secret, returning nil if no such object exists. -func owningCertForSecret(secret *corev1.Secret) *types.NamespacedName { - val, ok := secret.Annotations[certmanager.CertificateNameKey] +// owningCertForSecret gets the name of the owning certificate for a given +// secret, returning nil if the supplied secret does not have a +// `cert-manager.io/certificate-name` annotation. +// The secret may be a v1.Secret or a v1.PartialObjectMetadata. +// +// NOTE: "owning" here does not mean [ownerReference][1], because +// cert-manager does not set the ownerReference of the Secret, +// unless the [`--enable-certificate-owner-ref` flag is true][2]. +// +// [1]: https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/ +// [2]: https://cert-manager.io/docs/cli/controller/ +func owningCertForSecret(secret client.Object) *types.NamespacedName { + val, ok := secret.GetAnnotations()[certmanager.CertificateNameKey] if !ok { return nil } return &types.NamespacedName{ Name: val, - Namespace: secret.Namespace, + Namespace: secret.GetNamespace(), } } diff --git a/pkg/controller/cainjector/setup.go b/pkg/controller/cainjector/setup.go index 2b51a325e11..bf23396bf22 100644 --- a/pkg/controller/cainjector/setup.go +++ b/pkg/controller/cainjector/setup.go @@ -165,7 +165,20 @@ func RegisterAllInjectors(ctx context.Context, mgr ctrl.Manager, opts SetupOptio // injectables is here where we define which // objects' events should trigger a reconcile. builder.WithPredicates(predicates)). - Watches(new(corev1.Secret), handler.EnqueueRequestsFromMapFunc(secretForInjectableMapFuncBuilder(mgr.GetClient(), log, setup))) + Watches( + new(corev1.Secret), + handler.EnqueueRequestsFromMapFunc(secretForInjectableMapFuncBuilder(mgr.GetClient(), log, setup)), + // Why do we use builder.OnlyMetadata? + // + // 1. To reduce memory use of cainjector, by only caching the + // metadata of Secrets, not the data. + // 2. To reduce the load on the K8S API server, by only listing + // the metadata of the Secrets when cainjector starts up. + // + // This configuration works in conjunction with the `DisableFor` + // option in the manager client.Options and client.CacheOptions. + builder.OnlyMetadata, + ) if opts.EnableCertificatesDataSource { // Index injectable with a new field. If the injectable's CA is // to be sourced from a Certificate's Secret, the field's value will be the @@ -176,10 +189,15 @@ func RegisterAllInjectors(ctx context.Context, mgr ctrl.Manager, opts SetupOptio err := fmt.Errorf("error making injectable indexable by inject-ca-from path: %w", err) return err } - b.Watches(new(corev1.Secret), handler.EnqueueRequestsFromMapFunc( - certFromSecretToInjectableMapFuncBuilder(mgr.GetClient(), log, setup))). - Watches(new(cmapi.Certificate), - handler.EnqueueRequestsFromMapFunc(certToInjectableMapFuncBuilder(mgr.GetClient(), log, setup))) + b.Watches( + new(corev1.Secret), + handler.EnqueueRequestsFromMapFunc(certFromSecretToInjectableMapFuncBuilder(mgr.GetClient(), log, setup)), + // See "Why do we use builder.OnlyMetadata?" above. + builder.OnlyMetadata, + ).Watches( + new(cmapi.Certificate), + handler.EnqueueRequestsFromMapFunc(certToInjectableMapFuncBuilder(mgr.GetClient(), log, setup)), + ) } if err := b.Complete(r); err != nil { return fmt.Errorf("error registering controller for %s: %w", setup.objType.GetName(), err) diff --git a/pkg/controller/cainjector/sources.go b/pkg/controller/cainjector/sources.go index f84f4eb07f0..4e6ba91104e 100644 --- a/pkg/controller/cainjector/sources.go +++ b/pkg/controller/cainjector/sources.go @@ -96,9 +96,9 @@ func (c *certificateDataSource) ReadCA(ctx context.Context, log logr.Logger, met } if namespace != "" && certName.Namespace != namespace { err := fmt.Errorf("cannot read CA data from Certificate in namespace %s, cainjector is scoped to namespace %s", certName.Namespace, namespace) - forbidenErr := apierrors.NewForbidden(cmapi.Resource("certificates"), certName.Name, err) - log.Error(forbidenErr, "cannot read data source") - return nil, forbidenErr + forbiddenErr := apierrors.NewForbidden(cmapi.Resource("certificates"), certName.Name, err) + log.Error(forbiddenErr, "cannot read data source") + return nil, forbiddenErr } var cert cmapi.Certificate @@ -117,6 +117,13 @@ func (c *certificateDataSource) ReadCA(ctx context.Context, log logr.Logger, met // don't requeue if we're just not found, we'll get called when the secret gets created return nil, dropNotFound(err) } + // Only use Secrets that have been created by this Certificate. + // The Secret must have a `cert-manager.io/certificate-name` annotation + // value matching the name of this Certificate.. + // NOTE: "owner" is not the `ownerReference`, because cert-manager does not + // usually set the ownerReference of the Secret. + // TODO: The logged warning below is misleading because it contains the + // ownerReference, which is not the reason for ignoring the Secret. owner := owningCertForSecret(&secret) if owner == nil || *owner != certName { log.V(logf.WarnLevel).Info("refusing to target secret not owned by certificate", "owner", metav1.GetControllerOf(&secret)) @@ -165,9 +172,9 @@ func (c *secretDataSource) ReadCA(ctx context.Context, log logr.Logger, metaObj if namespace != "" && secretName.Namespace != namespace { err := fmt.Errorf("cannot read CA data from Secret in namespace %s, cainjector is scoped to namespace %s", secretName.Namespace, namespace) - forbidenErr := apierrors.NewForbidden(cmapi.Resource("certificates"), secretName.Name, err) - log.Error(forbidenErr, "cannot read data source") - return nil, forbidenErr + forbiddenErr := apierrors.NewForbidden(cmapi.Resource("certificates"), secretName.Name, err) + log.Error(forbiddenErr, "cannot read data source") + return nil, forbiddenErr } // grab the associated secret diff --git a/pkg/controller/certificate-shim/gateways/controller.go b/pkg/controller/certificate-shim/gateways/controller.go index 0351c1c8b56..ed25bc6d26a 100644 --- a/pkg/controller/certificate-shim/gateways/controller.go +++ b/pkg/controller/certificate-shim/gateways/controller.go @@ -22,6 +22,7 @@ import ( k8sErrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" @@ -42,10 +43,10 @@ type controller struct { sync shimhelper.SyncFn // For testing purposes. - queue workqueue.RateLimitingInterface + queue workqueue.TypedRateLimitingInterface[types.NamespacedName] } -func (c *controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitingInterface, []cache.InformerSynced, error) { +func (c *controller) Register(ctx *controllerpkg.Context) (workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { c.gatewayLister = ctx.GWShared.Gateway().V1().Gateways().Lister() log := logf.FromContext(ctx.RootContext, ControllerName) c.sync = shimhelper.SyncFnFor(ctx.Recorder, log, ctx.CMClient, ctx.SharedInformerFactory.Certmanager().V1().Certificates().Lister(), ctx.IngressShimOptions, ctx.FieldManager) @@ -53,9 +54,11 @@ func (c *controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitin // We don't need to requeue Gateways on "Deleted" events, since our Sync // function does nothing when the Gateway lister returns "not found". But we // still do it for consistency with the rest of the controllers. - ctx.GWShared.Gateway().V1().Gateways().Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{ + if _, err := ctx.GWShared.Gateway().V1().Gateways().Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{ Queue: c.queue, - }) + }); err != nil { + return nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } // Even thought the Gateway controller already re-queues the Gateway after // creating a child Certificate, we still re-queue the Gateway when we @@ -67,9 +70,11 @@ func (c *controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitin // // Regarding "Deleted" events on Certificates, we requeue the parent Gateway // to immediately recreate the Certificate when the Certificate is deleted. - ctx.SharedInformerFactory.Certmanager().V1().Certificates().Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ + if _, err := ctx.SharedInformerFactory.Certmanager().V1().Certificates().Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ WorkFunc: certificateHandler(c.queue), - }) + }); err != nil { + return nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } mustSync := []cache.InformerSynced{ ctx.GWShared.Gateway().V1().Gateways().Informer().HasSynced, @@ -79,12 +84,8 @@ func (c *controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitin return c.queue, mustSync, nil } -func (c *controller) ProcessItem(ctx context.Context, key string) error { - namespace, name, err := cache.SplitMetaNamespaceKey(key) - if err != nil { - runtime.HandleError(fmt.Errorf("invalid resource key: %s", key)) - return nil - } +func (c *controller) ProcessItem(ctx context.Context, key types.NamespacedName) error { + namespace, name := key.Namespace, key.Name gateway, err := c.gatewayLister.Gateways(namespace).Get(name) @@ -115,7 +116,7 @@ func (c *controller) ProcessItem(ctx context.Context, key string) error { // name: gateway-1 // blockOwnerDeletion: true // uid: 7d3897c2-ce27-4144-883a-e1b5f89bd65a -func certificateHandler(queue workqueue.RateLimitingInterface) func(obj interface{}) { +func certificateHandler(queue workqueue.TypedRateLimitingInterface[types.NamespacedName]) func(obj interface{}) { return func(obj interface{}) { crt, ok := obj.(*cmapi.Certificate) if !ok { @@ -137,14 +138,22 @@ func certificateHandler(queue workqueue.RateLimitingInterface) func(obj interfac return } - queue.Add(crt.Namespace + "/" + ref.Name) + queue.Add(types.NamespacedName{ + Namespace: crt.Namespace, + Name: ref.Name, + }) } } func init() { controllerpkg.Register(ControllerName, func(ctx *controllerpkg.ContextFactory) (controllerpkg.Interface, error) { return controllerpkg.NewBuilder(ctx, ControllerName). - For(&controller{queue: workqueue.NewNamedRateLimitingQueue(controllerpkg.DefaultItemBasedRateLimiter(), ControllerName)}). + For(&controller{queue: workqueue.NewTypedRateLimitingQueueWithConfig( + controllerpkg.DefaultItemBasedRateLimiter(), + workqueue.TypedRateLimitingQueueConfig[types.NamespacedName]{ + Name: ControllerName, + }, + )}). Complete() }) } diff --git a/pkg/controller/certificate-shim/gateways/controller_test.go b/pkg/controller/certificate-shim/gateways/controller_test.go index f41c7e69f7d..82dcd9bb4f5 100644 --- a/pkg/controller/certificate-shim/gateways/controller_test.go +++ b/pkg/controller/certificate-shim/gateways/controller_test.go @@ -25,6 +25,7 @@ import ( "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/util/workqueue" gwapi "sigs.k8s.io/gateway-api/apis/v1" gwclient "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned" @@ -41,7 +42,7 @@ func Test_controller_Register(t *testing.T) { name string existingCert *cmapi.Certificate givenCall func(*testing.T, cmclient.Interface, gwclient.Interface) - expectAddCalls []interface{} + expectAddCalls []types.NamespacedName }{ { name: "gateway is re-queued when an 'Added' event is received for this gateway", @@ -51,7 +52,12 @@ func Test_controller_Register(t *testing.T) { }}, metav1.CreateOptions{}) require.NoError(t, err) }, - expectAddCalls: []interface{}{"namespace-1/gateway-1"}, + expectAddCalls: []types.NamespacedName{ + { + Namespace: "namespace-1", + Name: "gateway-1", + }, + }, }, { name: "gateway is re-queued when an 'Updated' event is received for this gateway", @@ -69,8 +75,18 @@ func Test_controller_Register(t *testing.T) { }}, metav1.UpdateOptions{}) require.NoError(t, err) }, - expectAddCalls: []interface{}{"namespace-1/gateway-1", "namespace-1/gateway-1"}, - // <----- Create ------> <------ Update -----> + expectAddCalls: []types.NamespacedName{ + // Create + { + Namespace: "namespace-1", + Name: "gateway-1", + }, + // Update + { + Namespace: "namespace-1", + Name: "gateway-1", + }, + }, }, { name: "gateway is re-queued when a 'Deleted' event is received for this gateway", @@ -83,8 +99,18 @@ func Test_controller_Register(t *testing.T) { err = c.GatewayV1().Gateways("namespace-1").Delete(context.Background(), "gateway-1", metav1.DeleteOptions{}) require.NoError(t, err) }, - expectAddCalls: []interface{}{"namespace-1/gateway-1", "namespace-1/gateway-1"}, - // <----- Create ------> <------ Delete -----> + expectAddCalls: []types.NamespacedName{ + // Create + { + Namespace: "namespace-1", + Name: "gateway-1", + }, + // Delete + { + Namespace: "namespace-1", + Name: "gateway-1", + }, + }, }, { name: "gateway is re-queued when an 'Added' event is received for its child Certificate", @@ -97,7 +123,12 @@ func Test_controller_Register(t *testing.T) { }}, metav1.CreateOptions{}) require.NoError(t, err) }, - expectAddCalls: []interface{}{"namespace-1/gateway-2"}, + expectAddCalls: []types.NamespacedName{ + { + Namespace: "namespace-1", + Name: "gateway-2", + }, + }, }, { name: "gateway is re-queued when an 'Updated' event is received for its child Certificate", @@ -116,7 +147,12 @@ func Test_controller_Register(t *testing.T) { }}, metav1.UpdateOptions{}) require.NoError(t, err) }, - expectAddCalls: []interface{}{"namespace-1/gateway-2"}, + expectAddCalls: []types.NamespacedName{ + { + Namespace: "namespace-1", + Name: "gateway-2", + }, + }, }, { name: "gateway is re-queued when a 'Deleted' event is received for its child Certificate", @@ -130,7 +166,12 @@ func Test_controller_Register(t *testing.T) { // err := c.CertmanagerV1().Certificates("namespace-1").Delete(context.Background(), "cert-1", metav1.DeleteOptions{}) // require.NoError(t, err) }, - expectAddCalls: []interface{}{"namespace-1/gateway-2"}, + expectAddCalls: []types.NamespacedName{ + { + Namespace: "namespace-1", + Name: "gateway-2", + }, + }, }, } @@ -181,34 +222,34 @@ func Test_controller_Register(t *testing.T) { type mockWorkqueue struct { t *testing.T - callsToAdd []interface{} + callsToAdd []types.NamespacedName } -var _ workqueue.Interface = &mockWorkqueue{} +var _ workqueue.TypedInterface[types.NamespacedName] = &mockWorkqueue{} -func (m *mockWorkqueue) Add(arg0 interface{}) { +func (m *mockWorkqueue) Add(arg0 types.NamespacedName) { m.callsToAdd = append(m.callsToAdd, arg0) } -func (m *mockWorkqueue) AddAfter(arg0 interface{}, arg1 time.Duration) { +func (m *mockWorkqueue) AddAfter(arg0 types.NamespacedName, arg1 time.Duration) { m.t.Error("workqueue.AddAfter was called but was not expected to be called") } -func (m *mockWorkqueue) AddRateLimited(arg0 interface{}) { +func (m *mockWorkqueue) AddRateLimited(arg0 types.NamespacedName) { m.t.Error("workqueue.AddRateLimited was called but was not expected to be called") } -func (m *mockWorkqueue) Done(arg0 interface{}) { +func (m *mockWorkqueue) Done(arg0 types.NamespacedName) { m.t.Error("workqueue.Done was called but was not expected to be called") } -func (m *mockWorkqueue) Forget(arg0 interface{}) { +func (m *mockWorkqueue) Forget(arg0 types.NamespacedName) { m.t.Error("workqueue.Forget was called but was not expected to be called") } -func (m *mockWorkqueue) Get() (interface{}, bool) { +func (m *mockWorkqueue) Get() (types.NamespacedName, bool) { m.t.Error("workqueue.Get was called but was not expected to be called") - return nil, false + return types.NamespacedName{}, false } func (m *mockWorkqueue) Len() int { @@ -216,7 +257,7 @@ func (m *mockWorkqueue) Len() int { return 0 } -func (m *mockWorkqueue) NumRequeues(arg0 interface{}) int { +func (m *mockWorkqueue) NumRequeues(arg0 types.NamespacedName) int { m.t.Error("workqueue.NumRequeues was called but was not expected to be called") return 0 } diff --git a/pkg/controller/certificate-shim/helper.go b/pkg/controller/certificate-shim/helper.go index ce6f59152e0..52345ffb596 100644 --- a/pkg/controller/certificate-shim/helper.go +++ b/pkg/controller/certificate-shim/helper.go @@ -163,6 +163,14 @@ func translateAnnotations(crt *cmapi.Certificate, ingLikeAnnotations map[string] crt.Spec.RenewBefore = &metav1.Duration{Duration: duration} } + if renewBeforePercentage, found := ingLikeAnnotations[cmapi.RenewBeforePercentageAnnotationKey]; found { + pct, err := strconv.ParseInt(renewBeforePercentage, 10, 32) + if err != nil { + return fmt.Errorf("%w %q: %v", errInvalidIngressAnnotation, cmapi.RenewBeforePercentageAnnotationKey, err) + } + crt.Spec.RenewBeforePercentage = ptr.To(int32(pct)) + } + if usages, found := ingLikeAnnotations[cmapi.UsagesAnnotationKey]; found { var newUsages []cmapi.KeyUsage for _, usageName := range strings.Split(usages, ",") { diff --git a/pkg/controller/certificate-shim/helper_test.go b/pkg/controller/certificate-shim/helper_test.go index 61d6b57da37..f42b8f8cb9b 100644 --- a/pkg/controller/certificate-shim/helper_test.go +++ b/pkg/controller/certificate-shim/helper_test.go @@ -79,6 +79,29 @@ func Test_translateAnnotations(t *testing.T) { a.Equal(`"1725 Slough Avenue, Suite 200, Scranton Business Park","1800 Slough Avenue, Suite 200, Scranton Business Park"`, joinedAddresses) }, }, + "success renew before pct": { + crt: gen.Certificate("example-cert"), + annotations: map[string]string{ + cmapi.CommonNameAnnotationKey: "www.example.com", + cmapi.DurationAnnotationKey: "168h", // 1 week + cmapi.RenewBeforePercentageAnnotationKey: "50", + cmapi.UsagesAnnotationKey: "server auth,signing", + cmapi.PrivateKeyAlgorithmAnnotationKey: "RSA", + cmapi.PrivateKeyEncodingAnnotationKey: "PKCS1", + cmapi.PrivateKeySizeAnnotationKey: "2048", + cmapi.PrivateKeyRotationPolicyAnnotationKey: "Always", + }, + check: func(a *assert.Assertions, crt *cmapi.Certificate) { + a.Equal("www.example.com", crt.Spec.CommonName) + a.Equal(&metav1.Duration{Duration: time.Hour * 24 * 7}, crt.Spec.Duration) + a.Equal(ptr.To(int32(50)), crt.Spec.RenewBeforePercentage) + a.Equal([]cmapi.KeyUsage{cmapi.UsageServerAuth, cmapi.UsageSigning}, crt.Spec.Usages) + a.Equal(cmapi.RSAKeyAlgorithm, crt.Spec.PrivateKey.Algorithm) + a.Equal(cmapi.PKCS1, crt.Spec.PrivateKey.Encoding) + a.Equal(2048, crt.Spec.PrivateKey.Size) + a.Equal(cmapi.RotationPolicyAlways, crt.Spec.PrivateKey.RotationPolicy) + }, + }, "success rsa private key algorithm": { crt: gen.Certificate("example-cert"), annotations: map[string]string{ @@ -175,6 +198,14 @@ func Test_translateAnnotations(t *testing.T) { }, expectedError: errInvalidIngressAnnotation, }, + "bad renewBeforePercentage": { + crt: gen.Certificate("example-cert"), + annotations: validAnnotations(), + mutate: func(tc *testCase) { + tc.annotations[cmapi.RenewBeforePercentageAnnotationKey] = "an un-parsable integer" + }, + expectedError: errInvalidIngressAnnotation, + }, "bad usages": { crt: gen.Certificate("example-cert"), annotations: validAnnotations(), @@ -275,7 +306,6 @@ func Test_translateAnnotations(t *testing.T) { }, } for name, tc := range tests { - tc := tc // G601: Remove after Go 1.22. https://go.dev/wiki/LoopvarExperiment t.Run(name, func(t *testing.T) { if tc.mutate != nil { tc.mutate(&tc) diff --git a/pkg/controller/certificate-shim/ingresses/controller.go b/pkg/controller/certificate-shim/ingresses/controller.go index 4c336c73a82..3414c2f4b3d 100644 --- a/pkg/controller/certificate-shim/ingresses/controller.go +++ b/pkg/controller/certificate-shim/ingresses/controller.go @@ -22,6 +22,7 @@ import ( k8sErrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/runtime" networkingv1listers "k8s.io/client-go/listers/networking/v1" "k8s.io/client-go/tools/cache" @@ -42,7 +43,7 @@ type controller struct { sync shimhelper.SyncFn } -func (c *controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitingInterface, []cache.InformerSynced, error) { +func (c *controller) Register(ctx *controllerpkg.Context) (workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { cmShared := ctx.SharedInformerFactory ingressInformer := ctx.KubeSharedInformerFactory.Ingresses() @@ -51,7 +52,12 @@ func (c *controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitin log := logf.FromContext(ctx.RootContext, ControllerName) c.sync = shimhelper.SyncFnFor(ctx.Recorder, log, ctx.CMClient, cmShared.Certmanager().V1().Certificates().Lister(), ctx.IngressShimOptions, ctx.FieldManager) - queue := workqueue.NewNamedRateLimitingQueue(controllerpkg.DefaultItemBasedRateLimiter(), ControllerName) + queue := workqueue.NewTypedRateLimitingQueueWithConfig( + controllerpkg.DefaultItemBasedRateLimiter(), + workqueue.TypedRateLimitingQueueConfig[types.NamespacedName]{ + Name: ControllerName, + }, + ) mustSync := []cache.InformerSynced{ ingressInformer.Informer().HasSynced, @@ -64,9 +70,11 @@ func (c *controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitin // to do some cleanup, we would use a finalizer, and the cleanup logic would // be triggered by the "Updated" event when the object gets marked for // deletion. - ingressInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{ + if _, err := ingressInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{ Queue: queue, - }) + }); err != nil { + return nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } // We still re-queue on "Add" because the workqueue will remove any // duplicate key, although the Ingress controller already re-queues the @@ -77,19 +85,17 @@ func (c *controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitin // // We want to immediately recreate a Certificate when the Certificate is // deleted. - cmShared.Certmanager().V1().Certificates().Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ + if _, err := cmShared.Certmanager().V1().Certificates().Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ WorkFunc: certificateHandler(queue), - }) + }); err != nil { + return nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } return queue, mustSync, nil } -func (c *controller) ProcessItem(ctx context.Context, key string) error { - namespace, name, err := cache.SplitMetaNamespaceKey(key) - if err != nil { - runtime.HandleError(fmt.Errorf("invalid resource key: %s", key)) - return nil - } +func (c *controller) ProcessItem(ctx context.Context, key types.NamespacedName) error { + namespace, name := key.Namespace, key.Name ingress, err := c.ingressLister.Ingresses(namespace).Get(name) @@ -120,7 +126,7 @@ func (c *controller) ProcessItem(ctx context.Context, key string) error { // name: ingress-1 // blockOwnerDeletion: true // uid: 7d3897c2-ce27-4144-883a-e1b5f89bd65a -func certificateHandler(queue workqueue.RateLimitingInterface) func(obj interface{}) { +func certificateHandler(queue workqueue.TypedRateLimitingInterface[types.NamespacedName]) func(obj interface{}) { return func(obj interface{}) { cert, ok := obj.(*cmapi.Certificate) if !ok { @@ -139,7 +145,10 @@ func certificateHandler(queue workqueue.RateLimitingInterface) func(obj interfac return } - queue.Add(cert.Namespace + "/" + ingress.Name) + queue.Add(types.NamespacedName{ + Namespace: cert.Namespace, + Name: ingress.Name, + }) } } diff --git a/pkg/controller/certificate-shim/ingresses/controller_test.go b/pkg/controller/certificate-shim/ingresses/controller_test.go index c899d8f13e3..8a0d9e23eaf 100644 --- a/pkg/controller/certificate-shim/ingresses/controller_test.go +++ b/pkg/controller/certificate-shim/ingresses/controller_test.go @@ -26,6 +26,7 @@ import ( networkingv1 "k8s.io/api/networking/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" kclient "k8s.io/client-go/kubernetes" cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" @@ -41,7 +42,7 @@ func Test_controller_Register(t *testing.T) { existingKObjects []runtime.Object existingCMObjects []runtime.Object givenCall func(*testing.T, cmclient.Interface, kclient.Interface) - expectRequeueKey string + expectRequeueKey types.NamespacedName }{ { name: "ingress is re-queued when an 'Added' event is received for this ingress", @@ -51,7 +52,10 @@ func Test_controller_Register(t *testing.T) { }}, metav1.CreateOptions{}) require.NoError(t, err) }, - expectRequeueKey: "namespace-1/ingress-1", + expectRequeueKey: types.NamespacedName{ + Namespace: "namespace-1", + Name: "ingress-1", + }, }, { name: "ingress is re-queued when an 'Updated' event is received for this ingress", @@ -64,7 +68,10 @@ func Test_controller_Register(t *testing.T) { }}, metav1.UpdateOptions{}) require.NoError(t, err) }, - expectRequeueKey: "namespace-1/ingress-1", + expectRequeueKey: types.NamespacedName{ + Namespace: "namespace-1", + Name: "ingress-1", + }, }, { name: "ingress is re-queued when a 'Deleted' event is received for this ingress", @@ -75,7 +82,10 @@ func Test_controller_Register(t *testing.T) { err := c.NetworkingV1().Ingresses("namespace-1").Delete(context.Background(), "ingress-1", metav1.DeleteOptions{}) require.NoError(t, err) }, - expectRequeueKey: "namespace-1/ingress-1", + expectRequeueKey: types.NamespacedName{ + Namespace: "namespace-1", + Name: "ingress-1", + }, }, { name: "ingress is re-queued when an 'Added' event is received for its child Certificate", @@ -88,7 +98,10 @@ func Test_controller_Register(t *testing.T) { }}, metav1.CreateOptions{}) require.NoError(t, err) }, - expectRequeueKey: "namespace-1/ingress-2", + expectRequeueKey: types.NamespacedName{ + Namespace: "namespace-1", + Name: "ingress-2", + }, }, { name: "ingress is re-queued when an 'Updated' event is received for its child Certificate", @@ -107,7 +120,10 @@ func Test_controller_Register(t *testing.T) { }}, metav1.UpdateOptions{}) require.NoError(t, err) }, - expectRequeueKey: "namespace-1/ingress-2", + expectRequeueKey: types.NamespacedName{ + Namespace: "namespace-1", + Name: "ingress-2", + }, }, { name: "ingress is re-queued when a 'Deleted' event is received for its child Certificate", @@ -121,7 +137,10 @@ func Test_controller_Register(t *testing.T) { err := c.CertmanagerV1().Certificates("namespace-1").Delete(context.Background(), "cert-1", metav1.DeleteOptions{}) require.NoError(t, err) }, - expectRequeueKey: "namespace-1/ingress-2", + expectRequeueKey: types.NamespacedName{ + Namespace: "namespace-1", + Name: "ingress-2", + }, }, } @@ -149,7 +168,7 @@ func Test_controller_Register(t *testing.T) { // to be nil. time.AfterFunc(50*time.Millisecond, queue.ShutDown) - var gotKeys []string + var gotKeys []types.NamespacedName for { // Get blocks until either (1) a key is returned, or (2) the // queue is shut down. @@ -157,13 +176,13 @@ func Test_controller_Register(t *testing.T) { if done { break } - gotKeys = append(gotKeys, gotKey.(string)) + gotKeys = append(gotKeys, gotKey) } assert.Equal(t, 0, queue.Len(), "queue should be empty") // We only expect 0 or 1 keys received in the queue. - if test.expectRequeueKey != "" { - assert.Equal(t, []string{test.expectRequeueKey}, gotKeys) + if test.expectRequeueKey != (types.NamespacedName{}) { + assert.Equal(t, []types.NamespacedName{test.expectRequeueKey}, gotKeys) } else { assert.Nil(t, gotKeys) } diff --git a/pkg/controller/certificate-shim/sync_test.go b/pkg/controller/certificate-shim/sync_test.go index e3e0d6378b9..ba66f3703c3 100644 --- a/pkg/controller/certificate-shim/sync_test.go +++ b/pkg/controller/certificate-shim/sync_test.go @@ -3193,28 +3193,37 @@ func TestSync(t *testing.T) { var expectedActions []testpkg.Action for _, cr := range test.ExpectedCreate { expectedActions = append(expectedActions, - testpkg.NewAction(coretesting.NewCreateAction( + testpkg.NewAction(coretesting.NewCreateActionWithOptions( cmapi.SchemeGroupVersion.WithResource("certificates"), cr.Namespace, cr, + metav1.CreateOptions{ + FieldManager: "cert-manager-test", + }, )), ) } for _, cr := range test.ExpectedUpdate { expectedActions = append(expectedActions, - testpkg.NewAction(coretesting.NewUpdateAction( + testpkg.NewAction(coretesting.NewUpdateActionWithOptions( cmapi.SchemeGroupVersion.WithResource("certificates"), cr.Namespace, cr, + metav1.UpdateOptions{ + // TODO: set field manager here too + }, )), ) } for _, cr := range test.ExpectedDelete { expectedActions = append(expectedActions, - testpkg.NewAction(coretesting.NewDeleteAction( + testpkg.NewAction(coretesting.NewDeleteActionWithOptions( cmapi.SchemeGroupVersion.WithResource("certificates"), cr.Namespace, cr.Name, + metav1.DeleteOptions{ + // TODO: set field manager here too + }, ))) } b := &testpkg.Builder{ @@ -3244,7 +3253,7 @@ func TestSync(t *testing.T) { t.Error(err) } if err := b.AllActionsExecuted(); err != nil { - t.Errorf(err.Error()) + t.Error(err) } } } diff --git a/pkg/controller/certificaterequests/acme/acme.go b/pkg/controller/certificaterequests/acme/acme.go index 2c821a6c37a..8baef5bb62c 100644 --- a/pkg/controller/certificaterequests/acme/acme.go +++ b/pkg/controller/certificaterequests/acme/acme.go @@ -25,6 +25,7 @@ import ( "github.com/go-logr/logr" k8sErrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/workqueue" @@ -74,19 +75,21 @@ func init() { For(certificaterequests.New( apiutil.IssuerACME, NewACME, - func(ctx *controllerpkg.Context, log logr.Logger, queue workqueue.RateLimitingInterface) ([]cache.InformerSynced, error) { + func(ctx *controllerpkg.Context, log logr.Logger, queue workqueue.TypedRateLimitingInterface[types.NamespacedName]) ([]cache.InformerSynced, error) { orderInformer := ctx.SharedInformerFactory.Acme().V1().Orders().Informer() certificateRequestLister := ctx.SharedInformerFactory.Certmanager().V1().CertificateRequests().Lister() - orderInformer.AddEventHandler(&controllerpkg.BlockingEventHandler{ + if _, err := orderInformer.AddEventHandler(&controllerpkg.BlockingEventHandler{ WorkFunc: controllerpkg.HandleOwnedResourceNamespacedFunc( log, queue, cmapi.SchemeGroupVersion.WithKind(cmapi.CertificateRequestKind), - func(namespace, name string) (interface{}, error) { + func(namespace, name string) (*cmapi.CertificateRequest, error) { return certificateRequestLister.CertificateRequests(namespace).Get(name) }, ), - }) + }); err != nil { + return nil, fmt.Errorf("error setting up event handler: %v", err) + } return []cache.InformerSynced{orderInformer.HasSynced}, nil }, )). @@ -232,7 +235,7 @@ func (a *ACME) Sign(ctx context.Context, cr *cmapi.CertificateRequest, issuer cm log.V(logf.InfoLevel).Info("certificate issued") - // Order valid, return cert. The calling controller will update with ready if its happy with the cert. + // Order valid, return cert. The calling controller will update with ready if it's happy with the cert. return &issuerpkg.IssueResponse{ Certificate: order.Status.Certificate, }, nil diff --git a/pkg/controller/certificaterequests/approver/approver.go b/pkg/controller/certificaterequests/approver/approver.go index bc1f165c194..d9f88e3733e 100644 --- a/pkg/controller/certificaterequests/approver/approver.go +++ b/pkg/controller/certificaterequests/approver/approver.go @@ -22,6 +22,7 @@ import ( "github.com/go-logr/logr" apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/workqueue" @@ -51,7 +52,7 @@ type Controller struct { recorder record.EventRecorder - queue workqueue.RateLimitingInterface + queue workqueue.TypedRateLimitingInterface[types.NamespacedName] } func init() { @@ -65,13 +66,20 @@ func init() { // Register registers and constructs the controller using the provided context. // It returns the workqueue to be used to enqueue items, a list of // InformerSynced functions that must be synced, or an error. -func (c *Controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitingInterface, []cache.InformerSynced, error) { +func (c *Controller) Register(ctx *controllerpkg.Context) (workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { c.log = logf.FromContext(ctx.RootContext, ControllerName) - c.queue = workqueue.NewNamedRateLimitingQueue(controllerpkg.DefaultItemBasedRateLimiter(), ControllerName) + c.queue = workqueue.NewTypedRateLimitingQueueWithConfig( + controllerpkg.DefaultItemBasedRateLimiter(), + workqueue.TypedRateLimitingQueueConfig[types.NamespacedName]{ + Name: ControllerName, + }, + ) certificateRequestInformer := ctx.SharedInformerFactory.Certmanager().V1().CertificateRequests() mustSync := []cache.InformerSynced{certificateRequestInformer.Informer().HasSynced} - certificateRequestInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: c.queue}) + if _, err := certificateRequestInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: c.queue}); err != nil { + return nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } c.certificateRequestLister = certificateRequestInformer.Lister() c.cmClient = ctx.CMClient @@ -83,15 +91,11 @@ func (c *Controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitin return c.queue, mustSync, nil } -func (c *Controller) ProcessItem(ctx context.Context, key string) error { +func (c *Controller) ProcessItem(ctx context.Context, key types.NamespacedName) error { log := logf.FromContext(ctx) dbg := log.V(logf.DebugLevel) - namespace, name, err := cache.SplitMetaNamespaceKey(key) - if err != nil { - log.Error(err, "invalid resource key") - return nil - } + namespace, name := key.Namespace, key.Name cr, err := c.certificateRequestLister.CertificateRequests(namespace).Get(name) if apierrors.IsNotFound(err) { diff --git a/pkg/controller/certificaterequests/approver/approver_test.go b/pkg/controller/certificaterequests/approver/approver_test.go index 3ed3369fd81..7389463a4b5 100644 --- a/pkg/controller/certificaterequests/approver/approver_test.go +++ b/pkg/controller/certificaterequests/approver/approver_test.go @@ -22,12 +22,12 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" coretesting "k8s.io/client-go/testing" fakeclock "k8s.io/utils/clock/testing" cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" - controllerpkg "github.com/cert-manager/cert-manager/pkg/controller" testpkg "github.com/cert-manager/cert-manager/pkg/controller/test" ) @@ -39,7 +39,7 @@ func TestProcessItem(t *testing.T) { // key that should be passed to ProcessItem. // if not set, the 'namespace/name' of the 'CertificateRequest' field will be used. // if neither is set, the key will be "" - key string + key types.NamespacedName // CertificateRequest to be synced for the test. // if not set, the 'key' will be passed to ProcessItem instead. @@ -59,10 +59,16 @@ func TestProcessItem(t *testing.T) { }{ "do nothing if an empty 'key' is used": {}, "do nothing if an invalid 'key' is used": { - key: "abc/def/ghi", + key: types.NamespacedName{ + Namespace: "abc", + Name: "def/ghi", + }, }, "do nothing if a key references a Certificate that does not exist": { - key: "namespace/name", + key: types.NamespacedName{ + Namespace: "namespace", + Name: "name", + }, }, "do nothing if CertificateRequest already has 'Approved' True condition": { request: &cmapi.CertificateRequest{ @@ -206,10 +212,10 @@ func TestProcessItem(t *testing.T) { defer builder.Stop() key := test.key - if key == "" && test.request != nil { - key, err = controllerpkg.KeyFunc(test.request) - if err != nil { - t.Fatal(err) + if key == (types.NamespacedName{}) && test.request != nil { + key = types.NamespacedName{ + Name: test.request.Name, + Namespace: test.request.Namespace, } } diff --git a/pkg/controller/certificaterequests/ca/ca_test.go b/pkg/controller/certificaterequests/ca/ca_test.go index 339918eaa67..91ba9904360 100644 --- a/pkg/controller/certificaterequests/ca/ca_test.go +++ b/pkg/controller/certificaterequests/ca/ca_test.go @@ -440,7 +440,9 @@ func runTest(t *testing.T, test testT) { apiutil.IssuerCA, func(*controller.Context) certificaterequests.Issuer { return ca }, ) - controller.Register(test.builder.Context) + if _, _, err := controller.Register(test.builder.Context); err != nil { + t.Fatal(err) + } test.builder.Start() err := controller.Sync(context.Background(), test.certificateRequest) diff --git a/pkg/controller/certificaterequests/checks.go b/pkg/controller/certificaterequests/checks.go index 322b34cd80c..effdc299068 100644 --- a/pkg/controller/certificaterequests/checks.go +++ b/pkg/controller/certificaterequests/checks.go @@ -20,6 +20,7 @@ import ( "fmt" "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/types" cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" logf "github.com/cert-manager/cert-manager/pkg/logs" @@ -41,13 +42,10 @@ func (c *Controller) handleGenericIssuer(obj interface{}) { return } for _, cr := range crs { - log := logf.WithRelatedResource(log, cr) - key, err := keyFunc(cr) - if err != nil { - log.Error(err, "error computing key for resource") - continue - } - c.queue.Add(key) + c.queue.Add(types.NamespacedName{ + Name: cr.Name, + Namespace: cr.Namespace, + }) } } diff --git a/pkg/controller/certificaterequests/controller.go b/pkg/controller/certificaterequests/controller.go index c14f8447e9f..c7f73735514 100644 --- a/pkg/controller/certificaterequests/controller.go +++ b/pkg/controller/certificaterequests/controller.go @@ -22,6 +22,7 @@ import ( "github.com/go-logr/logr" k8sErrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/workqueue" @@ -37,15 +38,13 @@ import ( logf "github.com/cert-manager/cert-manager/pkg/logs" ) -var keyFunc = controllerpkg.KeyFunc - // Issuer implements the functionality to sign a certificate request for a // particular issuer type. type Issuer interface { Sign(context.Context, *v1.CertificateRequest, v1.GenericIssuer) (*issuer.IssueResponse, error) } -// Issuer Contractor builds a Issuer instance using the given controller +// Issuer Contractor builds an Issuer instance using the given controller // context. type IssuerConstructor func(*controllerpkg.Context) Issuer @@ -54,7 +53,7 @@ type IssuerConstructor func(*controllerpkg.Context) Issuer // covered in the main shared controller implementation. // The returned set of InformerSyncs will be waited on when the controller // starts. -type RegisterExtraInformerFn func(*controllerpkg.Context, logr.Logger, workqueue.RateLimitingInterface) ([]cache.InformerSynced, error) +type RegisterExtraInformerFn func(*controllerpkg.Context, logr.Logger, workqueue.TypedRateLimitingInterface[types.NamespacedName]) ([]cache.InformerSynced, error) // Controller is an implementation of the queueingController for // certificate requests. @@ -74,7 +73,7 @@ type Controller struct { // more details at https://github.com/cert-manager/cert-manager/issues/5216 secretLister internalinformers.SecretLister - queue workqueue.RateLimitingInterface + queue workqueue.TypedRateLimitingInterface[types.NamespacedName] // logger to be used by this controller log logr.Logger @@ -104,7 +103,7 @@ type Controller struct { // New will construct a new certificaterequest controller using the given // Issuer implementation. -// Note: the registerExtraInfromers passed here will be 'waited' for when +// Note: the registerExtraInformers passed here will be 'waited' for when // starting to ensure their corresponding listers have synced. // The caller is responsible for ensuring the informer work functions are setup // correctly on any informer. @@ -123,14 +122,19 @@ func New(issuerType string, issuerConstructor IssuerConstructor, registerExtraIn // Register registers and constructs the controller using the provided context. // It returns the workqueue to be used to enqueue items, a list of // InformerSynced functions that must be synced, or an error. -func (c *Controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitingInterface, []cache.InformerSynced, error) { +func (c *Controller) Register(ctx *controllerpkg.Context) (workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { componentName := "certificaterequests-issuer-" + c.issuerType // construct a new named logger to be reused throughout the controller c.log = logf.FromContext(ctx.RootContext, componentName) // create a queue used to queue up items to be processed - c.queue = workqueue.NewNamedRateLimitingQueue(controllerpkg.DefaultItemBasedRateLimiter(), componentName) + c.queue = workqueue.NewTypedRateLimitingQueueWithConfig( + controllerpkg.DefaultItemBasedRateLimiter(), + workqueue.TypedRateLimitingQueueConfig[types.NamespacedName]{ + Name: componentName, + }, + ) secretsInformer := ctx.KubeSharedInformerFactory.Secrets() issuerInformer := ctx.SharedInformerFactory.Certmanager().V1().Issuers() @@ -164,7 +168,9 @@ func (c *Controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitin clusterIssuerInformer := ctx.SharedInformerFactory.Certmanager().V1().ClusterIssuers() c.clusterIssuerLister = clusterIssuerInformer.Lister() // register handler function for clusterissuer resources - clusterIssuerInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{WorkFunc: c.handleGenericIssuer}) + if _, err := clusterIssuerInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{WorkFunc: c.handleGenericIssuer}); err != nil { + return nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } mustSync = append(mustSync, clusterIssuerInformer.Informer().HasSynced) } @@ -172,8 +178,12 @@ func (c *Controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitin c.certificateRequestLister = certificateRequestInformer.Lister() // register handler functions - certificateRequestInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: c.queue}) - issuerInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{WorkFunc: c.handleGenericIssuer}) + if _, err := certificateRequestInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: c.queue}); err != nil { + return nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } + if _, err := issuerInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{WorkFunc: c.handleGenericIssuer}); err != nil { + return nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } // create an issuer helper for reading generic issuers c.helper = issuer.NewHelper(c.issuerLister, c.clusterIssuerLister) @@ -196,15 +206,11 @@ func (c *Controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitin // ProcessItem is the worker function that will be called with a new key from // the workqueue. A key corresponds to a certificate request object. -func (c *Controller) ProcessItem(ctx context.Context, key string) error { +func (c *Controller) ProcessItem(ctx context.Context, key types.NamespacedName) error { log := logf.FromContext(ctx) dbg := log.V(logf.DebugLevel) - namespace, name, err := cache.SplitMetaNamespaceKey(key) - if err != nil { - log.Error(err, "invalid resource key") - return nil - } + namespace, name := key.Namespace, key.Name cr, err := c.certificateRequestLister.CertificateRequests(namespace).Get(name) if err != nil { diff --git a/pkg/controller/certificaterequests/selfsigned/checks.go b/pkg/controller/certificaterequests/selfsigned/checks.go index 87d31fa0607..2999a2f2c4a 100644 --- a/pkg/controller/certificaterequests/selfsigned/checks.go +++ b/pkg/controller/certificaterequests/selfsigned/checks.go @@ -23,6 +23,7 @@ import ( corev1 "k8s.io/api/core/v1" k8sErrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/util/workqueue" apiutil "github.com/cert-manager/cert-manager/pkg/api/util" @@ -41,7 +42,7 @@ import ( func handleSecretReferenceWorkFunc(log logr.Logger, lister clientv1.CertificateRequestLister, helper issuer.Helper, - queue workqueue.RateLimitingInterface, + queue workqueue.TypedRateLimitingInterface[types.NamespacedName], ) func(obj any) { return func(obj any) { log := log.WithName("handleSecretReference") @@ -57,13 +58,10 @@ func handleSecretReferenceWorkFunc(log logr.Logger, return } for _, request := range requests { - log := logf.WithRelatedResource(log, request) - key, err := controllerpkg.KeyFunc(request) - if err != nil { - log.Error(err, "error computing key for resource") - continue - } - queue.Add(key) + queue.Add(types.NamespacedName{ + Name: request.Name, + Namespace: request.Namespace, + }) } } } diff --git a/pkg/controller/certificaterequests/selfsigned/checks_test.go b/pkg/controller/certificaterequests/selfsigned/checks_test.go index c42b17a8823..8fea4146096 100644 --- a/pkg/controller/certificaterequests/selfsigned/checks_test.go +++ b/pkg/controller/certificaterequests/selfsigned/checks_test.go @@ -22,6 +22,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/util/workqueue" "k8s.io/klog/v2/ktesting" @@ -37,7 +38,7 @@ func Test_handleSecretReferenceWorkFunc(t *testing.T) { secret runtime.Object existingCRs []runtime.Object existingIssuers []runtime.Object - expectedQueue []string + expectedQueue []types.NamespacedName }{ "if given object is not secret, expect empty queue": { secret: gen.Certificate("not-a-secret"), @@ -68,7 +69,7 @@ func Test_handleSecretReferenceWorkFunc(t *testing.T) { gen.SetIssuerSelfSigned(cmapi.SelfSignedIssuer{}), ), }, - expectedQueue: []string{}, + expectedQueue: []types.NamespacedName{}, }, "if no requests then expect empty queue": { secret: gen.Secret("test-secret", gen.SetSecretNamespace("test-namespace")), @@ -82,7 +83,7 @@ func Test_handleSecretReferenceWorkFunc(t *testing.T) { gen.SetIssuerSelfSigned(cmapi.SelfSignedIssuer{}), ), }, - expectedQueue: []string{}, + expectedQueue: []types.NamespacedName{}, }, "referenced requests should be added to the queue": { secret: gen.Secret("test-secret", gen.SetSecretNamespace("test-namespace")), @@ -113,7 +114,16 @@ func Test_handleSecretReferenceWorkFunc(t *testing.T) { gen.SetIssuerSelfSigned(cmapi.SelfSignedIssuer{}), ), }, - expectedQueue: []string{"test-namespace/a", "test-namespace/b"}, + expectedQueue: []types.NamespacedName{ + { + Namespace: "test-namespace", + Name: "a", + }, + { + Namespace: "test-namespace", + Name: "b", + }, + }, }, } @@ -134,13 +144,13 @@ func Test_handleSecretReferenceWorkFunc(t *testing.T) { builder.Start() - queue := workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()) + queue := workqueue.NewTypedRateLimitingQueue(workqueue.DefaultTypedControllerRateLimiter[types.NamespacedName]()) handleSecretReferenceWorkFunc(ktesting.NewLogger(t, ktesting.NewConfig()), lister, helper, queue)(test.secret) require.Equal(t, len(test.expectedQueue), queue.Len()) - var actualQueue []string + var actualQueue []types.NamespacedName for range test.expectedQueue { i, _ := queue.Get() - actualQueue = append(actualQueue, i.(string)) + actualQueue = append(actualQueue, i) } assert.ElementsMatch(t, test.expectedQueue, actualQueue) }) diff --git a/pkg/controller/certificaterequests/selfsigned/selfsigned.go b/pkg/controller/certificaterequests/selfsigned/selfsigned.go index fa7803f5fd8..22b668e5f9d 100644 --- a/pkg/controller/certificaterequests/selfsigned/selfsigned.go +++ b/pkg/controller/certificaterequests/selfsigned/selfsigned.go @@ -26,6 +26,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" k8sErrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/workqueue" @@ -71,16 +72,18 @@ func init() { // Handle informed Secrets which may be referenced by the // "cert-manager.io/private-key-secret-name" annotation. - func(ctx *controllerpkg.Context, log logr.Logger, queue workqueue.RateLimitingInterface) ([]cache.InformerSynced, error) { + func(ctx *controllerpkg.Context, log logr.Logger, queue workqueue.TypedRateLimitingInterface[types.NamespacedName]) ([]cache.InformerSynced, error) { secretInformer := ctx.KubeSharedInformerFactory.Secrets().Informer() certificateRequestLister := ctx.SharedInformerFactory.Certmanager().V1().CertificateRequests().Lister() helper := issuer.NewHelper( ctx.SharedInformerFactory.Certmanager().V1().Issuers().Lister(), ctx.SharedInformerFactory.Certmanager().V1().ClusterIssuers().Lister(), ) - secretInformer.AddEventHandler(&controllerpkg.BlockingEventHandler{ + if _, err := secretInformer.AddEventHandler(&controllerpkg.BlockingEventHandler{ WorkFunc: handleSecretReferenceWorkFunc(log, certificateRequestLister, helper, queue), - }) + }); err != nil { + return nil, fmt.Errorf("error setting up event handler: %v", err) + } return []cache.InformerSynced{ secretInformer.HasSynced, ctx.SharedInformerFactory.Certmanager().V1().Issuers().Informer().HasSynced, diff --git a/pkg/controller/certificaterequests/selfsigned/selfsigned_test.go b/pkg/controller/certificaterequests/selfsigned/selfsigned_test.go index 0aca090b72d..fa64aae2387 100644 --- a/pkg/controller/certificaterequests/selfsigned/selfsigned_test.go +++ b/pkg/controller/certificaterequests/selfsigned/selfsigned_test.go @@ -630,7 +630,9 @@ func runTest(t *testing.T, test testT) { apiutil.IssuerSelfSigned, func(*controller.Context) certificaterequests.Issuer { return self }, ) - controller.Register(test.builder.Context) + if _, _, err := controller.Register(test.builder.Context); err != nil { + t.Fatal(err) + } test.builder.Start() err := controller.Sync(context.Background(), test.certificateRequest) diff --git a/pkg/controller/certificaterequests/sync_test.go b/pkg/controller/certificaterequests/sync_test.go index ec9979ed105..5cb23a35ca2 100644 --- a/pkg/controller/certificaterequests/sync_test.go +++ b/pkg/controller/certificaterequests/sync_test.go @@ -445,7 +445,7 @@ func TestSync(t *testing.T) { }, }, }, - "should return error to try again if there was a error getting issuer wasn't a not found error": { + "should return error to try again if there was an error getting issuer wasn't a not found error": { certificateRequest: baseCR.DeepCopy(), helper: &issuerfake.Helper{ GetGenericIssuerFunc: func(cmmeta.ObjectReference, string) (cmapi.GenericIssuer, error) { @@ -773,7 +773,9 @@ func runTest(t *testing.T, test testT) { } c := New(util.IssuerSelfSigned, func(*controller.Context) Issuer { return test.issuerImpl }) - c.Register(test.builder.Context) + if _, _, err := c.Register(test.builder.Context); err != nil { + t.Fatal(err) + } if test.helper != nil { c.helper = test.helper diff --git a/pkg/controller/certificaterequests/vault/fuzz_test.go b/pkg/controller/certificaterequests/vault/fuzz_test.go new file mode 100644 index 00000000000..65f6872d475 --- /dev/null +++ b/pkg/controller/certificaterequests/vault/fuzz_test.go @@ -0,0 +1,192 @@ +/* +Copyright 2024 The cert-manager 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 vault + +import ( + "context" + "crypto/rsa" + "testing" + "time" + + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + + internalinformers "github.com/cert-manager/cert-manager/internal/informers" + internalvault "github.com/cert-manager/cert-manager/internal/vault" + fakevault "github.com/cert-manager/cert-manager/internal/vault/fake" + apiutil "github.com/cert-manager/cert-manager/pkg/api/util" + "github.com/cert-manager/cert-manager/pkg/apis/certmanager" + cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" + cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" + controllerpkg "github.com/cert-manager/cert-manager/pkg/controller" + "github.com/cert-manager/cert-manager/pkg/controller/certificaterequests" + testpkg "github.com/cert-manager/cert-manager/pkg/controller/test" + "github.com/cert-manager/cert-manager/pkg/util/pki" + "github.com/cert-manager/cert-manager/test/unit/gen" +) + +var ( + rsaSKFuzz *rsa.PrivateKey + err error +) + +func init() { + rsaSKFuzz, err = pki.GenerateRSAPrivateKey(2048) + if err != nil { + panic(err) + } +} + +/* + FuzzVaultCRController is a fuzz test that can be run by way of + +go test -fuzz=FuzzVaultCRController. It tests for panics, OOMs +and stackoverflow-related bugs in the Vault reconciliation. +*/ +func FuzzVaultCRController(f *testing.F) { + f.Fuzz(func(t *testing.T, + secretTokenData, + customCsrPEM, + customRsaPEMCert []byte, + certDuration string, + addToken, + addCustomCsrPEM, + isCA bool, + baseCRCondition int) { + tm, err := time.ParseDuration(certDuration) + if err != nil { + return + } + + // Add possibly invalid csrPEM or generate valid + var csrPEM []byte + if addCustomCsrPEM { + csrPEM = customCsrPEM + } else { + csrPEM = generateCSR(t, rsaSKFuzz) + } + + fixedClockStart = time.Now() + metaFixedClockStart := metav1.NewTime(fixedClockStart) + baseIssuer := gen.Issuer("vault-issuer", + gen.SetIssuerVault(cmapi.VaultIssuer{ + Server: "https://example.vault.com", + }), + gen.AddIssuerCondition(cmapi.IssuerCondition{ + Type: cmapi.IssuerConditionReady, + Status: cmmeta.ConditionTrue, + }), + ) + + baseCRNotApproved := gen.CertificateRequest("test-cr", + gen.SetCertificateRequestIsCA(isCA), + gen.SetCertificateRequestCSR(csrPEM), + gen.SetCertificateRequestDuration(&metav1.Duration{Duration: tm}), + gen.SetCertificateRequestIssuer(cmmeta.ObjectReference{ + Name: baseIssuer.Name, + Group: certmanager.GroupName, + Kind: baseIssuer.Kind, + }), + ) + var condition cmapi.CertificateRequestConditionType + switch baseCRCondition % 4 { + case 0: + condition = cmapi.CertificateRequestConditionReady + case 1: + condition = cmapi.CertificateRequestConditionInvalidRequest + case 2: + condition = cmapi.CertificateRequestConditionApproved + case 3: + condition = cmapi.CertificateRequestConditionDenied + } + baseCR := gen.CertificateRequestFrom(baseCRNotApproved, + gen.SetCertificateRequestStatusCondition(cmapi.CertificateRequestCondition{ + Type: condition, + Status: cmmeta.ConditionTrue, + Reason: "cert-manager.io", + Message: "[test-message]", + LastTransitionTime: &metaFixedClockStart, + }), + ) + + kubeObjects := []runtime.Object{} + certManagerObjects := []runtime.Object{} + certManagerObjects = append(certManagerObjects, baseCR.DeepCopy()) + + // Add token if the fuzzer decides to. + if addToken { + tokenSecret := &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: gen.DefaultTestNamespace, + Name: "token-secret", + }, + Data: map[string][]byte{ + "my-token-key": secretTokenData, + }, + } + kubeObjects = append(kubeObjects, tokenSecret) + certManagerObjects = append(certManagerObjects, gen.IssuerFrom(baseIssuer, + gen.SetIssuerVault(cmapi.VaultIssuer{ + Auth: cmapi.VaultAuth{ + TokenSecretRef: &cmmeta.SecretKeySelector{ + Key: "my-token-key", + LocalObjectReference: cmmeta.LocalObjectReference{ + Name: "token-secret", + }, + }, + }, + }), + )) + } else { + certManagerObjects = append(certManagerObjects, baseIssuer.DeepCopy()) + } + + builder := &testpkg.Builder{ + T: t, + KubeObjects: kubeObjects, + CertManagerObjects: certManagerObjects, + } + builder.Init() + defer builder.Stop() + vault := NewVault(builder.Context).(*Vault) + + if !addCustomCsrPEM { + rsaPEMCert, err := generateSelfSignedCertFromCR(baseCR, rsaSKFuzz) + if err != nil { + return + } + + fakeVault := fakevault.New().WithSign(rsaPEMCert, rsaPEMCert, nil) + vault.vaultClientBuilder = func(_ context.Context, ns string, _ func(ns string) internalvault.CreateToken, sl internalinformers.SecretLister, + iss cmapi.GenericIssuer) (internalvault.Interface, error) { + return fakeVault.New(ns, sl, iss) + } + } + + controller := certificaterequests.New( + apiutil.IssuerVault, + func(*controllerpkg.Context) certificaterequests.Issuer { return vault }, + ) + if _, _, err := controller.Register(builder.Context); err != nil { + // Make it explicit if this fails + panic(err) + } + builder.Start() + _ = controller.Sync(context.Background(), baseCR) + }) +} diff --git a/pkg/controller/certificaterequests/vault/vault_test.go b/pkg/controller/certificaterequests/vault/vault_test.go index 2f28114c5d4..fa3be7c9f46 100644 --- a/pkg/controller/certificaterequests/vault/vault_test.go +++ b/pkg/controller/certificaterequests/vault/vault_test.go @@ -201,7 +201,7 @@ func TestSign(t *testing.T) { KubeObjects: []runtime.Object{}, CertManagerObjects: []runtime.Object{baseCR.DeepCopy(), baseIssuer.DeepCopy()}, ExpectedEvents: []string{ - "Normal VaultInitError Failed to initialise vault client for signing: error initializing Vault client: tokenSecretRef, appRoleSecretRef, or Kubernetes auth role not set", + "Normal VaultInitError Failed to initialise vault client for signing: error initializing Vault client: tokenSecretRef, appRoleSecretRef, clientCertificate, or Kubernetes auth role not set", }, ExpectedActions: []testpkg.Action{ testpkg.NewAction(coretesting.NewUpdateSubresourceAction( @@ -213,7 +213,7 @@ func TestSign(t *testing.T) { Type: cmapi.CertificateRequestConditionReady, Status: cmmeta.ConditionFalse, Reason: cmapi.CertificateRequestReasonPending, - Message: "Failed to initialise vault client for signing: error initializing Vault client: tokenSecretRef, appRoleSecretRef, or Kubernetes auth role not set", + Message: "Failed to initialise vault client for signing: error initializing Vault client: tokenSecretRef, appRoleSecretRef, clientCertificate, or Kubernetes auth role not set", LastTransitionTime: &metaFixedClockStart, }), ), diff --git a/pkg/controller/certificaterequests/venafi/fuzz_test.go b/pkg/controller/certificaterequests/venafi/fuzz_test.go new file mode 100644 index 00000000000..ca0a125571f --- /dev/null +++ b/pkg/controller/certificaterequests/venafi/fuzz_test.go @@ -0,0 +1,166 @@ +/* +Copyright 2024 The cert-manager 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 venafi + +import ( + "context" + "crypto/rsa" + "testing" + "time" + + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + + apiutil "github.com/cert-manager/cert-manager/pkg/api/util" + "github.com/cert-manager/cert-manager/pkg/apis/certmanager" + cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" + cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" + controllerpkg "github.com/cert-manager/cert-manager/pkg/controller" + "github.com/cert-manager/cert-manager/pkg/controller/certificaterequests" + testpkg "github.com/cert-manager/cert-manager/pkg/controller/test" + "github.com/cert-manager/cert-manager/pkg/util/pki" + "github.com/cert-manager/cert-manager/test/unit/gen" +) + +var ( + rsaSKFuzz *rsa.PrivateKey + err error +) + +func init() { + rsaSKFuzz, err = pki.GenerateRSAPrivateKey(2048) + if err != nil { + panic(err) + } +} + +/* + FuzzVenafiCRController is a fuzz test that can be run by way of + +go test -fuzz=FuzzVenafiCRController. It tests for panics, OOMs +and stackoverflow-related bugs in the Venafi reconciliation. +*/ +func FuzzVenafiCRController(f *testing.F) { + f.Fuzz(func(t *testing.T, + secretTokenData, + customCsrPEM, + customRsaPEMCert []byte, + certDuration string, + addToken, + addCustomCsrPEM, + isCA bool, + baseCRCondition int) { + tm, err := time.ParseDuration(certDuration) + if err != nil { + return + } + + // Add possibly invalid csrPEM or generate valid + var csrPEM []byte + if addCustomCsrPEM { + csrPEM = customCsrPEM + } else { + csrPEM = generateCSR(t, rsaSKFuzz) + } + + fixedClockStart = time.Now() + metaFixedClockStart := metav1.NewTime(fixedClockStart) + + baseIssuer := gen.Issuer("fuzz-issuer", + gen.SetIssuerVenafi(cmapi.VenafiIssuer{}), + gen.AddIssuerCondition(cmapi.IssuerCondition{ + Type: cmapi.IssuerConditionReady, + Status: cmmeta.ConditionTrue, + }), + ) + + baseCRNotApproved := gen.CertificateRequest("test-cr", + gen.SetCertificateRequestIsCA(isCA), + gen.SetCertificateRequestCSR(csrPEM), + gen.SetCertificateRequestDuration(&metav1.Duration{Duration: tm}), + gen.SetCertificateRequestIssuer(cmmeta.ObjectReference{ + Name: baseIssuer.Name, + Group: certmanager.GroupName, + Kind: baseIssuer.Kind, + }), + ) + var condition cmapi.CertificateRequestConditionType + switch baseCRCondition % 4 { + case 0: + condition = cmapi.CertificateRequestConditionReady + case 1: + condition = cmapi.CertificateRequestConditionInvalidRequest + case 2: + condition = cmapi.CertificateRequestConditionApproved + case 3: + condition = cmapi.CertificateRequestConditionDenied + } + baseCR := gen.CertificateRequestFrom(baseCRNotApproved, + gen.SetCertificateRequestStatusCondition(cmapi.CertificateRequestCondition{ + Type: condition, + Status: cmmeta.ConditionTrue, + Reason: "cert-manager.io", + Message: "[test-message]", + LastTransitionTime: &metaFixedClockStart, + }), + ) + + kubeObjects := []runtime.Object{} + certManagerObjects := []runtime.Object{} + certManagerObjects = append(certManagerObjects, baseCR.DeepCopy()) + + // Add token if the fuzzer decides to. + if addToken { + tokenSecret := &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: gen.DefaultTestNamespace, + Name: "token-secret", + }, + Data: map[string][]byte{ + "my-token-key": secretTokenData, + }, + } + kubeObjects = append(kubeObjects, tokenSecret) + certManagerObjects = append(certManagerObjects, gen.IssuerFrom(baseIssuer, + gen.SetIssuerVenafi(cmapi.VenafiIssuer{}), + )) + + } else { + certManagerObjects = append(certManagerObjects, baseIssuer.DeepCopy()) + } + + builder := &testpkg.Builder{ + T: t, + KubeObjects: kubeObjects, + CertManagerObjects: certManagerObjects, + } + defer builder.Stop() + builder.InitWithRESTConfig() + v := NewVenafi(builder.Context).(*Venafi) + controller := certificaterequests.New( + apiutil.IssuerVenafi, + func(*controllerpkg.Context) certificaterequests.Issuer { return v }, + ) + if _, _, err := controller.Register(builder.Context); err != nil { + // Make it explicit if this fails + panic(err) + } + _ = controller.Sync(context.Background(), baseCR) + + }) +} diff --git a/pkg/controller/certificaterequests/venafi/venafi.go b/pkg/controller/certificaterequests/venafi/venafi.go index 623d21713a1..77ee5334f49 100644 --- a/pkg/controller/certificaterequests/venafi/venafi.go +++ b/pkg/controller/certificaterequests/venafi/venafi.go @@ -115,11 +115,12 @@ func (v *Venafi) Sign(ctx context.Context, cr *cmapi.CertificateRequest, issuerO } } + duration := apiutil.DefaultCertDuration(cr.Spec.Duration) pickupID := cr.ObjectMeta.Annotations[cmapi.VenafiPickupIDAnnotationKey] // check if the pickup ID annotation is there, if not set it up. if pickupID == "" { - pickupID, err = client.RequestCertificate(cr.Spec.Request, customFields) + pickupID, err = client.RequestCertificate(cr.Spec.Request, duration, customFields) // Check some known error types if err != nil { switch err.(type) { @@ -147,7 +148,7 @@ func (v *Venafi) Sign(ctx context.Context, cr *cmapi.CertificateRequest, issuerO return nil, nil } - certPem, err := client.RetrieveCertificate(pickupID, cr.Spec.Request, customFields) + certPem, err := client.RetrieveCertificate(pickupID, cr.Spec.Request, duration, customFields) if err != nil { switch err.(type) { case endpoint.ErrCertificatePending, endpoint.ErrRetrieveCertificateTimeout: diff --git a/pkg/controller/certificaterequests/venafi/venafi_test.go b/pkg/controller/certificaterequests/venafi/venafi_test.go index dd8e84a2bf2..612aec30d1f 100644 --- a/pkg/controller/certificaterequests/venafi/venafi_test.go +++ b/pkg/controller/certificaterequests/venafi/venafi_test.go @@ -222,10 +222,10 @@ func TestSign(t *testing.T) { } clientReturnsPending := &internalvenafifake.Venafi{ - RequestCertificateFn: func(csrPEM []byte, customFields []api.CustomField) (string, error) { + RequestCertificateFn: func(csrPEM []byte, duration time.Duration, customFields []api.CustomField) (string, error) { return "test", nil }, - RetrieveCertificateFn: func(string, []byte, []api.CustomField) ([]byte, error) { + RetrieveCertificateFn: func(string, []byte, time.Duration, []api.CustomField) ([]byte, error) { return nil, endpoint.ErrCertificatePending{ CertificateID: "test-cert-id", Status: "test-status-pending", @@ -233,33 +233,33 @@ func TestSign(t *testing.T) { }, } clientReturnsGenericError := &internalvenafifake.Venafi{ - RequestCertificateFn: func(csrPEM []byte, customFields []api.CustomField) (string, error) { + RequestCertificateFn: func(csrPEM []byte, duration time.Duration, customFields []api.CustomField) (string, error) { return "", errors.New("this is an error") }, } clientReturnsCert := &internalvenafifake.Venafi{ - RequestCertificateFn: func(csrPEM []byte, customFields []api.CustomField) (string, error) { + RequestCertificateFn: func(csrPEM []byte, duration time.Duration, customFields []api.CustomField) (string, error) { return "test", nil }, - RetrieveCertificateFn: func(string, []byte, []api.CustomField) ([]byte, error) { + RetrieveCertificateFn: func(string, []byte, time.Duration, []api.CustomField) ([]byte, error) { return append(certPEM, rootPEM...), nil }, } clientReturnsCertIfCustomField := &internalvenafifake.Venafi{ - RequestCertificateFn: func(csrPEM []byte, fields []api.CustomField) (string, error) { + RequestCertificateFn: func(csrPEM []byte, duration time.Duration, fields []api.CustomField) (string, error) { if len(fields) > 0 && fields[0].Name == "cert-manager-test" && fields[0].Value == "test ok" { return "test", nil } return "", errors.New("Custom field not set") }, - RetrieveCertificateFn: func(string, []byte, []api.CustomField) ([]byte, error) { + RetrieveCertificateFn: func(string, []byte, time.Duration, []api.CustomField) ([]byte, error) { return append(certPEM, rootPEM...), nil }, } clientReturnsInvalidCustomFieldType := &internalvenafifake.Venafi{ - RequestCertificateFn: func(csrPEM []byte, fields []api.CustomField) (string, error) { + RequestCertificateFn: func(csrPEM []byte, duration time.Duration, fields []api.CustomField) (string, error) { return "", client.ErrCustomFieldsType{Type: fields[0].Type} }, } @@ -833,7 +833,9 @@ func runTest(t *testing.T, test testT) { apiutil.IssuerVenafi, func(*controllerpkg.Context) certificaterequests.Issuer { return v }, ) - controller.Register(test.builder.Context) + if _, _, err := controller.Register(test.builder.Context); err != nil { + t.Fatal(err) + } test.builder.Start() // Deep copy the certificate request to prevent pulling condition state across tests diff --git a/pkg/controller/certificates/informers.go b/pkg/controller/certificates/informers.go index 27f6d9b85cb..ac56c110fe3 100644 --- a/pkg/controller/certificates/informers.go +++ b/pkg/controller/certificates/informers.go @@ -21,10 +21,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/util/workqueue" cmlisters "github.com/cert-manager/cert-manager/pkg/client/listers/certmanager/v1" - controllerpkg "github.com/cert-manager/cert-manager/pkg/controller" logf "github.com/cert-manager/cert-manager/pkg/logs" "github.com/cert-manager/cert-manager/pkg/util/predicate" ) @@ -37,7 +37,7 @@ import ( // call when enqueuing Certificate resources. // If no predicate constructors are given, all Certificate resources will be // enqueued on every invocation. -func EnqueueCertificatesForResourceUsingPredicates(log logr.Logger, queue workqueue.Interface, lister cmlisters.CertificateLister, selector labels.Selector, predicateBuilders ...predicate.ExtractorFunc) func(obj interface{}) { +func EnqueueCertificatesForResourceUsingPredicates(log logr.Logger, queue workqueue.TypedInterface[types.NamespacedName], lister cmlisters.CertificateLister, selector labels.Selector, predicateBuilders ...predicate.ExtractorFunc) func(obj interface{}) { return func(obj interface{}) { s, ok := obj.(metav1.Object) if !ok { @@ -58,12 +58,10 @@ func EnqueueCertificatesForResourceUsingPredicates(log logr.Logger, queue workqu } for _, cert := range certs { - key, err := controllerpkg.KeyFunc(cert) - if err != nil { - log.Error(err, "Error determining 'key' for resource") - continue - } - queue.Add(key) + queue.Add(types.NamespacedName{ + Name: cert.Name, + Namespace: cert.Namespace, + }) } } } diff --git a/pkg/controller/certificates/issuing/internal/secret_test.go b/pkg/controller/certificates/issuing/internal/secret_test.go index c6f42b9fa2f..8165247e3a6 100644 --- a/pkg/controller/certificates/issuing/internal/secret_test.go +++ b/pkg/controller/certificates/issuing/internal/secret_test.go @@ -807,7 +807,7 @@ func Test_getCertificateSecret(t *testing.T) { Type: corev1.SecretTypeTLS, }, }, - "if secret exists, expect onlt basic metadata to be retuned, but the Type set to tls": { + "if secret exists, expect only basic metadata to be retuned, but the Type set to tls": { existingSecret: &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test-namespace", Name: "test-secret", diff --git a/pkg/controller/certificates/issuing/issuing_controller.go b/pkg/controller/certificates/issuing/issuing_controller.go index 44c9d108455..5e69828b9d1 100644 --- a/pkg/controller/certificates/issuing/issuing_controller.go +++ b/pkg/controller/certificates/issuing/issuing_controller.go @@ -27,6 +27,7 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/workqueue" @@ -91,31 +92,44 @@ type controller struct { func NewController( log logr.Logger, ctx *controllerpkg.Context, -) (*controller, workqueue.RateLimitingInterface, []cache.InformerSynced) { +) (*controller, workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { // create a queue used to queue up items to be processed - queue := workqueue.NewNamedRateLimitingQueue(workqueue.NewItemExponentialFailureRateLimiter(time.Second*1, time.Second*30), ControllerName) + queue := workqueue.NewTypedRateLimitingQueueWithConfig( + controllerpkg.DefaultCertificateRateLimiter(), + workqueue.TypedRateLimitingQueueConfig[types.NamespacedName]{ + Name: ControllerName, + }, + ) // obtain references to all the informers used by this controller certificateInformer := ctx.SharedInformerFactory.Certmanager().V1().Certificates() certificateRequestInformer := ctx.SharedInformerFactory.Certmanager().V1().CertificateRequests() secretsInformer := ctx.KubeSharedInformerFactory.Secrets() - certificateInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: queue}) - certificateRequestInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ + if _, err := certificateInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: queue}); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } + if _, err := certificateRequestInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ WorkFunc: certificates.EnqueueCertificatesForResourceUsingPredicates(log, queue, certificateInformer.Lister(), labels.Everything(), predicate.ResourceOwnerOf), - }) - secretsInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ + }); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } + if _, err := secretsInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ // Issuer reconciles on changes to the Secret named `spec.nextPrivateKeySecretName` WorkFunc: certificates.EnqueueCertificatesForResourceUsingPredicates(log, queue, certificateInformer.Lister(), labels.Everything(), predicate.ResourceOwnerOf, predicate.ExtractResourceName(predicate.CertificateNextPrivateKeySecretName)), - }) - secretsInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ + }); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } + if _, err := secretsInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ // Issuer reconciles on changes to the Secret named `spec.secretName` WorkFunc: certificates.EnqueueCertificatesForResourceUsingPredicates(log, queue, certificateInformer.Lister(), labels.Everything(), predicate.ExtractResourceName(predicate.CertificateSecretName)), - }) + }); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } // build a list of InformerSynced functions that will be returned by the Register method. // the controller will only begin processing items once all of these informers have synced. @@ -144,10 +158,10 @@ func NewController( ), fieldManager: ctx.FieldManager, localTemporarySigner: pki.GenerateLocallySignedTemporaryCertificate, - }, queue, mustSync + }, queue, mustSync, nil } -func (c *controller) ProcessItem(ctx context.Context, key string) error { +func (c *controller) ProcessItem(ctx context.Context, key types.NamespacedName) error { // TODO: Change to globals.DefaultControllerContextTimeout as part of a wider effort to ensure we have // failsafe timeouts in every controller ctx, cancel := context.WithTimeout(ctx, time.Second*10) @@ -155,10 +169,7 @@ func (c *controller) ProcessItem(ctx context.Context, key string) error { log := logf.FromContext(ctx).WithValues("key", key) - namespace, name, err := cache.SplitMetaNamespaceKey(key) - if err != nil { - return nil - } + namespace, name := key.Namespace, key.Name crt, err := c.certificateLister.Certificates(namespace).Get(name) if apierrors.IsNotFound(err) { @@ -208,10 +219,7 @@ func (c *controller) ProcessItem(ctx context.Context, key string) error { logf.WithResource(log, nextPrivateKeySecret).Error(err, "failed to parse next private key, waiting for keymanager controller") return nil } - pkViolations, err := pki.PrivateKeyMatchesSpec(pk, crt.Spec) - if err != nil { - return err - } + pkViolations := pki.PrivateKeyMatchesSpec(pk, crt.Spec) if len(pkViolations) > 0 { logf.WithResource(log, nextPrivateKeySecret).Info("stored next private key does not match requirements on Certificate resource, waiting for keymanager controller", "violations", pkViolations) return nil @@ -274,7 +282,7 @@ func (c *controller) ProcessItem(ctx context.Context, key string) error { // issuance will be retried with a delay (the logic for that lives in // certificates-trigger controller). Final states are: Denied condition // with status True => fail issuance InvalidRequest condition with - // status True => fail issuance Ready conidtion with reason Failed => + // status True => fail issuance Ready condition with reason Failed => // fail issuance Ready condition with reason Issued => finalize issuance // as succeeded. @@ -470,14 +478,14 @@ type controllerWrapper struct { *controller } -func (c *controllerWrapper) Register(ctx *controllerpkg.Context) (workqueue.RateLimitingInterface, []cache.InformerSynced, error) { +func (c *controllerWrapper) Register(ctx *controllerpkg.Context) (workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { // construct a new named logger to be reused throughout the controller log := logf.FromContext(ctx.RootContext, ControllerName) - ctrl, queue, mustSync := NewController(log, ctx) + ctrl, queue, mustSync, err := NewController(log, ctx) c.controller = ctrl - return queue, mustSync, nil + return queue, mustSync, err } func init() { diff --git a/pkg/controller/certificates/issuing/issuing_controller_test.go b/pkg/controller/certificates/issuing/issuing_controller_test.go index 0234e993fb8..2383522d92d 100644 --- a/pkg/controller/certificates/issuing/issuing_controller_test.go +++ b/pkg/controller/certificates/issuing/issuing_controller_test.go @@ -27,8 +27,8 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" coretesting "k8s.io/client-go/testing" - "k8s.io/client-go/tools/cache" fakeclock "k8s.io/utils/clock/testing" "k8s.io/utils/ptr" @@ -1397,13 +1397,10 @@ func TestIssuingController(t *testing.T) { test.builder.Start() - key, err := cache.MetaNamespaceKeyFunc(test.certificate) - if err != nil { - t.Errorf("failed to build meta namespace key from certificate: %s", err) - t.FailNow() - } - - err = w.controller.ProcessItem(context.Background(), key) + err = w.controller.ProcessItem(context.Background(), types.NamespacedName{ + Namespace: test.certificate.Namespace, + Name: test.certificate.Name, + }) if err != nil && !test.expectedErr { t.Errorf("expected to not get an error, but got: %v", err) } diff --git a/pkg/controller/certificates/issuing/secret_manager_test.go b/pkg/controller/certificates/issuing/secret_manager_test.go index 03431a8258d..7251c9db735 100644 --- a/pkg/controller/certificates/issuing/secret_manager_test.go +++ b/pkg/controller/certificates/issuing/secret_manager_test.go @@ -48,7 +48,7 @@ func Test_ensureSecretData(t *testing.T) { // key that should be passed to ProcessItem. // if not set, the 'namespace/name' of the 'Certificate' field will be used. // if neither is set, the key will be "". - key string + key types.NamespacedName // cert is the optional cert to be loaded to fake clientset. cert *cmapi.Certificate @@ -67,15 +67,20 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: false, }, "if 'key' is an invalid value, should do nothing and not error": { - key: "abc/def/ghi", + key: types.NamespacedName{ + Namespace: "abc", + Name: "def/ghi", + }, expectedAction: false, }, "if 'key' references a Certificate that doesn't exist, should do nothing and not error": { - key: "random-namespace/random-certificate", + key: types.NamespacedName{ + Namespace: "random-namespace", + Name: "random-certificate", + }, expectedAction: false, }, "if Certificate and Secret exists, but the Secret contains no certificate or private key data, do nothing": { - key: "test-namespace/test-name", cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name"}, Spec: cmapi.CertificateSpec{ @@ -90,7 +95,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: false, }, "if Certificate and Secret exists, but the Secret contains no certificate data, do nothing": { - key: "test-namespace/test-name", cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name"}, Spec: cmapi.CertificateSpec{ @@ -107,7 +111,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: false, }, "if Certificate and Secret exists, but the Secret contains no private key data, do nothing": { - key: "test-namespace/test-name", cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name"}, Spec: cmapi.CertificateSpec{ @@ -124,7 +127,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: false, }, "if Certificate and Secret exists, but the Certificate has a True Issuing condition, do nothing": { - key: "test-namespace/test-name", cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name"}, Spec: cmapi.CertificateSpec{ @@ -145,7 +147,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: false, }, "if Certificate exists without a Issuing condition, but Secret does not exist, do nothing": { - key: "test-namespace/test-name", cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name"}, Spec: cmapi.CertificateSpec{ @@ -158,7 +159,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: false, }, "if Certificate exists in a false Issuing condition, Secret exists and matches the SecretTemplate but no managed fields, should reconcile Secret": { - key: "test-namespace/test-name", cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name"}, Spec: cmapi.CertificateSpec{ @@ -182,7 +182,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: true, }, "if Certificate exists in a false Issuing condition, Secret exists and matches the SecretTemplate but the managed fields contains more than what is in the SecretTemplate, should reconcile Secret": { - key: "test-namespace/test-name", cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name"}, Spec: cmapi.CertificateSpec{ @@ -226,7 +225,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: true, }, "if Certificate exists in a false Issuing condition, Secret exists and matches the SecretTemplate but the managed fields are managed by another manager, should reconcile Secret": { - key: "test-namespace/test-name", cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name"}, Spec: cmapi.CertificateSpec{ @@ -268,7 +266,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: true, }, "if Certificate exists in a false Issuing condition, Secret exists and matches the SecretTemplate with the correct managed fields and base labels, should do nothing": { - key: "test-namespace/test-name", cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name"}, Spec: cmapi.CertificateSpec{ @@ -312,7 +309,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: false, }, "if Certificate exists in a false Issuing condition, Secret exists but does not match SecretTemplate, should apply the Labels and Annotations": { - key: "test-namespace/test-name", cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name"}, Spec: cmapi.CertificateSpec{ @@ -337,7 +333,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: true, }, "if Certificate exists in a false Issuing condition, Secret exists but is missing the required label, apply the label": { - key: "test-namespace/test-name", cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name"}, Spec: cmapi.CertificateSpec{ @@ -362,7 +357,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: true, }, "if Certificate exists in a false Issuing condition, Secret exists with some labels, but is missing the required label, apply the label": { - key: "test-namespace/test-name", cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name"}, Spec: cmapi.CertificateSpec{ @@ -386,7 +380,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: true, }, "if Certificate with combined pem and Secret exists, but the Secret doesn't have combined pem, should apply the combined pem": { - key: "test-namespace/test-name", cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name"}, Spec: cmapi.CertificateSpec{ @@ -407,7 +400,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: true, }, "if Certificate with der and Secret exists, but the Secret doesn't have der, should apply the der": { - key: "test-namespace/test-name", cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name"}, Spec: cmapi.CertificateSpec{ @@ -428,7 +420,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: true, }, "if Certificate with combined pem and der, and Secret exists, but the Secret doesn't have combined pem or der, should apply the combined pem and der": { - key: "test-namespace/test-name", cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name"}, Spec: cmapi.CertificateSpec{ @@ -450,7 +441,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: true, }, "if Certificate with combined pem and der, and Secret exists with combined pem and der with managed fields, should do nothing": { - key: "test-namespace/test-name", cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name"}, Spec: cmapi.CertificateSpec{ @@ -501,7 +491,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: false, }, "if Certificate with no combined pem or der, and Secret exists with combined pem and der managed by field manager, should apply to remove them": { - key: "test-namespace/test-name", cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name"}, Spec: cmapi.CertificateSpec{ @@ -550,7 +539,6 @@ func Test_ensureSecretData(t *testing.T) { }, "enabledOwnerRef=false if Secret has owner reference to Certificate owned by field manager, expect action": { - key: "test-namespace/test-name", enableOwnerRef: false, cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name", UID: types.UID("uid-123")}, @@ -584,7 +572,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: true, }, "enabledOwnerRef=true if Secret has owner reference to Certificate owned by field manager, expect no action": { - key: "test-namespace/test-name", enableOwnerRef: true, cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name", UID: types.UID("uid-123")}, @@ -621,7 +608,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: false, }, "refresh secrets when keystore is not defined and the secret has keystore/truststore fields": { - key: "test-namespace/test-name", enableOwnerRef: true, cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name", UID: types.UID("uid-234")}, @@ -676,7 +662,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: true, }, "refresh secrets when JKS keystore is defined and the secret does not have keystore/truststore fields": { - key: "test-namespace/test-name", enableOwnerRef: true, cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name", UID: types.UID("uid-123")}, @@ -735,7 +720,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: true, }, "refresh secrets when JKS keystore is defined, create is disabled and the secret has keystore/truststore fields": { - key: "test-namespace/test-name", enableOwnerRef: true, cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name", UID: types.UID("uid-123")}, @@ -795,7 +779,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: true, }, "refresh secrets when JKS keystore is null and the secret has keystore/truststore fields": { - key: "test-namespace/test-name", enableOwnerRef: true, cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name", UID: types.UID("uid-123")}, @@ -853,7 +836,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: true, }, "do nothing when JKS keystore is defined and create field is set to false": { - key: "test-namespace/test-name", enableOwnerRef: true, cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name", UID: types.UID("uid-123")}, @@ -912,7 +894,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: false, }, "refresh secret when PKCS12 keystore is defined and the secret does not have keystore/truststore fields": { - key: "test-namespace/test-name", enableOwnerRef: true, cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name", UID: types.UID("uid-123")}, @@ -971,7 +952,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: true, }, "refresh secret when PKCS12 keystore is defined, create is disabled and the secret has keystore/truststore fields": { - key: "test-namespace/test-name", enableOwnerRef: true, cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name", UID: types.UID("uid-123")}, @@ -1031,7 +1011,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: true, }, "refresh secret when PKCS12 keystore is null and the secret has keystore/truststore fields": { - key: "test-namespace/test-name", enableOwnerRef: true, cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name", UID: types.UID("uid-123")}, @@ -1089,7 +1068,6 @@ func Test_ensureSecretData(t *testing.T) { expectedAction: true, }, "do nothing when PKCS12 keystore is defined and the create is set to false": { - key: "test-namespace/test-name", enableOwnerRef: true, cert: &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{Namespace: "test-namespace", Name: "test-name", UID: types.UID("uid-123")}, @@ -1185,6 +1163,12 @@ func Test_ensureSecretData(t *testing.T) { defer builder.Stop() key := test.key + if key == (types.NamespacedName{}) && test.cert != nil { + key = types.NamespacedName{ + Name: test.cert.Name, + Namespace: test.cert.Namespace, + } + } // Call ProcessItem err = w.controller.ProcessItem(context.Background(), key) diff --git a/pkg/controller/certificates/keymanager/keymanager_controller.go b/pkg/controller/certificates/keymanager/keymanager_controller.go index 6bae89d5ee1..ff1d457f4bc 100644 --- a/pkg/controller/certificates/keymanager/keymanager_controller.go +++ b/pkg/controller/certificates/keymanager/keymanager_controller.go @@ -20,7 +20,6 @@ import ( "context" "crypto" "fmt" - "time" "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" @@ -28,6 +27,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/selection" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" @@ -75,28 +75,39 @@ type controller struct { func NewController( log logr.Logger, ctx *controllerpkg.Context, -) (*controller, workqueue.RateLimitingInterface, []cache.InformerSynced) { +) (*controller, workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { // create a queue used to queue up items to be processed - queue := workqueue.NewNamedRateLimitingQueue(workqueue.NewItemExponentialFailureRateLimiter(time.Second*1, time.Second*30), ControllerName) + queue := workqueue.NewTypedRateLimitingQueueWithConfig( + controllerpkg.DefaultCertificateRateLimiter(), + workqueue.TypedRateLimitingQueueConfig[types.NamespacedName]{ + Name: ControllerName, + }, + ) // obtain references to all the informers used by this controller certificateInformer := ctx.SharedInformerFactory.Certmanager().V1().Certificates() secretsInformer := ctx.KubeSharedInformerFactory.Secrets() - certificateInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: queue}) + if _, err := certificateInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: queue}); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } - secretsInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ + if _, err := secretsInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ // Trigger reconciles on changes to any 'owned' secret resources WorkFunc: certificates.EnqueueCertificatesForResourceUsingPredicates(log, queue, certificateInformer.Lister(), labels.Everything(), predicate.ResourceOwnerOf, ), - }) - secretsInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ + }); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } + if _, err := secretsInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ // Trigger reconciles on changes to certificates named as spec.secretName WorkFunc: certificates.EnqueueCertificatesForResourceUsingPredicates(log, queue, certificateInformer.Lister(), labels.Everything(), predicate.ExtractResourceName(predicate.CertificateSecretName), ), - }) + }); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } // build a list of InformerSynced functions that will be returned by the Register method. // the controller will only begin processing items once all of these informers have synced. @@ -112,7 +123,7 @@ func NewController( coreClient: ctx.Client, recorder: ctx.Recorder, fieldManager: ctx.FieldManager, - }, queue, mustSync + }, queue, mustSync, nil } // isNextPrivateKeyLabelSelector is a label selector used to match Secret @@ -127,15 +138,11 @@ func init() { isNextPrivateKeyLabelSelector = labels.NewSelector().Add(*r) } -func (c *controller) ProcessItem(ctx context.Context, key string) error { +func (c *controller) ProcessItem(ctx context.Context, key types.NamespacedName) error { log := logf.FromContext(ctx).WithValues("key", key) ctx = logf.NewContext(ctx, log) - namespace, name, err := cache.SplitMetaNamespaceKey(key) - if err != nil { - log.Error(err, "invalid resource key passed to ProcessItem") - return nil - } + namespace, name := key.Namespace, key.Name crt, err := c.certificateLister.Certificates(namespace).Get(name) if apierrors.IsNotFound(err) { @@ -212,11 +219,7 @@ func (c *controller) ProcessItem(ctx context.Context, key string) error { return c.deleteSecretResources(ctx, secrets) } - violations, err := pki.PrivateKeyMatchesSpec(pk, crt.Spec) - if err != nil { - log.Error(err, "Internal error verifying if private key matches spec - please open an issue.") - return nil - } + violations := pki.PrivateKeyMatchesSpec(pk, crt.Spec) if len(violations) > 0 { log.V(logf.DebugLevel).Info("Regenerating private key due to change in fields", "violations", violations) c.recorder.Eventf(crt, corev1.EventTypeNormal, reasonDeleted, "Regenerating private key due to change in fields: %v", violations) @@ -246,11 +249,7 @@ func (c *controller) createNextPrivateKeyRotationPolicyNever(ctx context.Context c.recorder.Eventf(crt, corev1.EventTypeWarning, reasonDecodeFailed, "Failed to decode private key stored in Secret %q - generating new key", crt.Spec.SecretName) return c.createAndSetNextPrivateKey(ctx, crt) } - violations, err := pki.PrivateKeyMatchesSpec(pk, crt.Spec) - if err != nil { - c.recorder.Eventf(crt, corev1.EventTypeWarning, reasonDecodeFailed, "Failed to check if private key stored in Secret %q is up to date - generating new key", crt.Spec.SecretName) - return c.createAndSetNextPrivateKey(ctx, crt) - } + violations := pki.PrivateKeyMatchesSpec(pk, crt.Spec) if len(violations) > 0 { c.recorder.Eventf(crt, corev1.EventTypeWarning, reasonCannotRegenerateKey, "User intervention required: existing private key in Secret %q does not match requirements on Certificate resource, mismatching fields: %v, but cert-manager cannot create new private key as the Certificate's .spec.privateKey.rotationPolicy is unset or set to Never. To allow cert-manager to create a new private key you can set .spec.privateKey.rotationPolicy to 'Always' (this will result in the private key being regenerated every time a cert is renewed) ", crt.Spec.SecretName, violations) return nil @@ -368,14 +367,14 @@ type controllerWrapper struct { *controller } -func (c *controllerWrapper) Register(ctx *controllerpkg.Context) (workqueue.RateLimitingInterface, []cache.InformerSynced, error) { +func (c *controllerWrapper) Register(ctx *controllerpkg.Context) (workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { // construct a new named logger to be reused throughout the controller log := logf.FromContext(ctx.RootContext, ControllerName) - ctrl, queue, mustSync := NewController(log, ctx) + ctrl, queue, mustSync, err := NewController(log, ctx) c.controller = ctrl - return queue, mustSync, nil + return queue, mustSync, err } func init() { diff --git a/pkg/controller/certificates/keymanager/keymanager_controller_test.go b/pkg/controller/certificates/keymanager/keymanager_controller_test.go index 9c2e584a04e..d912db94fc1 100644 --- a/pkg/controller/certificates/keymanager/keymanager_controller_test.go +++ b/pkg/controller/certificates/keymanager/keymanager_controller_test.go @@ -32,7 +32,6 @@ import ( cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" - controllerpkg "github.com/cert-manager/cert-manager/pkg/controller" testpkg "github.com/cert-manager/cert-manager/pkg/controller/test" "github.com/cert-manager/cert-manager/pkg/util/pki" ) @@ -98,7 +97,7 @@ func TestProcessItem(t *testing.T) { // key that should be passed to ProcessItem. // if not set, the 'namespace/name' of the 'Certificate' field will be used. // if neither is set, the key will be "" - key string + key types.NamespacedName // Certificate to be synced for the test. // if not set, the 'key' will be passed to ProcessItem instead. @@ -118,10 +117,16 @@ func TestProcessItem(t *testing.T) { }{ "do nothing if an empty 'key' is used": {}, "do nothing if an invalid 'key' is used": { - key: "abc/def/ghi", + key: types.NamespacedName{ + Namespace: "abc", + Name: "def/ghi", + }, }, "do nothing if a key references a Certificate that does not exist": { - key: "namespace/name", + key: types.NamespacedName{ + Namespace: "namespace", + Name: "name", + }, }, "do nothing if Certificate has 'Issuing' condition set to 'false'": { certificate: &cmapi.Certificate{ @@ -494,10 +499,10 @@ func TestProcessItem(t *testing.T) { defer builder.Stop() key := test.key - if key == "" && test.certificate != nil { - key, err = controllerpkg.KeyFunc(test.certificate) - if err != nil { - t.Fatal(err) + if key == (types.NamespacedName{}) && test.certificate != nil { + key = types.NamespacedName{ + Name: test.certificate.Name, + Namespace: test.certificate.Namespace, } } diff --git a/pkg/controller/certificates/metrics/controller.go b/pkg/controller/certificates/metrics/controller.go index e24048e621f..e8ef8ed2e08 100644 --- a/pkg/controller/certificates/metrics/controller.go +++ b/pkg/controller/certificates/metrics/controller.go @@ -18,9 +18,10 @@ package metrics import ( "context" - "time" + "fmt" apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" @@ -49,9 +50,14 @@ type controller struct { metrics *metrics.Metrics } -func NewController(ctx *controllerpkg.Context) (*controller, workqueue.RateLimitingInterface, []cache.InformerSynced) { +func NewController(ctx *controllerpkg.Context) (*controller, workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { // create a queue used to queue up items to be processed - queue := workqueue.NewNamedRateLimitingQueue(workqueue.NewItemExponentialFailureRateLimiter(time.Second*1, time.Second*30), ControllerName) + queue := workqueue.NewTypedRateLimitingQueueWithConfig( + controllerpkg.DefaultCertificateRateLimiter(), + workqueue.TypedRateLimitingQueueConfig[types.NamespacedName]{ + Name: ControllerName, + }, + ) // obtain references to all the informers used by this controller certificateInformer := ctx.SharedInformerFactory.Certmanager().V1().Certificates() @@ -59,7 +65,9 @@ func NewController(ctx *controllerpkg.Context) (*controller, workqueue.RateLimit // Reconcile over all Certificate events. We do _not_ reconcile on Secret // events that are related to Certificates. It is the responsibility of the // Certificates controllers to update accordingly. - certificateInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: queue}) + if _, err := certificateInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: queue}); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } // build a list of InformerSynced functions that will be returned by the // Register method. the controller will only begin processing items once all @@ -71,18 +79,15 @@ func NewController(ctx *controllerpkg.Context) (*controller, workqueue.RateLimit return &controller{ certificateLister: certificateInformer.Lister(), metrics: ctx.Metrics, - }, queue, mustSync + }, queue, mustSync, nil } -func (c *controller) ProcessItem(ctx context.Context, key string) error { - namespace, name, err := cache.SplitMetaNamespaceKey(key) - if err != nil { - return nil - } +func (c *controller) ProcessItem(ctx context.Context, key types.NamespacedName) error { + namespace, name := key.Namespace, key.Name crt, err := c.certificateLister.Certificates(namespace).Get(name) if apierrors.IsNotFound(err) { - // If the Certificate no longer exists, remove it's metrics from being exposed. + // If the Certificate no longer exists, remove its metrics from being exposed. c.metrics.RemoveCertificate(key) return nil } @@ -96,11 +101,10 @@ func (c *controller) ProcessItem(ctx context.Context, key string) error { return nil } -func (c *controllerWrapper) Register(ctx *controllerpkg.Context) (workqueue.RateLimitingInterface, []cache.InformerSynced, error) { - ctrl, queue, mustSync := NewController(ctx) +func (c *controllerWrapper) Register(ctx *controllerpkg.Context) (workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { + ctrl, queue, mustSync, err := NewController(ctx) c.controller = ctrl - - return queue, mustSync, nil + return queue, mustSync, err } func init() { diff --git a/pkg/controller/certificates/readiness/readiness_controller.go b/pkg/controller/certificates/readiness/readiness_controller.go index 859b49acb11..4c623f6a3b1 100644 --- a/pkg/controller/certificates/readiness/readiness_controller.go +++ b/pkg/controller/certificates/readiness/readiness_controller.go @@ -18,7 +18,7 @@ package readiness import ( "context" - "time" + "fmt" "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" @@ -26,6 +26,7 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" @@ -82,27 +83,38 @@ func NewController( chain policies.Chain, renewalTimeCalculator pki.RenewalTimeFunc, policyEvaluator policyEvaluatorFunc, -) (*controller, workqueue.RateLimitingInterface, []cache.InformerSynced) { +) (*controller, workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { // create a queue used to queue up items to be processed - queue := workqueue.NewNamedRateLimitingQueue(workqueue.NewItemExponentialFailureRateLimiter(time.Second*1, time.Second*30), ControllerName) + queue := workqueue.NewTypedRateLimitingQueueWithConfig( + controllerpkg.DefaultCertificateRateLimiter(), + workqueue.TypedRateLimitingQueueConfig[types.NamespacedName]{ + Name: ControllerName, + }, + ) // obtain references to all the informers used by this controller certificateInformer := ctx.SharedInformerFactory.Certmanager().V1().Certificates() certificateRequestInformer := ctx.SharedInformerFactory.Certmanager().V1().CertificateRequests() secretsInformer := ctx.KubeSharedInformerFactory.Secrets() - certificateInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: queue}) + if _, err := certificateInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: queue}); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } // When a CertificateRequest resource changes, enqueue the Certificate resource that owns it. - certificateRequestInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ + if _, err := certificateRequestInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ WorkFunc: certificates.EnqueueCertificatesForResourceUsingPredicates(log, queue, certificateInformer.Lister(), labels.Everything(), predicate.ResourceOwnerOf), - }) + }); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } // When a Secret resource changes, enqueue any Certificate resources that name it as spec.secretName. - secretsInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ + if _, err := secretsInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ // Trigger reconciles on changes to the Secret named `spec.secretName` WorkFunc: certificates.EnqueueCertificatesForResourceUsingPredicates(log, queue, certificateInformer.Lister(), labels.Everything(), predicate.ExtractResourceName(predicate.CertificateSecretName)), - }) + }); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } // build a list of InformerSynced functions that will be returned by the Register method. // the controller will only begin processing items once all of these informers have synced. @@ -125,21 +137,17 @@ func NewController( policyEvaluator: policyEvaluator, renewalTimeCalculator: renewalTimeCalculator, fieldManager: ctx.FieldManager, - }, queue, mustSync + }, queue, mustSync, nil } // ProcessItem is a worker function that will be called when a new key // corresponding to a Certificate to be re-synced is pulled from the workqueue. // ProcessItem will update the Ready condition of a Certificate. -func (c *controller) ProcessItem(ctx context.Context, key string) error { +func (c *controller) ProcessItem(ctx context.Context, key types.NamespacedName) error { log := logf.FromContext(ctx).WithValues("key", key) ctx = logf.NewContext(ctx, log) - namespace, name, err := cache.SplitMetaNamespaceKey(key) - if err != nil { - log.Error(err, "invalid resource key passed to ProcessItem") - return nil - } + namespace, name := key.Namespace, key.Name crt, err := c.certificateLister.Certificates(namespace).Get(name) if apierrors.IsNotFound(err) { @@ -173,8 +181,7 @@ func (c *controller) ProcessItem(ctx context.Context, key string) error { notBefore := metav1.NewTime(x509cert.NotBefore) notAfter := metav1.NewTime(x509cert.NotAfter) - renewBeforeHint := crt.Spec.RenewBefore - renewalTime := c.renewalTimeCalculator(x509cert.NotBefore, x509cert.NotAfter, renewBeforeHint) + renewalTime := c.renewalTimeCalculator(x509cert.NotBefore, x509cert.NotAfter, crt.Spec.RenewBefore, crt.Spec.RenewBeforePercentage) // update Certificate's Status crt.Status.NotBefore = ¬Before @@ -245,11 +252,11 @@ type controllerWrapper struct { *controller } -func (c *controllerWrapper) Register(ctx *controllerpkg.Context) (workqueue.RateLimitingInterface, []cache.InformerSynced, error) { +func (c *controllerWrapper) Register(ctx *controllerpkg.Context) (workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { // construct a new named logger to be reused throughout the controller log := logf.FromContext(ctx.RootContext, ControllerName) - ctrl, queue, mustSync := NewController(log, + ctrl, queue, mustSync, err := NewController(log, ctx, policies.NewReadinessPolicyChain(ctx.Clock), pki.RenewalTime, @@ -257,7 +264,7 @@ func (c *controllerWrapper) Register(ctx *controllerpkg.Context) (workqueue.Rate ) c.controller = ctrl - return queue, mustSync, nil + return queue, mustSync, err } func init() { diff --git a/pkg/controller/certificates/readiness/readiness_controller_test.go b/pkg/controller/certificates/readiness/readiness_controller_test.go index 5919284701e..f725d707207 100644 --- a/pkg/controller/certificates/readiness/readiness_controller_test.go +++ b/pkg/controller/certificates/readiness/readiness_controller_test.go @@ -23,13 +23,13 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" coretesting "k8s.io/client-go/testing" fakeclock "k8s.io/utils/clock/testing" "github.com/cert-manager/cert-manager/internal/controller/certificates/policies" cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" - controllerpkg "github.com/cert-manager/cert-manager/pkg/controller" testpkg "github.com/cert-manager/cert-manager/pkg/controller/test" "github.com/cert-manager/cert-manager/pkg/util/pki" testcrypto "github.com/cert-manager/cert-manager/test/unit/crypto" @@ -45,7 +45,7 @@ func policyEvaluatorBuilder(c cmapi.CertificateCondition) policyEvaluatorFunc { // renewalTimeBuilder returns a fake renewalTimeFunc for ReadinessController. func renewalTimeBuilder(rt *metav1.Time) pki.RenewalTimeFunc { - return func(notBefore, notAfter time.Time, cert *metav1.Duration) *metav1.Time { + return func(notBefore, notAfter time.Time, renewBefore *metav1.Duration, renewBeforePercentage *int32) *metav1.Time { return rt } } @@ -74,7 +74,7 @@ func TestProcessItem(t *testing.T) { // key that should be passed to ProcessItem. // if not set, the 'namespace/name' of the 'Certificate' field will be used. // if neither is set, the key will be "". - key string + key types.NamespacedName // cert to be loaded to fake clientset cert *cmapi.Certificate @@ -105,10 +105,16 @@ func TestProcessItem(t *testing.T) { }{ "do nothing if an empty 'key' is used": {}, "do nothing if an invalid 'key' is used": { - key: "abc/def/ghi", + key: types.NamespacedName{ + Namespace: "abc", + Name: "def/ghi", + }, }, "do nothing if a key references a Certificate that does not exist": { - key: "namespace/name", + key: types.NamespacedName{ + Namespace: "namespace", + Name: "name", + }, }, "update status for a Certificate that is evaluated as Ready and whose spec.secretName secret contains a valid X509 cert": { condition: cmapi.CertificateCondition{ @@ -216,7 +222,7 @@ func TestProcessItem(t *testing.T) { Message: "ready message", })), }, - "update status for a Certificate that has a Ready condition and the policy evaluates to True- should remain True": { + "update status for a Certificate that has a Ready condition and the policy evaluates to True - should remain True": { condition: cmapi.CertificateCondition{ Type: cmapi.CertificateConditionReady, Status: cmmeta.ConditionTrue, @@ -285,7 +291,7 @@ func TestProcessItem(t *testing.T) { c := gen.CertificateFrom(test.cert, gen.SetCertificateStatusCondition(test.condition)) - // gen package functions don't accept pointers- we need to test setting these values to nil in some scenarios. + // gen package functions don't accept pointers - we need to test setting these values to nil in some scenarios. c.Status.NotAfter = test.notAfter c.Status.NotBefore = test.notBefore c.Status.RenewalTime = test.renewalTime @@ -303,10 +309,10 @@ func TestProcessItem(t *testing.T) { defer builder.Stop() key := test.key - if key == "" && cert != nil { - key, err = controllerpkg.KeyFunc(cert) - if err != nil { - t.Fatal(err) + if key == (types.NamespacedName{}) && cert != nil { + key = types.NamespacedName{ + Name: cert.Name, + Namespace: cert.Namespace, } } diff --git a/pkg/controller/certificates/requestmanager/requestmanager_controller.go b/pkg/controller/certificates/requestmanager/requestmanager_controller.go index 75c9ef10fdc..143df644d89 100644 --- a/pkg/controller/certificates/requestmanager/requestmanager_controller.go +++ b/pkg/controller/certificates/requestmanager/requestmanager_controller.go @@ -30,6 +30,7 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" @@ -77,28 +78,39 @@ type controller struct { } func NewController( - log logr.Logger, ctx *controllerpkg.Context) (*controller, workqueue.RateLimitingInterface, []cache.InformerSynced) { + log logr.Logger, ctx *controllerpkg.Context) (*controller, workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { // create a queue used to queue up items to be processed - queue := workqueue.NewNamedRateLimitingQueue(workqueue.NewItemExponentialFailureRateLimiter(time.Second*1, time.Second*30), ControllerName) + queue := workqueue.NewTypedRateLimitingQueueWithConfig( + controllerpkg.DefaultCertificateRateLimiter(), + workqueue.TypedRateLimitingQueueConfig[types.NamespacedName]{ + Name: ControllerName, + }, + ) // obtain references to all the informers used by this controller certificateInformer := ctx.SharedInformerFactory.Certmanager().V1().Certificates() certificateRequestInformer := ctx.SharedInformerFactory.Certmanager().V1().CertificateRequests() secretsInformer := ctx.KubeSharedInformerFactory.Secrets() - certificateInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: queue}) - certificateRequestInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ + if _, err := certificateInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: queue}); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } + if _, err := certificateRequestInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ // Trigger reconciles on changes to any 'owned' CertificateRequest resources WorkFunc: certificates.EnqueueCertificatesForResourceUsingPredicates(log, queue, certificateInformer.Lister(), labels.Everything(), predicate.ResourceOwnerOf, ), - }) - secretsInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ + }); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } + if _, err := secretsInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ // Trigger reconciles on changes to any 'owned' secret resources WorkFunc: certificates.EnqueueCertificatesForResourceUsingPredicates(log, queue, certificateInformer.Lister(), labels.Everything(), predicate.ResourceOwnerOf, ), - }) + }); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } // build a list of InformerSynced functions that will be returned by the Register method. // the controller will only begin processing items once all of these informers have synced. @@ -117,18 +129,14 @@ func NewController( clock: ctx.Clock, copiedAnnotationPrefixes: ctx.CertificateOptions.CopiedAnnotationPrefixes, fieldManager: ctx.FieldManager, - }, queue, mustSync + }, queue, mustSync, nil } -func (c *controller) ProcessItem(ctx context.Context, key string) error { +func (c *controller) ProcessItem(ctx context.Context, key types.NamespacedName) error { log := logf.FromContext(ctx).WithValues("key", key) ctx = logf.NewContext(ctx, log) - namespace, name, err := cache.SplitMetaNamespaceKey(key) - if err != nil { - log.Error(err, "invalid resource key passed to ProcessItem") - return nil - } + namespace, name := key.Namespace, key.Name crt, err := c.certificateLister.Certificates(namespace).Get(name) if apierrors.IsNotFound(err) { @@ -455,14 +463,14 @@ type controllerWrapper struct { *controller } -func (c *controllerWrapper) Register(ctx *controllerpkg.Context) (workqueue.RateLimitingInterface, []cache.InformerSynced, error) { +func (c *controllerWrapper) Register(ctx *controllerpkg.Context) (workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { // construct a new named logger to be reused throughout the controller log := logf.FromContext(ctx.RootContext, ControllerName) - ctrl, queue, mustSync := NewController(log, ctx) + ctrl, queue, mustSync, err := NewController(log, ctx) c.controller = ctrl - return queue, mustSync, nil + return queue, mustSync, err } func init() { diff --git a/pkg/controller/certificates/requestmanager/requestmanager_controller_test.go b/pkg/controller/certificates/requestmanager/requestmanager_controller_test.go index 8a4383535b8..0b18da69dc6 100644 --- a/pkg/controller/certificates/requestmanager/requestmanager_controller_test.go +++ b/pkg/controller/certificates/requestmanager/requestmanager_controller_test.go @@ -28,6 +28,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" coretesting "k8s.io/client-go/testing" "k8s.io/component-base/featuregate" featuregatetesting "k8s.io/component-base/featuregate/testing" @@ -36,7 +37,6 @@ import ( "github.com/cert-manager/cert-manager/internal/controller/feature" cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" - controllerpkg "github.com/cert-manager/cert-manager/pkg/controller" testpkg "github.com/cert-manager/cert-manager/pkg/controller/test" utilfeature "github.com/cert-manager/cert-manager/pkg/util/feature" "github.com/cert-manager/cert-manager/pkg/util/pki" @@ -117,7 +117,7 @@ func TestProcessItem(t *testing.T) { // key that should be passed to ProcessItem. // if not set, the 'namespace/name' of the 'Certificate' field will be used. // if neither is set, the key will be "" - key string + key types.NamespacedName // Featuregates to set for a particular test. featuresFlags map[featuregate.Feature]bool @@ -140,10 +140,16 @@ func TestProcessItem(t *testing.T) { }{ "do nothing if an empty 'key' is used": {}, "do nothing if an invalid 'key' is used": { - key: "abc/def/ghi", + key: types.NamespacedName{ + Namespace: "abc", + Name: "def/ghi", + }, }, "do nothing if a key references a Certificate that does not exist": { - key: "namespace/name", + key: types.NamespacedName{ + Namespace: "namespace", + Name: "name", + }, }, "do nothing if Certificate has 'Issuing' condition set to 'false'": { certificate: gen.CertificateFrom(bundle1.certificate, @@ -743,7 +749,7 @@ func TestProcessItem(t *testing.T) { // Enable any features for a particular test for feature, value := range test.featuresFlags { - defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, feature, value)() + featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, feature, value) } // Start the informers and begin processing updates @@ -751,10 +757,10 @@ func TestProcessItem(t *testing.T) { defer builder.Stop() key := test.key - if key == "" && test.certificate != nil { - key, err = controllerpkg.KeyFunc(test.certificate) - if err != nil { - t.Fatal(err) + if key == (types.NamespacedName{}) && test.certificate != nil { + key = types.NamespacedName{ + Name: test.certificate.Name, + Namespace: test.certificate.Namespace, } } diff --git a/pkg/controller/certificates/requestmanager/util_test.go b/pkg/controller/certificates/requestmanager/util_test.go index 2c2fdfadde5..475e4703bda 100644 --- a/pkg/controller/certificates/requestmanager/util_test.go +++ b/pkg/controller/certificates/requestmanager/util_test.go @@ -19,7 +19,6 @@ package requestmanager import ( "crypto" "crypto/x509" - "encoding/pem" "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -77,7 +76,7 @@ func createCryptoBundle(originalCert *cmapi.Certificate) (*cryptoBundle, error) return nil, err } - privateKey, err := pki.GeneratePrivateKeyForCertificate(crt) + csrPEM, privateKey, err := gen.CSRForCertificate(crt) if err != nil { return nil, err } @@ -87,11 +86,6 @@ func createCryptoBundle(originalCert *cmapi.Certificate) (*cryptoBundle, error) return nil, err } - csrPEM, err := generateCSRImpl(crt, privateKeyBytes) - if err != nil { - return nil, err - } - csr, err := pki.DecodeX509CertificateRequestBytes(csrPEM) if err != nil { return nil, err @@ -173,26 +167,3 @@ func createCryptoBundle(originalCert *cmapi.Certificate) (*cryptoBundle, error) certBytes: certBytes, }, nil } - -func generateCSRImpl(crt *cmapi.Certificate, pk []byte) ([]byte, error) { - csr, err := pki.GenerateCSR(crt) - if err != nil { - return nil, err - } - - signer, err := pki.DecodePrivateKeyBytes(pk) - if err != nil { - return nil, err - } - - csrDER, err := pki.EncodeCSR(csr, signer) - if err != nil { - return nil, err - } - - csrPEM := pem.EncodeToMemory(&pem.Block{ - Type: "CERTIFICATE REQUEST", Bytes: csrDER, - }) - - return csrPEM, nil -} diff --git a/pkg/controller/certificates/revisionmanager/revisionmanager_controller.go b/pkg/controller/certificates/revisionmanager/revisionmanager_controller.go index d0cb5090596..774468d93fa 100644 --- a/pkg/controller/certificates/revisionmanager/revisionmanager_controller.go +++ b/pkg/controller/certificates/revisionmanager/revisionmanager_controller.go @@ -19,9 +19,9 @@ package revisionmanager import ( "context" "errors" + "fmt" "sort" "strconv" - "time" "github.com/go-logr/logr" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -57,21 +57,30 @@ type revision struct { types.NamespacedName } -func NewController(log logr.Logger, ctx *controllerpkg.Context) (*controller, workqueue.RateLimitingInterface, []cache.InformerSynced) { +func NewController(log logr.Logger, ctx *controllerpkg.Context) (*controller, workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { // create a queue used to queue up items to be processed - queue := workqueue.NewNamedRateLimitingQueue(workqueue.NewItemExponentialFailureRateLimiter(time.Second*1, time.Second*30), ControllerName) + queue := workqueue.NewTypedRateLimitingQueueWithConfig( + controllerpkg.DefaultCertificateRateLimiter(), + workqueue.TypedRateLimitingQueueConfig[types.NamespacedName]{ + Name: ControllerName, + }, + ) // obtain references to all the informers used by this controller certificateInformer := ctx.SharedInformerFactory.Certmanager().V1().Certificates() certificateRequestInformer := ctx.SharedInformerFactory.Certmanager().V1().CertificateRequests() - certificateInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: queue}) - certificateRequestInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ + if _, err := certificateInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: queue}); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } + if _, err := certificateRequestInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ // Trigger reconciles on changes to any 'owned' CertificateRequest resources WorkFunc: certificates.EnqueueCertificatesForResourceUsingPredicates(log, queue, certificateInformer.Lister(), labels.Everything(), predicate.ResourceOwnerOf, ), - }) + }); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } // build a list of InformerSynced functions that will be returned by the Register method. // the controller will only begin processing items once all of these informers have synced. @@ -84,21 +93,17 @@ func NewController(log logr.Logger, ctx *controllerpkg.Context) (*controller, wo certificateLister: certificateInformer.Lister(), certificateRequestLister: certificateRequestInformer.Lister(), client: ctx.CMClient, - }, queue, mustSync + }, queue, mustSync, nil } // ProcessItem will attempt to garbage collect old CertificateRequests based // upon `spec.revisionHistoryLimit`. This controller will only act on // Certificates which are in a Ready state and this value is set. -func (c *controller) ProcessItem(ctx context.Context, key string) error { +func (c *controller) ProcessItem(ctx context.Context, key types.NamespacedName) error { log := logf.FromContext(ctx).WithValues("key", key) ctx = logf.NewContext(ctx, log) - namespace, name, err := cache.SplitMetaNamespaceKey(key) - if err != nil { - log.Error(err, "invalid resource key passed to ProcessItem") - return nil - } + namespace, name := key.Namespace, key.Name crt, err := c.certificateLister.Certificates(namespace).Get(name) if apierrors.IsNotFound(err) { @@ -138,7 +143,7 @@ func (c *controller) ProcessItem(ctx context.Context, key string) error { for _, req := range toDelete { logf.WithRelatedResourceName(log, req.Name, req.Namespace, cmapi.CertificateRequestKind). - WithValues("revision", req.rev).Info("garbage collecting old certificate request revsion") + WithValues("revision", req.rev).Info("garbage collecting old certificate request revision") err = c.client.CertmanagerV1().CertificateRequests(req.Namespace).Delete(ctx, req.Name, metav1.DeleteOptions{}) if apierrors.IsNotFound(err) { continue @@ -168,13 +173,13 @@ func certificateRequestsToDelete(log logr.Logger, limit int, requests []*cmapi.C log = logf.WithRelatedResource(log, req) if req.Annotations == nil || req.Annotations[cmapi.CertificateRequestRevisionAnnotationKey] == "" { - log.Error(errors.New("skipping processing request with missing revsion"), "") + log.Error(errors.New("skipping processing request with missing revision"), "") continue } rn, err := strconv.Atoi(req.Annotations[cmapi.CertificateRequestRevisionAnnotationKey]) if err != nil { - log.Error(err, "failed to parse request revsion") + log.Error(err, "failed to parse request revision") continue } @@ -185,7 +190,7 @@ func certificateRequestsToDelete(log logr.Logger, limit int, requests []*cmapi.C return revisions[i].rev < revisions[j].rev }) - // Return the oldest revsions which are over the limit + // Return the oldest revisions which are over the limit remaining := len(revisions) - limit if remaining < 0 { return nil @@ -200,14 +205,14 @@ type controllerWrapper struct { *controller } -func (c *controllerWrapper) Register(ctx *controllerpkg.Context) (workqueue.RateLimitingInterface, []cache.InformerSynced, error) { +func (c *controllerWrapper) Register(ctx *controllerpkg.Context) (workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { // construct a new named logger to be reused throughout the controller log := logf.FromContext(ctx.RootContext, ControllerName) - ctrl, queue, mustSync := NewController(log, ctx) + ctrl, queue, mustSync, err := NewController(log, ctx) c.controller = ctrl - return queue, mustSync, nil + return queue, mustSync, err } func init() { diff --git a/pkg/controller/certificates/revisionmanager/revisionmanager_controller_test.go b/pkg/controller/certificates/revisionmanager/revisionmanager_controller_test.go index a51d90b083a..810e90604a4 100644 --- a/pkg/controller/certificates/revisionmanager/revisionmanager_controller_test.go +++ b/pkg/controller/certificates/revisionmanager/revisionmanager_controller_test.go @@ -29,7 +29,6 @@ import ( cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" - controllerpkg "github.com/cert-manager/cert-manager/pkg/controller" testpkg "github.com/cert-manager/cert-manager/pkg/controller/test" "github.com/cert-manager/cert-manager/test/unit/gen" ) @@ -52,7 +51,7 @@ func TestProcessItem(t *testing.T) { // key that should be passed to ProcessItem. // if not set, the 'namespace/name' of the 'Certificate' field will be used. // if neither is set, the key will be "" - key string + key types.NamespacedName // Certificate to be synced for the test. // if not set, the 'key' will be passed to ProcessItem instead. @@ -68,10 +67,16 @@ func TestProcessItem(t *testing.T) { }{ "do nothing if an empty 'key' is used": {}, "do nothing if an invalid 'key' is used": { - key: "abc/def/ghi", + key: types.NamespacedName{ + Namespace: "abc", + Name: "def/ghi", + }, }, "do nothing if a key references a Certificate that does not exist": { - key: "namespace/name", + key: types.NamespacedName{ + Namespace: "namespace", + Name: "name", + }, }, "do nothing if Certificate is not in a Ready=True state": { certificate: gen.CertificateFrom(baseCrt, @@ -239,10 +244,10 @@ func TestProcessItem(t *testing.T) { defer builder.Stop() key := test.key - if key == "" && test.certificate != nil { - key, err = controllerpkg.KeyFunc(test.certificate) - if err != nil { - t.Fatal(err) + if key == (types.NamespacedName{}) && test.certificate != nil { + key = types.NamespacedName{ + Name: test.certificate.Name, + Namespace: test.certificate.Namespace, } } diff --git a/pkg/controller/certificates/trigger/trigger_controller.go b/pkg/controller/certificates/trigger/trigger_controller.go index 1724d96a61a..53ca2e225a5 100644 --- a/pkg/controller/certificates/trigger/trigger_controller.go +++ b/pkg/controller/certificates/trigger/trigger_controller.go @@ -27,6 +27,7 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/workqueue" @@ -69,7 +70,7 @@ type controller struct { secretLister internalinformers.SecretLister client cmclient.Interface recorder record.EventRecorder - scheduledWorkQueue scheduler.ScheduledWorkQueue + scheduledWorkQueue scheduler.ScheduledWorkQueue[types.NamespacedName] // fieldManager is the string which will be used as the Field Manager on // fields created or edited by the cert-manager Kubernetes client during @@ -86,27 +87,38 @@ func NewController( log logr.Logger, ctx *controllerpkg.Context, shouldReissue policies.Func, -) (*controller, workqueue.RateLimitingInterface, []cache.InformerSynced) { +) (*controller, workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { // create a queue used to queue up items to be processed - queue := workqueue.NewNamedRateLimitingQueue(workqueue.NewItemExponentialFailureRateLimiter(time.Second*1, time.Second*30), ControllerName) + queue := workqueue.NewTypedRateLimitingQueueWithConfig( + controllerpkg.DefaultCertificateRateLimiter(), + workqueue.TypedRateLimitingQueueConfig[types.NamespacedName]{ + Name: ControllerName, + }, + ) // obtain references to all the informers used by this controller certificateInformer := ctx.SharedInformerFactory.Certmanager().V1().Certificates() certificateRequestInformer := ctx.SharedInformerFactory.Certmanager().V1().CertificateRequests() secretsInformer := ctx.KubeSharedInformerFactory.Secrets() - certificateInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: queue}) + if _, err := certificateInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: queue}); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } // When a CertificateRequest resource changes, enqueue the Certificate resource that owns it. - certificateRequestInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ + if _, err := certificateRequestInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ WorkFunc: certificates.EnqueueCertificatesForResourceUsingPredicates(log, queue, certificateInformer.Lister(), labels.Everything(), predicate.ResourceOwnerOf), - }) + }); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } // When a Secret resource changes, enqueue any Certificate resources that name it as spec.secretName. - secretsInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ + if _, err := secretsInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{ // Trigger reconciles on changes to the Secret named `spec.secretName` WorkFunc: certificates.EnqueueCertificatesForResourceUsingPredicates(log, queue, certificateInformer.Lister(), labels.Everything(), predicate.ExtractResourceName(predicate.CertificateSecretName)), - }) + }); err != nil { + return nil, nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } // build a list of InformerSynced functions that will be returned by the Register method. // the controller will only begin processing items once all of these informers have synced. @@ -132,17 +144,13 @@ func NewController( CertificateRequestLister: certificateRequestInformer.Lister(), SecretLister: secretsInformer.Lister(), }).DataForCertificate, - }, queue, mustSync + }, queue, mustSync, nil } -func (c *controller) ProcessItem(ctx context.Context, key string) error { +func (c *controller) ProcessItem(ctx context.Context, key types.NamespacedName) error { log := logf.FromContext(ctx).WithValues("key", key) ctx = logf.NewContext(ctx, log) - namespace, name, err := cache.SplitMetaNamespaceKey(key) - if err != nil { - log.Error(err, "invalid resource key passed to ProcessItem") - return nil - } + namespace, name := key.Namespace, key.Name crt, err := c.certificateLister.Certificates(namespace).Get(name) if apierrors.IsNotFound(err) { @@ -162,7 +170,7 @@ func (c *controller) ProcessItem(ctx context.Context, key string) error { // It is possible for multiple Certificates to reference the same Secret. In that case, without this check, // the duplicate Certificates would each be issued and store their version of the X.509 certificate in the - // target Secret, triggering the re-issuance of the other Certificate resources who's spec no longer matches + // target Secret, triggering the re-issuance of the other Certificate resources whose spec no longer matches // what is in the Secret. This would cause a flood of re-issuance attempts and overloads the Kubernetes API // and the API server of the issuing CA. isOwner, duplicates, err := internalcertificates.CertificateOwnsSecret(ctx, c.certificateLister, c.secretLister, crt) @@ -327,7 +335,7 @@ func shouldBackoffReissuingOnFailure(log logr.Logger, c clock.Clock, crt *cmapi. // has elapsed. // If the 'durationUntilRenewalTime' is less than zero, it will not be // queued again. -func (c *controller) scheduleRecheckOfCertificateIfRequired(log logr.Logger, key string, durationUntilRenewalTime time.Duration) { +func (c *controller) scheduleRecheckOfCertificateIfRequired(log logr.Logger, key types.NamespacedName, durationUntilRenewalTime time.Duration) { // don't schedule a re-queue if the time is in the past. // if it is in the past, the resource will be triggered during the // current call to the ProcessItem method. If we added the item to the @@ -349,17 +357,17 @@ type controllerWrapper struct { *controller } -func (c *controllerWrapper) Register(ctx *controllerpkg.Context) (workqueue.RateLimitingInterface, []cache.InformerSynced, error) { +func (c *controllerWrapper) Register(ctx *controllerpkg.Context) (workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { // construct a new named logger to be reused throughout the controller log := logf.FromContext(ctx.RootContext, ControllerName) - ctrl, queue, mustSync := NewController(log, + ctrl, queue, mustSync, err := NewController(log, ctx, policies.NewTriggerPolicyChain(ctx.Clock).Evaluate, ) c.controller = ctrl - return queue, mustSync, nil + return queue, mustSync, err } func init() { diff --git a/pkg/controller/certificates/trigger/trigger_controller_test.go b/pkg/controller/certificates/trigger/trigger_controller_test.go index 3db2b09d45a..9ab252cad85 100644 --- a/pkg/controller/certificates/trigger/trigger_controller_test.go +++ b/pkg/controller/certificates/trigger/trigger_controller_test.go @@ -27,13 +27,13 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" coretesting "k8s.io/client-go/testing" fakeclock "k8s.io/utils/clock/testing" "k8s.io/utils/ptr" "github.com/cert-manager/cert-manager/internal/controller/certificates/policies" cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" - controllerpkg "github.com/cert-manager/cert-manager/pkg/controller" testpkg "github.com/cert-manager/cert-manager/pkg/controller/test" testcrypto "github.com/cert-manager/cert-manager/test/unit/crypto" "github.com/cert-manager/cert-manager/test/unit/gen" @@ -52,7 +52,7 @@ func Test_controller_ProcessItem(t *testing.T) { // key that should be passed to ProcessItem. If not set, the // 'namespace/name' of the 'Certificate' field will be used. If neither // is set, the key will be "". - key string + key types.NamespacedName // Certificate to be synced for the test. If not set, the 'key' will be // passed to ProcessItem instead. @@ -84,10 +84,16 @@ func Test_controller_ProcessItem(t *testing.T) { }{ "do nothing if an empty 'key' is used": {}, "do nothing if an invalid 'key' is used": { - key: "abc/def/ghi", + key: types.NamespacedName{ + Namespace: "abc", + Name: "def/ghi", + }, }, "do nothing if a key references a Certificate that does not exist": { - key: "namespace/name", + key: types.NamespacedName{ + Namespace: "namespace", + Name: "name", + }, }, "should do nothing if Certificate already has 'Issuing' condition": { existingCertificate: gen.Certificate("cert-1", gen.SetCertificateNamespace("testns"), @@ -408,7 +414,7 @@ func Test_controller_ProcessItem(t *testing.T) { // TODO(mael): we should really remove the Certificate field from // DataForCertificate since the input certificate is always expected - // to be the same as the output certiticate. + // to be the same as the output certificate. test.mockDataForCertificateReturn.Certificate = test.existingCertificate gotDataForCertificateCalled := false @@ -440,10 +446,10 @@ func Test_controller_ProcessItem(t *testing.T) { defer builder.Stop() key := test.key - if key == "" && test.existingCertificate != nil { - key, err = controllerpkg.KeyFunc(test.existingCertificate) - if err != nil { - t.Fatal(err) + if key == (types.NamespacedName{}) && test.existingCertificate != nil { + key = types.NamespacedName{ + Name: test.existingCertificate.Name, + Namespace: test.existingCertificate.Namespace, } } diff --git a/pkg/controller/certificatesigningrequests/acme/acme.go b/pkg/controller/certificatesigningrequests/acme/acme.go index 3abe5073ed9..0155ed40cb1 100644 --- a/pkg/controller/certificatesigningrequests/acme/acme.go +++ b/pkg/controller/certificatesigningrequests/acme/acme.go @@ -29,6 +29,7 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" certificatesclient "k8s.io/client-go/kubernetes/typed/certificates/v1" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" @@ -80,19 +81,21 @@ func init() { func controllerBuilder() *certificatesigningrequests.Controller { return certificatesigningrequests.New(apiutil.IssuerACME, NewACME, - func(ctx *controllerpkg.Context, log logr.Logger, queue workqueue.RateLimitingInterface) ([]cache.InformerSynced, error) { + func(ctx *controllerpkg.Context, log logr.Logger, queue workqueue.TypedRateLimitingInterface[types.NamespacedName]) ([]cache.InformerSynced, error) { orderInformer := ctx.SharedInformerFactory.Acme().V1().Orders().Informer() csrLister := ctx.KubeSharedInformerFactory.CertificateSigningRequests().Lister() - orderInformer.AddEventHandler(&controllerpkg.BlockingEventHandler{ + if _, err := orderInformer.AddEventHandler(&controllerpkg.BlockingEventHandler{ WorkFunc: controllerpkg.HandleOwnedResourceNamespacedFunc( log, queue, certificatesv1.SchemeGroupVersion.WithKind("CertificateSigningRequest"), - func(_, name string) (interface{}, error) { + func(_, name string) (*certificatesv1.CertificateSigningRequest, error) { return csrLister.Get(name) }, ), - }) + }); err != nil { + return nil, fmt.Errorf("error setting up event handler: %v", err) + } return []cache.InformerSynced{orderInformer.HasSynced}, nil }, ) diff --git a/pkg/controller/certificatesigningrequests/acme/acme_test.go b/pkg/controller/certificatesigningrequests/acme/acme_test.go index 9494c6cf0d1..b0826ac193b 100644 --- a/pkg/controller/certificatesigningrequests/acme/acme_test.go +++ b/pkg/controller/certificatesigningrequests/acme/acme_test.go @@ -31,6 +31,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes" coretesting "k8s.io/client-go/testing" fakeclock "k8s.io/utils/clock/testing" @@ -66,19 +67,19 @@ func Test_controllerBuilder(t *testing.T) { existingCSR runtime.Object existingCMObjects []runtime.Object givenCall func(*testing.T, cmclient.Interface, kubernetes.Interface) - expectRequeueKey string + expectRequeueKey types.NamespacedName }{ "if no request then no request should sync": { existingCSR: nil, existingCMObjects: []runtime.Object{baseOrder}, givenCall: func(t *testing.T, _ cmclient.Interface, _ kubernetes.Interface) {}, - expectRequeueKey: "", + expectRequeueKey: types.NamespacedName{}, }, "if no changes to request or order, then no request should sync": { existingCSR: baseCSR, existingCMObjects: []runtime.Object{baseOrder}, givenCall: func(t *testing.T, _ cmclient.Interface, _ kubernetes.Interface) {}, - expectRequeueKey: "", + expectRequeueKey: types.NamespacedName{}, }, "request should be synced if an owned order is updated": { existingCSR: baseCSR, @@ -95,7 +96,9 @@ func Test_controllerBuilder(t *testing.T) { _, err := cmclient.AcmeV1().Orders("test-namespace").Update(context.TODO(), order, metav1.UpdateOptions{}) require.NoError(t, err) }, - expectRequeueKey: "test-csr", + expectRequeueKey: types.NamespacedName{ + Name: "test-csr", + }, }, "request should not be synced if updated order is not owned": { existingCSR: baseCSR, @@ -109,7 +112,7 @@ func Test_controllerBuilder(t *testing.T) { _, err := cmclient.AcmeV1().Orders("test-namespace").Update(context.TODO(), order, metav1.UpdateOptions{}) require.NoError(t, err) }, - expectRequeueKey: "", + expectRequeueKey: types.NamespacedName{}, }, "request should be synced if request is updated": { existingCSR: baseCSR, @@ -121,7 +124,9 @@ func Test_controllerBuilder(t *testing.T) { _, err := kubeclient.CertificatesV1().CertificateSigningRequests().UpdateStatus(context.TODO(), csr, metav1.UpdateOptions{}) require.NoError(t, err) }, - expectRequeueKey: "test-csr", + expectRequeueKey: types.NamespacedName{ + Name: "test-csr", + }, }, } @@ -158,7 +163,7 @@ func Test_controllerBuilder(t *testing.T) { // to be nil. time.AfterFunc(50*time.Millisecond, queue.ShutDown) - var gotKeys []string + var gotKeys []types.NamespacedName for { // Get blocks until either (1) a key is returned, or (2) the // queue is shut down. @@ -166,13 +171,13 @@ func Test_controllerBuilder(t *testing.T) { if done { break } - gotKeys = append(gotKeys, gotKey.(string)) + gotKeys = append(gotKeys, gotKey) } assert.Equal(t, 0, queue.Len(), "queue should be empty") // We only expect 0 or 1 keys received in the queue. - if test.expectRequeueKey != "" { - assert.Equal(t, []string{test.expectRequeueKey}, gotKeys) + if test.expectRequeueKey != (types.NamespacedName{}) { + assert.Equal(t, []types.NamespacedName{test.expectRequeueKey}, gotKeys) } else { assert.Nil(t, gotKeys) } @@ -916,11 +921,15 @@ func Test_ProcessItem(t *testing.T) { defer test.builder.Stop() controller := controllerBuilder() - controller.Register(test.builder.Context) + if _, _, err := controller.Register(test.builder.Context); err != nil { + t.Fatal(err) + } test.builder.Start() - err := controller.ProcessItem(context.Background(), test.csr.Name) + err := controller.ProcessItem(context.Background(), types.NamespacedName{ + Name: test.csr.Name, + }) if (err != nil) != test.expectedErr { t.Errorf("unexpected error, exp=%t got=%v", test.expectedErr, err) } diff --git a/pkg/controller/certificatesigningrequests/ca/ca_test.go b/pkg/controller/certificatesigningrequests/ca/ca_test.go index da190bef0da..874bd340413 100644 --- a/pkg/controller/certificatesigningrequests/ca/ca_test.go +++ b/pkg/controller/certificatesigningrequests/ca/ca_test.go @@ -36,6 +36,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" clientcorev1 "k8s.io/client-go/listers/core/v1" coretesting "k8s.io/client-go/testing" fakeclock "k8s.io/utils/clock/testing" @@ -573,10 +574,14 @@ func runTest(t *testing.T, test testT) { apiutil.IssuerCA, func(*controller.Context) certificatesigningrequests.Signer { return ca }, ) - controller.Register(test.builder.Context) + if _, _, err := controller.Register(test.builder.Context); err != nil { + t.Fatal(err) + } test.builder.Start() - err := controller.ProcessItem(context.Background(), test.csr.Name) + err := controller.ProcessItem(context.Background(), types.NamespacedName{ + Name: test.csr.Name, + }) if err != nil && !test.expectedErr { t.Errorf("expected to not get an error, but got: %v", err) } diff --git a/pkg/controller/certificatesigningrequests/checks.go b/pkg/controller/certificatesigningrequests/checks.go index 5673da55ed7..5e112a3c7f9 100644 --- a/pkg/controller/certificatesigningrequests/checks.go +++ b/pkg/controller/certificatesigningrequests/checks.go @@ -21,6 +21,7 @@ import ( certificatesv1 "k8s.io/api/certificates/v1" "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/types" "github.com/cert-manager/cert-manager/pkg/apis/certmanager" cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" @@ -44,13 +45,10 @@ func (c *Controller) handleGenericIssuer(obj interface{}) { return } for _, cr := range crs { - log := logf.WithRelatedResource(log, cr) - key, err := keyFunc(cr) - if err != nil { - log.Error(err, "error computing key for resource") - continue - } - c.queue.Add(key) + c.queue.Add(types.NamespacedName{ + Name: cr.Name, + Namespace: cr.Namespace, + }) } } diff --git a/pkg/controller/certificatesigningrequests/controller.go b/pkg/controller/certificatesigningrequests/controller.go index 80b16cd2762..180b1f72a2a 100644 --- a/pkg/controller/certificatesigningrequests/controller.go +++ b/pkg/controller/certificatesigningrequests/controller.go @@ -23,6 +23,7 @@ import ( "github.com/go-logr/logr" certificatesv1 "k8s.io/api/certificates/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/types" authzclient "k8s.io/client-go/kubernetes/typed/authorization/v1" certificatesclient "k8s.io/client-go/kubernetes/typed/certificates/v1" certificateslisters "k8s.io/client-go/listers/certificates/v1" @@ -37,8 +38,6 @@ import ( logf "github.com/cert-manager/cert-manager/pkg/logs" ) -var keyFunc = controllerpkg.KeyFunc - // Signer is an implementation of a Kubernetes CertificateSigningRequest // signer, backed by a cert-manager Issuer. type Signer interface { @@ -54,7 +53,7 @@ type SignerConstructor func(*controllerpkg.Context) Signer // informers not covered in the main shared controller implementation. // The returned set of InformerSyncs will be waited on when the controller // starts. -type RegisterExtraInformerFn func(*controllerpkg.Context, logr.Logger, workqueue.RateLimitingInterface) ([]cache.InformerSynced, error) +type RegisterExtraInformerFn func(*controllerpkg.Context, logr.Logger, workqueue.TypedRateLimitingInterface[types.NamespacedName]) ([]cache.InformerSynced, error) // Controller is a base Kubernetes CertificateSigningRequest controller. It is // responsible for orchestrating and performing shared operations that all @@ -72,7 +71,7 @@ type Controller struct { // fieldManager is the manager name used for the Apply operations. fieldManager string - queue workqueue.RateLimitingInterface + queue workqueue.TypedRateLimitingInterface[types.NamespacedName] // logger to be used by this controller log logr.Logger @@ -97,7 +96,7 @@ type Controller struct { // New will construct a new certificatesigningrequest controller using the // given Signer implementation. -// Note: the registerExtraInfromers passed here will be 'waited' for when +// Note: the registerExtraInformers passed here will be 'waited' for when // starting to ensure their corresponding listers have synced. // The caller is responsible for ensuring the informer work functions are setup // correctly on any informer. @@ -113,14 +112,19 @@ func New(signerType string, signerConstructor SignerConstructor, registerExtraIn } } -func (c *Controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitingInterface, []cache.InformerSynced, error) { +func (c *Controller) Register(ctx *controllerpkg.Context) (workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { componentName := "certificatesigningrequests-" + c.signerType // construct a new named logger to be reused throughout the controller c.log = logf.FromContext(ctx.RootContext, componentName) // create a queue used to queue up items to be processed - c.queue = workqueue.NewNamedRateLimitingQueue(controllerpkg.DefaultItemBasedRateLimiter(), componentName) + c.queue = workqueue.NewTypedRateLimitingQueueWithConfig( + controllerpkg.DefaultItemBasedRateLimiter(), + workqueue.TypedRateLimitingQueueConfig[types.NamespacedName]{ + Name: componentName, + }, + ) kubeClient := ctx.Client c.sarClient = kubeClient.AuthorizationV1().SubjectAccessReviews() @@ -153,7 +157,9 @@ func (c *Controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitin clusterIssuerInformer := ctx.SharedInformerFactory.Certmanager().V1().ClusterIssuers() if ctx.Namespace == "" { // register handler function for clusterissuer resources - clusterIssuerInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{WorkFunc: c.handleGenericIssuer}) + if _, err := clusterIssuerInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{WorkFunc: c.handleGenericIssuer}); err != nil { + return nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } mustSync = append(mustSync, clusterIssuerInformer.Informer().HasSynced) } @@ -161,8 +167,12 @@ func (c *Controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitin c.csrLister = csrInformer.Lister() // register handler functions - csrInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: c.queue}) - issuerInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{WorkFunc: c.handleGenericIssuer}) + if _, err := csrInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: c.queue}); err != nil { + return nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } + if _, err := issuerInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{WorkFunc: c.handleGenericIssuer}); err != nil { + return nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } // create an issuer helper for reading generic issuers c.helper = issuer.NewHelper(issuerInformer.Lister(), clusterIssuerInformer.Lister()) @@ -182,15 +192,11 @@ func (c *Controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitin return c.queue, mustSync, nil } -func (c *Controller) ProcessItem(ctx context.Context, key string) error { +func (c *Controller) ProcessItem(ctx context.Context, key types.NamespacedName) error { log := logf.FromContext(ctx) dbg := log.V(logf.DebugLevel) - _, name, err := cache.SplitMetaNamespaceKey(key) - if err != nil { - log.Error(err, "invalid resource key") - return nil - } + name := key.Name csr, err := c.csrLister.Get(name) if apierrors.IsNotFound(err) { diff --git a/pkg/controller/certificatesigningrequests/controller_test.go b/pkg/controller/certificatesigningrequests/controller_test.go index db7b7c043a1..c66689d9a93 100644 --- a/pkg/controller/certificatesigningrequests/controller_test.go +++ b/pkg/controller/certificatesigningrequests/controller_test.go @@ -27,6 +27,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" coretesting "k8s.io/client-go/testing" fakeclock "k8s.io/utils/clock/testing" @@ -34,7 +35,6 @@ import ( cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" "github.com/cert-manager/cert-manager/pkg/controller" - controllerpkg "github.com/cert-manager/cert-manager/pkg/controller" "github.com/cert-manager/cert-manager/pkg/controller/certificatesigningrequests/fake" "github.com/cert-manager/cert-manager/pkg/controller/certificatesigningrequests/util" testpkg "github.com/cert-manager/cert-manager/pkg/controller/test" @@ -75,7 +75,7 @@ func TestController(t *testing.T) { // key that should be passed to ProcessItem. If not set, the // 'namespace/name' of the 'CertificateSigningRequest' field will be used. // If neither is set, the key will be "". - key string + key types.NamespacedName // CertificateSigningRequest to be synced for the test. If not set, the // 'key' will be passed to ProcessItem instead. @@ -107,13 +107,19 @@ func TestController(t *testing.T) { sarReaction: sarReactionExpectNoCall, }, "do nothing if an invalid 'key' is used": { - key: "abc/def/ghi", + key: types.NamespacedName{ + Namespace: "abc", + Name: "def/ghi", + }, signerType: apiutil.IssuerCA, signerImpl: signerExpectNoCall, sarReaction: sarReactionExpectNoCall, }, "do nothing if a key references a CertificateSigningRequest that does not exist": { - key: "namespace/name", + key: types.NamespacedName{ + Namespace: "namespace", + Name: "name", + }, signerType: apiutil.IssuerCA, signerImpl: signerExpectNoCall, sarReaction: sarReactionExpectNoCall, @@ -621,10 +627,10 @@ func TestController(t *testing.T) { defer builder.Stop() key := test.key - if key == "" && test.existingCSR != nil { - key, err = controllerpkg.KeyFunc(test.existingCSR) - if err != nil { - t.Fatal(err) + if key == (types.NamespacedName{}) && test.existingCSR != nil { + key = types.NamespacedName{ + Name: test.existingCSR.Name, + Namespace: test.existingCSR.Namespace, } } diff --git a/pkg/controller/certificatesigningrequests/selfsigned/checks.go b/pkg/controller/certificatesigningrequests/selfsigned/checks.go index 0f1e867ea13..4cb76d231f3 100644 --- a/pkg/controller/certificatesigningrequests/selfsigned/checks.go +++ b/pkg/controller/certificatesigningrequests/selfsigned/checks.go @@ -24,6 +24,7 @@ import ( corev1 "k8s.io/api/core/v1" k8sErrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/types" clientv1 "k8s.io/client-go/listers/certificates/v1" "k8s.io/client-go/util/workqueue" @@ -43,7 +44,7 @@ import ( func handleSecretReferenceWorkFunc(log logr.Logger, lister clientv1.CertificateSigningRequestLister, helper issuer.Helper, - queue workqueue.RateLimitingInterface, + queue workqueue.TypedRateLimitingInterface[types.NamespacedName], issuerOptions controllerpkg.IssuerOptions, ) func(obj any) { return func(obj any) { @@ -60,13 +61,10 @@ func handleSecretReferenceWorkFunc(log logr.Logger, return } for _, request := range requests { - log := logf.WithRelatedResource(log, request) - key, err := controllerpkg.KeyFunc(request) - if err != nil { - log.Error(err, "error computing key for resource") - continue - } - queue.Add(key) + queue.Add(types.NamespacedName{ + Name: request.Name, + Namespace: request.Namespace, + }) } } } diff --git a/pkg/controller/certificatesigningrequests/selfsigned/checks_test.go b/pkg/controller/certificatesigningrequests/selfsigned/checks_test.go index 82d1fc118f9..64333644a15 100644 --- a/pkg/controller/certificatesigningrequests/selfsigned/checks_test.go +++ b/pkg/controller/certificatesigningrequests/selfsigned/checks_test.go @@ -23,6 +23,7 @@ import ( "github.com/stretchr/testify/require" certificatesv1 "k8s.io/api/certificates/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/util/workqueue" "k8s.io/klog/v2/ktesting" @@ -38,7 +39,7 @@ func Test_handleSecretReferenceWorkFunc(t *testing.T) { secret runtime.Object existingCSRs []runtime.Object existingIssuers []runtime.Object - expectedQueue []string + expectedQueue []types.NamespacedName }{ "if given object is not secret, expect empty queue": { secret: gen.Certificate("not-a-secret"), @@ -65,7 +66,7 @@ func Test_handleSecretReferenceWorkFunc(t *testing.T) { gen.SetIssuerSelfSigned(cmapi.SelfSignedIssuer{}), ), }, - expectedQueue: []string{}, + expectedQueue: []types.NamespacedName{}, }, "if no requests then expect empty queue": { secret: gen.Secret("test-secret", gen.SetSecretNamespace("test-namespace")), @@ -79,7 +80,7 @@ func Test_handleSecretReferenceWorkFunc(t *testing.T) { gen.SetIssuerSelfSigned(cmapi.SelfSignedIssuer{}), ), }, - expectedQueue: []string{}, + expectedQueue: []types.NamespacedName{}, }, "referenced requests should be added to the queue": { secret: gen.Secret("test-secret", gen.SetSecretNamespace("test-namespace")), @@ -106,7 +107,10 @@ func Test_handleSecretReferenceWorkFunc(t *testing.T) { gen.SetIssuerSelfSigned(cmapi.SelfSignedIssuer{}), ), }, - expectedQueue: []string{"a", "b"}, + expectedQueue: []types.NamespacedName{ + {Name: "a"}, + {Name: "b"}, + }, }, } @@ -128,15 +132,15 @@ func Test_handleSecretReferenceWorkFunc(t *testing.T) { builder.Start() - queue := workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()) + queue := workqueue.NewTypedRateLimitingQueueWithConfig(workqueue.DefaultTypedControllerRateLimiter[types.NamespacedName](), workqueue.TypedRateLimitingQueueConfig[types.NamespacedName]{}) handleSecretReferenceWorkFunc(ktesting.NewLogger(t, ktesting.NewConfig()), lister, helper, queue, controllerpkg.IssuerOptions{ClusterResourceNamespace: "test-namespace"}, )(test.secret) require.Equal(t, len(test.expectedQueue), queue.Len()) - var actualQueue []string + var actualQueue []types.NamespacedName for range test.expectedQueue { i, _ := queue.Get() - actualQueue = append(actualQueue, i.(string)) + actualQueue = append(actualQueue, i) } assert.ElementsMatch(t, test.expectedQueue, actualQueue) }) diff --git a/pkg/controller/certificatesigningrequests/selfsigned/selfsigned.go b/pkg/controller/certificatesigningrequests/selfsigned/selfsigned.go index 01843a017ac..5e48fadce46 100644 --- a/pkg/controller/certificatesigningrequests/selfsigned/selfsigned.go +++ b/pkg/controller/certificatesigningrequests/selfsigned/selfsigned.go @@ -27,6 +27,7 @@ import ( certificatesv1 "k8s.io/api/certificates/v1" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/types" certificatesclient "k8s.io/client-go/kubernetes/typed/certificates/v1" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" @@ -79,16 +80,18 @@ func init() { // Handle informed Secrets which may be referenced by the // "experimental.cert-manager.io/private-key-secret-name" annotation. - func(ctx *controllerpkg.Context, log logr.Logger, queue workqueue.RateLimitingInterface) ([]cache.InformerSynced, error) { + func(ctx *controllerpkg.Context, log logr.Logger, queue workqueue.TypedRateLimitingInterface[types.NamespacedName]) ([]cache.InformerSynced, error) { secretInformer := ctx.KubeSharedInformerFactory.Secrets().Informer() certificateSigningRequestLister := ctx.KubeSharedInformerFactory.CertificateSigningRequests().Lister() helper := issuer.NewHelper( ctx.SharedInformerFactory.Certmanager().V1().Issuers().Lister(), ctx.SharedInformerFactory.Certmanager().V1().ClusterIssuers().Lister(), ) - secretInformer.AddEventHandler(&controllerpkg.BlockingEventHandler{ + if _, err := secretInformer.AddEventHandler(&controllerpkg.BlockingEventHandler{ WorkFunc: handleSecretReferenceWorkFunc(log, certificateSigningRequestLister, helper, queue, ctx.IssuerOptions), - }) + }); err != nil { + return nil, fmt.Errorf("error setting up event handler: %v", err) + } return []cache.InformerSynced{ secretInformer.HasSynced, ctx.SharedInformerFactory.Certmanager().V1().Issuers().Informer().HasSynced, diff --git a/pkg/controller/certificatesigningrequests/selfsigned/selfsigned_test.go b/pkg/controller/certificatesigningrequests/selfsigned/selfsigned_test.go index da7e9e816c8..4fc1bf038de 100644 --- a/pkg/controller/certificatesigningrequests/selfsigned/selfsigned_test.go +++ b/pkg/controller/certificatesigningrequests/selfsigned/selfsigned_test.go @@ -32,6 +32,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" coretesting "k8s.io/client-go/testing" fakeclock "k8s.io/utils/clock/testing" @@ -616,10 +617,14 @@ func TestProcessItem(t *testing.T) { apiutil.IssuerSelfSigned, func(*controller.Context) certificatesigningrequests.Signer { return selfsigned }, ) - controller.Register(test.builder.Context) + if _, _, err := controller.Register(test.builder.Context); err != nil { + t.Fatal(err) + } test.builder.Start() - err := controller.ProcessItem(context.Background(), test.csr.Name) + err := controller.ProcessItem(context.Background(), types.NamespacedName{ + Name: test.csr.Name, + }) if err != nil && !test.expectedErr { t.Errorf("expected to not get an error, but got: %v", err) } diff --git a/pkg/controller/certificatesigningrequests/sync_test.go b/pkg/controller/certificatesigningrequests/sync_test.go index e91a87a7199..ea7b8cd5835 100644 --- a/pkg/controller/certificatesigningrequests/sync_test.go +++ b/pkg/controller/certificatesigningrequests/sync_test.go @@ -330,7 +330,9 @@ func TestController_Sync(t *testing.T) { } c := New(util.IssuerSelfSigned, func(*controller.Context) Signer { return scenario.signerImpl }) - c.Register(scenario.builder.Context) + if _, _, err := c.Register(scenario.builder.Context); err != nil { + t.Fatal(err) + } scenario.builder.Start() diff --git a/pkg/controller/certificatesigningrequests/vault/vault_test.go b/pkg/controller/certificatesigningrequests/vault/vault_test.go index 5c457f41d38..1df9f1b8ac1 100644 --- a/pkg/controller/certificatesigningrequests/vault/vault_test.go +++ b/pkg/controller/certificatesigningrequests/vault/vault_test.go @@ -30,6 +30,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" coretesting "k8s.io/client-go/testing" fakeclock "k8s.io/utils/clock/testing" @@ -439,10 +440,14 @@ func TestProcessItem(t *testing.T) { apiutil.IssuerVault, func(*controllerpkg.Context) certificatesigningrequests.Signer { return vault }, ) - controller.Register(test.builder.Context) + if _, _, err := controller.Register(test.builder.Context); err != nil { + t.Fatal(err) + } test.builder.Start() - err := controller.ProcessItem(context.Background(), test.csr.Name) + err := controller.ProcessItem(context.Background(), types.NamespacedName{ + Name: test.csr.Name, + }) if err != nil && !test.expectedErr { t.Errorf("expected to not get an error, but got: %v", err) } diff --git a/pkg/controller/certificatesigningrequests/venafi/venafi.go b/pkg/controller/certificatesigningrequests/venafi/venafi.go index d3b55be2eb1..282399ffe68 100644 --- a/pkg/controller/certificatesigningrequests/venafi/venafi.go +++ b/pkg/controller/certificatesigningrequests/venafi/venafi.go @@ -40,6 +40,7 @@ import ( venafiapi "github.com/cert-manager/cert-manager/pkg/issuer/venafi/client/api" logf "github.com/cert-manager/cert-manager/pkg/logs" "github.com/cert-manager/cert-manager/pkg/metrics" + "github.com/cert-manager/cert-manager/pkg/util/pki" utilpki "github.com/cert-manager/cert-manager/pkg/util/pki" ) @@ -129,6 +130,16 @@ func (v *Venafi) Sign(ctx context.Context, csr *certificatesv1.CertificateSignin } } + duration, err := pki.DurationFromCertificateSigningRequest(csr) + if err != nil { + message := fmt.Sprintf("Failed to parse requested duration: %s", err) + log.Error(err, message) + v.recorder.Event(csr, corev1.EventTypeWarning, "ErrorParseDuration", message) + util.CertificateSigningRequestSetFailed(csr, "ErrorParseDuration", message) + _, userr := util.UpdateOrApplyStatus(ctx, v.certClient, csr, certificatesv1.CertificateFailed, v.fieldManager) + return userr + } + // The signing process with Venafi is slow. The "pickupID" allows us to track // the progress of the certificate signing. It is set as an annotation the // first time the Certificate is reconciled. @@ -136,7 +147,7 @@ func (v *Venafi) Sign(ctx context.Context, csr *certificatesv1.CertificateSignin // check if the pickup ID annotation is there, if not set it up. if len(pickupID) == 0 { - pickupID, err := client.RequestCertificate(csr.Spec.Request, customFields) + pickupID, err := client.RequestCertificate(csr.Spec.Request, duration, customFields) // Check some known error types if err != nil { switch err.(type) { @@ -166,7 +177,7 @@ func (v *Venafi) Sign(ctx context.Context, csr *certificatesv1.CertificateSignin return uerr } - certPem, err := client.RetrieveCertificate(pickupID, csr.Spec.Request, customFields) + certPem, err := client.RetrieveCertificate(pickupID, csr.Spec.Request, duration, customFields) if err != nil { switch err.(type) { case endpoint.ErrCertificatePending: diff --git a/pkg/controller/certificatesigningrequests/venafi/venafi_test.go b/pkg/controller/certificatesigningrequests/venafi/venafi_test.go index be983abd9b8..1f0f80dd5df 100644 --- a/pkg/controller/certificatesigningrequests/venafi/venafi_test.go +++ b/pkg/controller/certificatesigningrequests/venafi/venafi_test.go @@ -33,6 +33,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" coretesting "k8s.io/client-go/testing" fakeclock "k8s.io/utils/clock/testing" @@ -390,7 +391,7 @@ func TestProcessItem(t *testing.T) { ), clientBuilder: func(_ string, _ internalinformers.SecretLister, _ cmapi.GenericIssuer, _ *metrics.Metrics, _ logr.Logger, _ string) (venaficlient.Interface, error) { return &fakevenaficlient.Venafi{ - RequestCertificateFn: func(_ []byte, _ []venafiapi.CustomField) (string, error) { + RequestCertificateFn: func(_ []byte, _ time.Duration, _ []venafiapi.CustomField) (string, error) { return "", venaficlient.ErrCustomFieldsType{Type: "test-type"} }, }, nil @@ -461,7 +462,7 @@ func TestProcessItem(t *testing.T) { ), clientBuilder: func(_ string, _ internalinformers.SecretLister, _ cmapi.GenericIssuer, _ *metrics.Metrics, _ logr.Logger, _ string) (venaficlient.Interface, error) { return &fakevenaficlient.Venafi{ - RequestCertificateFn: func(_ []byte, _ []venafiapi.CustomField) (string, error) { + RequestCertificateFn: func(_ []byte, _ time.Duration, _ []venafiapi.CustomField) (string, error) { return "", errors.New("generic error") }, }, nil @@ -532,7 +533,7 @@ func TestProcessItem(t *testing.T) { ), clientBuilder: func(_ string, _ internalinformers.SecretLister, _ cmapi.GenericIssuer, _ *metrics.Metrics, _ logr.Logger, _ string) (venaficlient.Interface, error) { return &fakevenaficlient.Venafi{ - RequestCertificateFn: func(_ []byte, _ []venafiapi.CustomField) (string, error) { + RequestCertificateFn: func(_ []byte, _ time.Duration, _ []venafiapi.CustomField) (string, error) { return "test-pickup-id", nil }, }, nil @@ -594,7 +595,7 @@ func TestProcessItem(t *testing.T) { ), clientBuilder: func(_ string, _ internalinformers.SecretLister, _ cmapi.GenericIssuer, _ *metrics.Metrics, _ logr.Logger, _ string) (venaficlient.Interface, error) { return &fakevenaficlient.Venafi{ - RetrieveCertificateFn: func(_ string, _ []byte, _ []venafiapi.CustomField) ([]byte, error) { + RetrieveCertificateFn: func(_ string, _ []byte, _ time.Duration, _ []venafiapi.CustomField) ([]byte, error) { return nil, endpoint.ErrCertificatePending{} }, }, nil @@ -645,7 +646,7 @@ func TestProcessItem(t *testing.T) { ), clientBuilder: func(_ string, _ internalinformers.SecretLister, _ cmapi.GenericIssuer, _ *metrics.Metrics, _ logr.Logger, _ string) (venaficlient.Interface, error) { return &fakevenaficlient.Venafi{ - RetrieveCertificateFn: func(_ string, _ []byte, _ []venafiapi.CustomField) ([]byte, error) { + RetrieveCertificateFn: func(_ string, _ []byte, _ time.Duration, _ []venafiapi.CustomField) ([]byte, error) { return nil, endpoint.ErrRetrieveCertificateTimeout{} }, }, nil @@ -696,7 +697,7 @@ func TestProcessItem(t *testing.T) { ), clientBuilder: func(_ string, _ internalinformers.SecretLister, _ cmapi.GenericIssuer, _ *metrics.Metrics, _ logr.Logger, _ string) (venaficlient.Interface, error) { return &fakevenaficlient.Venafi{ - RetrieveCertificateFn: func(_ string, _ []byte, _ []venafiapi.CustomField) ([]byte, error) { + RetrieveCertificateFn: func(_ string, _ []byte, _ time.Duration, _ []venafiapi.CustomField) ([]byte, error) { return nil, errors.New("generic error") }, }, nil @@ -747,7 +748,7 @@ func TestProcessItem(t *testing.T) { ), clientBuilder: func(_ string, _ internalinformers.SecretLister, _ cmapi.GenericIssuer, _ *metrics.Metrics, _ logr.Logger, _ string) (venaficlient.Interface, error) { return &fakevenaficlient.Venafi{ - RetrieveCertificateFn: func(_ string, _ []byte, _ []venafiapi.CustomField) ([]byte, error) { + RetrieveCertificateFn: func(_ string, _ []byte, _ time.Duration, _ []venafiapi.CustomField) ([]byte, error) { return []byte("garbage"), nil }, }, nil @@ -820,7 +821,7 @@ func TestProcessItem(t *testing.T) { ), clientBuilder: func(_ string, _ internalinformers.SecretLister, _ cmapi.GenericIssuer, _ *metrics.Metrics, _ logr.Logger, _ string) (venaficlient.Interface, error) { return &fakevenaficlient.Venafi{ - RetrieveCertificateFn: func(_ string, _ []byte, _ []venafiapi.CustomField) ([]byte, error) { + RetrieveCertificateFn: func(_ string, _ []byte, _ time.Duration, _ []venafiapi.CustomField) ([]byte, error) { return []byte(fmt.Sprintf("%s%s", certBundle.ChainPEM, certBundle.CAPEM)), nil }, }, nil @@ -907,10 +908,14 @@ func TestProcessItem(t *testing.T) { apiutil.IssuerVenafi, func(*controllerpkg.Context) certificatesigningrequests.Signer { return venafi }, ) - controller.Register(test.builder.Context) + if _, _, err := controller.Register(test.builder.Context); err != nil { + t.Fatal(err) + } test.builder.Start() - err := controller.ProcessItem(context.Background(), test.csr.Name) + err := controller.ProcessItem(context.Background(), types.NamespacedName{ + Name: test.csr.Name, + }) if err != nil && !test.expectedErr { t.Errorf("expected to not get an error, but got: %v", err) } diff --git a/pkg/controller/clusterissuers/checks.go b/pkg/controller/clusterissuers/checks.go index fcd4ceda00c..092b036c384 100644 --- a/pkg/controller/clusterissuers/checks.go +++ b/pkg/controller/clusterissuers/checks.go @@ -29,7 +29,7 @@ func (c *controller) issuersForSecret(secret *corev1.Secret) ([]*v1.ClusterIssue issuers, err := c.clusterIssuerLister.List(labels.NewSelector()) if err != nil { - return nil, fmt.Errorf("error listing certificates: %s", err.Error()) + return nil, fmt.Errorf("error listing issuers: %s", err.Error()) } var affected []*v1.ClusterIssuer @@ -60,6 +60,12 @@ func (c *controller) issuersForSecret(secret *corev1.Secret) ([]*v1.ClusterIssue affected = append(affected, iss) continue } + if iss.Spec.Venafi.TPP.CABundleSecretRef != nil { + if iss.Spec.Venafi.TPP.CABundleSecretRef.Name == secret.Name { + affected = append(affected, iss) + continue + } + } } if iss.Spec.Venafi.Cloud != nil { if iss.Spec.Venafi.Cloud.APITokenSecretRef.Name == secret.Name { diff --git a/pkg/controller/clusterissuers/controller.go b/pkg/controller/clusterissuers/controller.go index 1f57e6632fd..9749dc441b0 100644 --- a/pkg/controller/clusterissuers/controller.go +++ b/pkg/controller/clusterissuers/controller.go @@ -18,9 +18,11 @@ package clusterissuers import ( "context" + "fmt" "github.com/go-logr/logr" k8sErrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/workqueue" @@ -39,7 +41,7 @@ type controller struct { // maintain a reference to the workqueue for this controller // so the handleOwnedResource method can enqueue resources - queue workqueue.RateLimitingInterface + queue workqueue.TypedRateLimitingInterface[types.NamespacedName] // logger to be used by this controller log logr.Logger @@ -65,12 +67,17 @@ type controller struct { // Register registers and constructs the controller using the provided context. // It returns the workqueue to be used to enqueue items, a list of // InformerSynced functions that must be synced, or an error. -func (c *controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitingInterface, []cache.InformerSynced, error) { +func (c *controller) Register(ctx *controllerpkg.Context) (workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { // construct a new named logger to be reused throughout the controller c.log = logf.FromContext(ctx.RootContext, ControllerName) // create a queue used to queue up items to be processed - c.queue = workqueue.NewNamedRateLimitingQueue(controllerpkg.DefaultItemBasedRateLimiter(), ControllerName) + c.queue = workqueue.NewTypedRateLimitingQueueWithConfig( + controllerpkg.DefaultItemBasedRateLimiter(), + workqueue.TypedRateLimitingQueueConfig[types.NamespacedName]{ + Name: ControllerName, + }, + ) // obtain references to all the informers used by this controller clusterIssuerInformer := ctx.SharedInformerFactory.Certmanager().V1().ClusterIssuers() @@ -87,8 +94,12 @@ func (c *controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitin c.secretLister = secretInformer.Lister() // register handler functions - clusterIssuerInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: c.queue}) - secretInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{WorkFunc: c.secretDeleted}) + if _, err := clusterIssuerInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: c.queue}); err != nil { + return nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } + if _, err := secretInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{WorkFunc: c.secretDeleted}); err != nil { + return nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } // instantiate additional helpers used by this controller c.issuerFactory = issuer.NewFactory(ctx) @@ -117,24 +128,17 @@ func (c *controller) secretDeleted(obj interface{}) { return } for _, iss := range issuers { - log := logf.WithRelatedResource(log, iss) - key, err := keyFunc(iss) - if err != nil { - log.Error(err, "error computing key for resource") - continue - } - c.queue.AddRateLimited(key) + c.queue.AddRateLimited(types.NamespacedName{ + Name: iss.Name, + Namespace: iss.Namespace, + }) } } -func (c *controller) ProcessItem(ctx context.Context, key string) error { +func (c *controller) ProcessItem(ctx context.Context, key types.NamespacedName) error { log := logf.FromContext(ctx) - _, name, err := cache.SplitMetaNamespaceKey(key) - if err != nil { - log.Error(nil, "invalid resource key") - return nil - } + name := key.Name issuer, err := c.clusterIssuerLister.Get(name) if err != nil { @@ -150,8 +154,6 @@ func (c *controller) ProcessItem(ctx context.Context, key string) error { return c.Sync(ctx, issuer) } -var keyFunc = controllerpkg.KeyFunc - const ( // ControllerName is the name of the ClusterIssuers controller. ControllerName = "clusterissuers" diff --git a/pkg/controller/context.go b/pkg/controller/context.go index d197bbae273..fa63242e803 100644 --- a/pkg/controller/context.go +++ b/pkg/controller/context.go @@ -30,6 +30,7 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/selection" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/discovery" "k8s.io/client-go/kubernetes" kscheme "k8s.io/client-go/kubernetes/scheme" @@ -240,7 +241,7 @@ type SchedulerOptions struct { MaxConcurrentChallenges int } -// ContextFactory is used for constructing new Contexts who's clients have been +// ContextFactory is used for constructing new Contexts whose clients have been // configured with a User Agent built from the component name. type ContextFactory struct { // baseRestConfig is the base Kubernetes REST config that can authenticate to @@ -325,15 +326,15 @@ func NewContextFactory(ctx context.Context, opts ContextOptions) (*ContextFactor }, nil } -// Build builds a new controller Context who's clients have a User Agent +// Build builds a new controller Context whose clients have a User Agent // derived from the optional component name. func (c *ContextFactory) Build(component ...string) (*Context, error) { restConfig := util.RestConfigWithUserAgent(c.baseRestConfig, component...) scheme := runtime.NewScheme() - kscheme.AddToScheme(scheme) - cmscheme.AddToScheme(scheme) - gwscheme.AddToScheme(scheme) + utilruntime.Must(kscheme.AddToScheme(scheme)) + utilruntime.Must(cmscheme.AddToScheme(scheme)) + utilruntime.Must(gwscheme.AddToScheme(scheme)) clients, err := buildClients(restConfig, c.ctx.ContextOptions) if err != nil { diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index 21132d389e0..63ca81d996f 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -23,6 +23,7 @@ import ( "sync" "time" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" "k8s.io/client-go/tools/cache" @@ -40,17 +41,17 @@ type runDurationFunc struct { } type queueingController interface { - Register(*Context) (workqueue.RateLimitingInterface, []cache.InformerSynced, error) - ProcessItem(ctx context.Context, key string) error + Register(*Context) (workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) + ProcessItem(ctx context.Context, key types.NamespacedName) error } func NewController( name string, metrics *metrics.Metrics, - syncFunc func(ctx context.Context, key string) error, + syncFunc func(ctx context.Context, key types.NamespacedName) error, mustSync []cache.InformerSynced, runDurationFuncs []runDurationFunc, - queue workqueue.RateLimitingInterface, + queue workqueue.TypedRateLimitingInterface[types.NamespacedName], ) Interface { return &controller{ name: name, @@ -68,7 +69,7 @@ type controller struct { // the function that should be called when an item is popped // off the workqueue - syncHandler func(ctx context.Context, key string) error + syncHandler func(ctx context.Context, key types.NamespacedName) error // mustSync is a slice of informers that must have synced before // this controller can start @@ -82,7 +83,7 @@ type controller struct { // queue is a reference to the queue used to enqueue resources // to be processed - queue workqueue.RateLimitingInterface + queue workqueue.TypedRateLimitingInterface[types.NamespacedName] // metrics is used to expose Prometheus, shared by all controllers metrics *metrics.Metrics @@ -114,7 +115,6 @@ func (c *controller) Run(workers int, ctx context.Context) error { } for _, f := range c.runDurationFuncs { - f := f // capture range variable go wait.Until(func() { f.fn(ctx) }, f.duration, ctx.Done()) } @@ -137,21 +137,16 @@ func (c *controller) worker(ctx context.Context) { break } - var key string // use an inlined function so we can use defer func() { defer c.queue.Done(obj) - var ok bool - if key, ok = obj.(string); !ok { - return - } - log := log.WithValues("key", key) + log.V(logf.DebugLevel).Info("syncing item") // Increase sync count for this controller c.metrics.IncrementSyncCallCount(c.name) - err := c.syncHandler(ctx, key) + err := c.syncHandler(ctx, obj) if err != nil { if strings.Contains(err.Error(), genericregistry.OptimisticLockErrorMsg) { log.Info("re-queuing item due to optimistic locking on resource", "error", err.Error()) diff --git a/pkg/controller/helper.go b/pkg/controller/helper.go index 3a04445c898..b25de1e423a 100644 --- a/pkg/controller/helper.go +++ b/pkg/controller/helper.go @@ -18,6 +18,7 @@ package controller import ( cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" + cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" ) // ResourceNamespace returns the Kubernetes namespace where resources @@ -30,6 +31,21 @@ func (o IssuerOptions) ResourceNamespace(iss cmapi.GenericIssuer) string { return ns } +// ResourceNamespaceRef returns the Kubernetes namespace where resources +// created or read by the referenced issuer are located. +// This function is identical to CanUseAmbientCredentials, but takes a reference to +// the issuer instead of the issuer itself (which means we don't need to fetch the +// issuer from the API server). +func (o IssuerOptions) ResourceNamespaceRef(ref cmmeta.ObjectReference, challengeNamespace string) string { + switch ref.Kind { + case cmapi.ClusterIssuerKind: + return o.ClusterResourceNamespace + case "", cmapi.IssuerKind: + return challengeNamespace + } + return challengeNamespace // Should not be reached +} + // CanUseAmbientCredentials returns whether `iss` will attempt to configure itself // from ambient credentials (e.g. from a cloud metadata service). func (o IssuerOptions) CanUseAmbientCredentials(iss cmapi.GenericIssuer) bool { @@ -41,3 +57,18 @@ func (o IssuerOptions) CanUseAmbientCredentials(iss cmapi.GenericIssuer) bool { } return false } + +// CanUseAmbientCredentialsFromRef returns whether the referenced issuer will attempt +// to configure itself from ambient credentials (e.g. from a cloud metadata service). +// This function is identical to CanUseAmbientCredentials, but takes a reference to +// the issuer instead of the issuer itself (which means we don't need to fetch the +// issuer from the API server). +func (o IssuerOptions) CanUseAmbientCredentialsFromRef(ref cmmeta.ObjectReference) bool { + switch ref.Kind { + case cmapi.ClusterIssuerKind: + return o.ClusterIssuerAmbientCredentials + case "", cmapi.IssuerKind: + return o.IssuerAmbientCredentials + } + return false +} diff --git a/pkg/controller/issuers/checks.go b/pkg/controller/issuers/checks.go index 8414ae0ac89..8f03e658caf 100644 --- a/pkg/controller/issuers/checks.go +++ b/pkg/controller/issuers/checks.go @@ -29,7 +29,7 @@ func (c *controller) issuersForSecret(secret *corev1.Secret) ([]*v1.Issuer, erro issuers, err := c.issuerLister.List(labels.NewSelector()) if err != nil { - return nil, fmt.Errorf("error listing certificates: %s", err.Error()) + return nil, fmt.Errorf("error listing issuers: %s", err.Error()) } var affected []*v1.Issuer @@ -62,6 +62,12 @@ func (c *controller) issuersForSecret(secret *corev1.Secret) ([]*v1.Issuer, erro affected = append(affected, iss) continue } + if iss.Spec.Venafi.TPP.CABundleSecretRef != nil { + if iss.Spec.Venafi.TPP.CABundleSecretRef.Name == secret.Name { + affected = append(affected, iss) + continue + } + } } if iss.Spec.Venafi.Cloud != nil { if iss.Spec.Venafi.Cloud.APITokenSecretRef.Name == secret.Name { diff --git a/pkg/controller/issuers/controller.go b/pkg/controller/issuers/controller.go index 0800e8288b5..c7370746902 100644 --- a/pkg/controller/issuers/controller.go +++ b/pkg/controller/issuers/controller.go @@ -18,9 +18,11 @@ package issuers import ( "context" + "fmt" "github.com/go-logr/logr" k8sErrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/workqueue" @@ -39,7 +41,7 @@ type controller struct { // maintain a reference to the workqueue for this controller // so the handleOwnedResource method can enqueue resources - queue workqueue.RateLimitingInterface + queue workqueue.TypedRateLimitingInterface[types.NamespacedName] // logger to be used by this controller log logr.Logger @@ -61,12 +63,17 @@ type controller struct { // Register registers and constructs the controller using the provided context. // It returns the workqueue to be used to enqueue items, a list of // InformerSynced functions that must be synced, or an error. -func (c *controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitingInterface, []cache.InformerSynced, error) { +func (c *controller) Register(ctx *controllerpkg.Context) (workqueue.TypedRateLimitingInterface[types.NamespacedName], []cache.InformerSynced, error) { // construct a new named logger to be reused throughout the controller c.log = logf.FromContext(ctx.RootContext, ControllerName) // create a queue used to queue up items to be processed - c.queue = workqueue.NewNamedRateLimitingQueue(controllerpkg.DefaultItemBasedRateLimiter(), ControllerName) + c.queue = workqueue.NewTypedRateLimitingQueueWithConfig( + controllerpkg.DefaultItemBasedRateLimiter(), + workqueue.TypedRateLimitingQueueConfig[types.NamespacedName]{ + Name: ControllerName, + }, + ) // obtain references to all the informers used by this controller issuerInformer := ctx.SharedInformerFactory.Certmanager().V1().Issuers() @@ -83,8 +90,12 @@ func (c *controller) Register(ctx *controllerpkg.Context) (workqueue.RateLimitin c.secretLister = secretInformer.Lister() // register handler functions - issuerInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: c.queue}) - secretInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{WorkFunc: c.secretDeleted}) + if _, err := issuerInformer.Informer().AddEventHandler(&controllerpkg.QueuingEventHandler{Queue: c.queue}); err != nil { + return nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } + if _, err := secretInformer.Informer().AddEventHandler(&controllerpkg.BlockingEventHandler{WorkFunc: c.secretDeleted}); err != nil { + return nil, nil, fmt.Errorf("error setting up event handler: %v", err) + } // instantiate additional helpers used by this controller c.issuerFactory = issuer.NewFactory(ctx) @@ -111,22 +122,16 @@ func (c *controller) secretDeleted(obj interface{}) { return } for _, iss := range issuers { - key, err := keyFunc(iss) - if err != nil { - log.Error(err, "error computing key for resource") - continue - } - c.queue.AddRateLimited(key) + c.queue.AddRateLimited(types.NamespacedName{ + Name: iss.Name, + Namespace: iss.Namespace, + }) } } -func (c *controller) ProcessItem(ctx context.Context, key string) error { +func (c *controller) ProcessItem(ctx context.Context, key types.NamespacedName) error { log := logf.FromContext(ctx) - namespace, name, err := cache.SplitMetaNamespaceKey(key) - if err != nil { - log.Error(err, "invalid resource key") - return nil - } + namespace, name := key.Namespace, key.Name issuer, err := c.issuerLister.Issuers(namespace).Get(name) if err != nil { @@ -142,8 +147,6 @@ func (c *controller) ProcessItem(ctx context.Context, key string) error { return c.Sync(ctx, issuer) } -var keyFunc = controllerpkg.KeyFunc - const ( ControllerName = "issuers" ) diff --git a/pkg/controller/test/context_builder.go b/pkg/controller/test/context_builder.go index 918effc68d9..9754192e8c9 100644 --- a/pkg/controller/test/context_builder.go +++ b/pkg/controller/test/context_builder.go @@ -20,6 +20,7 @@ import ( "context" "flag" "fmt" + "slices" "testing" "time" @@ -113,15 +114,19 @@ const informerResyncPeriod = time.Second // for any unset fields. func (b *Builder) Init() { if b.Context == nil { - b.Context = &controller.Context{ - RootContext: context.Background(), - } + b.Context = &controller.Context{} + } + if b.Context.RootContext == nil { + b.Context.RootContext = context.Background() } if b.StringGenerator == nil { b.StringGenerator = rand.String } scheme := metadatafake.NewTestScheme() - metav1.AddMetaToScheme(scheme) + if err := metav1.AddMetaToScheme(scheme); err != nil { + b.T.Fatalf("error adding meta to scheme: %v", err) + } + b.ACMEOptions.ACMEHTTP01SolverRunAsNonRoot = true // default from cmd/controller/app/options/options.go b.Client = kubefake.NewSimpleClientset(b.KubeObjects...) b.CMClient = cmfake.NewSimpleClientset(b.CertManagerObjects...) b.GWClient = gwfake.NewSimpleClientset(b.GWObjects...) @@ -213,10 +218,10 @@ func (b *Builder) FakeDiscoveryClient() *discoveryfake.Discovery { func (b *Builder) CheckAndFinish(args ...interface{}) { defer b.Stop() if err := b.AllActionsExecuted(); err != nil { - b.T.Errorf(err.Error()) + b.T.Error(err) } if err := b.AllEventsCalled(); err != nil { - b.T.Errorf(err.Error()) + b.T.Error(err) } // resync listers before running checks @@ -245,8 +250,7 @@ func (b *Builder) AllActionsExecuted() error { var unexpectedActions []coretesting.Action var errs []error - missingActions := make([]Action, len(b.ExpectedActions)) - copy(missingActions, b.ExpectedActions) + missingActions := slices.Clone(b.ExpectedActions) for _, a := range firedActions { // skip list and watch actions if a.GetVerb() == "list" || a.GetVerb() == "watch" { diff --git a/pkg/controller/util.go b/pkg/controller/util.go index d0dd6c66b27..8cef8c0b994 100644 --- a/pkg/controller/util.go +++ b/pkg/controller/util.go @@ -26,6 +26,7 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" @@ -33,21 +34,33 @@ import ( logf "github.com/cert-manager/cert-manager/pkg/logs" ) -// KeyFunc creates a key for an API object. The key can be passed to a -// worker function that processes an object from a queue such as -// ProcessItem. -var KeyFunc = cache.DeletionHandlingMetaNamespaceKeyFunc - // DefaultItemBasedRateLimiter returns a new rate limiter with base delay of 5 // seconds, max delay of 5 minutes. -func DefaultItemBasedRateLimiter() workqueue.RateLimiter { - return workqueue.NewItemExponentialFailureRateLimiter(time.Second*5, time.Minute*5) +func DefaultItemBasedRateLimiter() workqueue.TypedRateLimiter[types.NamespacedName] { + return workqueue.NewTypedItemExponentialFailureRateLimiter[types.NamespacedName](time.Second*5, time.Minute*5) +} + +// DefaultCertificateRateLimiter returns a new rate limiter with base delay of 1 +// seconds, max delay of 30 seconds. +func DefaultCertificateRateLimiter() workqueue.TypedRateLimiter[types.NamespacedName] { + return workqueue.NewTypedItemExponentialFailureRateLimiter[types.NamespacedName](time.Second*1, time.Second*30) +} + +// DefaultCertificateRateLimiter returns a new rate limiter with base delay of 5 +// seconds, max delay of 30 minutes. +func DefaultACMERateLimiter() workqueue.TypedRateLimiter[types.NamespacedName] { + return workqueue.NewTypedItemExponentialFailureRateLimiter[types.NamespacedName](time.Second*5, time.Minute*30) } -// HandleOwnedResourceNamespacedFunc returns a function thataccepts a +// HandleOwnedResourceNamespacedFunc returns a function that accepts a // Kubernetes object and adds its owner references to the workqueue. // https://kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/#owners-and-dependents -func HandleOwnedResourceNamespacedFunc(log logr.Logger, queue workqueue.RateLimitingInterface, ownerGVK schema.GroupVersionKind, get func(namespace, name string) (interface{}, error)) func(obj interface{}) { +func HandleOwnedResourceNamespacedFunc[T metav1.Object]( + log logr.Logger, + queue workqueue.TypedRateLimitingInterface[types.NamespacedName], + ownerGVK schema.GroupVersionKind, + get func(namespace, name string) (T, error), +) func(obj interface{}) { return func(obj interface{}) { log := log.WithName("handleOwnedResource") @@ -87,12 +100,10 @@ func HandleOwnedResourceNamespacedFunc(log logr.Logger, queue workqueue.RateLimi log.Error(err, "error getting referenced owning resource from cache") continue } - objKey, err := KeyFunc(obj) - if err != nil { - log.Error(err, "error computing key for resource") - continue - } - queue.Add(objKey) + queue.Add(types.NamespacedName{ + Name: obj.GetName(), + Namespace: obj.GetNamespace(), + }) } } } @@ -101,17 +112,20 @@ func HandleOwnedResourceNamespacedFunc(log logr.Logger, queue workqueue.RateLimi // QueuingEventHandler is an implementation of cache.ResourceEventHandler that // simply queues objects that are added/updated/deleted. type QueuingEventHandler struct { - Queue workqueue.RateLimitingInterface + Queue workqueue.TypedRateLimitingInterface[types.NamespacedName] } // Enqueue adds a key for an object to the workqueue. func (q *QueuingEventHandler) Enqueue(obj interface{}) { - key, err := KeyFunc(obj) + objectName, err := cache.DeletionHandlingObjectToName(obj) if err != nil { runtime.HandleError(err) return } - q.Queue.Add(key) + q.Queue.Add(types.NamespacedName{ + Name: objectName.Name, + Namespace: objectName.Namespace, + }) } // OnAdd adds a newly created object to the workqueue. diff --git a/pkg/ctl/scheme.go b/pkg/ctl/scheme.go deleted file mode 100644 index 015ca5182a6..00000000000 --- a/pkg/ctl/scheme.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -Copyright 2020 The cert-manager 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 ctl was created to have a scheme that has the internal cert-manager types, -// and their conversion functions as well as the List object type registered, which is needed for ctl command like -// `convert` or `create certificaterequest`. - -package ctl - -import ( - corev1 "k8s.io/api/core/v1" - metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/conversion" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - kscheme "k8s.io/client-go/kubernetes/scheme" - - acmeinstall "github.com/cert-manager/cert-manager/internal/apis/acme/install" - cminstall "github.com/cert-manager/cert-manager/internal/apis/certmanager/install" - metainstall "github.com/cert-manager/cert-manager/internal/apis/meta/install" -) - -// Define a Scheme that has all cert-manager API types registered, including -// the internal API version, defaulting functions and conversion functions for -// all external versions. - -var ( - // Scheme is a Kubernetes runtime.Scheme with all internal and external API - // versions for cert-manager types registered. - Scheme = runtime.NewScheme() -) - -func init() { - cminstall.Install(Scheme) - acmeinstall.Install(Scheme) - metainstall.Install(Scheme) - - // This is used to add the List object type - listGroupVersion := schema.GroupVersionKind{Group: "", Version: runtime.APIVersionInternal, Kind: "List"} - Scheme.AddKnownTypeWithName(listGroupVersion, &metainternalversion.List{}) - metav1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - - utilruntime.Must(kscheme.AddToScheme(Scheme)) - utilruntime.Must(metainternalversion.AddToScheme(Scheme)) - - // Adds the conversion between internalmeta.List and corev1.List - _ = Scheme.AddConversionFunc((*corev1.List)(nil), (*metainternalversion.List)(nil), func(a, b interface{}, scope conversion.Scope) error { - metaList := &metav1.List{} - metaList.Items = a.(*corev1.List).Items - return metainternalversion.Convert_v1_List_To_internalversion_List(metaList, b.(*metainternalversion.List), scope) - }) - - _ = Scheme.AddConversionFunc((*metainternalversion.List)(nil), (*corev1.List)(nil), func(a, b interface{}, scope conversion.Scope) error { - metaList := &metav1.List{} - err := metainternalversion.Convert_internalversion_List_To_v1_List(a.(*metainternalversion.List), metaList, scope) - if err != nil { - return err - } - b.(*corev1.List).Items = metaList.Items - return nil - }) -} diff --git a/pkg/healthz/healthz_test.go b/pkg/healthz/healthz_test.go index c583a049fd4..877448b0106 100644 --- a/pkg/healthz/healthz_test.go +++ b/pkg/healthz/healthz_test.go @@ -189,7 +189,6 @@ func TestHealthzLivezLeaderElection(t *testing.T) { } for _, tc := range tests { - tc := tc t.Run(tc.name, func(t *testing.T) { t.Parallel() log, ctx := ktesting.NewTestContext(t) diff --git a/pkg/issuer/acme/dns/akamai/akamai_test.go b/pkg/issuer/acme/dns/akamai/akamai_test.go index e66cdf98b90..f15d39c9b9c 100644 --- a/pkg/issuer/acme/dns/akamai/akamai_test.go +++ b/pkg/issuer/acme/dns/akamai/akamai_test.go @@ -48,7 +48,7 @@ func testRecordBodyDataExist() *dns.RecordBody { } } -// OpenEdggrid DNS Stub +// OpenEdgegrid DNS Stub type StubOpenDNSConfig struct { FuncOutput map[string]interface{} FuncErrors map[string]error @@ -74,7 +74,7 @@ func TestNewDNSProvider(t *testing.T) { akamai, err := NewDNSProvider("akamai.example.com", "token", "secret", "access-token", util.RecursiveNameservers) assert.NoError(t, err) - // samplee couple important fields + // sample couple important fields assert.Equal(t, akamai.serviceConsumerDomain, "akamai.example.com") assert.Equal(t, fmt.Sprintf("%T", akamai.dnsclient), "*akamai.OpenDNSConfig") @@ -316,7 +316,7 @@ func (o StubOpenDNSConfig) GetRecord(zone string, name string, recordType string return nil, fmt.Errorf("GetRecord: Unexpected nil") } rec = exp.(*dns.RecordBody) - // comare passed with expected + // compare passed with expected if name != rec.Name { return nil, fmt.Errorf("GetRecord: expected/actual Name don't match") } @@ -333,7 +333,7 @@ func (o StubOpenDNSConfig) RecordSave(rec *dns.RecordBody, zone string) error { exp, ok := o.FuncOutput["RecordSave"] if ok { - // comare passed with expected + // compare passed with expected if rec.Name != exp.(*dns.RecordBody).Name { return fmt.Errorf("RecordSave: expected/actual Name don't match") } @@ -360,7 +360,7 @@ func (o StubOpenDNSConfig) RecordUpdate(rec *dns.RecordBody, zone string) error exp, ok := o.FuncOutput["RecordUpdate"] if ok { - // comare passed with expected + // compare passed with expected if rec.Name != exp.(*dns.RecordBody).Name { return fmt.Errorf("RecordUpdate: expected/actual Name don't match") } @@ -386,7 +386,7 @@ func (o StubOpenDNSConfig) RecordDelete(rec *dns.RecordBody, zone string) error exp, ok := o.FuncOutput["RecordDelete"] if ok { - // comare passed with expected + // compare passed with expected if rec.Name != exp.(*dns.RecordBody).Name { return fmt.Errorf("RecordDelete: expected/actual Name don't match") } diff --git a/pkg/issuer/acme/dns/azuredns/azuredns.go b/pkg/issuer/acme/dns/azuredns/azuredns.go index 7fedb0cbd46..c902734a4cf 100644 --- a/pkg/issuer/acme/dns/azuredns/azuredns.go +++ b/pkg/issuer/acme/dns/azuredns/azuredns.go @@ -271,7 +271,7 @@ func (c *DNSProvider) updateTXTRecord(ctx context.Context, fqdn string, updater // is the same to avoid spurious challenge updates. // // The given error must not be nil. This function must be called everywhere -// we have a non-nil error coming from a azure-sdk func that makes API calls. +// we have a non-nil error coming from an azure-sdk func that makes API calls. func stabilizeError(err error) error { if err == nil { return nil diff --git a/pkg/issuer/acme/dns/dns.go b/pkg/issuer/acme/dns/dns.go index a59af8d49cc..1514f24c44b 100644 --- a/pkg/issuer/acme/dns/dns.go +++ b/pkg/issuer/acme/dns/dns.go @@ -82,7 +82,7 @@ func (s *Solver) Present(ctx context.Context, issuer v1.GenericIssuer, ch *cmacm log := logf.WithResource(logf.FromContext(ctx, "Present"), ch).WithValues("domain", ch.Spec.DNSName) ctx = logf.NewContext(ctx, log) - webhookSolver, req, err := s.prepareChallengeRequest(ctx, issuer, ch) + webhookSolver, req, err := s.prepareChallengeRequest(ctx, ch) if err != nil && err != errNotFound { return err } @@ -91,7 +91,7 @@ func (s *Solver) Present(ctx context.Context, issuer v1.GenericIssuer, ch *cmacm return webhookSolver.Present(req) } - slv, providerConfig, err := s.solverForChallenge(ctx, issuer, ch) + slv, providerConfig, err := s.solverForChallenge(ctx, ch) if err != nil { return err } @@ -137,11 +137,11 @@ func (s *Solver) Check(ctx context.Context, issuer v1.GenericIssuer, ch *cmacme. // CleanUp removes DNS records which are no longer needed after // certificate issuance. -func (s *Solver) CleanUp(ctx context.Context, issuer v1.GenericIssuer, ch *cmacme.Challenge) error { +func (s *Solver) CleanUp(ctx context.Context, ch *cmacme.Challenge) error { log := logf.WithResource(logf.FromContext(ctx, "CleanUp"), ch).WithValues("domain", ch.Spec.DNSName) ctx = logf.NewContext(ctx, log) - webhookSolver, req, err := s.prepareChallengeRequest(ctx, issuer, ch) + webhookSolver, req, err := s.prepareChallengeRequest(ctx, ch) if err != nil && err != errNotFound { return err } @@ -150,7 +150,7 @@ func (s *Solver) CleanUp(ctx context.Context, issuer v1.GenericIssuer, ch *cmacm return webhookSolver.CleanUp(req) } - slv, providerConfig, err := s.solverForChallenge(ctx, issuer, ch) + slv, providerConfig, err := s.solverForChallenge(ctx, ch) if err != nil { return err } @@ -178,12 +178,12 @@ func extractChallengeSolverConfig(ch *cmacme.Challenge) (*cmacme.ACMEChallengeSo // solverForChallenge returns a Solver for the given providerName. // The providerName is the name of an ACME DNS-01 challenge provider as // specified on the Issuer resource for the Solver. -func (s *Solver) solverForChallenge(ctx context.Context, issuer v1.GenericIssuer, ch *cmacme.Challenge) (solver, *cmacme.ACMEChallengeSolverDNS01, error) { +func (s *Solver) solverForChallenge(ctx context.Context, ch *cmacme.Challenge) (solver, *cmacme.ACMEChallengeSolverDNS01, error) { log := logf.FromContext(ctx, "solverForChallenge") dbg := log.V(logf.DebugLevel) - resourceNamespace := s.ResourceNamespace(issuer) - canUseAmbientCredentials := s.CanUseAmbientCredentials(issuer) + resourceNamespace := s.ResourceNamespaceRef(ch.Spec.IssuerRef, ch.Namespace) + canUseAmbientCredentials := s.CanUseAmbientCredentialsFromRef(ch.Spec.IssuerRef) providerConfig, err := extractChallengeSolverConfig(ch) if err != nil { @@ -239,7 +239,7 @@ func (s *Solver) solverForChallenge(ctx context.Context, issuer v1.GenericIssuer } // attempt to construct the cloud dns provider - impl, err = s.dnsProviderConstructors.cloudDNS(ctx, providerConfig.CloudDNS.Project, keyData, s.DNS01Nameservers, s.CanUseAmbientCredentials(issuer), providerConfig.CloudDNS.HostedZoneName) + impl, err = s.dnsProviderConstructors.cloudDNS(ctx, providerConfig.CloudDNS.Project, keyData, s.DNS01Nameservers, s.CanUseAmbientCredentialsFromRef(ch.Spec.IssuerRef), providerConfig.CloudDNS.HostedZoneName) if err != nil { return nil, nil, fmt.Errorf("error instantiating google clouddns challenge solver: %s", err) } @@ -440,7 +440,7 @@ func (s *Solver) solverForChallenge(ctx context.Context, issuer v1.GenericIssuer return impl, providerConfig, nil } -func (s *Solver) prepareChallengeRequest(ctx context.Context, issuer v1.GenericIssuer, ch *cmacme.Challenge) (webhook.Solver, *whapi.ChallengeRequest, error) { +func (s *Solver) prepareChallengeRequest(ctx context.Context, ch *cmacme.Challenge) (webhook.Solver, *whapi.ChallengeRequest, error) { dns01Config, err := extractChallengeSolverConfig(ch) if err != nil { return nil, nil, err @@ -461,8 +461,8 @@ func (s *Solver) prepareChallengeRequest(ctx context.Context, issuer v1.GenericI return nil, nil, err } - resourceNamespace := s.ResourceNamespace(issuer) - canUseAmbientCredentials := s.CanUseAmbientCredentials(issuer) + resourceNamespace := s.ResourceNamespaceRef(ch.Spec.IssuerRef, ch.Namespace) + canUseAmbientCredentials := s.CanUseAmbientCredentialsFromRef(ch.Spec.IssuerRef) // construct a ChallengeRequest which can be passed to DNS solvers. // The provided config will be encoded to JSON in order to avoid a coupling diff --git a/pkg/issuer/acme/dns/dns_test.go b/pkg/issuer/acme/dns/dns_test.go index 81aba151301..0f5dccad929 100644 --- a/pkg/issuer/acme/dns/dns_test.go +++ b/pkg/issuer/acme/dns/dns_test.go @@ -27,7 +27,6 @@ import ( "k8s.io/client-go/rest" cmacme "github.com/cert-manager/cert-manager/pkg/apis/acme/v1" - v1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" "github.com/cert-manager/cert-manager/pkg/controller" "github.com/cert-manager/cert-manager/pkg/controller/test" @@ -36,29 +35,79 @@ import ( "github.com/cert-manager/cert-manager/pkg/issuer/acme/dns/util" ) -func newIssuer() *v1.Issuer { - return &v1.Issuer{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test", - Namespace: "default", - }, - Spec: v1.IssuerSpec{ - IssuerConfig: v1.IssuerConfig{ - ACME: &cmacme.ACMEIssuer{}, - }, - }, - } -} +const ( + fakeIssuerNamespace = "fake-issuer-namespace" + fakeClusterIssuerResourceNamespace = "fake-cluster-resource-namespace" +) -func newSecret(name string, data map[string][]byte) *corev1.Secret { +func newSecret(name string, data map[string][]byte, namespace string) *corev1.Secret { return &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ Name: name, - Namespace: "default", + Namespace: namespace, }, Data: data, } } + +func TestClusterIssuerNamespace(t *testing.T) { + f := &solverFixture{ + Builder: &test.Builder{ + KubeObjects: []runtime.Object{ + newSecret( + "route53", + map[string][]byte{ + "secret": []byte("AKIENDINNEWLINE \n"), + }, + fakeClusterIssuerResourceNamespace, // since this is a ClusterIssuer, the secret should be in the clusterResourceNamespace + ), + }, + Context: &controller.Context{ + ContextOptions: controller.ContextOptions{ + IssuerOptions: controller.IssuerOptions{ + ClusterResourceNamespace: fakeClusterIssuerResourceNamespace, + }, + }, + }, + }, + Challenge: &cmacme.Challenge{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "random-certificate-namespace", // Random namespace in which the Certificate and Challenge live + }, + Spec: cmacme.ChallengeSpec{ + Solver: cmacme.ACMEChallengeSolver{ + DNS01: &cmacme.ACMEChallengeSolverDNS01{ + Route53: &cmacme.ACMEIssuerDNS01ProviderRoute53{ + AccessKeyID: " test_with_spaces ", + Region: "us-west-2", + SecretAccessKey: cmmeta.SecretKeySelector{ + LocalObjectReference: cmmeta.LocalObjectReference{ + Name: "route53", + }, + Key: "secret", + }, + }, + }, + }, + IssuerRef: cmmeta.ObjectReference{ + Name: "test-issuer", + Kind: "ClusterIssuer", // ClusterIssuer reference, so should use the clusterResourceNamespace + }, + }, + }, + dnsProviders: newFakeDNSProviders(), + } + + f.Setup(t) + defer f.Finish(t) + + s := f.Solver + _, _, err := s.solverForChallenge(context.Background(), f.Challenge) + if err != nil { + t.Fatalf("expected solverFor to not error, but got: %s", err) + } +} + func TestSolverFor(t *testing.T) { type testT struct { *solverFixture @@ -73,11 +122,13 @@ func TestSolverFor(t *testing.T) { KubeObjects: []runtime.Object{ newSecret("cloudflare-key", map[string][]byte{ "api-key": []byte("a-cloudflare-api-key"), - }), + }, fakeIssuerNamespace), }, }, - Issuer: newIssuer(), Challenge: &cmacme.Challenge{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: fakeIssuerNamespace, + }, Spec: cmacme.ChallengeSpec{ Solver: cmacme.ACMEChallengeSolver{ DNS01: &cmacme.ACMEChallengeSolverDNS01{ @@ -92,6 +143,9 @@ func TestSolverFor(t *testing.T) { }, }, }, + IssuerRef: cmmeta.ObjectReference{ + Name: "test-issuer", + }, }, }, }, @@ -104,11 +158,13 @@ func TestSolverFor(t *testing.T) { KubeObjects: []runtime.Object{ newSecret("cloudflare-token", map[string][]byte{ "api-token": []byte("a-cloudflare-api-token"), - }), + }, fakeIssuerNamespace), }, }, - Issuer: newIssuer(), Challenge: &cmacme.Challenge{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: fakeIssuerNamespace, + }, Spec: cmacme.ChallengeSpec{ Solver: cmacme.ACMEChallengeSolver{ DNS01: &cmacme.ACMEChallengeSolverDNS01{ @@ -123,6 +179,9 @@ func TestSolverFor(t *testing.T) { }, }, }, + IssuerRef: cmmeta.ObjectReference{ + Name: "test-issuer", + }, }, }, }, @@ -131,9 +190,11 @@ func TestSolverFor(t *testing.T) { }, "fails to load a cloudflare provider with a missing secret": { solverFixture: &solverFixture{ - Issuer: newIssuer(), // don't include any secrets in the lister Challenge: &cmacme.Challenge{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: fakeIssuerNamespace, + }, Spec: cmacme.ChallengeSpec{ Solver: cmacme.ACMEChallengeSolver{ DNS01: &cmacme.ACMEChallengeSolverDNS01{ @@ -148,6 +209,9 @@ func TestSolverFor(t *testing.T) { }, }, }, + IssuerRef: cmmeta.ObjectReference{ + Name: "test-issuer", + }, }, }, }, @@ -156,9 +220,11 @@ func TestSolverFor(t *testing.T) { }, "fails to load a cloudflare provider when key and token are provided": { solverFixture: &solverFixture{ - Issuer: newIssuer(), // don't include any secrets in the lister Challenge: &cmacme.Challenge{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: fakeIssuerNamespace, + }, Spec: cmacme.ChallengeSpec{ Solver: cmacme.ACMEChallengeSolver{ DNS01: &cmacme.ACMEChallengeSolverDNS01{ @@ -179,6 +245,9 @@ func TestSolverFor(t *testing.T) { }, }, }, + IssuerRef: cmmeta.ObjectReference{ + Name: "test-issuer", + }, }, }, }, @@ -191,11 +260,13 @@ func TestSolverFor(t *testing.T) { KubeObjects: []runtime.Object{ newSecret("cloudflare-key", map[string][]byte{ "api-key-oops": []byte("a-cloudflare-api-key"), - }), + }, fakeIssuerNamespace), }, }, - Issuer: newIssuer(), Challenge: &cmacme.Challenge{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: fakeIssuerNamespace, + }, Spec: cmacme.ChallengeSpec{ Solver: cmacme.ACMEChallengeSolver{ DNS01: &cmacme.ACMEChallengeSolverDNS01{ @@ -210,6 +281,9 @@ func TestSolverFor(t *testing.T) { }, }, }, + IssuerRef: cmmeta.ObjectReference{ + Name: "test-issuer", + }, }, }, }, @@ -222,11 +296,13 @@ func TestSolverFor(t *testing.T) { KubeObjects: []runtime.Object{ newSecret("cloudflare-token", map[string][]byte{ "api-key-oops": []byte("a-cloudflare-api-token"), - }), + }, fakeIssuerNamespace), }, }, - Issuer: newIssuer(), Challenge: &cmacme.Challenge{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: fakeIssuerNamespace, + }, Spec: cmacme.ChallengeSpec{ Solver: cmacme.ACMEChallengeSolver{ DNS01: &cmacme.ACMEChallengeSolverDNS01{ @@ -241,6 +317,9 @@ func TestSolverFor(t *testing.T) { }, }, }, + IssuerRef: cmmeta.ObjectReference{ + Name: "test-issuer", + }, }, }, }, @@ -253,11 +332,13 @@ func TestSolverFor(t *testing.T) { KubeObjects: []runtime.Object{ newSecret("acmedns-key", map[string][]byte{ "acmedns.json": []byte("{}"), - }), + }, fakeIssuerNamespace), }, }, - Issuer: newIssuer(), Challenge: &cmacme.Challenge{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: fakeIssuerNamespace, + }, Spec: cmacme.ChallengeSpec{ Solver: cmacme.ACMEChallengeSolver{ DNS01: &cmacme.ACMEChallengeSolverDNS01{ @@ -272,6 +353,9 @@ func TestSolverFor(t *testing.T) { }, }, }, + IssuerRef: cmmeta.ObjectReference{ + Name: "test-issuer", + }, }, }, }, @@ -284,7 +368,7 @@ func TestSolverFor(t *testing.T) { test.Setup(t) defer test.Finish(t) s := test.Solver - dnsSolver, _, err := s.solverForChallenge(context.Background(), test.Issuer, test.Challenge) + dnsSolver, _, err := s.solverForChallenge(context.Background(), test.Challenge) if err != nil && !test.expectErr { t.Errorf("expected solverFor to not error, but got: %s", err.Error()) return @@ -307,11 +391,13 @@ func TestSolveForDigitalOcean(t *testing.T) { KubeObjects: []runtime.Object{ newSecret("digitalocean", map[string][]byte{ "token": []byte("FAKE-TOKEN"), - }), + }, fakeIssuerNamespace), }, }, - Issuer: newIssuer(), Challenge: &cmacme.Challenge{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: fakeIssuerNamespace, + }, Spec: cmacme.ChallengeSpec{ Solver: cmacme.ACMEChallengeSolver{ DNS01: &cmacme.ACMEChallengeSolverDNS01{ @@ -325,6 +411,9 @@ func TestSolveForDigitalOcean(t *testing.T) { }, }, }, + IssuerRef: cmmeta.ObjectReference{ + Name: "test-issuer", + }, }, }, dnsProviders: newFakeDNSProviders(), @@ -334,7 +423,7 @@ func TestSolveForDigitalOcean(t *testing.T) { defer f.Finish(t) s := f.Solver - _, _, err := s.solverForChallenge(context.Background(), f.Issuer, f.Challenge) + _, _, err := s.solverForChallenge(context.Background(), f.Challenge) if err != nil { t.Fatalf("expected solverFor to not error, but got: %s", err) } @@ -358,11 +447,13 @@ func TestRoute53TrimCreds(t *testing.T) { KubeObjects: []runtime.Object{ newSecret("route53", map[string][]byte{ "secret": []byte("AKIENDINNEWLINE \n"), - }), + }, fakeIssuerNamespace), }, }, - Issuer: newIssuer(), Challenge: &cmacme.Challenge{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: fakeIssuerNamespace, + }, Spec: cmacme.ChallengeSpec{ Solver: cmacme.ACMEChallengeSolver{ DNS01: &cmacme.ACMEChallengeSolverDNS01{ @@ -378,6 +469,9 @@ func TestRoute53TrimCreds(t *testing.T) { }, }, }, + IssuerRef: cmmeta.ObjectReference{ + Name: "test-issuer", + }, }, }, dnsProviders: newFakeDNSProviders(), @@ -387,7 +481,7 @@ func TestRoute53TrimCreds(t *testing.T) { defer f.Finish(t) s := f.Solver - _, _, err := s.solverForChallenge(context.Background(), f.Issuer, f.Challenge) + _, _, err := s.solverForChallenge(context.Background(), f.Challenge) if err != nil { t.Fatalf("expected solverFor to not error, but got: %s", err) } @@ -411,11 +505,13 @@ func TestRoute53SecretAccessKey(t *testing.T) { newSecret("route53", map[string][]byte{ "accessKeyID": []byte("AWSACCESSKEYID"), "secretAccessKey": []byte("AKIENDINNEWLINE \n"), - }), + }, fakeIssuerNamespace), }, }, - Issuer: newIssuer(), Challenge: &cmacme.Challenge{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: fakeIssuerNamespace, + }, Spec: cmacme.ChallengeSpec{ Solver: cmacme.ACMEChallengeSolver{ DNS01: &cmacme.ACMEChallengeSolverDNS01{ @@ -436,6 +532,9 @@ func TestRoute53SecretAccessKey(t *testing.T) { }, }, }, + IssuerRef: cmmeta.ObjectReference{ + Name: "test-issuer", + }, }, }, dnsProviders: newFakeDNSProviders(), @@ -445,7 +544,7 @@ func TestRoute53SecretAccessKey(t *testing.T) { defer f.Finish(t) s := f.Solver - _, _, err := s.solverForChallenge(context.Background(), f.Issuer, f.Challenge) + _, _, err := s.solverForChallenge(context.Background(), f.Challenge) if err != nil { t.Fatalf("expected solverFor to not error, but got: %s", err) } @@ -484,9 +583,11 @@ func TestRoute53AmbientCreds(t *testing.T) { }, }, }, - Issuer: newIssuer(), dnsProviders: newFakeDNSProviders(), Challenge: &cmacme.Challenge{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: fakeIssuerNamespace, + }, Spec: cmacme.ChallengeSpec{ Solver: cmacme.ACMEChallengeSolver{ DNS01: &cmacme.ACMEChallengeSolverDNS01{ @@ -495,6 +596,9 @@ func TestRoute53AmbientCreds(t *testing.T) { }, }, }, + IssuerRef: cmmeta.ObjectReference{ + Name: "test-issuer", + }, }, }, }, @@ -517,9 +621,11 @@ func TestRoute53AmbientCreds(t *testing.T) { }, }, }, - Issuer: newIssuer(), dnsProviders: newFakeDNSProviders(), Challenge: &cmacme.Challenge{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: fakeIssuerNamespace, + }, Spec: cmacme.ChallengeSpec{ Solver: cmacme.ACMEChallengeSolver{ DNS01: &cmacme.ACMEChallengeSolverDNS01{ @@ -528,6 +634,9 @@ func TestRoute53AmbientCreds(t *testing.T) { }, }, }, + IssuerRef: cmmeta.ObjectReference{ + Name: "test-issuer", + }, }, }, }, @@ -545,7 +654,7 @@ func TestRoute53AmbientCreds(t *testing.T) { f.Setup(t) defer f.Finish(t) s := f.Solver - _, _, err := s.solverForChallenge(context.Background(), f.Issuer, f.Challenge) + _, _, err := s.solverForChallenge(context.Background(), f.Challenge) if tt.out.expectedErr != err { t.Fatalf("expected error %v, got error %v", tt.out.expectedErr, err) } @@ -580,9 +689,11 @@ func TestRoute53AssumeRole(t *testing.T) { }, }, }, - Issuer: newIssuer(), dnsProviders: newFakeDNSProviders(), Challenge: &cmacme.Challenge{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: fakeIssuerNamespace, + }, Spec: cmacme.ChallengeSpec{ Solver: cmacme.ACMEChallengeSolver{ DNS01: &cmacme.ACMEChallengeSolverDNS01{ @@ -592,6 +703,9 @@ func TestRoute53AssumeRole(t *testing.T) { }, }, }, + IssuerRef: cmmeta.ObjectReference{ + Name: "test-issuer", + }, }, }, }, @@ -614,9 +728,11 @@ func TestRoute53AssumeRole(t *testing.T) { }, }, }, - Issuer: newIssuer(), dnsProviders: newFakeDNSProviders(), Challenge: &cmacme.Challenge{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: fakeIssuerNamespace, + }, Spec: cmacme.ChallengeSpec{ Solver: cmacme.ACMEChallengeSolver{ DNS01: &cmacme.ACMEChallengeSolverDNS01{ @@ -626,6 +742,9 @@ func TestRoute53AssumeRole(t *testing.T) { }, }, }, + IssuerRef: cmmeta.ObjectReference{ + Name: "test-issuer", + }, }, }, }, @@ -643,7 +762,7 @@ func TestRoute53AssumeRole(t *testing.T) { f.Setup(t) defer f.Finish(t) s := f.Solver - _, _, err := s.solverForChallenge(context.Background(), f.Issuer, f.Challenge) + _, _, err := s.solverForChallenge(context.Background(), f.Challenge) if tt.out.expectedErr != err { t.Fatalf("expected error %v, got error %v", tt.out.expectedErr, err) } diff --git a/pkg/issuer/acme/dns/rfc2136/rfc2136.go b/pkg/issuer/acme/dns/rfc2136/rfc2136.go index 8c6f5cfb91a..8f09c92a0a5 100644 --- a/pkg/issuer/acme/dns/rfc2136/rfc2136.go +++ b/pkg/issuer/acme/dns/rfc2136/rfc2136.go @@ -105,10 +105,10 @@ func (r *DNSProvider) CleanUp(_, fqdn, zone, value string) error { return r.changeRecord("REMOVE", fqdn, zone, value, 60) } -func (r *DNSProvider) changeRecord(action, fqdn, zone, value string, ttl int) error { +func (r *DNSProvider) changeRecord(action, fqdn, zone, value string, ttl uint32) error { // Create RR rr := new(dns.TXT) - rr.Hdr = dns.RR_Header{Name: fqdn, Rrtype: dns.TypeTXT, Class: dns.ClassINET, Ttl: uint32(ttl)} + rr.Hdr = dns.RR_Header{Name: fqdn, Rrtype: dns.TypeTXT, Class: dns.ClassINET, Ttl: ttl} rr.Txt = []string{value} rrs := []dns.RR{rr} diff --git a/pkg/issuer/acme/dns/route53/route53.go b/pkg/issuer/acme/dns/route53/route53.go index 0cdec3fb546..52922f5e9e3 100644 --- a/pkg/issuer/acme/dns/route53/route53.go +++ b/pkg/issuer/acme/dns/route53/route53.go @@ -25,8 +25,8 @@ import ( "github.com/aws/aws-sdk-go-v2/service/route53" route53types "github.com/aws/aws-sdk-go-v2/service/route53/types" "github.com/aws/aws-sdk-go-v2/service/sts" + "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" - "github.com/go-logr/logr" "github.com/cert-manager/cert-manager/pkg/issuer/acme/dns/util" logf "github.com/cert-manager/cert-manager/pkg/logs" @@ -41,9 +41,7 @@ type DNSProvider struct { dns01Nameservers []string client *route53.Client hostedZoneID string - log logr.Logger - - userAgent string + userAgent string } type sessionProvider struct { @@ -54,7 +52,6 @@ type sessionProvider struct { Role string WebIdentityToken string StsProvider func(aws.Config) StsClient - log logr.Logger userAgent string } @@ -78,17 +75,69 @@ func (d *sessionProvider) GetSession(ctx context.Context) (aws.Config, error) { useAmbientCredentials := d.Ambient && (d.AccessKeyID == "" && d.SecretAccessKey == "") && d.WebIdentityToken == "" - var optFns []func(*config.LoadOptions) error + log := logf.FromContext(ctx) + optFns := []func(*config.LoadOptions) error{ + // Print AWS API requests but only at cert-manager debug level + config.WithLogger(logging.LoggerFunc(func(classification logging.Classification, format string, v ...interface{}) { + log := log.WithValues("aws-classification", classification) + if classification == logging.Debug { + log = log.V(logf.DebugLevel) + } + log.Info(fmt.Sprintf(format, v...)) + })), + config.WithClientLogMode(aws.LogDeprecatedUsage | aws.LogRequest), + config.WithLogConfigurationWarnings(true), + // Append cert-manager user-agent string to all AWS API requests + config.WithAPIOptions( + []func(*middleware.Stack) error{ + func(stack *middleware.Stack) error { + return awsmiddleware.AddUserAgentKeyValue("cert-manager", d.userAgent)(stack) + }, + }, + ), + } + + var envRegionFound bool + { + envConfig, err := config.NewEnvConfig() + if err != nil { + return aws.Config{}, err + } + envRegionFound = envConfig.Region != "" + } + + if !envRegionFound && d.Region == "" { + log.Info( + "Region not found", + "reason", "The AWS_REGION or AWS_DEFAULT_REGION environment variables were not set and the Issuer region field was empty", + ) + } + + if d.Region != "" { + if envRegionFound && useAmbientCredentials { + log.Info( + "Ignoring Issuer region", + "reason", "Issuer is configured to use ambient credentials and AWS_REGION or AWS_DEFAULT_REGION environment variables were found", + "suggestion", "Since cert-manager 1.16, the Issuer region field is optional and can be removed from your Issuer or ClusterIssuer", + "issuer-region", d.Region, + ) + } else { + optFns = append(optFns, + config.WithRegion(d.Region), + ) + } + } + switch { case d.Role != "" && d.WebIdentityToken != "": - d.log.V(logf.DebugLevel).Info("using assume role with web identity") + log.V(logf.DebugLevel).Info("using assume role with web identity") case useAmbientCredentials: - d.log.V(logf.DebugLevel).Info("using ambient credentials") + log.V(logf.DebugLevel).Info("using ambient credentials") // Leaving credentials unset results in a default credential chain being // used; this chain is a reasonable default for getting ambient creds. // https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials default: - d.log.V(logf.DebugLevel).Info("not using ambient credentials") + log.V(logf.DebugLevel).Info("not using ambient credentials") optFns = append(optFns, config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider(d.AccessKeyID, d.SecretAccessKey, ""))) } @@ -105,14 +154,14 @@ func (d *sessionProvider) GetSession(ctx context.Context) (aws.Config, error) { stsCfg.Region = "aws-global" if d.Role != "" && d.WebIdentityToken == "" { - d.log.V(logf.DebugLevel).WithValues("role", d.Role).Info("assuming role") - stsSvc := d.StsProvider(stsCfg) + log.V(logf.DebugLevel).WithValues("role", d.Role).Info("assuming role") + stsSvc := d.StsProvider(cfg) result, err := stsSvc.AssumeRole(ctx, &sts.AssumeRoleInput{ RoleArn: aws.String(d.Role), RoleSessionName: aws.String("cert-manager"), }) if err != nil { - return aws.Config{}, fmt.Errorf("unable to assume role: %s", err) + return aws.Config{}, fmt.Errorf("unable to assume role: %s", removeReqID(err)) } cfg.Credentials = credentials.NewStaticCredentialsProvider( @@ -123,7 +172,7 @@ func (d *sessionProvider) GetSession(ctx context.Context) (aws.Config, error) { } if d.Role != "" && d.WebIdentityToken != "" { - d.log.V(logf.DebugLevel).WithValues("role", d.Role).Info("assuming role with web identity") + log.V(logf.DebugLevel).WithValues("role", d.Role).Info("assuming role with web identity") stsSvc := d.StsProvider(stsCfg) result, err := stsSvc.AssumeRoleWithWebIdentity(ctx, &sts.AssumeRoleWithWebIdentityInput{ @@ -132,7 +181,7 @@ func (d *sessionProvider) GetSession(ctx context.Context) (aws.Config, error) { WebIdentityToken: aws.String(d.WebIdentityToken), }) if err != nil { - return aws.Config{}, fmt.Errorf("unable to assume role with web identity: %s", err) + return aws.Config{}, fmt.Errorf("unable to assume role with web identity: %s", removeReqID(err)) } cfg.Credentials = credentials.NewStaticCredentialsProvider( @@ -142,17 +191,21 @@ func (d *sessionProvider) GetSession(ctx context.Context) (aws.Config, error) { ) } - // If ambient credentials aren't permitted, always set the region, even if to - // empty string, to avoid it falling back on the environment. - // This has to be set after session is constructed, as a different region (aws-global) - // is used for the STS service. - if d.Region != "" || !useAmbientCredentials { - cfg.Region = d.Region - } - - cfg.APIOptions = append(cfg.APIOptions, func(stack *middleware.Stack) error { - return awsmiddleware.AddUserAgentKeyValue("cert-manager", d.userAgent)(stack) - }) + // Log some key values of the loaded configuration, so that users can + // self-diagnose problems in the field. If users shared logs in their bug + // reports, we can know whether the region was detected and whether an + // alternative defaults mode has been configured. + // + // TODO(wallrj): Loop through the cfg.ConfigSources and log which config + // source was used to load the region and credentials, so that it is clearer + // to the user where environment variables or config files or IMDS metadata + // are being used. + log.V(logf.DebugLevel).Info( + "loaded-config", + "defaults-mode", cfg.DefaultsMode, + "region", cfg.Region, + "runtime-environment", cfg.RuntimeEnvironment, + ) return cfg, nil } @@ -166,7 +219,6 @@ func newSessionProvider(accessKeyID, secretAccessKey, region, role string, webId Role: role, WebIdentityToken: webIdentityToken, StsProvider: defaultSTSProvider, - log: logf.Log.WithName("route53-session-provider"), userAgent: userAgent, } } @@ -198,7 +250,6 @@ func NewDNSProvider( client: client, hostedZoneID: hostedZoneID, dns01Nameservers: dns01Nameservers, - log: logf.Log.WithName("route53"), userAgent: userAgent, }, nil } @@ -216,6 +267,7 @@ func (r *DNSProvider) CleanUp(ctx context.Context, domain, fqdn, value string) e } func (r *DNSProvider) changeRecord(ctx context.Context, action route53types.ChangeAction, fqdn, value string, ttl int) error { + log := logf.FromContext(ctx) hostedZoneID, err := r.getHostedZoneID(ctx, fqdn) if err != nil { return fmt.Errorf("failed to determine Route 53 hosted zone ID: %v", err) @@ -238,7 +290,7 @@ func (r *DNSProvider) changeRecord(ctx context.Context, action route53types.Chan resp, err := r.client.ChangeResourceRecordSets(ctx, reqParams) if err != nil { if errors.Is(err, &route53types.InvalidChangeBatch{}) && action == route53types.ChangeActionDelete { - r.log.V(logf.DebugLevel).WithValues("error", err).Info("ignoring InvalidChangeBatch error") + log.V(logf.DebugLevel).WithValues("error", err).Info("ignoring InvalidChangeBatch error") // If we try to delete something and get a 'InvalidChangeBatch' that // means it's already deleted, no need to consider it an error. return nil @@ -325,16 +377,16 @@ func newTXTRecordSet(fqdn, value string, ttl int) *route53types.ResourceRecordSe // want our error messages to be the same when the cause is the same to // avoid spurious challenge updates. // -// The given error must not be nil. This function must be called everywhere -// we have a non-nil error coming from an aws-sdk-go func. The passed error -// is modified in place. This function does not work in case the full error -// message is pre-generated at construction time (instead of when Error() is -// called), which is the case for eg. fmt.Errorf("error message: %w", err). +// This function must be called everywhere we have an error coming from +// an aws-sdk-go func. The passed error is modified in place. func removeReqID(err error) error { var responseError *awshttp.ResponseError if errors.As(err, &responseError) { + before := responseError.Error() // remove the request id from the error message responseError.RequestID = "" + after := responseError.Error() + return errors.New(strings.Replace(err.Error(), before, after, 1)) } return err } diff --git a/pkg/issuer/acme/dns/route53/route53_test.go b/pkg/issuer/acme/dns/route53/route53_test.go index 3134318043d..3b9b828c22b 100644 --- a/pkg/issuer/acme/dns/route53/route53_test.go +++ b/pkg/issuer/acme/dns/route53/route53_test.go @@ -27,9 +27,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "k8s.io/klog/v2" + "k8s.io/klog/v2/ktesting" "github.com/cert-manager/cert-manager/pkg/issuer/acme/dns/util" - logf "github.com/cert-manager/cert-manager/pkg/logs" ) const jwt string = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJzdHMuYW1hem9uYXdzLmNvbSIsImV4cCI6MTc0MTg4NzYwOCwiaWF0IjoxNzEwMzUxNjM4LCJpc3MiOiJodHRwczovL2V4YW1wbGUuY29tIiwibmFtZSI6IkpvaG4gRG9lIiwic3ViIjoiMTIzNDU2Nzg5MCJ9.SfuV3SW-vEdV-tLFIr2PK2DnN6QYmozygav5OeoH36Q" @@ -38,11 +39,6 @@ func makeRoute53Provider(ts *httptest.Server) (*DNSProvider, error) { cfg, err := config.LoadDefaultConfig( context.TODO(), config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider("abc", "123", " ")), - config.WithEndpointResolverWithOptions(aws.EndpointResolverWithOptionsFunc(func(service, region string, options ...interface{}) (aws.Endpoint, error) { - return aws.Endpoint{ - URL: ts.URL, - }, nil - })), config.WithRegion("mock-region"), config.WithRetryMaxAttempts(1), config.WithHTTPClient(ts.Client()), @@ -51,6 +47,8 @@ func makeRoute53Provider(ts *httptest.Server) (*DNSProvider, error) { return nil, err } + cfg.BaseEndpoint = aws.String(ts.URL) + client := route53.NewFromConfig(cfg) return &DNSProvider{client: client, dns01Nameservers: util.RecursiveNameservers}, nil } @@ -60,10 +58,11 @@ func TestAmbientCredentialsFromEnv(t *testing.T) { t.Setenv("AWS_SECRET_ACCESS_KEY", "123") t.Setenv("AWS_REGION", "us-east-1") - provider, err := NewDNSProvider(context.TODO(), "", "", "", "", "", "", true, util.RecursiveNameservers, "cert-manager-test") + _, ctx := ktesting.NewTestContext(t) + provider, err := NewDNSProvider(ctx, "", "", "", "", "", "", true, util.RecursiveNameservers, "cert-manager-test") assert.NoError(t, err, "Expected no error constructing DNSProvider") - _, err = provider.client.Options().Credentials.Retrieve(context.TODO()) + _, err = provider.client.Options().Credentials.Retrieve(ctx) assert.NoError(t, err, "Expected credentials to be set from environment") assert.Equal(t, provider.client.Options().Region, "us-east-1") @@ -74,29 +73,178 @@ func TestNoCredentialsFromEnv(t *testing.T) { t.Setenv("AWS_SECRET_ACCESS_KEY", "123") t.Setenv("AWS_REGION", "us-east-1") - _, err := NewDNSProvider(context.TODO(), "", "", "", "", "", "", false, util.RecursiveNameservers, "cert-manager-test") + _, ctx := ktesting.NewTestContext(t) + _, err := NewDNSProvider(ctx, "", "", "", "", "", "", false, util.RecursiveNameservers, "cert-manager-test") assert.Error(t, err, "Expected error constructing DNSProvider with no credentials and not ambient") } -func TestAmbientRegionFromEnv(t *testing.T) { - t.Setenv("AWS_REGION", "us-east-1") - - provider, err := NewDNSProvider(context.TODO(), "", "", "", "", "", "", true, util.RecursiveNameservers, "cert-manager-test") - assert.NoError(t, err, "Expected no error constructing DNSProvider") +type bitmask byte - assert.Equal(t, "us-east-1", provider.client.Options().Region, "Expected Region to be set from environment") +func (haystack bitmask) Has(needle bitmask) bool { + return haystack&needle != 0 } -func TestNoRegionFromEnv(t *testing.T) { - t.Setenv("AWS_REGION", "us-east-1") +// TestSessionProviderGetSessionRegion calls sessionProvider.GetSession with all +// permutations of those inputs that influence how it selects an AWS region. +// The desired region selection properties are documented alongside each +// assertion. +func TestSessionProviderGetSessionRegion(t *testing.T) { + const ( + fakeAmbientRegion = "ambient-region-1" + fakeIssuerRegion = "issuer-region-1" + ) - provider, err := NewDNSProvider(context.TODO(), "marx", "swordfish", "", "", "", "", false, util.RecursiveNameservers, "cert-manager-test") - assert.NoError(t, err, "Expected no error constructing DNSProvider") + testFunc := func(t *testing.T, allowAmbientCredentials, setAmbientRegion, supplyAccessKey, supplyWebIdentity, supplyIssuerRegion bool) { + t.Log( + "ambient-credentials-allowed", allowAmbientCredentials, + "ambient-region-set", setAmbientRegion, + "access-key-supplied", supplyAccessKey, + "web-identity-supplied", supplyWebIdentity, + "issuer-region-supplied", supplyIssuerRegion, + ) + var ( + accessKeyID string + secretAccessKey string + region string + role string + webIdentityToken string + userAgent string + ) + if supplyAccessKey { + accessKeyID = "fake-access-key-id" + secretAccessKey = "fake-secret-access-key" + } + if supplyWebIdentity { + webIdentityToken = "fake-web-identity-token" + role = "fake-web-identity-role" + } + if setAmbientRegion { + t.Setenv("AWS_REGION", fakeAmbientRegion) + } + if supplyIssuerRegion { + region = fakeIssuerRegion + } + + p := newSessionProvider(accessKeyID, secretAccessKey, region, role, webIdentityToken, allowAmbientCredentials, userAgent) + p.StsProvider = func(cfg aws.Config) StsClient { + return &mockSTS{ + AssumeRoleWithWebIdentityFn: func( + ctx context.Context, + params *sts.AssumeRoleWithWebIdentityInput, + optFns ...func(*sts.Options), + ) (*sts.AssumeRoleWithWebIdentityOutput, error) { + return &sts.AssumeRoleWithWebIdentityOutput{ + Credentials: &ststypes.Credentials{ + AccessKeyId: aws.String("fake-sts-access-key-id"), + SecretAccessKey: aws.String("fake-sts-secret-access-key"), + SessionToken: aws.String("fake-sts-session-token"), + }, + }, nil + }, + } + } + + logger := ktesting.NewLogger(t, ktesting.NewConfig(ktesting.BufferLogs(true))) + ctx := klog.NewContext(context.Background(), logger) + + cfg, err := p.GetSession(ctx) + + testingLogger, ok := logger.GetSink().(ktesting.Underlier) + require.True(t, ok) + logMessages := testingLogger.GetBuffer().String() + + if !supplyAccessKey && !supplyWebIdentity && !allowAmbientCredentials { + assert.EqualError(t, err, "unable to construct route53 provider: empty credentials; perhaps you meant to enable ambient credentials?") + return + } else { + require.NoError(t, err) + } - assert.Equal(t, "", provider.client.Options().Region, "Expected Region to not be set from environment") + // IRSA and Pod Identity are the most widely used "ambient credential" + // mechanisms and both use webhooks to inject the AWS_REGION environment + // variable into the cert-manager Pod. + // When ambient credentials are in use and an environment region is detected, + // cert-manager will use the environment region and ignore any Issuer region. + // This if for backwards compatibility with cert-manager < 1.16 where + // the Issuer region was a required field, but ignored. + if !supplyAccessKey && !supplyWebIdentity && setAmbientRegion { + assert.Equal(t, fakeAmbientRegion, cfg.Region, + "If using ambient credentials, and there is a region in the environment, "+ + "use the region from the environment. Ignore the region in the Issuer region.") + } + + // If the Issuer region has been ignored (see above), log an info + // message to alert the user that the Issuer region is no longer a + // required field and can be omitted in this situation. + if !supplyAccessKey && !supplyWebIdentity && setAmbientRegion && supplyIssuerRegion { + assert.Contains(t, logMessages, "Ignoring Issuer region", + "If using ambient credentials, and there is a region in the environment and in the Issuer resource, "+ + "log a warning to say the Issuer region will be ignored.") + } + + // In the case of ambient credentials from EC2 instance metadata service + // (IMDS), the AWS_REGION environment variable is not necessarily set + // and the Issuer region **should** be used. + if !supplyAccessKey && !supplyWebIdentity && !setAmbientRegion && supplyIssuerRegion { + assert.Equal(t, fakeIssuerRegion, cfg.Region, + "If using ambient credentials but no environment region, "+ + "use the Issuer region.") + } + + // In the general case, the environment region should always be used + // if it is set and if the Issuer region is omitted. + if setAmbientRegion && !supplyIssuerRegion { + assert.Equal(t, fakeAmbientRegion, cfg.Region, + "If there is a region in the environment and not in the Issuer resource, "+ + "the region in the environment should always be used.") + } + + // In the general case, the Issuer region should always be used if it is set. + // and if the environment region is not detected. + if !setAmbientRegion && supplyIssuerRegion { + assert.Equal(t, fakeIssuerRegion, cfg.Region, + "If there is an Issuer region but no environment region, "+ + "the Issuer region in the environment should always be used.") + } + + // And if no region is detected, log an info message to alert the user + // to the mis-configuration + if !setAmbientRegion && !supplyIssuerRegion { + assert.Contains(t, logMessages, "Region not found", + "If no region was detected, "+ + "log a warning to explain how to set the region.") + } + } + + const ( + allowAmbientCredentials bitmask = 1 << iota + setAmbientRegion + supplyAccessKey + supplyWebIdentity + supplyIssuerRegion + ) + allFalse := bitmask(0) + allTrue := allowAmbientCredentials | setAmbientRegion | supplyAccessKey | supplyWebIdentity | supplyIssuerRegion + + for input := allFalse; input <= allTrue; input++ { + t.Run( + fmt.Sprintf("%v", input), + func(t *testing.T) { + testFunc( + t, + input.Has(allowAmbientCredentials), + input.Has(setAmbientRegion), + input.Has(supplyAccessKey), + input.Has(supplyWebIdentity), + input.Has(supplyIssuerRegion), + ) + }, + ) + } } func TestRoute53Present(t *testing.T) { + _, ctx := ktesting.NewTestContext(t) mockResponses := MockResponseMap{ "/2013-04-01/hostedzonesbyname": MockResponse{StatusCode: 200, Body: ListHostedZonesByNameResponse}, "/2013-04-01/hostedzone/ABCDEFG/rrset": MockResponse{StatusCode: 200, Body: ChangeResourceRecordSetsResponse}, @@ -114,25 +262,25 @@ func TestRoute53Present(t *testing.T) { domain := "example.com" keyAuth := "123456d==" - err = provider.Present(context.TODO(), domain, "_acme-challenge."+domain+".", keyAuth) + err = provider.Present(ctx, domain, "_acme-challenge."+domain+".", keyAuth) assert.NoError(t, err, "Expected Present to return no error") subDomain := "foo.example.com" - err = provider.Present(context.TODO(), subDomain, "_acme-challenge."+subDomain+".", keyAuth) + err = provider.Present(ctx, subDomain, "_acme-challenge."+subDomain+".", keyAuth) assert.NoError(t, err, "Expected Present to return no error") nonExistentSubDomain := "bar.foo.example.com" - err = provider.Present(context.TODO(), nonExistentSubDomain, nonExistentSubDomain+".", keyAuth) + err = provider.Present(ctx, nonExistentSubDomain, nonExistentSubDomain+".", keyAuth) assert.NoError(t, err, "Expected Present to return no error") nonExistentDomain := "baz.com" - err = provider.Present(context.TODO(), nonExistentDomain, nonExistentDomain+".", keyAuth) + err = provider.Present(ctx, nonExistentDomain, nonExistentDomain+".", keyAuth) assert.Error(t, err, "Expected Present to return an error") // This test case makes sure that the request id has been properly // stripped off. It has to be stripped because it changes on every // request which causes spurious challenge updates. - err = provider.Present(context.TODO(), "bar.example.com", "bar.example.com.", keyAuth) + err = provider.Present(ctx, "bar.example.com", "bar.example.com.", keyAuth) require.Error(t, err, "Expected Present to return an error") assert.Equal(t, `failed to change Route 53 record set: operation error Route 53: ChangeResourceRecordSets, https response error StatusCode: 403, RequestID: , api error AccessDenied: User: arn:aws:iam::0123456789:user/test-cert-manager is not authorized to perform: route53:ChangeResourceRecordSets on resource: arn:aws:route53:::hostedzone/OPQRSTU`, err.Error()) } @@ -149,6 +297,7 @@ func TestAssumeRole(t *testing.T) { role string webIdentityToken string expErr bool + expErrMessage string expCreds *ststypes.Credentials expRegion string key string @@ -156,6 +305,51 @@ func TestAssumeRole(t *testing.T) { region string mockSTS *mockSTS }{ + { + name: "should remove request ID for assumeRole", + role: "my-role", + ambient: true, + expErr: true, + expErrMessage: "unable to assume role: https response error StatusCode: 0, RequestID: , foo", + expCreds: creds, + expRegion: "", + mockSTS: &mockSTS{ + AssumeRoleFn: func(ctx context.Context, params *sts.AssumeRoleInput, optFns ...func(*sts.Options)) (*sts.AssumeRoleOutput, error) { + return nil, &awshttp.ResponseError{ + RequestID: "fake-request-id", + ResponseError: &smithyhttp.ResponseError{ + Err: errors.New("foo"), + Response: &smithyhttp.Response{ + Response: &http.Response{}, + }, + }, + } + }, + }, + }, + { + name: "should remove request ID for assumeRoleWithWebIdentity", + role: "my-role", + webIdentityToken: jwt, + ambient: true, + expErr: true, + expErrMessage: "unable to assume role with web identity: https response error StatusCode: 0, RequestID: , foo", + expCreds: creds, + expRegion: "", + mockSTS: &mockSTS{ + AssumeRoleWithWebIdentityFn: func(ctx context.Context, params *sts.AssumeRoleWithWebIdentityInput, optFns ...func(*sts.Options)) (*sts.AssumeRoleWithWebIdentityOutput, error) { + return nil, &awshttp.ResponseError{ + RequestID: "fake-request-id", + ResponseError: &smithyhttp.ResponseError{ + Err: errors.New("foo"), + Response: &smithyhttp.Response{ + Response: &http.Response{}, + }, + }, + } + }, + }, + }, { name: "should assume role w/ ambient creds", role: "my-role", @@ -257,15 +451,18 @@ func TestAssumeRole(t *testing.T) { for _, c := range cases { t.Run(c.name, func(t *testing.T) { provider := makeMockSessionProvider(func(cfg aws.Config) StsClient { - assert.Equal(t, "aws-global", cfg.Region) // verify that the global sts endpoint is used return c.mockSTS }, c.key, c.secret, c.region, c.role, c.webIdentityToken, c.ambient) - cfg, err := provider.GetSession(context.TODO()) + _, ctx := ktesting.NewTestContext(t) + cfg, err := provider.GetSession(ctx) if c.expErr { assert.NotNil(t, err) + if c.expErrMessage != "" { + assert.EqualError(t, err, c.expErrMessage) + } } else { assert.Nil(t, err) - sessCreds, _ := cfg.Credentials.Retrieve(context.TODO()) + sessCreds, _ := cfg.Credentials.Retrieve(ctx) assert.Equal(t, c.mockSTS.assumedRole, c.role) assert.Equal(t, *c.expCreds.SecretAccessKey, sessCreds.SecretAccessKey) assert.Equal(t, *c.expCreds.AccessKeyId, sessCreds.AccessKeyID) @@ -312,7 +509,6 @@ func makeMockSessionProvider( Role: role, WebIdentityToken: webIdentityToken, StsProvider: defaultSTSProvider, - log: logf.Log.WithName("route53-session"), } } @@ -341,6 +537,11 @@ func Test_removeReqID(t *testing.T) { err: &awshttp.ResponseError{RequestID: "SOMEREQUESTID", ResponseError: newResponseError()}, wantErr: &awshttp.ResponseError{RequestID: "", ResponseError: newResponseError()}, }, + { + name: "should replace the request id in a %w wrapped error", + err: fmt.Errorf("failed to refresh cached credentials, %w", &awshttp.ResponseError{RequestID: "SOMEREQUESTID", ResponseError: newResponseError()}), + wantErr: fmt.Errorf("failed to refresh cached credentials, %w", &awshttp.ResponseError{RequestID: "", ResponseError: newResponseError()}), + }, { name: "should do nothing if no request id is set", err: newResponseError(), @@ -351,6 +552,11 @@ func Test_removeReqID(t *testing.T) { err: errors.New("foo"), wantErr: errors.New("foo"), }, + { + name: "should ignore nil errors", + err: nil, + wantErr: nil, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { diff --git a/pkg/issuer/acme/dns/util_test.go b/pkg/issuer/acme/dns/util_test.go index 32872c157d3..32345e12003 100644 --- a/pkg/issuer/acme/dns/util_test.go +++ b/pkg/issuer/acme/dns/util_test.go @@ -22,7 +22,6 @@ import ( "testing" cmacme "github.com/cert-manager/cert-manager/pkg/apis/acme/v1" - v1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" "github.com/cert-manager/cert-manager/pkg/controller/test" "github.com/cert-manager/cert-manager/pkg/issuer/acme/dns/acmedns" "github.com/cert-manager/cert-manager/pkg/issuer/acme/dns/azuredns" @@ -31,11 +30,6 @@ import ( "github.com/cert-manager/cert-manager/pkg/issuer/acme/dns/digitalocean" "github.com/cert-manager/cert-manager/pkg/issuer/acme/dns/route53" "github.com/cert-manager/cert-manager/pkg/issuer/acme/dns/util" - "github.com/cert-manager/cert-manager/test/unit/gen" -) - -const ( - defaultTestIssuerName = "test-issuer" ) type solverFixture struct { @@ -43,8 +37,6 @@ type solverFixture struct { Solver *Solver *test.Builder - // Issuer to be passed to functions on the Solver (a default will be used if nil) - Issuer v1.GenericIssuer // Challenge resource to use during tests Challenge *cmacme.Challenge @@ -54,7 +46,7 @@ type solverFixture struct { // This is useful if you want to load the clientset with some resources *after* the // fixture has been created. PreFn func(*testing.T, *solverFixture) - // CheckFn should performs checks to ensure the output of the test is as expected. + // CheckFn should perform checks to ensure the output of the test is as expected. // Optional additional values may be provided, which represent the output of the // function under test. CheckFn func(*testing.T, *solverFixture, ...interface{}) @@ -67,9 +59,6 @@ type solverFixture struct { } func (s *solverFixture) Setup(t *testing.T) { - if s.Issuer == nil { - s.Issuer = gen.Issuer(defaultTestIssuerName, gen.SetIssuerACME(cmacme.ACMEIssuer{})) - } if s.testResources == nil { s.testResources = map[string]interface{}{} } diff --git a/pkg/issuer/acme/http/http.go b/pkg/issuer/acme/http/http.go index f1b71f799c3..440f0e51fbd 100644 --- a/pkg/issuer/acme/http/http.go +++ b/pkg/issuer/acme/http/http.go @@ -188,7 +188,7 @@ func (s *Solver) Check(ctx context.Context, issuer v1.GenericIssuer, ch *cmacme. // CleanUp will ensure the created service, ingress and pod are clean/deleted of any // cert-manager created data. -func (s *Solver) CleanUp(ctx context.Context, issuer v1.GenericIssuer, ch *cmacme.Challenge) error { +func (s *Solver) CleanUp(ctx context.Context, ch *cmacme.Challenge) error { var errs []error errs = append(errs, s.cleanupPods(ctx, ch)) errs = append(errs, s.cleanupServices(ctx, ch)) diff --git a/pkg/issuer/acme/http/http_test.go b/pkg/issuer/acme/http/http_test.go index 8dac34561b4..d68aaaed19c 100644 --- a/pkg/issuer/acme/http/http_test.go +++ b/pkg/issuer/acme/http/http_test.go @@ -111,7 +111,11 @@ func TestReachabilityCustomDnsServers(t *testing.T) { dnsServerCalled := int32(0) server := &dns.Server{Addr: "127.0.0.1:15353", Net: "udp", NotifyStartedFunc: func() { close(dnsServerStarted) }} - defer server.Shutdown() + defer func() { + if err := server.Shutdown(); err != nil { + t.Error(err) + } + }() mux := &dns.ServeMux{} server.Handler = mux diff --git a/pkg/issuer/acme/http/pod.go b/pkg/issuer/acme/http/pod.go index b5d25efd582..d0d124e94ab 100644 --- a/pkg/issuer/acme/http/pod.go +++ b/pkg/issuer/acme/http/pod.go @@ -155,6 +155,10 @@ func (s *Solver) buildPod(ch *cmacme.Challenge) *corev1.Pod { pod = s.mergePodObjectMetaWithPodTemplate(pod, ch.Spec.Solver.HTTP01.Ingress.PodTemplate) } + if ch.Spec.Solver.HTTP01.GatewayHTTPRoute != nil { + pod = s.mergePodObjectMetaWithPodTemplate(pod, + ch.Spec.Solver.HTTP01.GatewayHTTPRoute.PodTemplate) + } } return pod @@ -163,7 +167,7 @@ func (s *Solver) buildPod(ch *cmacme.Challenge) *corev1.Pod { // Note: this function builds pod spec using defaults and any configuration // options passed via flags to cert-manager controller. // Solver pod configuration via flags is a now deprecated -// mechanism- please use pod template instead when adding any new +// mechanism - please use pod template instead when adding any new // configuration options // https://github.com/cert-manager/cert-manager/blob/f1d7c432763100c3fb6eb6a1654d29060b479b3c/pkg/apis/acme/v1/types_issuer.go#L270 func (s *Solver) buildDefaultPod(ch *cmacme.Challenge) *corev1.Pod { @@ -292,5 +296,18 @@ func (s *Solver) mergePodObjectMetaWithPodTemplate(pod *corev1.Pod, podTempl *cm pod.Spec.ImagePullSecrets = append(pod.Spec.ImagePullSecrets, podTempl.Spec.ImagePullSecrets...) + if podTempl.Spec.SecurityContext != nil { + pod.Spec.SecurityContext = &corev1.PodSecurityContext{} + pod.Spec.SecurityContext.SELinuxOptions = podTempl.Spec.SecurityContext.SELinuxOptions + pod.Spec.SecurityContext.RunAsUser = podTempl.Spec.SecurityContext.RunAsUser + pod.Spec.SecurityContext.RunAsGroup = podTempl.Spec.SecurityContext.RunAsGroup + pod.Spec.SecurityContext.RunAsNonRoot = podTempl.Spec.SecurityContext.RunAsNonRoot + pod.Spec.SecurityContext.SupplementalGroups = podTempl.Spec.SecurityContext.SupplementalGroups + pod.Spec.SecurityContext.FSGroup = podTempl.Spec.SecurityContext.FSGroup + pod.Spec.SecurityContext.Sysctls = podTempl.Spec.SecurityContext.Sysctls + pod.Spec.SecurityContext.FSGroupChangePolicy = podTempl.Spec.SecurityContext.FSGroupChangePolicy + pod.Spec.SecurityContext.SeccompProfile = podTempl.Spec.SecurityContext.SeccompProfile + } + return pod } diff --git a/pkg/issuer/acme/http/pod_test.go b/pkg/issuer/acme/http/pod_test.go index b60f80bd88d..608f7f90d9e 100644 --- a/pkg/issuer/acme/http/pod_test.go +++ b/pkg/issuer/acme/http/pod_test.go @@ -134,6 +134,11 @@ func TestEnsurePod(t *testing.T) { ObjectMeta: pod.ObjectMeta, } ) + scPod := pod.DeepCopy() + scPod.Spec.SecurityContext.RunAsUser = ptr.To(int64(1020)) + scPod.Spec.SecurityContext.RunAsNonRoot = nil + scPod.Spec.ImagePullSecrets = []corev1.LocalObjectReference{} + scPod.Spec.Tolerations = []corev1.Toleration{} tests := map[string]testT{ "should do nothing if pod already exists": { builder: &testpkg.Builder{ @@ -149,6 +154,91 @@ func TestEnsurePod(t *testing.T) { }, chal: chal, }, + "should have the correct default security context": { + chal: &cmacme.Challenge{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: testNamespace, + }, + Spec: cmacme.ChallengeSpec{ + DNSName: "example.com", + Token: "token", + Key: "key", + Solver: cmacme.ACMEChallengeSolver{ + HTTP01: &cmacme.ACMEChallengeSolverHTTP01{ + Ingress: &cmacme.ACMEChallengeSolverHTTP01Ingress{}, + }, + }, + }, + }, + builder: &testpkg.Builder{ + PartialMetadataObjects: []runtime.Object{}, + ExpectedActions: []testpkg.Action{testpkg.NewAction(coretesting.NewCreateAction(corev1.SchemeGroupVersion.WithResource("pods"), testNamespace, pod))}, + }, + }, + "security context should be configurable": { + chal: &cmacme.Challenge{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: testNamespace, + }, + Spec: cmacme.ChallengeSpec{ + DNSName: "example.com", + Token: "token", + Key: "key", + Solver: cmacme.ACMEChallengeSolver{ + HTTP01: &cmacme.ACMEChallengeSolverHTTP01{ + Ingress: &cmacme.ACMEChallengeSolverHTTP01Ingress{ + PodTemplate: &cmacme.ACMEChallengeSolverHTTP01IngressPodTemplate{ + Spec: cmacme.ACMEChallengeSolverHTTP01IngressPodSpec{ + SecurityContext: &cmacme.ACMEChallengeSolverHTTP01IngressPodSecurityContext{ + RunAsUser: ptr.To(int64(1020)), + SeccompProfile: &corev1.SeccompProfile{ + Type: corev1.SeccompProfileTypeRuntimeDefault, + }, + }, + }, + }, + }, + }, + }, + }, + }, + builder: &testpkg.Builder{ + PartialMetadataObjects: []runtime.Object{}, + ExpectedActions: []testpkg.Action{testpkg.NewAction(coretesting.NewCreateAction(corev1.SchemeGroupVersion.WithResource("pods"), testNamespace, scPod))}, + }, + }, + "security context should be configurable using gateway-api": { + chal: &cmacme.Challenge{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: testNamespace, + }, + Spec: cmacme.ChallengeSpec{ + DNSName: "example.com", + Token: "token", + Key: "key", + Solver: cmacme.ACMEChallengeSolver{ + HTTP01: &cmacme.ACMEChallengeSolverHTTP01{ + GatewayHTTPRoute: &cmacme.ACMEChallengeSolverHTTP01GatewayHTTPRoute{ + PodTemplate: &cmacme.ACMEChallengeSolverHTTP01IngressPodTemplate{ + Spec: cmacme.ACMEChallengeSolverHTTP01IngressPodSpec{ + SecurityContext: &cmacme.ACMEChallengeSolverHTTP01IngressPodSecurityContext{ + RunAsUser: ptr.To(int64(1020)), + SeccompProfile: &corev1.SeccompProfile{ + Type: corev1.SeccompProfileTypeRuntimeDefault, + }, + }, + }, + }, + }, + }, + }, + }, + }, + builder: &testpkg.Builder{ + PartialMetadataObjects: []runtime.Object{}, + ExpectedActions: []testpkg.Action{testpkg.NewAction(coretesting.NewCreateAction(corev1.SchemeGroupVersion.WithResource("pods"), testNamespace, scPod))}, + }, + }, "should clean up if multiple pods exist": { builder: &testpkg.Builder{ PartialMetadataObjects: []runtime.Object{podMeta, func(p metav1.PartialObjectMetadata) *metav1.PartialObjectMetadata { p.Name = "foobar"; return &p }(*podMeta)}, @@ -365,6 +455,97 @@ func TestMergePodObjectMetaWithPodTemplate(t *testing.T) { } }, }, + "should use labels, annotations and spec fields from template when using gateway-api": { + Challenge: &cmacme.Challenge{ + Spec: cmacme.ChallengeSpec{ + DNSName: "example.com", + Solver: cmacme.ACMEChallengeSolver{ + HTTP01: &cmacme.ACMEChallengeSolverHTTP01{ + GatewayHTTPRoute: &cmacme.ACMEChallengeSolverHTTP01GatewayHTTPRoute{ + PodTemplate: &cmacme.ACMEChallengeSolverHTTP01IngressPodTemplate{ + ACMEChallengeSolverHTTP01IngressPodObjectMeta: cmacme.ACMEChallengeSolverHTTP01IngressPodObjectMeta{ + Labels: map[string]string{ + "this is a": "label", + cmacme.DomainLabelKey: "44655555555", + }, + Annotations: map[string]string{ + "sidecar.istio.io/inject": "true", + "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", + "foo": "bar", + }, + }, + Spec: cmacme.ACMEChallengeSolverHTTP01IngressPodSpec{ + PriorityClassName: "high", + NodeSelector: map[string]string{ + "node": "selector", + }, + Tolerations: []corev1.Toleration{ + { + Key: "key", + Operator: "Exists", + Effect: "NoSchedule", + }, + }, + ServiceAccountName: "cert-manager", + ImagePullSecrets: []corev1.LocalObjectReference{{Name: "cred"}}, + }, + }, + }, + }, + }, + }, + }, + PreFn: func(t *testing.T, s *solverFixture) { + resultingPod := s.Solver.buildDefaultPod(s.Challenge) + resultingPod.Labels = map[string]string{ + "this is a": "label", + cmacme.DomainLabelKey: "44655555555", + cmacme.TokenLabelKey: "1", + cmacme.SolverIdentificationLabelKey: "true", + } + resultingPod.Annotations = map[string]string{ + "sidecar.istio.io/inject": "true", + "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", + "foo": "bar", + } + resultingPod.Spec.NodeSelector = map[string]string{ + "kubernetes.io/os": "linux", + "node": "selector", + } + resultingPod.Spec.Tolerations = []corev1.Toleration{ + { + Key: "key", + Operator: "Exists", + Effect: "NoSchedule", + }, + } + resultingPod.Spec.PriorityClassName = "high" + resultingPod.Spec.ServiceAccountName = "cert-manager" + resultingPod.Spec.ImagePullSecrets = []corev1.LocalObjectReference{{Name: "cred"}} + s.testResources[createdPodKey] = resultingPod + + s.Builder.Sync() + }, + CheckFn: func(t *testing.T, s *solverFixture, args ...interface{}) { + resultingPod := s.testResources[createdPodKey].(*corev1.Pod) + + resp, ok := args[0].(*corev1.Pod) + if !ok { + t.Errorf("expected pod to be returned, but got %v", args[0]) + t.Fail() + return + } + + // ignore pointer differences here + resultingPod.OwnerReferences = resp.OwnerReferences + + if resp.String() != resultingPod.String() { + t.Errorf("unexpected pod generated from merge\nexp=%s\ngot=%s", + resultingPod, resp) + t.Fail() + } + }, + }, "should use default if nothing has changed in template": { Challenge: &cmacme.Challenge{ Spec: cmacme.ChallengeSpec{ diff --git a/pkg/issuer/acme/http/util_test.go b/pkg/issuer/acme/http/util_test.go index a9a63671635..28f76a6f414 100644 --- a/pkg/issuer/acme/http/util_test.go +++ b/pkg/issuer/acme/http/util_test.go @@ -40,7 +40,7 @@ type solverFixture struct { // This is useful if you want to load the clientset with some resources *after* the // fixture has been created. PreFn func(*testing.T, *solverFixture) - // CheckFn should performs checks to ensure the output of the test is as expected. + // CheckFn should perform checks to ensure the output of the test is as expected. // Optional additional values may be provided, which represent the output of the // function under test. CheckFn func(*testing.T, *solverFixture, ...interface{}) diff --git a/pkg/issuer/acme/setup.go b/pkg/issuer/acme/setup.go index 89780a5309a..c96cb3f4582 100644 --- a/pkg/issuer/acme/setup.go +++ b/pkg/issuer/acme/setup.go @@ -115,7 +115,7 @@ func (a *Acme) Setup(ctx context.Context) error { if err != nil { msg = messageAccountRegistrationFailed + err.Error() reason = errorAccountRegistrationFailed - return fmt.Errorf(msg) + return fmt.Errorf("%s", msg) } // We clear the ACME account URI as we have generated a new private key a.issuer.GetStatus().ACMEStatus().URI = "" @@ -139,7 +139,7 @@ func (a *Acme) Setup(ctx context.Context) error { case err != nil: reason = errorAccountVerificationFailed msg = messageAccountVerificationFailed + err.Error() - return fmt.Errorf(msg) + return fmt.Errorf("%s", msg) } rsaPk, ok := pk.(*rsa.PrivateKey) if !ok { @@ -244,7 +244,7 @@ func (a *Acme) Setup(ctx context.Context) error { case err != nil: reason = errorAccountRegistrationFailed msg = messageAccountRegistrationFailed + err.Error() - return fmt.Errorf(msg) + return fmt.Errorf("%s", msg) } // set the external account binding @@ -258,7 +258,7 @@ func (a *Acme) Setup(ctx context.Context) error { account, err := a.registerAccount(ctx, cl, eabAccount) if err != nil { // TODO: this error could be from an account registration or an attempt - // to retrieve an existing account- perhaps we should log different + // to retrieve an existing account - perhaps we should log different // messages in those two scenarios. reason = errorAccountRegistrationFailed msg = messageAccountRegistrationFailed + err.Error() diff --git a/pkg/issuer/vault/setup.go b/pkg/issuer/vault/setup.go index fba4b946c85..d2e9f0abe6c 100644 --- a/pkg/issuer/vault/setup.go +++ b/pkg/issuer/vault/setup.go @@ -35,7 +35,7 @@ const ( messageVaultClientInitFailed = "Failed to initialize Vault client: " messageVaultConfigRequired = "Vault config cannot be empty" messageServerAndPathRequired = "Vault server and path are required fields" - messageAuthFieldsRequired = "Vault tokenSecretRef, appRole, or kubernetes is required" + messageAuthFieldsRequired = "Vault tokenSecretRef, appRole, clientCertificate, or kubernetes is required" messageMultipleAuthFieldsSet = "Multiple auth methods cannot be set on the same Vault issuer" messageKubeAuthRoleRequired = "Vault Kubernetes auth requires a role to be set" @@ -64,19 +64,21 @@ func (v *Vault) Setup(ctx context.Context) error { tokenAuth := v.issuer.GetSpec().Vault.Auth.TokenSecretRef appRoleAuth := v.issuer.GetSpec().Vault.Auth.AppRole + clientCertificateAuth := v.issuer.GetSpec().Vault.Auth.ClientCertificate kubeAuth := v.issuer.GetSpec().Vault.Auth.Kubernetes // check if at least one auth method is specified. - if tokenAuth == nil && appRoleAuth == nil && kubeAuth == nil { + if tokenAuth == nil && appRoleAuth == nil && clientCertificateAuth == nil && kubeAuth == nil { logf.V(logf.WarnLevel).Infof("%s: %s", v.issuer.GetObjectMeta().Name, messageAuthFieldsRequired) apiutil.SetIssuerCondition(v.issuer, v.issuer.GetGeneration(), v1.IssuerConditionReady, cmmeta.ConditionFalse, errorVault, messageAuthFieldsRequired) return nil } - // check only one auth method set - if (tokenAuth != nil && appRoleAuth != nil) || - (tokenAuth != nil && kubeAuth != nil) || - (appRoleAuth != nil && kubeAuth != nil) { + // check only one auth method is set + if !((tokenAuth != nil && appRoleAuth == nil && clientCertificateAuth == nil && kubeAuth == nil) || + (tokenAuth == nil && appRoleAuth != nil && clientCertificateAuth == nil && kubeAuth == nil) || + (tokenAuth == nil && appRoleAuth == nil && clientCertificateAuth != nil && kubeAuth == nil) || + (tokenAuth == nil && appRoleAuth == nil && clientCertificateAuth == nil && kubeAuth != nil)) { logf.V(logf.WarnLevel).Infof("%s: %s", v.issuer.GetObjectMeta().Name, messageMultipleAuthFieldsSet) apiutil.SetIssuerCondition(v.issuer, v.issuer.GetGeneration(), v1.IssuerConditionReady, cmmeta.ConditionFalse, errorVault, messageMultipleAuthFieldsSet) return nil diff --git a/pkg/issuer/vault/setup_test.go b/pkg/issuer/vault/setup_test.go index 3393a1a9880..9c9b56d2ec0 100644 --- a/pkg/issuer/vault/setup_test.go +++ b/pkg/issuer/vault/setup_test.go @@ -45,9 +45,11 @@ import ( func TestVault_Setup(t *testing.T) { // Create a mock Vault HTTP server. vaultServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.URL.Path == "/v1/auth/approle/login" || r.URL.Path == "/v1/auth/kubernetes/login" { + if r.URL.Path == "/v1/auth/approle/login" || r.URL.Path == "/v1/auth/kubernetes/login" || r.URL.Path == "/v1/auth/cert/login" { w.WriteHeader(http.StatusOK) - w.Write([]byte(`{"auth":{"client_token": "5b1a0318-679c-9c45-e5c6-d1b9a9035d49"}}`)) + if _, err := w.Write([]byte(`{"auth":{"client_token": "5b1a0318-679c-9c45-e5c6-d1b9a9035d49"}}`)); err != nil { + t.Fatal(err) + } } })) defer vaultServer.Close() @@ -403,9 +405,21 @@ func TestVault_Setup(t *testing.T) { }, expectErr: "error initializing Vault client: parse \" https://vault.example.com\": first path segment in URL cannot contain colon", }, + { + name: "valid auth.clientCertificate: All fields can be omitted", + givenIssuer: v1.IssuerConfig{ + Vault: &v1.VaultIssuer{ + Path: "pki_int", + Server: vaultServer.URL, + Auth: v1.VaultAuth{ + ClientCertificate: &v1.VaultClientCertificateAuth{}, + }, + }, + }, + expectCond: "Ready True: VaultVerified: Vault verified", + }, } for _, tt := range tests { - tt := tt // G601: Remove after Go 1.22. https://go.dev/wiki/LoopvarExperiment t.Run(tt.name, func(t *testing.T) { givenIssuer := &v1.Issuer{ ObjectMeta: metav1.ObjectMeta{ @@ -457,7 +471,7 @@ func TestVault_Setup(t *testing.T) { // was the controller-side validation (i.e., the validation that we // do in setup.go). To prevent the breakage of existing Issuer or // ClusterIssuers resources due to the webhook-side validation - // suddently becoming stricter than the controller-side validation, + // suddenly becoming stricter than the controller-side validation, // we perform the webhook validation too and check that it passes. converted := internalapi.IssuerConfig{} err = internalv1.Convert_v1_IssuerConfig_To_certmanager_IssuerConfig(&tt.givenIssuer, &converted, nil) diff --git a/pkg/issuer/venafi/client/fake/venafi.go b/pkg/issuer/venafi/client/fake/venafi.go index f5758b55e07..fb9e2688fcb 100644 --- a/pkg/issuer/venafi/client/fake/venafi.go +++ b/pkg/issuer/venafi/client/fake/venafi.go @@ -17,6 +17,8 @@ limitations under the License. package fake import ( + "time" + "github.com/Venafi/vcert/v5/pkg/endpoint" "github.com/cert-manager/cert-manager/pkg/issuer/venafi/client/api" @@ -24,8 +26,8 @@ import ( type Venafi struct { PingFn func() error - RequestCertificateFn func(csrPEM []byte, customFields []api.CustomField) (string, error) - RetrieveCertificateFn func(pickupID string, csrPEM []byte, customFields []api.CustomField) ([]byte, error) + RequestCertificateFn func(csrPEM []byte, duration time.Duration, customFields []api.CustomField) (string, error) + RetrieveCertificateFn func(pickupID string, csrPEM []byte, duration time.Duration, customFields []api.CustomField) ([]byte, error) ReadZoneConfigurationFn func() (*endpoint.ZoneConfiguration, error) VerifyCredentialsFn func() error } @@ -34,12 +36,12 @@ func (v *Venafi) Ping() error { return v.PingFn() } -func (v *Venafi) RequestCertificate(csrPEM []byte, customFields []api.CustomField) (string, error) { - return v.RequestCertificateFn(csrPEM, customFields) +func (v *Venafi) RequestCertificate(csrPEM []byte, duration time.Duration, customFields []api.CustomField) (string, error) { + return v.RequestCertificateFn(csrPEM, duration, customFields) } -func (v *Venafi) RetrieveCertificate(pickupID string, csrPEM []byte, customFields []api.CustomField) ([]byte, error) { - return v.RetrieveCertificateFn(pickupID, csrPEM, customFields) +func (v *Venafi) RetrieveCertificate(pickupID string, csrPEM []byte, duration time.Duration, customFields []api.CustomField) ([]byte, error) { + return v.RetrieveCertificateFn(pickupID, csrPEM, duration, customFields) } func (v *Venafi) ReadZoneConfiguration() (*endpoint.ZoneConfiguration, error) { diff --git a/pkg/issuer/venafi/client/request.go b/pkg/issuer/venafi/client/request.go index b907b674613..df277a3cd29 100644 --- a/pkg/issuer/venafi/client/request.go +++ b/pkg/issuer/venafi/client/request.go @@ -24,6 +24,7 @@ import ( "time" "github.com/Venafi/vcert/v5/pkg/certificate" + "github.com/Venafi/vcert/v5/pkg/util" "github.com/Venafi/vcert/v5/pkg/venafi/tpp" "github.com/cert-manager/cert-manager/pkg/issuer/venafi/client/api" @@ -45,8 +46,8 @@ var ErrorMissingSubject = errors.New("Certificate requests submitted to Venafi i // The CSR will be decoded to be validated against the zone configuration policy. // Upon the template being successfully defaulted and validated, the CSR will be sent, as is. // It will return a pickup ID which can be used with RetrieveCertificate to get the certificate -func (v *Venafi) RequestCertificate(csrPEM []byte, customFields []api.CustomField) (string, error) { - vreq, err := v.buildVReq(csrPEM, customFields) +func (v *Venafi) RequestCertificate(csrPEM []byte, duration time.Duration, customFields []api.CustomField) (string, error) { + vreq, err := v.buildVReq(csrPEM, duration, customFields) if err != nil { return "", err } @@ -81,8 +82,8 @@ func (v *Venafi) RequestCertificate(csrPEM []byte, customFields []api.CustomFiel return v.vcertClient.RequestCertificate(vreq) } -func (v *Venafi) RetrieveCertificate(pickupID string, csrPEM []byte, customFields []api.CustomField) ([]byte, error) { - vreq, err := v.buildVReq(csrPEM, customFields) +func (v *Venafi) RetrieveCertificate(pickupID string, csrPEM []byte, duration time.Duration, customFields []api.CustomField) ([]byte, error) { + vreq, err := v.buildVReq(csrPEM, duration, customFields) if err != nil { return nil, err } @@ -103,7 +104,7 @@ func (v *Venafi) RetrieveCertificate(pickupID string, csrPEM []byte, customField return []byte(chain), nil } -func (v *Venafi) buildVReq(csrPEM []byte, customFields []api.CustomField) (*certificate.Request, error) { +func (v *Venafi) buildVReq(csrPEM []byte, duration time.Duration, customFields []api.CustomField) (*certificate.Request, error) { // Retrieve a copy of the Venafi zone. // This contains default values and policy control info that we can apply // and check against locally. @@ -122,7 +123,7 @@ func (v *Venafi) buildVReq(csrPEM []byte, customFields []api.CustomField) (*cert } // Create a vcert Request structure - vreq := newVRequest(tmpl) + vreq := newVRequest(tmpl, duration) // Convert over custom fields from our struct type to venafi's vfields, err := convertCustomFieldsToVcert(customFields) @@ -182,8 +183,11 @@ func convertCustomFieldsToVcert(customFields []api.CustomField) ([]certificate.C return out, nil } -func newVRequest(cert *x509.Certificate) *certificate.Request { +func newVRequest(cert *x509.Certificate, duration time.Duration) *certificate.Request { req := certificate.NewRequest(cert) + + req.ValidityDuration = &duration + req.IssuerHint = util.IssuerHintAllIssuers req.ChainOption = certificate.ChainOptionRootLast // overwrite entire Subject block diff --git a/pkg/issuer/venafi/client/request_test.go b/pkg/issuer/venafi/client/request_test.go index 9d6692a8f2a..8f7278e6292 100644 --- a/pkg/issuer/venafi/client/request_test.go +++ b/pkg/issuer/venafi/client/request_test.go @@ -20,6 +20,7 @@ import ( "crypto" "errors" "testing" + "time" "github.com/Venafi/vcert/v5/pkg/certificate" "github.com/Venafi/vcert/v5/pkg/endpoint" @@ -214,7 +215,7 @@ func TestVenafi_RequestCertificate(t *testing.T) { "foo.example.com", "bar.example.com"}) } - got, err := v.RequestCertificate(tt.args.csrPEM, tt.args.customFields) + got, err := v.RequestCertificate(tt.args.csrPEM, time.Minute, tt.args.customFields) if (err != nil) != tt.wantErr { t.Errorf("RequestCertificate() error = %v, wantErr %v", err, tt.wantErr) return @@ -235,6 +236,7 @@ func TestVenafi_RetrieveCertificate(t *testing.T) { type args struct { csrPEM []byte + duration time.Duration customFields []api.CustomField } tests := []struct { @@ -278,11 +280,11 @@ func TestVenafi_RetrieveCertificate(t *testing.T) { // this is needed to provide the fake venafi client with a "valid" pickup id // testing errors in this should be done in TestVenafi_RequestCertificate // any error returned in these tests is a hard fail - pickupID, err := v.RequestCertificate(tt.args.csrPEM, tt.args.customFields) + pickupID, err := v.RequestCertificate(tt.args.csrPEM, tt.args.duration, tt.args.customFields) if err != nil { t.Errorf("RequestCertificate() should but error but got error = %v", err) } - got, err := v.RetrieveCertificate(pickupID, tt.args.csrPEM, tt.args.customFields) + got, err := v.RetrieveCertificate(pickupID, tt.args.csrPEM, tt.args.duration, tt.args.customFields) if (err != nil) != tt.wantErr { t.Errorf("RetrieveCertificate() error = %v, wantErr %v", err, tt.wantErr) return diff --git a/pkg/issuer/venafi/client/venaficlient.go b/pkg/issuer/venafi/client/venaficlient.go index 707a011be75..8a864048e13 100644 --- a/pkg/issuer/venafi/client/venaficlient.go +++ b/pkg/issuer/venafi/client/venaficlient.go @@ -34,6 +34,7 @@ import ( internalinformers "github.com/cert-manager/cert-manager/internal/informers" cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" + cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" "github.com/cert-manager/cert-manager/pkg/issuer/venafi/client/api" "github.com/cert-manager/cert-manager/pkg/metrics" "github.com/cert-manager/cert-manager/pkg/util" @@ -43,6 +44,9 @@ const ( tppUsernameKey = "username" tppPasswordKey = "password" tppAccessTokenKey = "access-token" + // Setting ClientId & Scope statically for simplicity + tppClientId = "cert-manager.io" + tppScopes = "certificate:manage" defaultAPIKeyKey = "api-key" ) @@ -52,15 +56,15 @@ type VenafiClientBuilder func(namespace string, secretsLister internalinformers. // Interface implements a Venafi client type Interface interface { - RequestCertificate(csrPEM []byte, customFields []api.CustomField) (string, error) - RetrieveCertificate(pickupID string, csrPEM []byte, customFields []api.CustomField) ([]byte, error) + RequestCertificate(csrPEM []byte, duration time.Duration, customFields []api.CustomField) (string, error) + RetrieveCertificate(pickupID string, csrPEM []byte, duration time.Duration, customFields []api.CustomField) ([]byte, error) Ping() error ReadZoneConfiguration() (*endpoint.ZoneConfiguration, error) SetClient(endpoint.Connector) VerifyCredentials() error } -// Venafi is a implementation of vcert library to manager certificates from TPP or Venafi Cloud +// Venafi is an implementation of vcert library to manager certificates from TPP or Venafi Cloud type Venafi struct { // Namespace in which to read resources related to this Issuer from. // For Issuers, this will be the namespace of the Issuer. @@ -81,7 +85,7 @@ type connector interface { ReadZoneConfiguration() (config *endpoint.ZoneConfiguration, err error) RequestCertificate(req *certificate.Request) (requestID string, err error) RetrieveCertificate(req *certificate.Request) (certificates *certificate.PEMCollection, err error) - // TODO: (irbekrm) this method is never used- can it be removed? + // TODO: (irbekrm) this method is never used - can it be removed? RenewCertificate(req *certificate.RenewalRequest) (requestID string, err error) } @@ -93,7 +97,16 @@ func New(namespace string, secretsLister internalinformers.SecretLister, issuer return nil, err } - vcertClient, err := vcert.NewClient(cfg) + // Using `false` here ensures we do not immediately authenticate to the + // Venafi backend. Doing so invokes a call which forces the use of APIKey + // on the TPP side. This auth method has been removed since 22.4 of TPP. + // This results in an APIKey usage error. + // Reference code from vcert library which still refers to the APIKey. + // ref: https://github.com/Venafi/vcert/blob/master/pkg/venafi/tpp/connector.go#L137-L146 + // + // cert-manager uses the VerifyCredentials function below after the client + // has been created. + vcertClient, err := vcert.NewClient(cfg, false) if err != nil { return nil, fmt.Errorf("error creating Venafi client: %s", err.Error()) } @@ -116,14 +129,22 @@ func New(namespace string, secretsLister internalinformers.SecretLister, issuer instrumentedVCertClient := newInstumentedConnector(vcertClient, metrics, logger) - return &Venafi{ + v := &Venafi{ namespace: namespace, secretsLister: secretsLister, vcertClient: instrumentedVCertClient, cloudClient: cc, tppClient: tppc, config: cfg, - }, nil + } + + // Since we did not authenticate when creating the client, authenticate + // now to verify the credentials passed. Ensure that upon leaving this + // function that credentials have been verified. + if err := v.VerifyCredentials(); err != nil { + return nil, err + } + return v, nil } // configForIssuer will convert a cert-manager Venafi issuer into a vcert.Config @@ -139,6 +160,11 @@ func configForIssuer(iss cmapi.GenericIssuer, secretsLister internalinformers.Se return nil, err } + caBundle, err := caBundleForVcertTPP(tpp, secretsLister, namespace) + if err != nil { + return nil, err + } + username := string(tppSecret.Data[tppUsernameKey]) password := string(tppSecret.Data[tppPasswordKey]) accessToken := string(tppSecret.Data[tppAccessTokenKey]) @@ -156,7 +182,7 @@ func configForIssuer(iss cmapi.GenericIssuer, secretsLister internalinformers.Se // below. But we want to retain the CA bundle validation errors that // were returned in previous versions of this code. // https://github.com/Venafi/vcert/blob/89645a7710a7b529765274cb60dc5e28066217a1/client.go#L55-L61 - ConnectionTrust: string(tpp.CABundle), + ConnectionTrust: string(caBundle), Credentials: &endpoint.Authentication{ User: username, Password: password, @@ -164,7 +190,7 @@ func configForIssuer(iss cmapi.GenericIssuer, secretsLister internalinformers.Se }, Client: httpClientForVcert(&httpClientForVcertOptions{ UserAgent: ptr.To(userAgent), - CABundle: tpp.CABundle, + CABundle: caBundle, TLSRenegotiationSupport: ptr.To(tls.RenegotiateOnceAsClient), }), }, nil @@ -312,6 +338,48 @@ func httpClientForVcert(options *httpClientForVcertOptions) *http.Client { } } +// caBundleForVcertTPP is used to by ConnectionTrust and Client fields of vcert.Config. +// This function sets appropriate CA based on provided bundle or kubernetes secret +// If no custom CA bundle is configured, an empty byte slice is returned. +// Assumes exactly one of the in-line/Secret CA bundles are defined. +// If the `key` of the Secret CA bundle is not defined, its value defaults to +// `ca.crt`. +func caBundleForVcertTPP(tpp *cmapi.VenafiTPP, secretsLister internalinformers.SecretLister, namespace string) (caBundle []byte, err error) { + if len(tpp.CABundle) > 0 { + return tpp.CABundle, nil + } + + secretRef := tpp.CABundleSecretRef + if secretRef == nil { + return nil, nil + } + + var certBytes []byte + var ok bool + + if secretRef != nil { + secret, err := secretsLister.Secrets(namespace).Get(secretRef.Name) + if err != nil { + return nil, fmt.Errorf("could not access secret '%s/%s': %s", namespace, secretRef.Name, err) + } + + var key string + if secretRef.Key != "" { + key = secretRef.Key + } else { + key = cmmeta.TLSCAKey + } + + certBytes, ok = secret.Data[key] + if !ok { + return nil, fmt.Errorf("no data for %q in secret '%s/%s'", key, namespace, secretRef.Name) + } + + } + + return certBytes, nil +} + func (v *Venafi) Ping() error { return v.vcertClient.Ping() } @@ -355,9 +423,24 @@ func (v *Venafi) VerifyCredentials() error { } if v.config.Credentials.User != "" && v.config.Credentials.Password != "" { - err := v.tppClient.Authenticate(&endpoint.Authentication{ + // Use vcert library GetRefreshToken which brings back a token pair. + // This includes the access_token which we set against the tppClient. + // Replaces usage of v.tppClient.Authenticate function which would + // have called the APIKey endpoint resulting in error. + resp, err := v.tppClient.GetRefreshToken(&endpoint.Authentication{ User: v.config.Credentials.User, Password: v.config.Credentials.Password, + ClientId: tppClientId, + Scope: tppScopes, + }) + + if err != nil { + return fmt.Errorf("tppClient.GetRefreshToken: %v", err) + } + + // Ensure that the access_token is stored on the tppClient object. + err = v.tppClient.Authenticate(&endpoint.Authentication{ + AccessToken: resp.Access_token, }) if err != nil { diff --git a/pkg/issuer/venafi/client/venaficlient_test.go b/pkg/issuer/venafi/client/venaficlient_test.go index 9a44ea042e1..cc72822b94b 100644 --- a/pkg/issuer/venafi/client/venaficlient_test.go +++ b/pkg/issuer/venafi/client/venaficlient_test.go @@ -31,6 +31,50 @@ import ( testlisters "github.com/cert-manager/cert-manager/test/unit/listers" ) +const ( + zone = "test-zone" + username = "test-username" + password = "test-password" + accessToken = "KT2EEVTIjWM/37L78dqJAg==" + apiKey = "test-api-key" + customKey = "test-custom-key" + defaultCaKey = "ca.crt" + customCaKey = "custom-ca-key" + tppUrl = "https://tpp.example.com/vedsdk" + customCaSecretName = "custom-ca-secret" + testLeafCertificate = `-----BEGIN CERTIFICATE----- +MIIFFTCCAv2gAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwRjELMAkGA1UEBhMCVVMx +CzAJBgNVBAgMAkNBMRQwEgYDVQQKDAtDRVJUTUFOQUdFUjEUMBIGA1UEAwwLZm9v +LmJhci5pbnQwHhcNMjAxMDAyMTQ1NzMwWhcNMjExMDEyMTQ1NzMwWjBKMQswCQYD +VQQGEwJVUzELMAkGA1UECAwCQ0ExFDASBgNVBAoMC0NFUlRNQU5BR0VSMRgwFgYD +VQQDDA9leGFtcGxlLmZvby5iYXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK +AoIBAQC8yTGzYIX3OoRma11vewbNf8dgKHc9GgvJJ29SVjaNwRAJjKOXokGOwcyQ +7Ieb1puYQ5KdSPC1IxyUx77URovIvd3Wql+J1gIxyrdN3om3uQdJ2ck6xatBZ8BI +Y3Z+6WpUQ2067Wk4KpUGfMrbGg5zVcesh6zc8J9yEiItUENeR+6GyEf+B8IJ0xqe +5lps2LaxZp6I6vaKeMELjj17Nb9r81Rjyk8BN7yX74tFE1mUGX9o75tsODU9IrYW +nqSl5gr2PO9Zb/bd6zhoncLJr9kj2tk6cLRPht+JOPoA2LAP6D0aEdC3a2XWuj2E +EsUYJR9e5C/X49VQaak0VdNnhO6RAgMBAAGjggEHMIIBAzAJBgNVHRMEAjAAMBEG +CWCGSAGG+EIBAQQEAwIGQDAzBglghkgBhvhCAQ0EJhYkT3BlblNTTCBHZW5lcmF0 +ZWQgU2VydmVyIENlcnRpZmljYXRlMB0GA1UdDgQWBBQ41U/GiA2rQtuMz6tNL55C +o4pnBDBqBgNVHSMEYzBhgBSfus9cb7UA/PCfHJAGtL6ot2EpLKFFpEMwQTEPMA0G +A1UEAwwGYmFyLmNhMQswCQYDVQQGEwJVUzELMAkGA1UECAwCQ0ExFDASBgNVBAoM +C0NFUlRNQU5BR0VSggIQADAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYB +BQUHAwEwDQYJKoZIhvcNAQELBQADggIBAFFTJNqKSkkJNWWt+R7WFNIEKoaPcFH5 +yupCQRYX9LK2cXdBQpF458/PFxREyt5jKFUcDyzQhOglFYq0hfcoAc2EB3Vw8Ww9 +c4QCiCU6ehJVMRt7MzZ9uUVGCRVOA+Fa1tIFfL3dKlI+4pTSbDhNHRqDtFhfWOZK +bgtruQEUOW1lQR61AsidOF1iwDBU6ckpVY9Lc2SHEAfQFs0MoXmJ8B4MqFptF4+H +al+IAeQ1bC/2EccFYg3tq9+YKHDCyghHf8qeKJR9tZslvkHrAzuX56e0MHxM3AD6 +D0L8nG3DsrHcjK0MlVUWmq0QFnY5t+78iocLoQZzpILZYuZn3p+XNlUdW4lcqSBn +y5fUwQ3RIuvN66GBhTeDV4vzYPa7g3i9PoBFoG50Ayr6VtIVn08rnl03lgp57Edv +A5oRrSHcd8Hd8/lk0Y9BpFTnZEg7RLhFhh9nazVp1/pjwaGx449uHIGEoxREQoPq +9Q+KLGMJR2IqiNI6+U1z2j8BChTOPkuAvsnSuAXyotu4BXBL5zbDzfDoggEk1ps1 +bfHWnmdelE0WP7h7B0PSA0EXn0pdg2VQIQsknV6y3MCzFQCCSAog/OSguokXG1PG +l6fctDJ3+AF07EjtgArOBkUn7Nt3/CgMN8I1rnBZ1Vmd8yrHEP0E3yRXBL7cDj5j +Fqmd89NQLlGs +-----END CERTIFICATE----- +` +) + func checkNoConfigReturned(t *testing.T, cnf *vcert.Config) { if cnf != nil { t.Errorf("expected no config to be returned, got=%+v", cnf) @@ -48,6 +92,28 @@ func checkZone(t *testing.T, zone string, cnf *vcert.Config) { } } +func checkTppUrl(t *testing.T, tppUrl string, cnf *vcert.Config) { + if cnf == nil { + t.Errorf("expected config but got: %+v", cnf) + } + + if tppUrl != cnf.BaseUrl { + t.Errorf("got unexpected BaseUrl set, exp=%s got=%s", + tppUrl, cnf.BaseUrl) + } +} + +func checkTppCa(t *testing.T, ca string, cnf *vcert.Config) { + if cnf == nil { + t.Errorf("expected config but got: %+v", cnf) + } + + if ca != cnf.ConnectionTrust { + t.Errorf("got unexpected CA as trust, exp=%s got=%s", + ca, cnf.ConnectionTrust) + } +} + func generateSecretLister(s *corev1.Secret, err error) internalinformers.SecretLister { return &testlisters.FakeSecretLister{ SecretsFn: func(string) corelisters.SecretNamespaceLister { @@ -79,6 +145,36 @@ func TestConfigForIssuerT(t *testing.T) { }), ) + tppIssuerWithoutCA := gen.IssuerFrom(baseIssuer, + gen.SetIssuerVenafi(cmapi.VenafiIssuer{ + Zone: zone, + TPP: &cmapi.VenafiTPP{ + URL: tppUrl, + }, + }), + ) + + tppIssuerWithCABundle := gen.IssuerFrom(tppIssuerWithoutCA, + gen.SetIssuerVenafi(cmapi.VenafiIssuer{ + TPP: &cmapi.VenafiTPP{ + CABundle: []byte(testLeafCertificate), + }, + }), + ) + + tppIssuerWithCABundleSecretRef := gen.IssuerFrom(tppIssuer, + gen.SetIssuerVenafi(cmapi.VenafiIssuer{ + TPP: &cmapi.VenafiTPP{ + CABundleSecretRef: &cmmeta.SecretKeySelector{ + Key: customCaKey, + LocalObjectReference: cmmeta.LocalObjectReference{ + Name: customCaSecretName, + }, + }, + }, + }), + ) + cloudIssuer := gen.IssuerFrom(baseIssuer, gen.SetIssuerVenafi(cmapi.VenafiIssuer{ Zone: zone, @@ -109,6 +205,22 @@ func TestConfigForIssuerT(t *testing.T) { CheckFn: checkNoConfigReturned, expectedErr: true, }, + "if TPP and neither caBundle nor caBundleSecretRef is specified, CA bundle is not set in vcert config": { + iss: tppIssuerWithoutCA, + secretsLister: generateSecretLister(&corev1.Secret{ + Data: map[string][]byte{ + tppUsernameKey: []byte(username), + tppPasswordKey: []byte(password), + }, + }, nil), + CheckFn: func(t *testing.T, cnf *vcert.Config) { + if trust := cnf.ConnectionTrust; trust != "" { + t.Errorf("got unexpected CA bundle: %s", trust) + } + checkTppUrl(t, tppUrl, cnf) + }, + expectedErr: false, + }, "if TPP and secret returns user/pass, should return config with those credentials": { iss: tppIssuer, secretsLister: generateSecretLister(&corev1.Secret{ @@ -143,6 +255,32 @@ func TestConfigForIssuerT(t *testing.T) { }, expectedErr: false, }, + // NOTE: Below scenarios assume valid TPP CAs, the scenarios with invalid TPP CAs are run part of TestCaBundleForVcertTPP test + "if TPP and a good caBundle specified, CA bundle should be added to ConnectionTrust and Client in vcert config": { + iss: tppIssuerWithCABundle, + secretsLister: generateSecretLister(&corev1.Secret{ + Data: map[string][]byte{ + tppAccessTokenKey: []byte(accessToken), + }, + }, nil), + CheckFn: func(t *testing.T, cnf *vcert.Config) { + checkTppCa(t, testLeafCertificate, cnf) + }, + expectedErr: false, + }, + "if TPP and a good caBundleSecretRef specified, CA bundle should be added to ConnectionTrust and Client in vcert config": { + iss: tppIssuerWithCABundleSecretRef, + // tppAccessTokenKey secret lister is not passed as we only have single secretsLister in testConfigForIssuerT struck + secretsLister: generateSecretLister(&corev1.Secret{ + Data: map[string][]byte{ + customCaKey: []byte(testLeafCertificate), + }, + }, nil), + CheckFn: func(t *testing.T, cnf *vcert.Config) { + checkTppCa(t, testLeafCertificate, cnf) + }, + expectedErr: false, + }, "if Cloud but getting secret fails, should error": { iss: cloudIssuer, secretsLister: generateSecretLister(nil, errors.New("this is a network error")), @@ -213,9 +351,108 @@ func TestConfigForIssuerT(t *testing.T) { } } +func TestCaBundleForVcertTPP(t *testing.T) { + baseIssuer := gen.Issuer("non-venafi-issue", + gen.SetIssuerVenafi(cmapi.VenafiIssuer{}), + ) + + tppIssuer := gen.IssuerFrom(baseIssuer, + gen.SetIssuerVenafi(cmapi.VenafiIssuer{ + Zone: zone, + TPP: &cmapi.VenafiTPP{}, + }), + ) + + tppIssuerWithCABundle := gen.IssuerFrom(tppIssuer, + gen.SetIssuerVenafi(cmapi.VenafiIssuer{ + TPP: &cmapi.VenafiTPP{ + CABundle: []byte(testLeafCertificate), + }, + }), + ) + + tppIssuerWithCABundleSecretRefNoKey := gen.IssuerFrom(tppIssuer, + gen.SetIssuerVenafi(cmapi.VenafiIssuer{ + TPP: &cmapi.VenafiTPP{ + CABundleSecretRef: &cmmeta.SecretKeySelector{ + LocalObjectReference: cmmeta.LocalObjectReference{ + Name: customCaSecretName, + }, + }, + }, + }), + ) + + tppIssuerWithCABundleSecretRef := gen.IssuerFrom(tppIssuer, + gen.SetIssuerVenafi(cmapi.VenafiIssuer{ + TPP: &cmapi.VenafiTPP{ + CABundleSecretRef: &cmmeta.SecretKeySelector{ + Key: customCaKey, + LocalObjectReference: cmmeta.LocalObjectReference{ + Name: customCaSecretName, + }, + }, + }, + }), + ) + + tests := map[string]testConfigForIssuerT{ + "if TPP and neither of caBundle nor caBundleSecretRef is specified, CA bundle is not returned": { + iss: tppIssuer, + caBundle: "", + expectedErr: false, + }, + "if TPP and caBundle is specified, correct CA bundle from CABundle should be returned": { + iss: tppIssuerWithCABundle, + caBundle: testLeafCertificate, + expectedErr: false, + }, + "if TPP and caBundleSecretRef is specified, correct CA bundle from CABundleSecretRef should be returned": { + iss: tppIssuerWithCABundleSecretRef, + caBundle: testLeafCertificate, + secretsLister: generateSecretLister(&corev1.Secret{ + Data: map[string][]byte{ + customCaKey: []byte(testLeafCertificate), + }, + }, nil), + expectedErr: false, + }, + "if TPP and caBundleSecretRef is specified without `key`, correct CA bundle from CABundleSecretRef with default key should be returned": { + iss: tppIssuerWithCABundleSecretRefNoKey, + caBundle: testLeafCertificate, + secretsLister: generateSecretLister(&corev1.Secret{ + Data: map[string][]byte{ + defaultCaKey: []byte(testLeafCertificate), + }, + }, nil), + expectedErr: false, + }, + "if TPP and caBundleSecretRef is specified, but getting secret fails should error": { + iss: tppIssuerWithCABundleSecretRef, + caBundle: testLeafCertificate, + secretsLister: generateSecretLister(nil, errors.New("this is a network error")), + expectedErr: true, + }, + // TODO: write test cases where bad CA is passed. + // above TODO can be ignored if the checks are added to issuer validations per below link + // https://github.com/cert-manager/cert-manager/blob/v1.14.4/internal/apis/certmanager/validation/issuer.go#L354 + // even though we are not prevalidating, vcert http.Client would anyway fail when using invalid CA + // 2 scenarios with bad CAs: + // "if TPP and caBundle is specified, a bad bundle from CABundle should error" + // "if TPP and caBundleSecretRef is specified, a bad bundle from a CABundleSecretRef should error" + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + test.runTppCaTest(t) + }) + } +} + type testConfigForIssuerT struct { iss cmapi.GenericIssuer secretsLister internalinformers.SecretLister + caBundle string expectedErr bool @@ -235,3 +472,21 @@ func (c *testConfigForIssuerT) runTest(t *testing.T) { c.CheckFn(t, resp) } } + +func (c *testConfigForIssuerT) runTppCaTest(t *testing.T) { + caResp, err := caBundleForVcertTPP(c.iss.GetSpec().Venafi.TPP, c.secretsLister, "test-namespace") + + if err != nil && !c.expectedErr { + t.Errorf("expected to not get an error, but got: %v", err) + } + if err == nil && c.expectedErr { + t.Errorf("expected to get an error but did not get one") + } + + if !c.expectedErr { + if c.caBundle != string(caResp) { + t.Errorf("got unexpected CA bundle, exp=%s got=%s", + c.caBundle, caResp) + } + } +} diff --git a/pkg/issuer/venafi/venafi.go b/pkg/issuer/venafi/venafi.go index 7fba4cfeebe..6cfb2c0fc0f 100644 --- a/pkg/issuer/venafi/venafi.go +++ b/pkg/issuer/venafi/venafi.go @@ -28,7 +28,7 @@ import ( logf "github.com/cert-manager/cert-manager/pkg/logs" ) -// Venafi is a implementation of govcert library to manager certificates from TPP or Venafi Cloud +// Venafi is an implementation of govcert library to manager certificates from TPP or Venafi Cloud type Venafi struct { issuer cmapi.GenericIssuer *controller.Context diff --git a/pkg/logs/logs.go b/pkg/logs/logs.go index 9af6d275429..cbb498331e2 100644 --- a/pkg/logs/logs.go +++ b/pkg/logs/logs.go @@ -20,6 +20,7 @@ import ( "context" "flag" "fmt" + "math" "github.com/go-logr/logr" "github.com/spf13/pflag" @@ -169,7 +170,14 @@ func NewContext(ctx context.Context, l logr.Logger, names ...string) context.Con } func V(level int) klog.Verbose { - return klog.V(klog.Level(level)) + switch { + case level < math.MinInt32: + return klog.V(klog.Level(math.MinInt32)) + case level > math.MaxInt32: + return klog.V(klog.Level(math.MaxInt32)) + default: + return klog.V(klog.Level(level)) + } } // LogWithFormat is a wrapper for logger that adds Infof method to log messages diff --git a/pkg/metrics/certificates.go b/pkg/metrics/certificates.go index 4feeb28a426..bb582840135 100644 --- a/pkg/metrics/certificates.go +++ b/pkg/metrics/certificates.go @@ -18,7 +18,7 @@ package metrics import ( "github.com/prometheus/client_golang/prometheus" - "k8s.io/client-go/tools/cache" + "k8s.io/apimachinery/pkg/types" cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" @@ -99,12 +99,8 @@ func (m *Metrics) updateCertificateReadyStatus(crt *cmapi.Certificate, current c // RemoveCertificate will delete the Certificate metrics from continuing to be // exposed. -func (m *Metrics) RemoveCertificate(key string) { - namespace, name, err := cache.SplitMetaNamespaceKey(key) - if err != nil { - m.log.Error(err, "failed to get namespace and name from key") - return - } +func (m *Metrics) RemoveCertificate(key types.NamespacedName) { + namespace, name := key.Namespace, key.Name m.certificateExpiryTimeSeconds.DeletePartialMatch(prometheus.Labels{"name": name, "namespace": namespace}) m.certificateRenewalTimeSeconds.DeletePartialMatch(prometheus.Labels{"name": name, "namespace": namespace}) diff --git a/pkg/metrics/certificates_test.go b/pkg/metrics/certificates_test.go index 835d36554aa..60af9282d7f 100644 --- a/pkg/metrics/certificates_test.go +++ b/pkg/metrics/certificates_test.go @@ -24,6 +24,7 @@ import ( logtesting "github.com/go-logr/logr/testing" "github.com/prometheus/client_golang/prometheus/testutil" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" "k8s.io/utils/clock" cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" @@ -322,7 +323,10 @@ func TestCertificateCache(t *testing.T) { } // Remove second certificate and check not exists - m.RemoveCertificate("default-unit-test-ns/crt2") + m.RemoveCertificate(types.NamespacedName{ + Namespace: "default-unit-test-ns", + Name: "crt2", + }) if err := testutil.CollectAndCompare(m.certificateReadyStatus, strings.NewReader(readyMetadata+` certmanager_certificate_ready_status{condition="False",issuer_group="test-issuer-group",issuer_kind="test-issuer-kind",issuer_name="test-issuer",name="crt1",namespace="default-unit-test-ns"} 0 @@ -347,19 +351,22 @@ func TestCertificateCache(t *testing.T) { } // Remove all Certificates (even is already removed) and observe no Certificates - m.RemoveCertificate("default-unit-test-ns/crt1") - m.RemoveCertificate("default-unit-test-ns/crt2") - m.RemoveCertificate("default-unit-test-ns/crt3") - if err := testutil.CollectAndCompare(m.certificateReadyStatus, - strings.NewReader(readyMetadata), - "certmanager_certificate_ready_status", - ); err != nil { - t.Errorf("unexpected collecting result:\n%s", err) + m.RemoveCertificate(types.NamespacedName{ + Namespace: "default-unit-test-ns", + Name: "crt1", + }) + m.RemoveCertificate(types.NamespacedName{ + Namespace: "default-unit-test-ns", + Name: "crt2", + }) + m.RemoveCertificate(types.NamespacedName{ + Namespace: "default-unit-test-ns", + Name: "crt3", + }) + if testutil.CollectAndCount(m.certificateReadyStatus, "certmanager_certificate_ready_status") != 0 { + t.Errorf("unexpected collecting result") } - if err := testutil.CollectAndCompare(m.certificateExpiryTimeSeconds, - strings.NewReader(expiryMetadata), - "certmanager_certificate_expiration_timestamp_seconds", - ); err != nil { - t.Errorf("unexpected collecting result:\n%s", err) + if testutil.CollectAndCount(m.certificateExpiryTimeSeconds, "certmanager_certificate_expiration_timestamp_seconds") != 0 { + t.Errorf("unexpected collecting result") } } diff --git a/pkg/metrics/metrics.go b/pkg/metrics/metrics.go index e3032375ed9..4464809d5fb 100644 --- a/pkg/metrics/metrics.go +++ b/pkg/metrics/metrics.go @@ -32,6 +32,7 @@ import ( "github.com/go-logr/logr" "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/collectors" "github.com/prometheus/client_golang/prometheus/promhttp" "k8s.io/utils/clock" @@ -186,10 +187,16 @@ func New(log logr.Logger, c clock.Clock) *Metrics { ) ) + // Create Registry and register the recommended collectors + registry := prometheus.NewRegistry() + registry.MustRegister( + collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}), + collectors.NewGoCollector(), + ) // Create server and register Prometheus metrics handler m := &Metrics{ log: log.WithName("metrics"), - registry: prometheus.NewRegistry(), + registry: registry, clockTimeSeconds: clockTimeSeconds, clockTimeSecondsGauge: clockTimeSecondsGauge, diff --git a/pkg/scheduler/scheduler.go b/pkg/scheduler/scheduler.go index 1d4f2af3cb5..1c95992000c 100644 --- a/pkg/scheduler/scheduler.go +++ b/pkg/scheduler/scheduler.go @@ -54,24 +54,25 @@ func afterFunc(c clock.Clock, d time.Duration, f func()) (cancel func()) { } // ProcessFunc is a function to process an item in the work queue. -type ProcessFunc func(interface{}) +type ProcessFunc[T comparable] func(T) // ScheduledWorkQueue is an interface to describe a queue that will execute the // given ProcessFunc with the object given to Add once the time.Duration is up, // since the time of calling Add. -type ScheduledWorkQueue interface { +type ScheduledWorkQueue[T comparable] interface { // Add will add an item to this queue, executing the ProcessFunc after the // Duration has come (since the time Add was called). If an existing Timer // for obj already exists, the previous timer will be cancelled. - Add(interface{}, time.Duration) + Add(T, time.Duration) + // Forget will cancel the timer for the given object, if the timer exists. - Forget(interface{}) + Forget(T) } -type scheduledWorkQueue struct { - processFunc ProcessFunc +type scheduledWorkQueue[T comparable] struct { + processFunc ProcessFunc[T] clock clock.Clock - work map[interface{}]func() + work map[T]func() workLock sync.Mutex // Testing purposes. @@ -79,11 +80,11 @@ type scheduledWorkQueue struct { } // NewScheduledWorkQueue will create a new workqueue with the given processFunc -func NewScheduledWorkQueue(clock clock.Clock, processFunc ProcessFunc) ScheduledWorkQueue { - return &scheduledWorkQueue{ +func NewScheduledWorkQueue[T comparable](clock clock.Clock, processFunc ProcessFunc[T]) ScheduledWorkQueue[T] { + return &scheduledWorkQueue[T]{ processFunc: processFunc, clock: clock, - work: make(map[interface{}]func()), + work: make(map[T]func()), workLock: sync.Mutex{}, afterFunc: afterFunc, @@ -93,7 +94,7 @@ func NewScheduledWorkQueue(clock clock.Clock, processFunc ProcessFunc) Scheduled // Add will add an item to this queue, executing the ProcessFunc after the // Duration has come (since the time Add was called). If an existing Timer for // obj already exists, the previous timer will be cancelled. -func (s *scheduledWorkQueue) Add(obj interface{}, duration time.Duration) { +func (s *scheduledWorkQueue[T]) Add(obj T, duration time.Duration) { s.workLock.Lock() defer s.workLock.Unlock() @@ -109,7 +110,7 @@ func (s *scheduledWorkQueue) Add(obj interface{}, duration time.Duration) { } // Forget will cancel the timer for the given object, if the timer exists. -func (s *scheduledWorkQueue) Forget(obj interface{}) { +func (s *scheduledWorkQueue[T]) Forget(obj T) { s.workLock.Lock() defer s.workLock.Unlock() diff --git a/pkg/scheduler/scheduler_test.go b/pkg/scheduler/scheduler_test.go index 5a0da475c1f..762dd45e6b8 100644 --- a/pkg/scheduler/scheduler_test.go +++ b/pkg/scheduler/scheduler_test.go @@ -99,7 +99,7 @@ func TestAdd(t *testing.T) { waitSubtest := make(chan struct{}) return func(t *testing.T) { startTime := after.currentTime - queue := NewScheduledWorkQueue(clock.RealClock{}, func(obj interface{}) { + queue := NewScheduledWorkQueue(clock.RealClock{}, func(obj string) { defer wg.Done() durationEarly := test.duration - after.currentTime.Sub(startTime) @@ -111,7 +111,7 @@ func TestAdd(t *testing.T) { } waitSubtest <- struct{}{} }) - queue.(*scheduledWorkQueue).afterFunc = after.AfterFunc + queue.(*scheduledWorkQueue[string]).afterFunc = after.AfterFunc queue.Add(test.obj, test.duration) after.warp(test.duration + time.Millisecond) <-waitSubtest @@ -140,10 +140,10 @@ func TestForget(t *testing.T) { t.Run(test.obj, func(test testT) func(*testing.T) { return func(t *testing.T) { defer wg.Done() - queue := NewScheduledWorkQueue(clock.RealClock{}, func(_ interface{}) { + queue := NewScheduledWorkQueue(clock.RealClock{}, func(_ string) { t.Errorf("scheduled function should never be called") }) - queue.(*scheduledWorkQueue).afterFunc = after.AfterFunc + queue.(*scheduledWorkQueue[string]).afterFunc = after.AfterFunc queue.Add(test.obj, test.duration) queue.Forget(test.obj) after.warp(test.duration * 2) @@ -160,10 +160,10 @@ func TestConcurrentAdd(t *testing.T) { after := newMockAfter() var wg sync.WaitGroup - queue := NewScheduledWorkQueue(clock.RealClock{}, func(obj interface{}) { + queue := NewScheduledWorkQueue(clock.RealClock{}, func(obj int) { t.Fatalf("should not be called, but was called with %v", obj) }) - queue.(*scheduledWorkQueue).afterFunc = after.AfterFunc + queue.(*scheduledWorkQueue[int]).afterFunc = after.AfterFunc for i := 0; i < 1000; i++ { wg.Add(1) diff --git a/pkg/scheduler/test/fake.go b/pkg/scheduler/test/fake.go index 89d66e3f5f1..20843f9a292 100644 --- a/pkg/scheduler/test/fake.go +++ b/pkg/scheduler/test/fake.go @@ -19,21 +19,23 @@ package test import ( "time" + "k8s.io/apimachinery/pkg/types" + "github.com/cert-manager/cert-manager/pkg/scheduler" ) -var _ scheduler.ScheduledWorkQueue = &FakeScheduler{} +var _ scheduler.ScheduledWorkQueue[types.NamespacedName] = &FakeScheduler{} // FakeScheduler allows stubbing the methods of scheduler.ScheduledWorkQueue in tests. type FakeScheduler struct { - AddFunc func(interface{}, time.Duration) - ForgetFunc func(interface{}) + AddFunc func(types.NamespacedName, time.Duration) + ForgetFunc func(types.NamespacedName) } -func (f *FakeScheduler) Add(obj interface{}, duration time.Duration) { +func (f *FakeScheduler) Add(obj types.NamespacedName, duration time.Duration) { f.AddFunc(obj, duration) } -func (f *FakeScheduler) Forget(obj interface{}) { +func (f *FakeScheduler) Forget(obj types.NamespacedName) { f.ForgetFunc(obj) } diff --git a/pkg/server/listener.go b/pkg/server/listener.go index d4152472dc6..27c9c832d31 100644 --- a/pkg/server/listener.go +++ b/pkg/server/listener.go @@ -74,7 +74,7 @@ func WithCertificateSource(certificateSource servertls.CertificateSource) Listen } } -// WithTLSCipherSuites specifies the allowed ciper suites, when an empty/nil array is passed +// WithTLSCipherSuites specifies the allowed cipher suites, when an empty/nil array is passed // the go defaults are used func WithTLSCipherSuites(suites []string) ListenerOption { return func(config *ListenerConfig) error { diff --git a/pkg/server/tls/authority/authority.go b/pkg/server/tls/authority/authority.go index c846c98ae5e..bdabce50b9f 100644 --- a/pkg/server/tls/authority/authority.go +++ b/pkg/server/tls/authority/authority.go @@ -86,6 +86,8 @@ type DynamicAuthority struct { // watchMutex gates access to the slice of watch channels watchMutex sync.Mutex watches []chan<- struct{} + + newClient func(c *rest.Config) (kubernetes.Interface, error) // for testing } type SignFunc func(template *x509.Certificate) (*x509.Certificate, error) @@ -107,7 +109,13 @@ func (d *DynamicAuthority) Run(ctx context.Context) error { d.LeafDuration = time.Hour * 24 * 7 // 7d } - cl, err := kubernetes.NewForConfig(d.RESTConfig) + if d.newClient == nil { + d.newClient = func(c *rest.Config) (kubernetes.Interface, error) { + return kubernetes.NewForConfig(c) + } + } + + cl, err := d.newClient(d.RESTConfig) if err != nil { return err } @@ -120,18 +128,26 @@ func (d *DynamicAuthority) Run(ctx context.Context) error { }), ) informer := factory.Core().V1().Secrets().Informer() - informer.AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err := informer.AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: d.handleAdd, UpdateFunc: d.handleUpdate, DeleteFunc: d.handleDelete, - }) + }); err != nil { + return fmt.Errorf("error setting up event handler: %v", err) + } d.lister = factory.Core().V1().Secrets().Lister().Secrets(d.SecretNamespace) d.client = cl.CoreV1().Secrets(d.SecretNamespace) // start the informers and wait for the cache to sync factory.Start(ctx.Done()) + defer factory.Shutdown() + if !cache.WaitForCacheSync(ctx.Done(), informer.HasSynced) { + if ctx.Err() != nil { // context was cancelled, we are shutting down; so, don't return an error because the informer caches were not yet synced + return nil + } + return fmt.Errorf("failed waiting for informer caches to sync") } @@ -155,8 +171,6 @@ func (d *DynamicAuthority) Run(ctx context.Context) error { return err } - factory.Shutdown() - return nil } @@ -167,6 +181,10 @@ func (d *DynamicAuthority) Sign(template *x509.Certificate) (*x509.Certificate, d.signMutex.Lock() defer d.signMutex.Unlock() + if d.currentCertData == nil || d.currentPrivateKeyData == nil { + return nil, fmt.Errorf("no tls.Certificate available yet, try again later") + } + // tls.X509KeyPair performs a number of verification checks against the // keypair, so we run it to verify the certificate and private key are // valid. @@ -211,7 +229,7 @@ func (d *DynamicAuthority) Sign(template *x509.Certificate) (*x509.Certificate, return cert, nil } -// WatchRotation will returns a channel that fires notifications if the CA +// WatchRotation will return a channel that fires notifications if the CA // certificate is rotated/updated. // This can be used to automatically trigger rotation of leaf certificates // when the root CA changes. @@ -242,12 +260,14 @@ func (d *DynamicAuthority) ensureCA(ctx context.Context) error { s, err := d.lister.Get(d.SecretName) if apierrors.IsNotFound(err) { + d.log.V(logf.InfoLevel).Info("Will regenerate CA", "reason", "CA secret not found") return d.regenerateCA(ctx, nil) } if err != nil { return err } - if d.caRequiresRegeneration(s) { + if required, reason := caRequiresRegeneration(s); required { + d.log.V(logf.InfoLevel).Info("Will regenerate CA", "reason", reason) return d.regenerateCA(ctx, s.DeepCopy()) } d.notifyWatches(s.Data[corev1.TLSCertKey], s.Data[corev1.TLSPrivateKeyKey]) @@ -260,7 +280,14 @@ func (d *DynamicAuthority) notifyWatches(newCertData, newPrivateKeyData []byte) return } - d.log.V(logf.DebugLevel).Info("Detected change in CA secret data, notifying watchers...") + d.log.V(logf.InfoLevel).Info("Detected change in CA secret data, update current CA data and notify watches") + + func() { + d.signMutex.Lock() + defer d.signMutex.Unlock() + d.currentCertData = newCertData + d.currentPrivateKeyData = newPrivateKeyData + }() func() { d.watchMutex.Lock() @@ -274,53 +301,42 @@ func (d *DynamicAuthority) notifyWatches(newCertData, newPrivateKeyData []byte) } } }() - - func() { - d.signMutex.Lock() - defer d.signMutex.Unlock() - d.currentCertData = newCertData - d.currentPrivateKeyData = newPrivateKeyData - }() } // caRequiresRegeneration will check data in a Secret resource and return true // if the CA needs to be regenerated for any reason. -func (d *DynamicAuthority) caRequiresRegeneration(s *corev1.Secret) bool { +func caRequiresRegeneration(s *corev1.Secret) (bool, string) { if s.Data == nil { - return true + return true, "Missing data in CA secret." } caData := s.Data[cmmeta.TLSCAKey] pkData := s.Data[corev1.TLSPrivateKeyKey] certData := s.Data[corev1.TLSCertKey] if len(caData) == 0 || len(pkData) == 0 || len(certData) == 0 { - d.log.V(logf.InfoLevel).Info("Missing data in CA secret. Regenerating") - return true + return true, "Missing data in CA secret." } // ensure that the ca.crt and tls.crt keys are equal if !bytes.Equal(caData, certData) { - return true + return true, "Different data in ca.crt and tls.crt." } cert, err := tls.X509KeyPair(certData, pkData) if err != nil { - d.log.Error(err, "Failed to parse data in CA secret. Regenerating") - return true + return true, "Failed to parse data in CA secret." } x509Cert, err := x509.ParseCertificate(cert.Certificate[0]) if err != nil { - d.log.Error(err, "internal error parsing x509 certificate") - return true + return true, "Internal error parsing x509 certificate." } if !x509Cert.IsCA { - d.log.V(logf.InfoLevel).Info("Stored certificate is not marked as a CA. Regenerating...") - return true + return true, "Stored certificate is not marked as a CA." } // renew the root CA when the current one is 2/3 of the way through its life if time.Until(x509Cert.NotAfter) < (x509Cert.NotAfter.Sub(x509Cert.NotBefore) / 3) { - d.log.V(logf.InfoLevel).Info("Root CA certificate is nearing expiry. Regenerating...") - return true + return true, "CA certificate is nearing expiry." } - return false + + return false, "" } var serialNumberLimit = new(big.Int).Lsh(big.NewInt(1), 128) @@ -329,7 +345,6 @@ var serialNumberLimit = new(big.Int).Lsh(big.NewInt(1), 128) // If the provided Secret is nil, a new secret resource will be Created. // Otherwise, the provided resource will be modified and Updated. func (d *DynamicAuthority) regenerateCA(ctx context.Context, s *corev1.Secret) error { - d.log.V(logf.DebugLevel).Info("Generating new root CA") pk, err := pki.GenerateECPrivateKey(384) if err != nil { return err @@ -371,6 +386,9 @@ func (d *DynamicAuthority) regenerateCA(ctx context.Context, s *corev1.Secret) e ObjectMeta: metav1.ObjectMeta{ Name: d.SecretName, Namespace: d.SecretNamespace, + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "cert-manager", + }, Annotations: map[string]string{ cmapi.AllowsInjectionFromSecretAnnotation: "true", }, @@ -381,6 +399,13 @@ func (d *DynamicAuthority) regenerateCA(ctx context.Context, s *corev1.Secret) e cmmeta.TLSCAKey: certBytes, }, }, metav1.CreateOptions{}) + if err != nil && apierrors.IsAlreadyExists(err) { + // another controller has created the secret, we expect a watch event + // to trigger another call to ensureCA + d.log.V(logf.DebugLevel).Info("Failed to create new root CA Secret, another controller has created it, waiting for watch event") + return nil + } + d.log.V(logf.InfoLevel).Info("Created new root CA Secret") return err } @@ -393,7 +418,7 @@ func (d *DynamicAuthority) regenerateCA(ctx context.Context, s *corev1.Secret) e if _, err := d.client.Update(ctx, s, metav1.UpdateOptions{}); err != nil { return err } - d.log.V(logf.DebugLevel).Info("Generated new root CA") + d.log.V(logf.InfoLevel).Info("Updated existing root CA Secret") return nil } diff --git a/pkg/server/tls/authority/authority_test.go b/pkg/server/tls/authority/authority_test.go index 782385755ac..cda92b257f1 100644 --- a/pkg/server/tls/authority/authority_test.go +++ b/pkg/server/tls/authority/authority_test.go @@ -17,21 +17,172 @@ limitations under the License. package authority import ( + "context" + "crypto/ecdsa" + "crypto/elliptic" "crypto/rand" "crypto/x509" "crypto/x509/pkix" + "fmt" "testing" "time" + testlogr "github.com/go-logr/logr/testing" "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" + kubefake "k8s.io/client-go/kubernetes/fake" + "k8s.io/client-go/rest" cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" + logf "github.com/cert-manager/cert-manager/pkg/logs" "github.com/cert-manager/cert-manager/pkg/util/pki" ) // Integration tests for the authority can be found in `test/integration/webhook/dynamic_authority_test.go`. +func testAuthority(t *testing.T, name string, cs *kubefake.Clientset) *DynamicAuthority { + logger := testlogr.NewTestLoggerWithOptions(t, testlogr.Options{ + Verbosity: 3, + }) + logger = logger.WithName(name) + + da := &DynamicAuthority{ + SecretNamespace: "test-namespace", + SecretName: "test-secret", + CADuration: 365 * 24 * time.Hour, + LeafDuration: 7 * 24 * time.Hour, + + newClient: func(_ *rest.Config) (kubernetes.Interface, error) { + return cs, nil + }, + } + + runCtx, cancel := context.WithCancel(context.Background()) + done := make(chan struct{}) + go func() { + defer close(done) + if err := da.Run(logf.NewContext(runCtx, logger)); err != nil { + t.Error(err) + } + }() + t.Cleanup(func() { + cancel() + <-done + }) + + return da +} + +func TestDynamicAuthority(t *testing.T) { + fake := kubefake.NewSimpleClientset() + + da := testAuthority(t, "authority", fake) + + // Test WatchRotation function + output := make(chan struct{}, 1) + da.WatchRotation(output) + defer da.StopWatchingRotation(output) + + waitForRotationAndSign := func(testInitial bool) { + privateKey, err := ecdsa.GenerateKey(elliptic.P521(), rand.Reader) + if err != nil { + t.Fatal(err) + } + template := &x509.Certificate{ + PublicKey: privateKey.Public(), + } + + if testInitial { + // If Sign works, we don't need to wait for rotation + cert, err := da.Sign(template) + if err == nil { + assert.NotNil(t, cert) + return + } + } + + select { + case <-output: + // Rotation detected + cert, err := da.Sign(template) + assert.NoError(t, err) + assert.NotNil(t, cert) + case <-time.After(5 * time.Second): + t.Error("Timeout waiting for rotation") + + t.Log("Queue length:", len(output)) + } + } + + waitForRotationAndSign(true) + + err := fake.CoreV1().Secrets(da.SecretNamespace).Delete(context.TODO(), da.SecretName, metav1.DeleteOptions{}) + assert.NoError(t, err) + + waitForRotationAndSign(false) + + secret, err := fake.CoreV1().Secrets(da.SecretNamespace).Get(context.TODO(), da.SecretName, metav1.GetOptions{}) + assert.NoError(t, err) + + secret.Data = map[string][]byte{ + "tls.crt": []byte("test"), + "tls.key": []byte("test"), + } + _, err = fake.CoreV1().Secrets(da.SecretNamespace).Update(context.TODO(), secret, metav1.UpdateOptions{}) + assert.NoError(t, err) + + waitForRotationAndSign(false) +} + +func TestDynamicAuthorityMulti(t *testing.T) { + fake := kubefake.NewSimpleClientset() + + authorities := make([]*DynamicAuthority, 0) + for i := 0; i < 200; i++ { + da := testAuthority(t, fmt.Sprintf("authority-%d", i), fake) + authorities = append(authorities, da) + } + + da := authorities[0] + + output := make(chan struct{}, 1) + da.WatchRotation(output) + defer da.StopWatchingRotation(output) + + waitForRotationAndSign := func() { + privateKey, err := ecdsa.GenerateKey(elliptic.P521(), rand.Reader) + if err != nil { + t.Fatal(err) + } + template := &x509.Certificate{ + PublicKey: privateKey.Public(), + } + + // If Sign works, we don't need to wait for rotation + cert, err := da.Sign(template) + if err == nil { + assert.NotNil(t, cert) + return + } + + select { + case <-output: + // Rotation detected + cert, err := da.Sign(template) + assert.NoError(t, err) + assert.NotNil(t, cert) + case <-time.After(5 * time.Second): + t.Error("Timeout waiting for rotation") + + t.Log("Queue length:", len(output)) + } + } + + waitForRotationAndSign() +} + func Test__caRequiresRegeneration(t *testing.T) { generateSecretData := func(mod func(*x509.Certificate)) map[string][]byte { // Generate a certificate and private key pair @@ -70,16 +221,18 @@ func Test__caRequiresRegeneration(t *testing.T) { } tests := []struct { - name string - secret *corev1.Secret - expect bool + name string + secret *corev1.Secret + expect bool + expectReason string }{ { name: "Missing data in CA secret (nil data)", secret: &corev1.Secret{ Data: nil, }, - expect: true, + expect: true, + expectReason: "Missing data in CA secret.", }, { name: "Missing data in CA secret (missing ca.crt)", @@ -88,7 +241,8 @@ func Test__caRequiresRegeneration(t *testing.T) { "tls.key": []byte("private key"), }, }, - expect: true, + expect: true, + expectReason: "Missing data in CA secret.", }, { name: "Different data in ca.crt and tls.crt", @@ -99,7 +253,8 @@ func Test__caRequiresRegeneration(t *testing.T) { "tls.key": []byte("secret"), }, }, - expect: true, + expect: true, + expectReason: "Different data in ca.crt and tls.crt.", }, { name: "Failed to parse data in CA secret", @@ -110,7 +265,8 @@ func Test__caRequiresRegeneration(t *testing.T) { "tls.key": []byte("secret"), }, }, - expect: true, + expect: true, + expectReason: "Failed to parse data in CA secret.", }, { name: "Stored certificate is not marked as a CA", @@ -121,7 +277,8 @@ func Test__caRequiresRegeneration(t *testing.T) { }, ), }, - expect: true, + expect: true, + expectReason: "Stored certificate is not marked as a CA.", }, { name: "Root CA certificate is JUST nearing expiry", @@ -133,7 +290,8 @@ func Test__caRequiresRegeneration(t *testing.T) { }, ), }, - expect: true, + expect: true, + expectReason: "CA certificate is nearing expiry.", }, { name: "Root CA certificate is ALMOST nearing expiry", @@ -157,23 +315,28 @@ func Test__caRequiresRegeneration(t *testing.T) { }, ), }, - expect: true, + expect: true, + expectReason: "CA certificate is nearing expiry.", }, { name: "Ok", secret: &corev1.Secret{ Data: generateSecretData(nil), }, - expect: false, + expect: false, + expectReason: "", }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { - required := (&DynamicAuthority{}).caRequiresRegeneration(test.secret) + required, reason := caRequiresRegeneration(test.secret) if required != test.expect { t.Errorf("Expected %v, but got %v", test.expect, required) } + if reason != test.expectReason { + t.Errorf("Expected %q, but got %q", test.expectReason, reason) + } }) } } diff --git a/pkg/server/tls/dynamic_source.go b/pkg/server/tls/dynamic_source.go index 58e772b8dc8..f72ae262d0c 100644 --- a/pkg/server/tls/dynamic_source.go +++ b/pkg/server/tls/dynamic_source.go @@ -141,7 +141,7 @@ func (f *DynamicSource) Start(ctx context.Context) error { case <-timerChannel: // Continue to the next select to try to send a message on renewalChan case renewMoment = <-nextRenewCh: - // We recevieved a renew moment, next loop iteration will update the timer + // We received a renew moment, next loop iteration will update the timer return false } diff --git a/pkg/server/tls/dynamic_source_test.go b/pkg/server/tls/dynamic_source_test.go index 42aec46746f..39917930bc9 100644 --- a/pkg/server/tls/dynamic_source_test.go +++ b/pkg/server/tls/dynamic_source_test.go @@ -37,6 +37,8 @@ import ( "github.com/cert-manager/cert-manager/pkg/util/pki" ) +// Integration tests for the DynamicSource can be found in `test/integration/webhook/dynamic_source_test.go`. + func signUsingTempCA(t *testing.T, template *x509.Certificate) *x509.Certificate { // generate random ca private key caPrivateKey, err := ecdsa.GenerateKey(elliptic.P521(), rand.Reader) @@ -238,7 +240,7 @@ func TestDynamicSource_FailingSign(t *testing.T) { template.NotAfter = template.NotBefore.Add(150 * time.Millisecond) signedCert := signUsingTempCA(t, template) - // Reset the NotBefor and NotAfter so we have high precision values here + // Reset the NotBefore and NotAfter so we have high precision values here signedCert.NotBefore = time.Now() signedCert.NotAfter = signedCert.NotBefore.Add(150 * time.Millisecond) @@ -278,7 +280,6 @@ func TestDynamicSource_FailingSign(t *testing.T) { } for _, tc := range tests { - tc := tc t.Run(tc.name, func(t *testing.T) { t.Parallel() diff --git a/pkg/util/cmapichecker/cmapichecker.go b/pkg/util/cmapichecker/cmapichecker.go index 83d7523154f..f94ba14e983 100644 --- a/pkg/util/cmapichecker/cmapichecker.go +++ b/pkg/util/cmapichecker/cmapichecker.go @@ -17,17 +17,22 @@ limitations under the License. package cmapichecker import ( + "bytes" "context" + "encoding/pem" "fmt" + "net/http" "regexp" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" + "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" + "github.com/cert-manager/cert-manager/pkg/util/pki" ) var ( @@ -35,19 +40,26 @@ var ( ErrWebhookServiceFailure = fmt.Errorf("the cert-manager webhook service is not created yet") ErrWebhookDeploymentFailure = fmt.Errorf("the cert-manager webhook deployment is not ready yet") ErrWebhookCertificateFailure = fmt.Errorf("the cert-manager webhook CA bundle is not injected yet") -) + ErrMutationWebhookMissing = fmt.Errorf("the cert-manager mutation webhook did not mutate the dry-run CertificateRequest object") + ErrValidatingWebhookMissing = fmt.Errorf("the cert-manager validating webhook did not validate the dry-run CertificateRequest object") + ErrMutationWebhookIncorrect = fmt.Errorf("the cert-manager validating webhook failed because the dry-run CertificateRequest object was mutated incorrectly") -const ( - crdsMapping1Error = `error finding the scope of the object: failed to get restmapping: failed to find API group "cert-manager.io"` - crdsMapping2Error = `error finding the scope of the object: failed to get restmapping: no matches for kind "Certificate" in group "cert-manager.io"` - crdsNotFoundError = `the server could not find the requested resource (post certificates.cert-manager.io)` + ErrFailedToCheckAPI = fmt.Errorf("failed to check the cert-manager API") ) var ( - regexErrCertManagerCRDsNotFound = regexp.MustCompile(`^(` + regexp.QuoteMeta(crdsMapping1Error) + `|` + regexp.QuoteMeta(crdsMapping2Error) + `|` + regexp.QuoteMeta(crdsNotFoundError) + `)$`) + regexErrCertManagerCRDsNotFound1 = regexp.MustCompile(`the server could not find the requested resource`) + regexErrCertManagerCRDsNotFound2 = regexp.MustCompile(`failed to find API group "cert-manager\.io"`) + regexErrCertManagerCRDsNotFound3 = regexp.MustCompile(`no resources found for group "cert-manager\.io/v1"`) + regexErrCertManagerCRDsNotFound4 = regexp.MustCompile(`no matches for kind "CertificateRequest" in group "cert-manager\.io"`) + regexErrCertManagerCRDsNotFound5 = regexp.MustCompile(`no matches for kind "CertificateRequest" in version "cert-manager\.io/v1"`) regexErrWebhookServiceFailure = regexp.MustCompile(`Post "(.*)": service "(.*)-webhook" not found`) regexErrWebhookDeploymentFailure = regexp.MustCompile(`Post "(.*)": (.*): connect: connection refused`) regexErrWebhookCertificateFailure = regexp.MustCompile(`Post "(.*)": x509: certificate signed by unknown authority`) + regexErrCertmanagerDeniedRequest = regexp.MustCompile(`admission webhook "webhook\.cert-manager\.io" denied the request: (.*)`) + + regexErrForbidden = regexp.MustCompile(`certificaterequests\.cert-manager\.io is forbidden`) + regexErrDenied = regexp.MustCompile(`admission webhook "(.*)" denied the request: (.*)`) ) // Interface is used to check that the cert-manager CRDs have been installed and are usable. @@ -57,23 +69,94 @@ type Interface interface { type cmapiChecker struct { client client.Client + + testValidCR *cmapi.CertificateRequest + testInvalidCR *cmapi.CertificateRequest } // New returns a cert-manager API checker -func New(restcfg *rest.Config, scheme *runtime.Scheme, namespace string) (Interface, error) { +func New(restcfg *rest.Config, namespace string) (Interface, error) { + httpClient, err := rest.HTTPClientFor(restcfg) + if err != nil { + return nil, fmt.Errorf("while creating HTTP client: %w", err) + } + + return NewForConfigAndClient(restcfg, httpClient, namespace) +} + +func NewForConfigAndClient(restcfg *rest.Config, httpClient *http.Client, namespace string) (Interface, error) { + scheme := runtime.NewScheme() if err := cmapi.AddToScheme(scheme); err != nil { return nil, fmt.Errorf("while configuring scheme: %w", err) } cl, err := client.New(restcfg, client.Options{ - Scheme: scheme, + HTTPClient: httpClient, + Scheme: scheme, + DryRun: ptr.To(true), }) if err != nil { return nil, fmt.Errorf("while creating client: %w", err) } + cl = client.NewNamespacedClient(cl, namespace) + + x509CertReq, err := pki.GenerateCSR( + &cmapi.Certificate{ + Spec: cmapi.CertificateSpec{ + DNSNames: []string{"example.com"}, + PrivateKey: &cmapi.CertificatePrivateKey{ + Algorithm: "ECDSA", + Size: 521, + }, + }, + }, + pki.WithEncodeBasicConstraintsInRequest(true), + ) + if err != nil { + return nil, fmt.Errorf("while generating CSR: %w", err) + } + + pk, err := pki.GenerateECPrivateKey(521) + if err != nil { + return nil, fmt.Errorf("while generating private key: %w", err) + } + + csrDER, err := pki.EncodeCSR(x509CertReq, pk) + if err != nil { + return nil, fmt.Errorf("while encoding CSR: %w", err) + } + + csrPEM := bytes.NewBuffer([]byte{}) + err = pem.Encode(csrPEM, &pem.Block{Type: "CERTIFICATE REQUEST", Bytes: csrDER}) + if err != nil { + return nil, fmt.Errorf("while encoding CSR to PEM: %w", err) + } + return &cmapiChecker{ - client: client.NewNamespacedClient(client.NewDryRunClient(cl), namespace), + client: cl, + testValidCR: &cmapi.CertificateRequest{ + ObjectMeta: metav1.ObjectMeta{ + GenerateName: "cmapichecker-valid-", + }, + Spec: cmapi.CertificateRequestSpec{ + Request: csrPEM.Bytes(), + IssuerRef: cmmeta.ObjectReference{ + Name: "cmapichecker", + }, + }, + }, + testInvalidCR: &cmapi.CertificateRequest{ + ObjectMeta: metav1.ObjectMeta{ + GenerateName: "cmapichecker-invalid-", + }, + Spec: cmapi.CertificateRequestSpec{ + Request: []byte("invalid-csr"), + IssuerRef: cmmeta.ObjectReference{ + Name: "cmapichecker", + }, + }, + }, }, nil } @@ -85,22 +168,37 @@ func New(restcfg *rest.Config, scheme *runtime.Scheme, namespace string) (Interf // we have disabled the serving of non-v1 CRD versions, so it is no longer // possible to test the reachability of the conversion webhook. func (o *cmapiChecker) Check(ctx context.Context) error { - cert := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - GenerateName: "cmapichecker-", - }, - Spec: cmapi.CertificateSpec{ - DNSNames: []string{"cmapichecker.example"}, - SecretName: "cmapichecker", - IssuerRef: cmmeta.ObjectReference{ - Name: "cmapichecker", - }, - }, + // Test the mutating webhook, which should add the username, UID, and groups + if err := func() error { + certReq := o.testValidCR.DeepCopy() + if err := o.client.Create(ctx, certReq); err != nil { + return err + } + + if certReq.Spec.Username == "" && + certReq.Spec.UID == "" { + return ErrMutationWebhookMissing + } + + return nil + }(); err != nil { + return err } - if err := o.client.Create(ctx, cert); err != nil { + // Test the validating webhook, which should reject the request + if err := func() error { + certReq := o.testInvalidCR.DeepCopy() + if err := o.client.Create(ctx, certReq); err == nil { + return ErrValidatingWebhookMissing + } else if !regexErrCertmanagerDeniedRequest.MatchString(err.Error()) { + return err + } + + return nil + }(); err != nil { return err } + return nil } @@ -115,11 +213,23 @@ func (o *cmapiChecker) Check(ctx context.Context) error { // - Internal error occurred: failed calling webhook "webhook.cert-manager.io": Post "https://cert-manager-webhook.cert-manager.svc:443/mutate?timeout=10s": dial tcp 10.96.38.90:443: connect: connection refused // ErrWebhookCertificateFailure: // - Internal error occurred: failed calling webhook "webhook.cert-manager.io": Post "https://cert-manager-webhook.cert-manager.svc:443/mutate?timeout=10s": x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "cert-manager-webhook-ca") +// ErrMutationWebhookIncorrect: +// - admission webhook "webhook.cert-manager.io" denied the request: [spec.username: Forbidden: username identity must be that of the requester, spec.groups: Forbidden: groups identity must be that of the requester] +// ErrFailedToCheckAPI: +// - certificaterequests.cert-manager.io is forbidden: User "test" cannot create resource "certificaterequests" in API group "cert-manager.io" in the namespace "default" +// - admission webhook "validate.kyverno.svc-fail" denied the request: ... func TranslateToSimpleError(err error) error { - s := err.Error() + if err == nil { + return nil + } + s := err.Error() switch { - case regexErrCertManagerCRDsNotFound.MatchString(s): + case regexErrCertManagerCRDsNotFound1.MatchString(s) || + regexErrCertManagerCRDsNotFound2.MatchString(s) || + regexErrCertManagerCRDsNotFound3.MatchString(s) || + regexErrCertManagerCRDsNotFound4.MatchString(s) || + regexErrCertManagerCRDsNotFound5.MatchString(s): return ErrCertManagerCRDsNotFound case regexErrWebhookServiceFailure.MatchString(s): return ErrWebhookServiceFailure @@ -127,6 +237,11 @@ func TranslateToSimpleError(err error) error { return ErrWebhookDeploymentFailure case regexErrWebhookCertificateFailure.MatchString(s): return ErrWebhookCertificateFailure + case regexErrCertmanagerDeniedRequest.MatchString(s): + return ErrMutationWebhookIncorrect + case regexErrForbidden.MatchString(s) || + regexErrDenied.MatchString(s): + return ErrFailedToCheckAPI default: return nil } diff --git a/pkg/util/cmapichecker/cmapichecker_test.go b/pkg/util/cmapichecker/cmapichecker_test.go index 8908eb6d343..280e4f80c54 100644 --- a/pkg/util/cmapichecker/cmapichecker_test.go +++ b/pkg/util/cmapichecker/cmapichecker_test.go @@ -18,175 +18,337 @@ package cmapichecker import ( "context" - "errors" + "encoding/json" + "net/http" + "net/http/httptest" "testing" - "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/client/fake" - - cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/rest" ) -type fakeErrorClient struct { - client.Client +const ( + crNoMutation = `{ + "kind":"CertificateRequest", + "apiVersion":"cert-manager.io/v1", + "metadata":{ + "name":"cmapichecker-0001", + "namespace":"test-namespace" + }, + "spec":{ + "issuerRef":{"name":"cmapichecker"}, + "request":"PENTUi1WQUxVRT4=" + } + }` + crAfterMutation = `{ + "kind":"CertificateRequest", + "apiVersion":"cert-manager.io/v1", + "metadata":{ + "name":"cmapichecker-0001", + "namespace":"test-namespace" + }, + "spec":{ + "issuerRef":{"name":"cmapichecker"}, + "request":"PENTUi1WQUxVRT4=", + "username":"test-user", + "uid":"test-uid" + }, + "status":{} + }` +) - createError error -} +func TestCheck(t *testing.T) { + type testT struct { + discoveryResponse func(t *testing.T, r *http.Request) (int, []byte) + createValidResponse func(t *testing.T, r *http.Request) (int, []byte) + createInvalidResponse func(t *testing.T, r *http.Request) (int, []byte) -func (cl *fakeErrorClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error { - if cl.createError != nil { - return cl.createError + expectedError string + expectedSimpleError string } - return cl.Client.Create(ctx, obj, opts...) -} - -func newFakeCmapiChecker() (*fakeErrorClient, Interface, error) { - scheme := runtime.NewScheme() - if err := cmapi.AddToScheme(scheme); err != nil { - return nil, nil, err - } - cl := fake.NewClientBuilder().WithScheme(scheme).Build() - errorClient := &fakeErrorClient{ - Client: cl, - createError: nil, - } - - return errorClient, &cmapiChecker{ - client: errorClient, - }, nil -} - -const ( - errCertManagerCRDsMapping = `error finding the scope of the object: failed to get restmapping: no matches for kind "Certificate" in group "cert-manager.io"` - errCertManagerCRDsNotFound = `the server could not find the requested resource (post certificates.cert-manager.io)` - - errMutatingWebhookServiceFailure = `Internal error occurred: failed calling webhook "webhook.cert-manager.io": Post "https://cert-manager-webhook.cert-manager.svc:443/mutate?timeout=10s": service "cert-manager-webhook" not found` - errMutatingWebhookDeploymentFailure = `Internal error occurred: failed calling webhook "webhook.cert-manager.io": Post "https://cert-manager-webhook.cert-manager.svc:443/mutate?timeout=10s": dial tcp 10.96.38.90:443: connect: connection refused` - errMutatingWebhookCertificateFailure = `Internal error occurred: failed calling webhook "webhook.cert-manager.io": Post "https://cert-manager-webhook.cert-manager.svc:443/mutate?timeout=10s": x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "cert-manager-webhook-ca"` - - // These /convert error examples test that we can correctly parse errors - // while connecting to the conversion webhook, - // but as of cert-manager 1.6 the conversion webhook will no-longer be used - // because legacy CRD versions will no longer be "served" - // and in 1.7 the conversion webhook may be removed at which point these can - // be removed too. - // TODO: Add tests for errors when connecting to the /validate - // ValidatingWebhook endpoint. - errConversionWebhookServiceFailure = `conversion webhook for cert-manager.io/v1alpha2, Kind=Certificate failed: Post "https://cert-manager-webhook.cert-manager.svc:443/convert?timeout=30s": service "cert-manager-webhook" not found` - errConversionWebhookDeploymentFailure = `conversion webhook for cert-manager.io/v1alpha2, Kind=Certificate failed: Post "https://cert-manager-webhook.cert-manager.svc:443/convert?timeout=30s": dial tcp 10.96.38.90:443: connect: connection refused` - errConversionWebhookCertificateFailure = `conversion webhook for cert-manager.io/v1alpha2, Kind=Certificate failed: Post "https://cert-manager-webhook.cert-manager.svc:443/convert?timeout=30s": x509: certificate signed by unknown authority` -) - -func TestCmapiChecker(t *testing.T) { tests := map[string]testT{ - "check API without errors": { - createError: nil, - - expectedSimpleError: "", - expectedVerboseError: "", + "no errors": {}, + "without any cert-manager CRDs installed (404)": { + discoveryResponse: func(t *testing.T, r *http.Request) (int, []byte) { + return http.StatusNotFound, nil + }, + expectedError: `error finding the scope of the object: failed to get restmapping: no matches for kind "CertificateRequest" in version "cert-manager.io/v1"`, + expectedSimpleError: ErrCertManagerCRDsNotFound.Error(), }, - "check API without CRDs installed 1": { - createError: errors.New(errCertManagerCRDsMapping), - - expectedSimpleError: ErrCertManagerCRDsNotFound.Error(), - expectedVerboseError: errCertManagerCRDsMapping, + "without any cert-manager CRDs installed (empty list)": { + discoveryResponse: func(t *testing.T, r *http.Request) (int, []byte) { + return http.StatusOK, []byte(`{ + "kind":"APIResourceList", + "apiVersion":"v1", + "groupVersion":"cert-manager.io/v1", + "resources":[] + }`) + }, + expectedError: `error finding the scope of the object: failed to get restmapping: no matches for kind "CertificateRequest" in version "cert-manager.io/v1"`, + expectedSimpleError: ErrCertManagerCRDsNotFound.Error(), }, - "check API without CRDs installed 2": { - createError: errors.New(errCertManagerCRDsNotFound), - - expectedSimpleError: ErrCertManagerCRDsNotFound.Error(), - expectedVerboseError: errCertManagerCRDsNotFound, + "without certificate request CRD installed": { + discoveryResponse: func(t *testing.T, r *http.Request) (int, []byte) { + return http.StatusOK, []byte(`{ + "kind":"APIResourceList", + "apiVersion":"v1", + "groupVersion":"cert-manager.io/v1", + "resources":[ + { + "name":"test", + "singularName":"", + "namespaced":true, + "kind":"Test", + "verbs":["get","patch","update"] + } + ] + }`) + }, + expectedError: `error finding the scope of the object: failed to get restmapping: no matches for kind "CertificateRequest" in version "cert-manager.io/v1"`, + expectedSimpleError: ErrCertManagerCRDsNotFound.Error(), }, - - "check API with mutating webhook service not ready": { - createError: errors.New(errMutatingWebhookServiceFailure), - - expectedSimpleError: ErrWebhookServiceFailure.Error(), - expectedVerboseError: errMutatingWebhookServiceFailure, + "with missing certificate request endpoint": { + discoveryResponse: func(t *testing.T, r *http.Request) (int, []byte) { + return http.StatusNotFound, nil + }, + expectedError: `error finding the scope of the object: failed to get restmapping: no matches for kind "CertificateRequest" in version "cert-manager.io/v1"`, + expectedSimpleError: ErrCertManagerCRDsNotFound.Error(), }, - "check API with conversion webhook service not ready": { - createError: errors.New(errConversionWebhookServiceFailure), - - expectedSimpleError: ErrWebhookServiceFailure.Error(), - expectedVerboseError: errConversionWebhookServiceFailure, + "dry-run certificate request was not mutated": { + createValidResponse: func(t *testing.T, r *http.Request) (int, []byte) { + return http.StatusOK, []byte(crNoMutation) + }, + expectedError: ErrMutationWebhookMissing.Error(), + }, + "cr was denied by 3rd party webhook": { + createInvalidResponse: func(t *testing.T, r *http.Request) (int, []byte) { + return http.StatusNotAcceptable, []byte(`{ + "kind":"Status", + "apiVersion":"v1", + "metadata":{}, + "status":"Failure", + "message":"admission webhook \"other-webhook.io\" denied the request: [ERROR MESSAGE]", + "reason":"NotAcceptable", + "code":406 + }`) + }, + expectedError: "admission webhook \"other-webhook.io\" denied the request: [ERROR MESSAGE]", + expectedSimpleError: ErrFailedToCheckAPI.Error(), + }, + "missing validation error": { + createInvalidResponse: func(t *testing.T, r *http.Request) (int, []byte) { + return http.StatusOK, []byte(crAfterMutation) + }, + expectedError: ErrValidatingWebhookMissing.Error(), }, + } - "check API with mutating webhook pod not accepting connections": { - createError: errors.New(errMutatingWebhookDeploymentFailure), + type testFailure struct { + message string + reason string + code int + simpleError string + } - expectedSimpleError: ErrWebhookDeploymentFailure.Error(), - expectedVerboseError: errMutatingWebhookDeploymentFailure, - }, - "check API with conversion webhook pod not accepting connections": { - createError: errors.New(errConversionWebhookDeploymentFailure), + for name, test := range map[string]testFailure{ + "no permission": { + message: `certificaterequests.cert-manager.io is forbidden: User "test" cannot create resource "certificaterequests" in API group "cert-manager.io" in the namespace "test-namespace"`, + reason: "Forbidden", + code: http.StatusForbidden, - expectedSimpleError: ErrWebhookDeploymentFailure.Error(), - expectedVerboseError: errConversionWebhookDeploymentFailure, + simpleError: ErrFailedToCheckAPI.Error(), }, - "check API with webhook certificate not updated in mutation webhook resource definitions": { - createError: errors.New(errMutatingWebhookCertificateFailure), + "service not found": { + message: `failed calling webhook "webhook.cert-manager.io": Post "https://cert-manager-webhook.cert-manager.svc:443/mutate?timeout=10s": service "cert-manager-webhook" not found`, + reason: "InternalError", + code: 500, - expectedSimpleError: ErrWebhookCertificateFailure.Error(), - expectedVerboseError: errMutatingWebhookCertificateFailure, + simpleError: ErrWebhookServiceFailure.Error(), }, - "check API with webhook certificate not updated in conversion webhook resource definitions": { - createError: errors.New(errConversionWebhookCertificateFailure), + "connection refused": { + message: `failed calling webhook "webhook.cert-manager.io": failed to call webhook: Post "https://cert-manager-webhook.cert-manager.svc:443/mutate?timeout=30s": dial tcp 10.96.19.42:443: connect: connection refused`, + reason: "InternalError", + code: 500, - expectedSimpleError: ErrWebhookCertificateFailure.Error(), - expectedVerboseError: errConversionWebhookCertificateFailure, + simpleError: ErrWebhookDeploymentFailure.Error(), }, - "unexpected error": { - createError: errors.New("unexpected error"), - expectedSimpleError: "", - expectedVerboseError: "unexpected error", + "certificate signed by unknown authority": { + message: `failed calling webhook "webhook.cert-manager.io": failed to call webhook: Post "https://cert-manager-webhook.cert-manager.svc:443/mutate?timeout=30s": x509: certificate signed by unknown authority`, + reason: "NotAcceptable", + code: 406, + + simpleError: ErrWebhookCertificateFailure.Error(), }, - } + "certificate signed by unknown authority (ECDSA verification failure)": { + message: `failed calling webhook "webhook.cert-manager.io": Post "https://cert-manager-webhook.cert-manager.svc:443/mutate?timeout=10s": x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "cert-manager-webhook-ca"`, + reason: "NotAcceptable", + code: 406, - for n, test := range tests { - t.Run(n, func(t *testing.T) { - runTest(t, test) - }) - } -} + simpleError: ErrWebhookCertificateFailure.Error(), + }, -type testT struct { - createError error + "validating webhook error (3rd party)": { + message: `admission webhook "other-webhook.io" denied the request: [ERROR MESSAGE]`, + reason: "NotAcceptable", + code: 406, - expectedSimpleError string - expectedVerboseError string -} + simpleError: ErrFailedToCheckAPI.Error(), + }, + "missing mutating webhook": { + message: `admission webhook "webhook.cert-manager.io" denied the request: [spec.username: Forbidden: username identity must be that of the requester, spec.groups: Forbidden: groups identity must be that of the requester]`, + reason: "NotAcceptable", + code: 406, -func runTest(t *testing.T, test testT) { - errorClient, checker, err := newFakeCmapiChecker() - if err != nil { - t.Error(err) - } + simpleError: ErrMutationWebhookIncorrect.Error(), + }, + "validating webhook error": { + message: `admission webhook "webhook.cert-manager.io" denied the request: spec.request: Invalid value: []byte{0x00}: error decoding certificate request PEM block`, + reason: "NotAcceptable", + code: 406, - errorClient.createError = test.createError + simpleError: ErrMutationWebhookIncorrect.Error(), + }, - var simpleError error - err = checker.Check(context.TODO()) - if err != nil { - if err.Error() != test.expectedVerboseError { - t.Errorf("error differs from expected error:\n%s\n vs \n%s", err.Error(), test.expectedVerboseError) + "unknown error": { + message: `UNKNOWN ERROR`, + reason: "InternalError", + code: 500, + }, + } { + tests["valid_failure_"+name] = testT{ + createValidResponse: func(t *testing.T, r *http.Request) (int, []byte) { + byteResponse, err := json.Marshal(map[string]interface{}{ + "kind": "Status", + "apiVersion": "v1", + "metadata": map[string]interface{}{}, + "status": "Failure", + "message": test.message, + "reason": test.reason, + "code": test.code, + }) + if err != nil { + t.Error(err) + } + return test.code, byteResponse + }, + expectedError: test.message, + expectedSimpleError: test.simpleError, } - - simpleError = TranslateToSimpleError(err) - } else if test.expectedVerboseError != "" { - t.Errorf("expected error did not occure:\n%s", test.expectedVerboseError) } - if simpleError != nil { - if simpleError.Error() != test.expectedSimpleError { - t.Errorf("simple error differs from expected error:\n%s\n vs \n%s", simpleError.Error(), test.expectedSimpleError) - } - } else { - if test.expectedSimpleError != "" { - t.Errorf("expected simple error did not occure:\n%s", test.expectedSimpleError) - } + for name, test := range tests { + t.Run(name, func(t *testing.T) { + // fake https server to simulate the Kubernetes API server responses + mockKubernetesAPI := func(t *testing.T, r *http.Request) (int, []byte) { + switch r.URL.Path { + case "/apis/cert-manager.io/v1": + if test.discoveryResponse != nil { + return test.discoveryResponse(t, r) + } + + return http.StatusOK, []byte(`{ + "kind":"APIResourceList", + "apiVersion":"v1", + "groupVersion":"cert-manager.io/v1", + "resources":[ + { + "name":"certificaterequests", + "singularName":"certificaterequest", + "namespaced":true, + "kind":"CertificateRequest", + "verbs":["delete","deletecollection","get","list","patch","create","update","watch"], + "shortNames":["cr","crs"], + "categories":["cert-manager"], + "storageVersionHash":"tuxiikMaACg=" + }, + { + "name":"certificaterequests/status", + "singularName":"", + "namespaced":true, + "kind":"CertificateRequest", + "verbs":["get","patch","update"] + } + ] + }`) + case "/apis/cert-manager.io/v1/namespaces/test-namespace/certificaterequests": + obj := metav1.PartialObjectMetadata{} + if err := json.NewDecoder(r.Body).Decode(&obj); err != nil { + t.Errorf("failed to decode request body: %v", err) + } + + switch obj.GenerateName { + case "cmapichecker-valid-": + if test.createValidResponse != nil { + return test.createValidResponse(t, r) + } + + return http.StatusOK, []byte(crAfterMutation) + case "cmapichecker-invalid-": + if test.createInvalidResponse != nil { + return test.createInvalidResponse(t, r) + } + + return http.StatusNotAcceptable, []byte(`{ + "kind":"Status", + "apiVersion":"v1", + "metadata":{}, + "status":"Failure", + "message":"admission webhook \"webhook.cert-manager.io\" denied the request: [ERROR MESSAGE]", + "reason":"NotAcceptable", + "code":406 + }`) + } + default: + } + + return http.StatusNotFound, nil + } + testServer := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json") + statusCode, content := mockKubernetesAPI(t, r) + w.WriteHeader(statusCode) + if content == nil { + return + } + + if _, err := w.Write(content); err != nil { + t.Errorf("failed to write response: %v", err) + } + })) + t.Cleanup(testServer.Close) + + restConfig := &rest.Config{ + Host: testServer.URL, + } + checker, err := NewForConfigAndClient(restConfig, testServer.Client(), "test-namespace") + if err != nil { + t.Fatalf("failed to create checker: %v", err) + } + + for i := 0; i < 10; i++ { + t.Logf("# check %d", i) + + err = checker.Check(context.Background()) + switch { + case err == nil && test.expectedError == "": + case err == nil && test.expectedError != "": + t.Errorf("expected error %q, got nil", test.expectedError) + case err.Error() != test.expectedError: + t.Errorf("expected error %q, got %q", test.expectedError, err.Error()) + } + + simpleErr := TranslateToSimpleError(err) + switch { + case simpleErr == nil && test.expectedSimpleError == "": + case simpleErr == nil && test.expectedSimpleError != "": + t.Errorf("expected error %q, got nil", test.expectedSimpleError) + case simpleErr.Error() != test.expectedSimpleError: + t.Errorf("expected error %q, got %q", test.expectedSimpleError, simpleErr.Error()) + } + } + }) } } diff --git a/pkg/util/feature/feature_gate.go b/pkg/util/feature/feature_gate.go index 512b96799ae..3a67691c828 100644 --- a/pkg/util/feature/feature_gate.go +++ b/pkg/util/feature/feature_gate.go @@ -24,7 +24,7 @@ var ( // DefaultMutableFeatureGate is a mutable version of DefaultFeatureGate. // Only top-level commands/options setup and the k8s.io/component-base/featuregate/testing package should make use of this. // Tests that need to modify feature gates for the duration of their test should use: - // defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features., )() + // featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features., ) DefaultMutableFeatureGate featuregate.MutableFeatureGate = featuregate.NewFeatureGate() // DefaultFeatureGate is a shared global FeatureGate. diff --git a/pkg/util/pki/csr.go b/pkg/util/pki/csr.go index 7e3d01fac84..ffcc936b0e5 100644 --- a/pkg/util/pki/csr.go +++ b/pkg/util/pki/csr.go @@ -260,11 +260,13 @@ func GenerateCSR(crt *v1.Certificate, optFuncs ...GenerateCSROption) (*x509.Cert return nil, fmt.Errorf("failed to build key usages: %w", err) } - usage, err := MarshalKeyUsage(ku) - if err != nil { - return nil, fmt.Errorf("failed to asn1 encode usages: %w", err) + if ku != 0 { + usage, err := MarshalKeyUsage(ku) + if err != nil { + return nil, fmt.Errorf("failed to asn1 encode usages: %w", err) + } + extraExtensions = append(extraExtensions, usage) } - extraExtensions = append(extraExtensions, usage) // Only add extended usages if they are specified. if len(ekus) > 0 { @@ -361,7 +363,7 @@ func SignCertificate(template *x509.Certificate, issuerCert *x509.Certificate, p // SignCSRTemplate signs a certificate template usually based upon a CSR. This // function expects all fields to be present in the certificate template, -// including it's public key. +// including its public key. // It returns the PEM bundle containing certificate data and the CA data, encoded in PEM format. func SignCSRTemplate(caCerts []*x509.Certificate, caKey crypto.Signer, template *x509.Certificate) (PEMBundle, error) { if len(caCerts) == 0 { diff --git a/pkg/util/pki/csr_test.go b/pkg/util/pki/csr_test.go index 9fb1078d642..d9b243c23fb 100644 --- a/pkg/util/pki/csr_test.go +++ b/pkg/util/pki/csr_test.go @@ -663,7 +663,7 @@ func TestGenerateCSR(t *testing.T) { wantErr: true, }, { - name: "Generate CSR from certficate with literal subject honouring the exact order", + name: "Generate CSR from certificate with literal subject honouring the exact order", crt: &cmapi.Certificate{Spec: cmapi.CertificateSpec{LiteralSubject: exampleLiteralSubject}}, want: &x509.CertificateRequest{ Version: 0, @@ -681,7 +681,7 @@ func TestGenerateCSR(t *testing.T) { literalCertificateSubjectFeatureEnabled: true, }, { - name: "Generate CSR from certficate with literal multi value subject honouring the exact order", + name: "Generate CSR from certificate with literal multi value subject honouring the exact order", crt: &cmapi.Certificate{Spec: cmapi.CertificateSpec{LiteralSubject: exampleMultiValueRDNLiteralSubject}}, want: &x509.CertificateRequest{ Version: 0, diff --git a/pkg/util/pki/generate_test.go b/pkg/util/pki/generate_test.go index de5d41444b9..83d1736808a 100644 --- a/pkg/util/pki/generate_test.go +++ b/pkg/util/pki/generate_test.go @@ -219,7 +219,7 @@ func TestGeneratePrivateKeyForCertificate(t *testing.T) { curve, err := ecCurveForKeySize(test.keySize) if err != nil { - t.Errorf(err.Error()) + t.Error(err) return } diff --git a/pkg/util/pki/match.go b/pkg/util/pki/match.go index 9f07d05930e..b495dede53a 100644 --- a/pkg/util/pki/match.go +++ b/pkg/util/pki/match.go @@ -22,23 +22,26 @@ import ( "crypto/ecdsa" "crypto/ed25519" "crypto/rsa" + "crypto/x509" "crypto/x509/pkix" "encoding/asn1" "fmt" "net" "reflect" - corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/sets" cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" "github.com/cert-manager/cert-manager/pkg/util" ) -// PrivateKeyMatchesSpec returns an error if the private key bit size -// doesn't match the provided spec. RSA, Ed25519 and ECDSA are supported. -// If any error is returned, a list of violations will also be returned. -func PrivateKeyMatchesSpec(pk crypto.PrivateKey, spec cmapi.CertificateSpec) ([]string, error) { +// PrivateKeyMatchesSpec returns a list of violations for the provided private +// key against the provided CertificateSpec. It will return an empty list/ nil +// if there are no violations found. RSA, Ed25519 and ECDSA private keys are +// supported. +// The function panics if the CertificateSpec contains an unknown key algorithm, +// since this should have been caught by the CertificateSpec validation already. +func PrivateKeyMatchesSpec(pk crypto.PrivateKey, spec cmapi.CertificateSpec) []string { spec = *spec.DeepCopy() if spec.PrivateKey == nil { spec.PrivateKey = &cmapi.CertificatePrivateKey{} @@ -51,14 +54,16 @@ func PrivateKeyMatchesSpec(pk crypto.PrivateKey, spec cmapi.CertificateSpec) ([] case cmapi.ECDSAKeyAlgorithm: return ecdsaPrivateKeyMatchesSpec(pk, spec) default: - return nil, fmt.Errorf("unrecognised key algorithm type %q", spec.PrivateKey.Algorithm) + // This should never happen as the CertificateSpec validation should + // catch this before it reaches this point. + panic(fmt.Sprintf("[PROGRAMMING ERROR] unrecognised key algorithm type %q", spec.PrivateKey.Algorithm)) } } -func rsaPrivateKeyMatchesSpec(pk crypto.PrivateKey, spec cmapi.CertificateSpec) ([]string, error) { +func rsaPrivateKeyMatchesSpec(pk crypto.PrivateKey, spec cmapi.CertificateSpec) []string { rsaPk, ok := pk.(*rsa.PrivateKey) if !ok { - return []string{"spec.privateKey.algorithm"}, nil + return []string{"spec.privateKey.algorithm"} } var violations []string // TODO: we should not use implicit defaulting here, and instead rely on @@ -73,13 +78,13 @@ func rsaPrivateKeyMatchesSpec(pk crypto.PrivateKey, spec cmapi.CertificateSpec) if rsaPk.N.BitLen() != keySize { violations = append(violations, "spec.privateKey.size") } - return violations, nil + return violations } -func ecdsaPrivateKeyMatchesSpec(pk crypto.PrivateKey, spec cmapi.CertificateSpec) ([]string, error) { +func ecdsaPrivateKeyMatchesSpec(pk crypto.PrivateKey, spec cmapi.CertificateSpec) []string { ecdsaPk, ok := pk.(*ecdsa.PrivateKey) if !ok { - return []string{"spec.privateKey.algorithm"}, nil + return []string{"spec.privateKey.algorithm"} } var violations []string // TODO: we should not use implicit defaulting here, and instead rely on @@ -94,16 +99,16 @@ func ecdsaPrivateKeyMatchesSpec(pk crypto.PrivateKey, spec cmapi.CertificateSpec if expectedKeySize != ecdsaPk.Curve.Params().BitSize { violations = append(violations, "spec.privateKey.size") } - return violations, nil + return violations } -func ed25519PrivateKeyMatchesSpec(pk crypto.PrivateKey) ([]string, error) { +func ed25519PrivateKeyMatchesSpec(pk crypto.PrivateKey) []string { _, ok := pk.(ed25519.PrivateKey) if !ok { - return []string{"spec.privateKey.algorithm"}, nil + return []string{"spec.privateKey.algorithm"} } - return nil, nil + return nil } func ipSlicesMatch(parsedIPs []net.IP, stringIPs []string) bool { @@ -127,7 +132,7 @@ func RequestMatchesSpec(req *cmapi.CertificateRequest, spec cmapi.CertificateSpe } // It is safe to mutate top-level fields in `spec` as it is not a pointer - // meaning changes will not effect the caller. + // meaning changes will not affect the caller. if spec.Subject == nil { spec.Subject = &cmapi.X509Subject{} } @@ -273,17 +278,16 @@ func matchOtherNames(extension []pkix.Extension, specOtherNames []cmapi.OtherNam return true, nil } -// SecretDataAltNamesMatchSpec will compare a Secret resource containing certificate -// data to a CertificateSpec and return a list of 'violations' for any fields that -// do not match their counterparts. +// FuzzyX509AltNamesMatchSpec will compare a X509 Certificate to a CertificateSpec +// and return a list of 'violations' for any fields that do not match their counterparts. +// // This is a purposely less comprehensive check than RequestMatchesSpec as some // issuers override/force certain fields. -func SecretDataAltNamesMatchSpec(secret *corev1.Secret, spec cmapi.CertificateSpec) ([]string, error) { - x509cert, err := DecodeX509CertificateBytes(secret.Data[corev1.TLSCertKey]) - if err != nil { - return nil, err - } - +// +// Deprecated: This function is very fuzzy and makes too many assumptions about +// how the issuer maps a CSR to a certificate. We only keep it for backward compatibility +// reasons, but use other comparison functions when possible. +func FuzzyX509AltNamesMatchSpec(x509cert *x509.Certificate, spec cmapi.CertificateSpec) []string { var violations []string // Perform a 'loose' check on the x509 certificate to determine if the @@ -291,11 +295,11 @@ func SecretDataAltNamesMatchSpec(secret *corev1.Secret, spec cmapi.CertificateSp // This check allows names to move between the DNSNames and CommonName // field freely in order to account for CAs behaviour of promoting DNSNames // to be CommonNames or vice-versa. - expectedDNSNames := sets.New[string](spec.DNSNames...) + expectedDNSNames := sets.New(spec.DNSNames...) if spec.CommonName != "" { expectedDNSNames.Insert(spec.CommonName) } - allDNSNames := sets.New[string](x509cert.DNSNames...) + allDNSNames := sets.New(x509cert.DNSNames...) if x509cert.Subject.CommonName != "" { allDNSNames.Insert(x509cert.Subject.CommonName) } @@ -322,7 +326,7 @@ func SecretDataAltNamesMatchSpec(secret *corev1.Secret, spec cmapi.CertificateSp violations = append(violations, "spec.emailAddresses") } - return violations, nil + return violations } func extractSANExtension(extensions []pkix.Extension) (pkix.Extension, error) { diff --git a/pkg/util/pki/match_test.go b/pkg/util/pki/match_test.go index ea8e11bcf9a..b754ca02278 100644 --- a/pkg/util/pki/match_test.go +++ b/pkg/util/pki/match_test.go @@ -14,25 +14,25 @@ See the License for the specific language governing permissions and limitations under the License. */ -package pki +package pki_test import ( - "bytes" "crypto" + "crypto/rand" "crypto/x509" "encoding/asn1" - "encoding/pem" "reflect" "testing" - corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" + "github.com/cert-manager/cert-manager/pkg/util/pki" + "github.com/cert-manager/cert-manager/test/unit/gen" ) func mustGenerateRSA(t *testing.T, keySize int) crypto.PrivateKey { - pk, err := GenerateRSAPrivateKey(keySize) + pk, err := pki.GenerateRSAPrivateKey(keySize) if err != nil { t.Fatal(err) } @@ -40,7 +40,7 @@ func mustGenerateRSA(t *testing.T, keySize int) crypto.PrivateKey { } func mustGenerateECDSA(t *testing.T, keySize int) crypto.PrivateKey { - pk, err := GenerateECPrivateKey(keySize) + pk, err := pki.GenerateECPrivateKey(keySize) if err != nil { t.Fatal(err) } @@ -48,7 +48,7 @@ func mustGenerateECDSA(t *testing.T, keySize int) crypto.PrivateKey { } func mustGenerateEd25519(t *testing.T) crypto.PrivateKey { - pk, err := GenerateEd25519PrivateKey() + pk, err := pki.GenerateEd25519PrivateKey() if err != nil { t.Fatal(err) } @@ -61,7 +61,6 @@ func TestPrivateKeyMatchesSpec(t *testing.T) { expectedAlgo cmapi.PrivateKeyAlgorithm expectedSize int violations []string - err string }{ "should match if keySize and algorithm are correct (RSA)": { key: mustGenerateRSA(t, 2048), @@ -75,18 +74,18 @@ func TestPrivateKeyMatchesSpec(t *testing.T) { violations: []string{"spec.privateKey.size"}, }, "should match if keySize and algorithm are correct (ECDSA)": { - key: mustGenerateECDSA(t, ECCurve256), + key: mustGenerateECDSA(t, pki.ECCurve256), expectedAlgo: cmapi.ECDSAKeyAlgorithm, expectedSize: 256, }, "should not match if ECDSA keySize is incorrect": { - key: mustGenerateECDSA(t, ECCurve256), + key: mustGenerateECDSA(t, pki.ECCurve256), expectedAlgo: cmapi.ECDSAKeyAlgorithm, - expectedSize: ECCurve521, + expectedSize: pki.ECCurve521, violations: []string{"spec.privateKey.size"}, }, "should not match if keyAlgorithm is incorrect": { - key: mustGenerateECDSA(t, ECCurve256), + key: mustGenerateECDSA(t, pki.ECCurve256), expectedAlgo: cmapi.RSAKeyAlgorithm, expectedSize: 2048, violations: []string{"spec.privateKey.algorithm"}, @@ -98,7 +97,7 @@ func TestPrivateKeyMatchesSpec(t *testing.T) { } for name, test := range tests { t.Run(name, func(t *testing.T) { - violations, err := PrivateKeyMatchesSpec( + violations := pki.PrivateKeyMatchesSpec( test.key, cmapi.CertificateSpec{ PrivateKey: &cmapi.CertificatePrivateKey{ @@ -107,16 +106,6 @@ func TestPrivateKeyMatchesSpec(t *testing.T) { }, }, ) - switch { - case err != nil: - if test.err != err.Error() { - t.Errorf("error text did not match, got=%s, exp=%s", err.Error(), test.err) - } - default: - if test.err != "" { - t.Errorf("got no error but expected: %s", test.err) - } - } if !reflect.DeepEqual(violations, test.violations) { t.Errorf("violations did not match, got=%s, exp=%s", violations, test.violations) } @@ -132,7 +121,7 @@ func TestCertificateRequestOtherNamesMatchSpec(t *testing.T) { violations []string }{ "should not report any violation if Certificate otherName(s) match the CertificateRequest's": { - crSpec: MustBuildCertificateRequest(&cmapi.Certificate{Spec: cmapi.CertificateSpec{ + crSpec: mustBuildCertificateRequest(t, &cmapi.Certificate{Spec: cmapi.CertificateSpec{ CommonName: "cn", OtherNames: []cmapi.OtherName{ { @@ -140,7 +129,7 @@ func TestCertificateRequestOtherNamesMatchSpec(t *testing.T) { UTF8Value: "upn@testdomain.local", }, }, - }}, t), + }}), certSpec: cmapi.CertificateSpec{ CommonName: "cn", OtherNames: []cmapi.OtherName{ @@ -153,7 +142,7 @@ func TestCertificateRequestOtherNamesMatchSpec(t *testing.T) { err: "", }, "should report violation if Certificate otherName(s) mismatch the CertificateRequest's": { - crSpec: MustBuildCertificateRequest(&cmapi.Certificate{Spec: cmapi.CertificateSpec{ + crSpec: mustBuildCertificateRequest(t, &cmapi.Certificate{Spec: cmapi.CertificateSpec{ CommonName: "cn", OtherNames: []cmapi.OtherName{ { @@ -161,7 +150,7 @@ func TestCertificateRequestOtherNamesMatchSpec(t *testing.T) { UTF8Value: "upn@testdomain.local", }, }, - }}, t), + }}), certSpec: cmapi.CertificateSpec{ CommonName: "cn", OtherNames: []cmapi.OtherName{ @@ -177,7 +166,7 @@ func TestCertificateRequestOtherNamesMatchSpec(t *testing.T) { }, }, "should not report violation if Certificate otherName(s) match the CertificateRequest's (with different order)": { - crSpec: MustBuildCertificateRequest(&cmapi.Certificate{Spec: cmapi.CertificateSpec{ + crSpec: mustBuildCertificateRequest(t, &cmapi.Certificate{Spec: cmapi.CertificateSpec{ CommonName: "cn", OtherNames: []cmapi.OtherName{ { @@ -189,7 +178,7 @@ func TestCertificateRequestOtherNamesMatchSpec(t *testing.T) { UTF8Value: "upn@testdomain.local", }, }, - }}, t), + }}), certSpec: cmapi.CertificateSpec{ CommonName: "cn", OtherNames: []cmapi.OtherName{ @@ -208,7 +197,7 @@ func TestCertificateRequestOtherNamesMatchSpec(t *testing.T) { } for name, test := range tests { t.Run(name, func(t *testing.T) { - violations, err := RequestMatchesSpec(test.crSpec, test.certSpec) + violations, err := pki.RequestMatchesSpec(test.crSpec, test.certSpec) if err != nil { if test.err == "" { t.Errorf("Unexpected error: %s", err.Error()) @@ -226,12 +215,7 @@ func TestCertificateRequestOtherNamesMatchSpec(t *testing.T) { func TestRequestMatchesSpecSubject(t *testing.T) { createCSRBlob := func(literalSubject string) []byte { - pk, err := GenerateRSAPrivateKey(2048) - if err != nil { - t.Fatal(err) - } - - seq, err := UnmarshalSubjectStringToRDNSequence(literalSubject) + seq, err := pki.UnmarshalSubjectStringToRDNSequence(literalSubject) if err != nil { t.Fatal(err) } @@ -241,16 +225,15 @@ func TestRequestMatchesSpecSubject(t *testing.T) { t.Fatal(err) } - csr := &x509.CertificateRequest{ - RawSubject: asn1Seq, - } - - csrBytes, err := x509.CreateCertificateRequest(bytes.NewBuffer(nil), csr, pk) + pemBytes, _, err := gen.CSR(x509.Ed25519, func(cr *x509.CertificateRequest) error { + cr.RawSubject = asn1Seq + return nil + }) if err != nil { t.Fatal(err) } - return pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE REQUEST", Bytes: csrBytes}) + return pemBytes } tests := []struct { @@ -280,9 +263,8 @@ func TestRequestMatchesSpecSubject(t *testing.T) { } for _, test := range tests { - test := test t.Run(test.name, func(t *testing.T) { - violations, err := RequestMatchesSpec( + violations, err := pki.RequestMatchesSpec( &cmapi.CertificateRequest{ Spec: cmapi.CertificateRequestSpec{ Request: test.x509CSR, @@ -308,11 +290,10 @@ func TestRequestMatchesSpecSubject(t *testing.T) { } } -func TestSecretDataAltNamesMatchSpec(t *testing.T) { +func TestFuzzyX509AltNamesMatchSpec(t *testing.T) { tests := map[string]struct { - data []byte + x509 *x509.Certificate spec cmapi.CertificateSpec - err string violations []string }{ "should match if common name and dns names exactly equal": { @@ -320,7 +301,7 @@ func TestSecretDataAltNamesMatchSpec(t *testing.T) { CommonName: "cn", DNSNames: []string{"at", "least", "one"}, }, - data: selfSignCertificate(t, cmapi.CertificateSpec{ + x509: selfSignCertificate(t, cmapi.CertificateSpec{ CommonName: "cn", DNSNames: []string{"at", "least", "one"}, }), @@ -330,7 +311,7 @@ func TestSecretDataAltNamesMatchSpec(t *testing.T) { CommonName: "cn", DNSNames: []string{"at", "least", "one"}, }, - data: selfSignCertificate(t, cmapi.CertificateSpec{ + x509: selfSignCertificate(t, cmapi.CertificateSpec{ DNSNames: []string{"cn", "at", "least", "one"}, }), }, @@ -339,7 +320,7 @@ func TestSecretDataAltNamesMatchSpec(t *testing.T) { CommonName: "cn", DNSNames: []string{"at", "least", "one"}, }, - data: selfSignCertificate(t, cmapi.CertificateSpec{ + x509: selfSignCertificate(t, cmapi.CertificateSpec{ DNSNames: []string{"at", "least", "one", "cn"}, }), }, @@ -347,7 +328,7 @@ func TestSecretDataAltNamesMatchSpec(t *testing.T) { spec: cmapi.CertificateSpec{ DNSNames: []string{"at", "least", "one"}, }, - data: selfSignCertificate(t, cmapi.CertificateSpec{ + x509: selfSignCertificate(t, cmapi.CertificateSpec{ CommonName: "at", DNSNames: []string{"least", "one"}, }), @@ -357,7 +338,7 @@ func TestSecretDataAltNamesMatchSpec(t *testing.T) { CommonName: "cn", DNSNames: []string{"at", "least", "one"}, }, - data: selfSignCertificate(t, cmapi.CertificateSpec{ + x509: selfSignCertificate(t, cmapi.CertificateSpec{ DNSNames: []string{"at", "least", "one"}, }), violations: []string{"spec.commonName"}, @@ -367,7 +348,7 @@ func TestSecretDataAltNamesMatchSpec(t *testing.T) { CommonName: "cn", DNSNames: []string{"at", "least", "one", "other"}, }, - data: selfSignCertificate(t, cmapi.CertificateSpec{ + x509: selfSignCertificate(t, cmapi.CertificateSpec{ DNSNames: []string{"at", "least", "one"}, }), violations: []string{"spec.commonName", "spec.dnsNames"}, @@ -376,7 +357,7 @@ func TestSecretDataAltNamesMatchSpec(t *testing.T) { spec: cmapi.CertificateSpec{ DNSNames: []string{"at", "least", "one"}, }, - data: selfSignCertificate(t, cmapi.CertificateSpec{ + x509: selfSignCertificate(t, cmapi.CertificateSpec{ CommonName: "cn", DNSNames: []string{"at", "least", "one", "other"}, }), @@ -387,7 +368,7 @@ func TestSecretDataAltNamesMatchSpec(t *testing.T) { CommonName: "cn", DNSNames: []string{"at", "least", "one"}, }, - data: selfSignCertificate(t, cmapi.CertificateSpec{ + x509: selfSignCertificate(t, cmapi.CertificateSpec{ CommonName: "cn", DNSNames: []string{"at", "least", "one", "other"}, }), @@ -397,7 +378,7 @@ func TestSecretDataAltNamesMatchSpec(t *testing.T) { spec: cmapi.CertificateSpec{ DNSNames: []string{"at", "least", "one"}, }, - data: selfSignCertificate(t, cmapi.CertificateSpec{ + x509: selfSignCertificate(t, cmapi.CertificateSpec{ CommonName: "at", DNSNames: []string{"at", "least", "one"}, }), @@ -407,7 +388,7 @@ func TestSecretDataAltNamesMatchSpec(t *testing.T) { CommonName: "cn", DNSNames: []string{"at", "least", "one"}, }, - data: selfSignCertificate(t, cmapi.CertificateSpec{ + x509: selfSignCertificate(t, cmapi.CertificateSpec{ CommonName: "at", DNSNames: []string{"at", "least", "one", "cn"}, }), @@ -416,7 +397,7 @@ func TestSecretDataAltNamesMatchSpec(t *testing.T) { spec: cmapi.CertificateSpec{ IPAddresses: []string{"127.0.0.1"}, }, - data: selfSignCertificate(t, cmapi.CertificateSpec{ + x509: selfSignCertificate(t, cmapi.CertificateSpec{ IPAddresses: []string{"127.0.0.1"}, }), }, @@ -424,7 +405,7 @@ func TestSecretDataAltNamesMatchSpec(t *testing.T) { spec: cmapi.CertificateSpec{ IPAddresses: []string{"127.0.0.1"}, }, - data: selfSignCertificate(t, cmapi.CertificateSpec{ + x509: selfSignCertificate(t, cmapi.CertificateSpec{ IPAddresses: []string{"127.0.2.1"}, }), violations: []string{"spec.ipAddresses"}, @@ -433,7 +414,7 @@ func TestSecretDataAltNamesMatchSpec(t *testing.T) { spec: cmapi.CertificateSpec{ IPAddresses: []string{"127.0.0.1"}, }, - data: selfSignCertificate(t, cmapi.CertificateSpec{ + x509: selfSignCertificate(t, cmapi.CertificateSpec{ CommonName: "127.0.0.1", IPAddresses: []string{"127.0.0.1"}, }), @@ -442,17 +423,7 @@ func TestSecretDataAltNamesMatchSpec(t *testing.T) { } for name, test := range tests { t.Run(name, func(t *testing.T) { - violations, err := SecretDataAltNamesMatchSpec(&corev1.Secret{Data: map[string][]byte{corev1.TLSCertKey: test.data}}, test.spec) - switch { - case err != nil: - if test.err != err.Error() { - t.Errorf("error text did not match, got=%s, exp=%s", err.Error(), test.err) - } - default: - if test.err != "" { - t.Errorf("got no error but expected: %s", test.err) - } - } + violations := pki.FuzzyX509AltNamesMatchSpec(test.x509, test.spec) if !reflect.DeepEqual(violations, test.violations) { t.Errorf("violations did not match, got=%s, exp=%s", violations, test.violations) } @@ -460,42 +431,37 @@ func TestSecretDataAltNamesMatchSpec(t *testing.T) { } } -func selfSignCertificate(t *testing.T, spec cmapi.CertificateSpec) []byte { - pk, err := GenerateRSAPrivateKey(2048) +func selfSignCertificate(t *testing.T, spec cmapi.CertificateSpec) *x509.Certificate { + template, err := pki.CertificateTemplateFromCertificate(&cmapi.Certificate{Spec: spec}) if err != nil { t.Fatal(err) } - template, err := CertificateTemplateFromCertificate(&cmapi.Certificate{Spec: spec}) + pk, err := pki.GenerateRSAPrivateKey(2048) if err != nil { t.Fatal(err) } - pemData, _, err := SignCertificate(template, template, pk.Public(), pk) + // Marshal and unmarshal to ensure all fields are set correctly + certDER, err := x509.CreateCertificate(rand.Reader, template, template, pk.Public(), pk) if err != nil { t.Fatal(err) } - return pemData -} - -func MustBuildCertificateRequest(crt *cmapi.Certificate, t *testing.T) *cmapi.CertificateRequest { - pk, err := GenerateRSAPrivateKey(2048) + cert, err := x509.ParseCertificate(certDER) if err != nil { t.Fatal(err) } - csrTemplate, err := GenerateCSR(crt, WithOtherNames(true)) - if err != nil { - t.Fatal(err) - } + return cert +} - var buffer bytes.Buffer - csr, err := x509.CreateCertificateRequest(&buffer, csrTemplate, pk) +func mustBuildCertificateRequest(t *testing.T, crt *cmapi.Certificate) *cmapi.CertificateRequest { + pemData, _, err := gen.CSRForCertificate(crt) if err != nil { t.Fatal(err) } - pemData := pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE REQUEST", Bytes: csr}) + cr := &cmapi.CertificateRequest{ ObjectMeta: metav1.ObjectMeta{ Name: t.Name(), diff --git a/pkg/util/pki/parse_certificate_chain.go b/pkg/util/pki/parse_certificate_chain.go index 5f3b06fb615..bb656706efe 100644 --- a/pkg/util/pki/parse_certificate_chain.go +++ b/pkg/util/pki/parse_certificate_chain.go @@ -217,7 +217,7 @@ func (c *chainNode) toBundleAndCA() (PEMBundle, error) { // A, which is why the argument order for the two input chains does not // matter. // -// Gluability: We say that the chains A and B are glueable when either the +// Gluability: We say that the chains A and B are gluable when either the // leaf certificate of A can be verified using the root certificate of B, // or that the leaf certificate of B can be verified using the root certificate // of A. diff --git a/pkg/util/pki/renewaltime.go b/pkg/util/pki/renewaltime.go index 7508b9ff635..318c09d135e 100644 --- a/pkg/util/pki/renewaltime.go +++ b/pkg/util/pki/renewaltime.go @@ -23,24 +23,20 @@ import ( ) // RenewalTimeFunc is a custom function type for calculating renewal time of a certificate. -type RenewalTimeFunc func(time.Time, time.Time, *metav1.Duration) *metav1.Time +type RenewalTimeFunc func(time.Time, time.Time, *metav1.Duration, *int32) *metav1.Time -// RenewalTime calculates renewal time for a certificate. Default renewal time -// is 2/3 through certificate's lifetime. If user has configured -// spec.renewBefore, renewal time will be renewBefore period before expiry -// (unless that is after the expiry). -func RenewalTime(notBefore, notAfter time.Time, renewBeforeOverride *metav1.Duration) *metav1.Time { +// RenewalTime calculates renewal time for a certificate. +// If renewBefore is non-nil and less than the certificate's lifetime, renewal +// time will be the computed renewBefore period before expiry. +// If renewBeforePercentage is non-nil and in the range (0,100), renewal time +// will be the computed period before expiry based on the renewBeforePercentage +// value and certificate lifetime. +// Default renewal time is 2/3 through certificate's lifetime. +func RenewalTime(notBefore, notAfter time.Time, renewBefore *metav1.Duration, renewBeforePercentage *int32) *metav1.Time { // 1. Calculate how long before expiry a cert should be renewed actualDuration := notAfter.Sub(notBefore) - renewBefore := actualDuration / 3 - - // If spec.renewBefore was set (and is less than duration) - // respect that. We don't want to prevent users from renewing - // longer lived certs more frequently. - if renewBeforeOverride != nil && renewBeforeOverride.Duration < actualDuration { - renewBefore = renewBeforeOverride.Duration - } + actualRenewBefore := RenewBefore(actualDuration, renewBefore, renewBeforePercentage) // 2. Calculate when a cert should be renewed @@ -49,11 +45,32 @@ func RenewalTime(notBefore, notAfter time.Time, renewBeforeOverride *metav1.Dura // where it is truncated to the nearest second. We use the renewal time // from Certificate's status to determine when the Certificate will be // added to the queue to be renewed, but then re-calculate whether it - // needs to be renewed _now_ using this function- so returning a + // needs to be renewed _now_ using this function, so returning a // non-truncated value here would potentially cause Certificates to be // re-queued for renewal earlier than the calculated renewal time thus // causing Certificates to not be automatically renewed. See // https://github.com/cert-manager/cert-manager/pull/4399. - rt := metav1.NewTime(notAfter.Add(-1 * renewBefore).Truncate(time.Second)) + rt := metav1.NewTime(notAfter.Add(-1 * actualRenewBefore).Truncate(time.Second)) return &rt } + +// RenewBefore calculates how far before expiry a certificate should be renewed. +// If renewBefore is non-nil and less than the certificate's lifetime, renewal +// time will be the computed renewBefore period before expiry. +// If renewBeforePercentage is non-nil and in the range (0,100), renewal time +// will be the computed period before expiry based on the renewBeforePercentage +// and actualDuration values. +// Default is 2/3 through certificate's lifetime. +func RenewBefore(actualDuration time.Duration, renewBefore *metav1.Duration, renewBeforePercentage *int32) time.Duration { + // If spec.renewBefore or spec.renewBeforePercentage was set (and is + // valid) respect that. We don't want to prevent users from renewing + // longer lived certs more frequently. + if renewBefore != nil && renewBefore.Duration > 0 && renewBefore.Duration < actualDuration { + return renewBefore.Duration + } else if renewBeforePercentage != nil && *renewBeforePercentage > 0 && *renewBeforePercentage < 100 { + return actualDuration * time.Duration(100-*renewBeforePercentage) / 100 + } + + // Otherwise, default to renewing 2/3 through certificate's lifetime. + return actualDuration / 3 +} diff --git a/pkg/util/pki/renewaltime_test.go b/pkg/util/pki/renewaltime_test.go index aa6f5989910..c7510087d5e 100644 --- a/pkg/util/pki/renewaltime_test.go +++ b/pkg/util/pki/renewaltime_test.go @@ -23,13 +23,15 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/utils/ptr" ) func TestRenewalTime(t *testing.T) { type scenario struct { notBefore time.Time notAfter time.Time - renewBeforeOverride *metav1.Duration + renewBefore *metav1.Duration + renewBeforePct *int32 expectedRenewalTime *metav1.Time } now := time.Now().Truncate(time.Second) @@ -37,40 +39,46 @@ func TestRenewalTime(t *testing.T) { "short lived cert, spec.renewBefore is not set": { notBefore: now, notAfter: now.Add(time.Hour * 3), - renewBeforeOverride: nil, + renewBefore: nil, expectedRenewalTime: &metav1.Time{Time: now.Add(time.Hour * 2)}, }, "long lived cert, spec.renewBefore is not set": { notBefore: now, notAfter: now.Add(time.Hour * 4380), // 6 months - renewBeforeOverride: nil, + renewBefore: nil, expectedRenewalTime: &metav1.Time{Time: now.Add(time.Hour * 2920)}, // renew in 4 months }, "spec.renewBefore is set": { notBefore: now, notAfter: now.Add(time.Hour * 24), - renewBeforeOverride: &metav1.Duration{Duration: time.Hour * 20}, + renewBefore: &metav1.Duration{Duration: time.Hour * 20}, expectedRenewalTime: &metav1.Time{Time: now.Add(time.Hour * 4)}, }, "long lived cert, spec.renewBefore is set to renew every day": { notBefore: now, notAfter: now.Add(time.Hour * 730), // 1 month - renewBeforeOverride: &metav1.Duration{Duration: time.Hour * 706}, // 1 month - 1 day + renewBefore: &metav1.Duration{Duration: time.Hour * 706}, // 1 month - 1 day expectedRenewalTime: &metav1.Time{Time: now.Add(time.Hour * 24)}, }, "spec.renewBefore is set, but would result in renewal time after expiry": { notBefore: now, notAfter: now.Add(time.Hour * 24), - renewBeforeOverride: &metav1.Duration{Duration: time.Hour * 25}, + renewBefore: &metav1.Duration{Duration: time.Hour * 25}, expectedRenewalTime: &metav1.Time{Time: now.Add(time.Hour * 16)}, }, + "long lived cert, spec.renewBeforePercentage is set to renew 50% of the way": { + notBefore: now, + notAfter: now.Add(time.Hour * 730), // 1 month + renewBeforePct: ptr.To(int32(50)), + expectedRenewalTime: &metav1.Time{Time: now.Add(time.Hour * 365)}, + }, // This test case is here to show the scenario where users set // renewBefore to very slightly less than actual duration. This // will result in cert being renewed 'continuously'. "spec.renewBefore is set to a value slightly less than cert's duration": { notBefore: now, notAfter: now.Add(time.Hour*24 + time.Minute*3), - renewBeforeOverride: &metav1.Duration{Duration: time.Hour * 24}, + renewBefore: &metav1.Duration{Duration: time.Hour * 24}, expectedRenewalTime: &metav1.Time{Time: now.Add(time.Minute * 3)}, // renew in 3 minutes }, // This test case is here to guard against an earlier bug where @@ -85,9 +93,51 @@ func TestRenewalTime(t *testing.T) { } for n, s := range tests { t.Run(n, func(t *testing.T) { - renewalTime := RenewalTime(s.notBefore, s.notAfter, s.renewBeforeOverride) + renewalTime := RenewalTime(s.notBefore, s.notAfter, s.renewBefore, s.renewBeforePct) assert.Equal(t, s.expectedRenewalTime, renewalTime, fmt.Sprintf("Expected renewal time: %v got: %v", s.expectedRenewalTime, renewalTime)) + }) + } +} +func TestRenewBefore(t *testing.T) { + const duration = time.Hour * 3 + + type scenario struct { + renewBefore *metav1.Duration + renewBeforePct *int32 + expectedRenewBefore time.Duration + } + + tests := map[string]scenario{ + "spec.renewBefore and spec.renewBeforePercentage are not set": { + renewBefore: nil, + expectedRenewBefore: time.Hour, + }, + "spec.renewBeforePercentage is valid": { + renewBeforePct: ptr.To(int32(25)), + expectedRenewBefore: 135 * time.Minute, + }, + "spec.renewBeforePercentage is too large so default is used": { + renewBeforePct: ptr.To(int32(100)), + expectedRenewBefore: time.Hour, + }, + "spec.renewBeforePercentage is too small so default is used": { + renewBeforePct: ptr.To(int32(0)), + expectedRenewBefore: time.Hour, + }, + "spec.renewBefore is valid": { + renewBefore: &metav1.Duration{Duration: time.Hour * 1}, + expectedRenewBefore: time.Hour, + }, + "spec.renewBefore is invalid so default is used": { + renewBefore: &metav1.Duration{Duration: time.Hour * 4}, + expectedRenewBefore: time.Hour, + }, + } + for n, s := range tests { + t.Run(n, func(t *testing.T) { + renewBefore := RenewBefore(duration, s.renewBefore, s.renewBeforePct) + assert.Equal(t, s.expectedRenewBefore, renewBefore, fmt.Sprintf("Expected renewBefore time: %v got: %v", s.expectedRenewBefore, renewBefore)) }) } } diff --git a/pkg/util/pki/sans.go b/pkg/util/pki/sans.go index 2ceed1157d1..b5005c63909 100644 --- a/pkg/util/pki/sans.go +++ b/pkg/util/pki/sans.go @@ -199,7 +199,7 @@ func forEachSAN(extension []byte, callback func(v asn1.RawValue) error) error { } // adapted from https://cs.opensource.google/go/go/+/master:src/crypto/x509/x509.go;l=1059-1103;drc=e2d9574b14b3db044331da0c6fadeb62315c644a -// MarshalSANs marshals a list of addresses into a the contents of an X.509 +// MarshalSANs marshals a list of addresses into the contents of an X.509 // SubjectAlternativeName extension. func MarshalSANs(gns GeneralNames, hasSubject bool) (pkix.Extension, error) { var rawValues []asn1.RawValue diff --git a/pkg/util/pki/subject_test.go b/pkg/util/pki/subject_test.go index 33e0c8b19ff..a2d7bb0b094 100644 --- a/pkg/util/pki/subject_test.go +++ b/pkg/util/pki/subject_test.go @@ -161,7 +161,6 @@ func TestRoundTripRDNSequence(t *testing.T) { } for _, tc := range rdnSequences { - tc := tc t.Run(tc.name, func(t *testing.T) { newRDNSeq, err := UnmarshalSubjectStringToRDNSequence(tc.rdn.String()) if err != nil { diff --git a/pkg/util/useragent_test.go b/pkg/util/useragent_test.go index 37f81dcc059..1d9ed8bca98 100644 --- a/pkg/util/useragent_test.go +++ b/pkg/util/useragent_test.go @@ -52,7 +52,6 @@ func Test_RestConfigWithUserAgent(t *testing.T) { } for name, test := range tests { - test := test // G601: Remove after Go 1.22. https://go.dev/wiki/LoopvarExperiment t.Run(name, func(t *testing.T) { gotRestConfig := RestConfigWithUserAgent(new(rest.Config), test.component...) assert.Equal(t, &test.expRestConfig, gotRestConfig) diff --git a/pkg/util/util.go b/pkg/util/util.go index af8a6ebc5db..7893e43b911 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -99,7 +99,9 @@ func EqualKeyUsagesUnsorted(s1, s2 []cmapi.KeyUsage) bool { func JoinWithEscapeCSV(in []string) (string, error) { b := new(bytes.Buffer) writer := csv.NewWriter(b) - writer.Write(in) + if err := writer.Write(in); err != nil { + return "", fmt.Errorf("failed to write %q as CSV: %w", in, err) + } writer.Flush() if err := writer.Error(); err != nil { diff --git a/pkg/webhook/configfile/configfile.go b/pkg/webhook/configfile/configfile.go index 5707f6c0380..c2731832280 100644 --- a/pkg/webhook/configfile/configfile.go +++ b/pkg/webhook/configfile/configfile.go @@ -81,6 +81,8 @@ func WebhookConfigurationPathRefs(cfg *config.WebhookConfiguration) ([]*string, return []*string{ &cfg.TLSConfig.Filesystem.KeyFile, &cfg.TLSConfig.Filesystem.CertFile, + &cfg.MetricsTLSConfig.Filesystem.KeyFile, + &cfg.MetricsTLSConfig.Filesystem.CertFile, &cfg.KubeConfig, }, nil } diff --git a/pkg/webhook/options/options.go b/pkg/webhook/options/options.go index 95942bc15ff..5d1f03a678f 100644 --- a/pkg/webhook/options/options.go +++ b/pkg/webhook/options/options.go @@ -90,4 +90,20 @@ func AddConfigFlags(fs *pflag.FlagSet, c *config.WebhookConfiguration) { "Options are:\n"+strings.Join(utilfeature.DefaultFeatureGate.KnownFeatures(), "\n")) logf.AddFlags(&c.Logging, fs) + + fs.StringVar(&c.MetricsListenAddress, "metrics-listen-address", c.MetricsListenAddress, "The host and port that the metrics endpoint should listen on. The value '0' disables the metrics server") + fs.StringVar(&c.MetricsTLSConfig.Filesystem.CertFile, "metrics-tls-cert-file", c.MetricsTLSConfig.Filesystem.CertFile, "path to the file containing the TLS certificate to serve metrics with") + fs.StringVar(&c.MetricsTLSConfig.Filesystem.KeyFile, "metrics-tls-private-key-file", c.MetricsTLSConfig.Filesystem.KeyFile, "path to the file containing the TLS private key to serve metrics with") + + fs.DurationVar(&c.MetricsTLSConfig.Dynamic.LeafDuration, "metrics-dynamic-serving-leaf-duration", c.MetricsTLSConfig.Dynamic.LeafDuration, "leaf duration of metrics serving certificates") + fs.StringVar(&c.MetricsTLSConfig.Dynamic.SecretNamespace, "metrics-dynamic-serving-ca-secret-namespace", c.MetricsTLSConfig.Dynamic.SecretNamespace, "namespace of the secret used to store the CA that signs metrics serving certificates") + fs.StringVar(&c.MetricsTLSConfig.Dynamic.SecretName, "metrics-dynamic-serving-ca-secret-name", c.MetricsTLSConfig.Dynamic.SecretName, "name of the secret used to store the CA that signs serving certificates") + fs.StringSliceVar(&c.MetricsTLSConfig.Dynamic.DNSNames, "metrics-dynamic-serving-dns-names", c.MetricsTLSConfig.Dynamic.DNSNames, "DNS names that should be present on certificates generated by the metrics dynamic serving CA") + fs.StringSliceVar(&c.MetricsTLSConfig.CipherSuites, "metrics-tls-cipher-suites", c.MetricsTLSConfig.CipherSuites, + "Comma-separated list of cipher suites for the metrics server. "+ + "If omitted, the default Go cipher suites will be used. "+ + "Possible values: "+strings.Join(tlsCipherPossibleValues, ",")) + fs.StringVar(&c.MetricsTLSConfig.MinTLSVersion, "metrics-tls-min-version", c.MetricsTLSConfig.MinTLSVersion, + "Minimum TLS version supported by the metrics server. If omitted, the default Go minimum version will be used. "+ + "Possible values: "+strings.Join(tlsPossibleVersions, ", ")) } diff --git a/pkg/webhook/server/server.go b/pkg/webhook/server/server.go index bd6bcd7bb0c..badb2f4a9e1 100644 --- a/pkg/webhook/server/server.go +++ b/pkg/webhook/server/server.go @@ -57,11 +57,11 @@ var ( type Server struct { // ListenAddr is the address the HTTP server should listen on // This must be specified. - ListenAddr int32 + ListenAddr int // HealthzAddr is the address the healthz HTTP server should listen on // If not specified, the healthz endpoint will not be exposed. - HealthzAddr *int32 + HealthzAddr *int // PprofAddress is the address the pprof endpoint should be served on if enabled. PprofAddress string @@ -86,6 +86,21 @@ type Server struct { // MinTLSVersion is the minimum TLS version supported. // Values are from tls package constants (https://golang.org/pkg/crypto/tls/#pkg-constants). MinTLSVersion string + + // The host and port that the metrics endpoint should listen on. + MetricsListenAddress string + + // If specified, the metrics server will listen with TLS using certificates + // provided by this CertificateSource. + MetricsCertificateSource servertls.CertificateSource + + // MetricsCipherSuites is the list of allowed cipher suites for the server. + // Values are from tls package constants (https://golang.org/pkg/crypto/tls/#pkg-constants). + MetricsCipherSuites []string + + // MetricsMinTLSVersion is the minimum TLS version supported. + // Values are from tls package constants (https://golang.org/pkg/crypto/tls/#pkg-constants). + MetricsMinTLSVersion string } func (s *Server) Run(ctx context.Context) error { @@ -104,13 +119,22 @@ func (s *Server) Run(ctx context.Context) error { return err } + metricsCipherSuites, err := ciphers.TLSCipherSuites(s.MetricsCipherSuites) + if err != nil { + return err + } + metricsMinVersion, err := ciphers.TLSVersion(s.MetricsMinTLSVersion) + if err != nil { + return err + } + if s.ListenAddr == 0 { webhookPort, err := freePort() if err != nil { return err } - s.ListenAddr = int32(webhookPort) + s.ListenAddr = webhookPort } mgr, err := ctrl.NewManager( @@ -119,9 +143,19 @@ func (s *Server) Run(ctx context.Context) error { Scheme: s.ResourceScheme, Logger: log, LeaderElection: false, // The webhook component does not need to perform leader election - Metrics: metricsserver.Options{BindAddress: "0"}, + Metrics: metricsserver.Options{ + BindAddress: s.MetricsListenAddress, + SecureServing: s.MetricsCertificateSource != nil, + TLSOpts: []func(*tls.Config){ + func(cfg *tls.Config) { + cfg.CipherSuites = metricsCipherSuites + cfg.MinVersion = metricsMinVersion + cfg.GetCertificate = s.MetricsCertificateSource.GetCertificate + }, + }, + }, WebhookServer: webhook.NewServer(webhook.Options{ - Port: int(s.ListenAddr), + Port: s.ListenAddr, TLSOpts: []func(*tls.Config){ func(cfg *tls.Config) { cfg.CipherSuites = cipherSuites @@ -139,6 +173,12 @@ func (s *Server) Run(ctx context.Context) error { return err } + if s.MetricsCertificateSource != nil { + if err := mgr.Add(s.MetricsCertificateSource); err != nil { + return err + } + } + // if a HealthzAddr is provided, start the healthz listener if s.HealthzAddr != nil { healthzListener, err := net.Listen("tcp", fmt.Sprintf(":%d", *s.HealthzAddr)) @@ -249,7 +289,7 @@ func (s *Server) Port() (int, error) { return 0, ErrNotListening } - return int(s.ListenAddr), nil + return s.ListenAddr, nil } func (s *Server) handleHealthz(w http.ResponseWriter, req *http.Request) { diff --git a/test/acme/fixture.go b/test/acme/fixture.go index 3e102e1b07e..4742a1289bc 100644 --- a/test/acme/fixture.go +++ b/test/acme/fixture.go @@ -24,6 +24,7 @@ import ( "time" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/kubernetes" "sigs.k8s.io/controller-runtime/pkg/envtest" @@ -34,8 +35,8 @@ import ( func init() { vFlag := flag.Lookup("v") if vFlag != nil { - flag.Set("alsologtostderr", fmt.Sprintf("%t", true)) - vFlag.Value.Set("12") + utilruntime.Must(flag.Set("alsologtostderr", fmt.Sprintf("%t", true))) + utilruntime.Must(vFlag.Value.Set("12")) } } @@ -138,7 +139,9 @@ func (f *fixture) setup(t *testing.T) func() { stopCh := make(chan struct{}) - f.testSolver.Initialize(env.Config, stopCh) + if err := f.testSolver.Initialize(env.Config, stopCh); err != nil { + t.Fatalf("error initializing solver: %v", err) + } return func() { close(stopCh) diff --git a/test/acme/server/rfc2136.go b/test/acme/server/rfc2136.go index 0f1b6ac9394..bad36826350 100644 --- a/test/acme/server/rfc2136.go +++ b/test/acme/server/rfc2136.go @@ -19,6 +19,7 @@ package server import ( "fmt" "sync" + "testing" "time" "github.com/go-logr/logr" @@ -28,6 +29,7 @@ import ( ) type rfc2136Handler struct { + t *testing.T log logr.Logger txtRecords map[string][]string @@ -44,7 +46,11 @@ func (b *rfc2136Handler) ServeDNS(w dns.ResponseWriter, req *dns.Msg) { m := new(dns.Msg) m.SetReply(req) - defer w.WriteMsg(m) + defer func() { + if err := w.WriteMsg(m); err != nil { + b.t.Errorf("failed to write response: %v", err) + } + }() var zone string if len(req.Question) > 0 { diff --git a/test/acme/server/server.go b/test/acme/server/server.go index a36818b67be..699faec63fb 100644 --- a/test/acme/server/server.go +++ b/test/acme/server/server.go @@ -21,6 +21,7 @@ import ( "fmt" "net" "sync" + "testing" "time" "github.com/miekg/dns" @@ -33,6 +34,8 @@ const ( ) type BasicServer struct { + T *testing.T + // Zones is a list of DNS zones that this server should accept responses // for. Zones []string @@ -84,6 +87,7 @@ func (b *BasicServer) RunWithAddress(ctx context.Context, listenAddr string) err if b.Handler == nil { b.Handler = &rfc2136Handler{ + t: b.T, log: log, txtRecords: make(map[string][]string), zones: b.Zones, @@ -98,9 +102,10 @@ func (b *BasicServer) RunWithAddress(ctx context.Context, listenAddr string) err b.server.NotifyStartedFunc = waitLock.Unlock go func() { log.V(logf.DebugLevel).Info("starting DNS server") - b.server.ActivateAndServe() + if err := b.server.ActivateAndServe(); err != nil { + b.T.Errorf("failed to start DNS server: %v", err) + } log.V(logf.DebugLevel).Info("DNS server exited") - pc.Close() }() waitLock.Lock() defer waitLock.Unlock() diff --git a/test/acme/suite.go b/test/acme/suite.go index 099547e004b..ab147a47487 100644 --- a/test/acme/suite.go +++ b/test/acme/suite.go @@ -33,7 +33,7 @@ import ( func (f *fixture) TestBasicPresentRecord(t *testing.T) { ns, cleanup := f.setupNamespace(t, "basic-present-record") defer cleanup() - ch := f.buildChallengeRequest(t, ns) + ch := f.buildChallengeRequest(ns) t.Logf("Calling Present with ChallengeRequest: %#v", ch) // present the record @@ -41,7 +41,11 @@ func (f *fixture) TestBasicPresentRecord(t *testing.T) { t.Errorf("expected Present to not error, but got: %v", err) return } - defer f.testSolver.CleanUp(ch) + defer func() { + if err := f.testSolver.CleanUp(ch); err != nil { + t.Errorf("expected CleanUp to not error, but got: %v", err) + } + }() // wait until the record has propagated if err := wait.PollUntilContextTimeout(context.TODO(), f.getPollInterval(), f.getPropagationLimit(), true, f.recordHasPropagatedCheck(ch.ResolvedFQDN, ch.Key)); err != nil { @@ -72,8 +76,8 @@ func (f *fixture) TestExtendedDeletingOneRecordRetainsOthers(t *testing.T) { ns, cleanup := f.setupNamespace(t, "extended-supports-multiple-same-domain") defer cleanup() - ch := f.buildChallengeRequest(t, ns) - ch2 := f.buildChallengeRequest(t, ns) + ch := f.buildChallengeRequest(ns) + ch2 := f.buildChallengeRequest(ns) ch2.Key = "anothertestingkey" // present the first record @@ -81,14 +85,22 @@ func (f *fixture) TestExtendedDeletingOneRecordRetainsOthers(t *testing.T) { t.Errorf("expected Present to not error, but got: %v", err) return } - defer f.testSolver.CleanUp(ch) + defer func() { + if err := f.testSolver.CleanUp(ch); err != nil { + t.Errorf("expected CleanUp to not error, but got: %v", err) + } + }() // present the second record if err := f.testSolver.Present(ch2); err != nil { t.Errorf("expected Present to not error, but got: %v", err) return } - defer f.testSolver.CleanUp(ch2) + defer func() { + if err := f.testSolver.CleanUp(ch2); err != nil { + t.Errorf("expected CleanUp to not error, but got: %v", err) + } + }() // wait until all records have propagated if err := wait.PollUntilContextTimeout( diff --git a/test/acme/util.go b/test/acme/util.go index a561473f5c9..a3f90e09362 100644 --- a/test/acme/util.go +++ b/test/acme/util.go @@ -82,11 +82,13 @@ func (f *fixture) setupNamespace(t *testing.T, name string) (string, func()) { } return name, func() { - f.clientset.CoreV1().Namespaces().Delete(context.TODO(), name, metav1.DeleteOptions{}) + if err := f.clientset.CoreV1().Namespaces().Delete(context.TODO(), name, metav1.DeleteOptions{}); err != nil { + t.Fatalf("error deleting test namespace %q: %v", name, err) + } } } -func (f *fixture) buildChallengeRequest(t *testing.T, ns string) *whapi.ChallengeRequest { +func (f *fixture) buildChallengeRequest(ns string) *whapi.ChallengeRequest { return &whapi.ChallengeRequest{ ResourceNamespace: ns, ResolvedFQDN: f.resolvedFQDN, diff --git a/test/e2e/LICENSES b/test/e2e/LICENSES index 2ebfc6a580f..ad6e266f5d0 100644 --- a/test/e2e/LICENSES +++ b/test/e2e/LICENSES @@ -4,18 +4,19 @@ github.com/blang/semver/v4,https://github.com/blang/semver/blob/v4.0.0/v4/LICENS github.com/cert-manager/cert-manager,https://github.com/cert-manager/cert-manager/blob/HEAD/LICENSE,Apache-2.0 github.com/cert-manager/cert-manager/e2e-tests,https://github.com/cert-manager/cert-manager/blob/HEAD/e2e-tests/LICENSE,Apache-2.0 github.com/cespare/xxhash/v2,https://github.com/cespare/xxhash/blob/v2.3.0/LICENSE.txt,MIT -github.com/cloudflare/cloudflare-go,https://github.com/cloudflare/cloudflare-go/blob/v0.88.0/LICENSE,BSD-3-Clause +github.com/cloudflare/cloudflare-go,https://github.com/cloudflare/cloudflare-go/blob/v0.102.0/LICENSE,BSD-3-Clause github.com/davecgh/go-spew/spew,https://github.com/davecgh/go-spew/blob/d8f796af33cc/LICENSE,ISC -github.com/emicklei/go-restful/v3,https://github.com/emicklei/go-restful/blob/v3.12.0/LICENSE,MIT +github.com/emicklei/go-restful/v3,https://github.com/emicklei/go-restful/blob/v3.12.1/LICENSE,MIT github.com/evanphx/json-patch/v5,https://github.com/evanphx/json-patch/blob/v5.9.0/v5/LICENSE,BSD-3-Clause +github.com/fxamacker/cbor/v2,https://github.com/fxamacker/cbor/blob/v2.7.0/LICENSE,MIT github.com/go-asn1-ber/asn1-ber,https://github.com/go-asn1-ber/asn1-ber/blob/v1.5.6/LICENSE,MIT github.com/go-ldap/ldap/v3,https://github.com/go-ldap/ldap/blob/v3.4.8/v3/LICENSE,MIT -github.com/go-logr/logr,https://github.com/go-logr/logr/blob/v1.4.1/LICENSE,Apache-2.0 +github.com/go-logr/logr,https://github.com/go-logr/logr/blob/v1.4.2/LICENSE,Apache-2.0 github.com/go-logr/zapr,https://github.com/go-logr/zapr/blob/v1.3.0/LICENSE,Apache-2.0 github.com/go-openapi/jsonpointer,https://github.com/go-openapi/jsonpointer/blob/v0.21.0/LICENSE,Apache-2.0 github.com/go-openapi/jsonreference,https://github.com/go-openapi/jsonreference/blob/v0.21.0/LICENSE,Apache-2.0 github.com/go-openapi/swag,https://github.com/go-openapi/swag/blob/v0.23.0/LICENSE,Apache-2.0 -github.com/goccy/go-json,https://github.com/goccy/go-json/blob/v0.10.2/LICENSE,MIT +github.com/goccy/go-json,https://github.com/goccy/go-json/blob/v0.10.3/LICENSE,MIT github.com/gogo/protobuf,https://github.com/gogo/protobuf/blob/v1.3.2/LICENSE,BSD-3-Clause github.com/golang/protobuf,https://github.com/golang/protobuf/blob/v1.5.4/LICENSE,BSD-3-Clause github.com/google/gnostic-models,https://github.com/google/gnostic-models/blob/v0.6.8/LICENSE,Apache-2.0 @@ -32,53 +33,60 @@ github.com/hashicorp/vault-client-go,https://github.com/hashicorp/vault-client-g github.com/imdario/mergo,https://github.com/imdario/mergo/blob/v0.3.16/LICENSE,BSD-3-Clause github.com/josharian/intern,https://github.com/josharian/intern/blob/v1.0.0/license.md,MIT github.com/json-iterator/go,https://github.com/json-iterator/go/blob/v1.1.12/LICENSE,MIT +github.com/klauspost/compress,https://github.com/klauspost/compress/blob/v1.17.9/LICENSE,MIT +github.com/klauspost/compress,https://github.com/klauspost/compress/blob/v1.17.9/LICENSE,Apache-2.0 +github.com/klauspost/compress,https://github.com/klauspost/compress/blob/v1.17.9/LICENSE,BSD-3-Clause +github.com/klauspost/compress/internal/snapref,https://github.com/klauspost/compress/blob/v1.17.9/internal/snapref/LICENSE,BSD-3-Clause +github.com/klauspost/compress/zstd/internal/xxhash,https://github.com/klauspost/compress/blob/v1.17.9/zstd/internal/xxhash/LICENSE.txt,MIT github.com/kr/pretty,https://github.com/kr/pretty/blob/v0.3.1/License,MIT github.com/kr/text,https://github.com/kr/text/blob/v0.2.0/License,MIT github.com/mailru/easyjson,https://github.com/mailru/easyjson/blob/v0.7.7/LICENSE,MIT -github.com/moby/spdystream,https://github.com/moby/spdystream/blob/v0.2.0/LICENSE,Apache-2.0 +github.com/moby/spdystream,https://github.com/moby/spdystream/blob/v0.4.0/LICENSE,Apache-2.0 github.com/modern-go/concurrent,https://github.com/modern-go/concurrent/blob/bacd9c7ef1dd/LICENSE,Apache-2.0 github.com/modern-go/reflect2,https://github.com/modern-go/reflect2/blob/v1.0.2/LICENSE,Apache-2.0 github.com/munnerz/goautoneg,https://github.com/munnerz/goautoneg/blob/a7dc8b61c822/LICENSE,BSD-3-Clause github.com/mxk/go-flowrate/flowrate,https://github.com/mxk/go-flowrate/blob/cca7078d478f/LICENSE,BSD-3-Clause -github.com/onsi/ginkgo/v2,https://github.com/onsi/ginkgo/blob/v2.17.2/LICENSE,MIT -github.com/onsi/gomega,https://github.com/onsi/gomega/blob/v1.33.1/LICENSE,MIT +github.com/onsi/ginkgo/v2,https://github.com/onsi/ginkgo/blob/v2.20.0/LICENSE,MIT +github.com/onsi/gomega,https://github.com/onsi/gomega/blob/v1.34.1/LICENSE,MIT github.com/pkg/errors,https://github.com/pkg/errors/blob/v0.9.1/LICENSE,BSD-2-Clause -github.com/prometheus/client_golang/prometheus,https://github.com/prometheus/client_golang/blob/v1.18.0/LICENSE,Apache-2.0 +github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil,https://github.com/prometheus/client_golang/blob/v1.20.4/internal/github.com/golang/gddo/LICENSE,BSD-3-Clause +github.com/prometheus/client_golang/prometheus,https://github.com/prometheus/client_golang/blob/v1.20.4/LICENSE,Apache-2.0 github.com/prometheus/client_model/go,https://github.com/prometheus/client_model/blob/v0.6.1/LICENSE,Apache-2.0 -github.com/prometheus/common,https://github.com/prometheus/common/blob/v0.46.0/LICENSE,Apache-2.0 -github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg,https://github.com/prometheus/common/blob/v0.46.0/internal/bitbucket.org/ww/goautoneg/README.txt,BSD-3-Clause -github.com/prometheus/procfs,https://github.com/prometheus/procfs/blob/v0.15.0/LICENSE,Apache-2.0 +github.com/prometheus/common,https://github.com/prometheus/common/blob/v0.55.0/LICENSE,Apache-2.0 +github.com/prometheus/procfs,https://github.com/prometheus/procfs/blob/v0.15.1/LICENSE,Apache-2.0 github.com/rogpeppe/go-internal/fmtsort,https://github.com/rogpeppe/go-internal/blob/v1.12.0/LICENSE,BSD-3-Clause github.com/ryanuber/go-glob,https://github.com/ryanuber/go-glob/blob/v1.0.0/LICENSE,MIT -github.com/spf13/cobra,https://github.com/spf13/cobra/blob/v1.8.0/LICENSE.txt,Apache-2.0 +github.com/spf13/cobra,https://github.com/spf13/cobra/blob/v1.8.1/LICENSE.txt,Apache-2.0 github.com/spf13/pflag,https://github.com/spf13/pflag/blob/v1.0.5/LICENSE,BSD-3-Clause +github.com/x448/float16,https://github.com/x448/float16/blob/v0.8.4/LICENSE,MIT go.uber.org/multierr,https://github.com/uber-go/multierr/blob/v1.11.0/LICENSE.txt,MIT go.uber.org/zap,https://github.com/uber-go/zap/blob/v1.27.0/LICENSE,MIT -golang.org/x/crypto,https://cs.opensource.google/go/x/crypto/+/v0.24.0:LICENSE,BSD-3-Clause -golang.org/x/net,https://cs.opensource.google/go/x/net/+/v0.26.0:LICENSE,BSD-3-Clause -golang.org/x/oauth2,https://cs.opensource.google/go/x/oauth2/+/v0.20.0:LICENSE,BSD-3-Clause -golang.org/x/sys/unix,https://cs.opensource.google/go/x/sys/+/v0.21.0:LICENSE,BSD-3-Clause -golang.org/x/term,https://cs.opensource.google/go/x/term/+/v0.21.0:LICENSE,BSD-3-Clause -golang.org/x/text,https://cs.opensource.google/go/x/text/+/v0.16.0:LICENSE,BSD-3-Clause -golang.org/x/time/rate,https://cs.opensource.google/go/x/time/+/v0.5.0:LICENSE,BSD-3-Clause -google.golang.org/protobuf,https://github.com/protocolbuffers/protobuf-go/blob/v1.34.1/LICENSE,BSD-3-Clause +golang.org/x/crypto,https://cs.opensource.google/go/x/crypto/+/v0.27.0:LICENSE,BSD-3-Clause +golang.org/x/exp,https://cs.opensource.google/go/x/exp/+/8a7402ab:LICENSE,BSD-3-Clause +golang.org/x/net,https://cs.opensource.google/go/x/net/+/v0.29.0:LICENSE,BSD-3-Clause +golang.org/x/oauth2,https://cs.opensource.google/go/x/oauth2/+/v0.23.0:LICENSE,BSD-3-Clause +golang.org/x/sys/unix,https://cs.opensource.google/go/x/sys/+/v0.25.0:LICENSE,BSD-3-Clause +golang.org/x/term,https://cs.opensource.google/go/x/term/+/v0.24.0:LICENSE,BSD-3-Clause +golang.org/x/text,https://cs.opensource.google/go/x/text/+/v0.18.0:LICENSE,BSD-3-Clause +golang.org/x/time/rate,https://cs.opensource.google/go/x/time/+/v0.6.0:LICENSE,BSD-3-Clause +google.golang.org/protobuf,https://github.com/protocolbuffers/protobuf-go/blob/v1.34.2/LICENSE,BSD-3-Clause gopkg.in/inf.v0,https://github.com/go-inf/inf/blob/v0.9.1/LICENSE,BSD-3-Clause gopkg.in/yaml.v2,https://github.com/go-yaml/yaml/blob/v2.4.0/LICENSE,Apache-2.0 gopkg.in/yaml.v3,https://github.com/go-yaml/yaml/blob/v3.0.1/LICENSE,MIT -k8s.io/api,https://github.com/kubernetes/api/blob/v0.30.1/LICENSE,Apache-2.0 -k8s.io/apiextensions-apiserver/pkg,https://github.com/kubernetes/apiextensions-apiserver/blob/v0.30.1/LICENSE,Apache-2.0 -k8s.io/apimachinery/pkg,https://github.com/kubernetes/apimachinery/blob/v0.30.1/LICENSE,Apache-2.0 -k8s.io/apimachinery/third_party/forked/golang,https://github.com/kubernetes/apimachinery/blob/v0.30.1/third_party/forked/golang/LICENSE,BSD-3-Clause -k8s.io/client-go,https://github.com/kubernetes/client-go/blob/v0.30.1/LICENSE,Apache-2.0 -k8s.io/component-base,https://github.com/kubernetes/component-base/blob/v0.30.1/LICENSE,Apache-2.0 -k8s.io/klog/v2,https://github.com/kubernetes/klog/blob/v2.120.1/LICENSE,Apache-2.0 -k8s.io/kube-aggregator/pkg/apis/apiregistration,https://github.com/kubernetes/kube-aggregator/blob/v0.30.1/LICENSE,Apache-2.0 -k8s.io/kube-openapi/pkg,https://github.com/kubernetes/kube-openapi/blob/f0e62f92d13f/LICENSE,Apache-2.0 -k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json,https://github.com/kubernetes/kube-openapi/blob/f0e62f92d13f/pkg/internal/third_party/go-json-experiment/json/LICENSE,BSD-3-Clause -k8s.io/kube-openapi/pkg/validation/spec,https://github.com/kubernetes/kube-openapi/blob/f0e62f92d13f/pkg/validation/spec/LICENSE,Apache-2.0 -k8s.io/utils,https://github.com/kubernetes/utils/blob/fe8a2dddb1d0/LICENSE,Apache-2.0 -k8s.io/utils/internal/third_party/forked/golang/net,https://github.com/kubernetes/utils/blob/fe8a2dddb1d0/internal/third_party/forked/golang/LICENSE,BSD-3-Clause -sigs.k8s.io/controller-runtime/pkg,https://github.com/kubernetes-sigs/controller-runtime/blob/v0.18.2/LICENSE,Apache-2.0 +k8s.io/api,https://github.com/kubernetes/api/blob/v0.31.1/LICENSE,Apache-2.0 +k8s.io/apiextensions-apiserver/pkg,https://github.com/kubernetes/apiextensions-apiserver/blob/v0.31.1/LICENSE,Apache-2.0 +k8s.io/apimachinery/pkg,https://github.com/kubernetes/apimachinery/blob/v0.31.1/LICENSE,Apache-2.0 +k8s.io/apimachinery/third_party/forked/golang,https://github.com/kubernetes/apimachinery/blob/v0.31.1/third_party/forked/golang/LICENSE,BSD-3-Clause +k8s.io/client-go,https://github.com/kubernetes/client-go/blob/v0.31.1/LICENSE,Apache-2.0 +k8s.io/component-base,https://github.com/kubernetes/component-base/blob/v0.31.1/LICENSE,Apache-2.0 +k8s.io/klog/v2,https://github.com/kubernetes/klog/blob/v2.130.1/LICENSE,Apache-2.0 +k8s.io/kube-aggregator/pkg/apis/apiregistration,https://github.com/kubernetes/kube-aggregator/blob/v0.31.1/LICENSE,Apache-2.0 +k8s.io/kube-openapi/pkg,https://github.com/kubernetes/kube-openapi/blob/9e1beecbcb38/LICENSE,Apache-2.0 +k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json,https://github.com/kubernetes/kube-openapi/blob/9e1beecbcb38/pkg/internal/third_party/go-json-experiment/json/LICENSE,BSD-3-Clause +k8s.io/kube-openapi/pkg/validation/spec,https://github.com/kubernetes/kube-openapi/blob/9e1beecbcb38/pkg/validation/spec/LICENSE,Apache-2.0 +k8s.io/utils,https://github.com/kubernetes/utils/blob/49e7df575cb6/LICENSE,Apache-2.0 +k8s.io/utils/internal/third_party/forked/golang/net,https://github.com/kubernetes/utils/blob/49e7df575cb6/internal/third_party/forked/golang/LICENSE,BSD-3-Clause +sigs.k8s.io/controller-runtime/pkg,https://github.com/kubernetes-sigs/controller-runtime/blob/v0.19.0/LICENSE,Apache-2.0 sigs.k8s.io/gateway-api,https://github.com/kubernetes-sigs/gateway-api/blob/v1.1.0/LICENSE,Apache-2.0 sigs.k8s.io/json,https://github.com/kubernetes-sigs/json/blob/bc3834ca7abd/LICENSE,Apache-2.0 sigs.k8s.io/json,https://github.com/kubernetes-sigs/json/blob/bc3834ca7abd/LICENSE,BSD-3-Clause diff --git a/test/e2e/framework/addon/internal/globals.go b/test/e2e/framework/addon/internal/globals.go index 83a3274f9e0..53d22d0e92c 100644 --- a/test/e2e/framework/addon/internal/globals.go +++ b/test/e2e/framework/addon/internal/globals.go @@ -22,7 +22,7 @@ import ( "github.com/cert-manager/cert-manager/e2e-tests/framework/config" ) -// Addon is an interface that defines a e2e addon. +// Addon is an interface that defines an e2e addon. type Addon interface { // For non-global addons, this function is called on all ginkgo processes without // any arguments. For global addons, this function is called on ginkgo process #1 diff --git a/test/e2e/framework/addon/vault/setup.go b/test/e2e/framework/addon/vault/setup.go index 70a5fe515cf..54d0f15722c 100644 --- a/test/e2e/framework/addon/vault/setup.go +++ b/test/e2e/framework/addon/vault/setup.go @@ -18,9 +18,14 @@ package vault import ( "context" + cryptorand "crypto/rand" + "crypto/rsa" "crypto/tls" "crypto/x509" + "crypto/x509/pkix" + "encoding/pem" "fmt" + "math/big" "net" "net/http" "net/url" @@ -52,6 +57,7 @@ type VaultInitializer struct { intermediateMount string role string // AppRole auth role appRoleAuthPath string // AppRole auth mount point in Vault + clientCertAuthPath string // Client certificate auth mount point in Vault kubernetesAuthPath string // Kubernetes auth mount point in Vault // Whether the intermediate CA should be configured with root CA @@ -59,6 +65,30 @@ type VaultInitializer struct { kubernetesAPIServerURL string // Kubernetes API Server URL } +func NewVaultInitializerClientCertificate( + kubeClient kubernetes.Interface, + details Details, + configureWithRoot bool, +) *VaultInitializer { + testId := rand.String(10) + rootMount := fmt.Sprintf("%s-root-ca", testId) + intermediateMount := fmt.Sprintf("%s-intermediate-ca", testId) + role := fmt.Sprintf("%s-role", testId) + clientCertAuthPath := fmt.Sprintf("%s-auth-clientcert", testId) + + return &VaultInitializer{ + kubeClient: kubeClient, + details: details, + + rootMount: rootMount, + intermediateMount: intermediateMount, + role: role, + clientCertAuthPath: clientCertAuthPath, + + configureWithRoot: configureWithRoot, + } +} + func NewVaultInitializerAppRole( kubeClient kubernetes.Interface, details Details, @@ -121,6 +151,7 @@ func NewVaultInitializerAllAuth( role := fmt.Sprintf("%s-role", testId) appRoleAuthPath := fmt.Sprintf("%s-auth-approle", testId) kubernetesAuthPath := fmt.Sprintf("%s-auth-kubernetes", testId) + clientCertAuthPath := fmt.Sprintf("%s-client-certificate", testId) return &VaultInitializer{ kubeClient: kubeClient, @@ -131,6 +162,7 @@ func NewVaultInitializerAllAuth( role: role, appRoleAuthPath: appRoleAuthPath, kubernetesAuthPath: kubernetesAuthPath, + clientCertAuthPath: clientCertAuthPath, configureWithRoot: configureWithRoot, kubernetesAPIServerURL: apiServerURL, @@ -155,6 +187,12 @@ func (v *VaultInitializer) AppRoleAuthPath() string { return v.appRoleAuthPath } +// AppRoleAuthPath returns the AppRole auth mount point in Vault. +// The format is "/v1/auth/xxxxx-auth-clientcert". +func (v *VaultInitializer) ClientCertificateAuthPath() string { + return path.Join("/v1", "auth", v.clientCertAuthPath) +} + // KubernetesAuthPath returns the Kubernetes auth mount point in Vault. // The format is "/v1/auth/xxxxx-auth-kubernetes". func (v *VaultInitializer) KubernetesAuthPath() string { @@ -339,6 +377,12 @@ func (v *VaultInitializer) Setup(ctx context.Context) error { } } + if v.clientCertAuthPath != "" { + if err := v.setupClientCertAuth(ctx); err != nil { + return err + } + } + return nil } @@ -372,8 +416,8 @@ func (v *VaultInitializer) CreateAppRole(ctx context.Context) (string, string, e ctx, v.role, schema.AppRoleWriteRoleRequest{ - Period: "24h", - Policies: []string{v.role}, + TokenPeriod: "24h", + TokenPolicies: []string{v.role}, }, vault.WithMountPath(v.appRoleAuthPath), ) @@ -612,7 +656,7 @@ func (v *VaultInitializer) setupKubernetesBasedAuth(ctx context.Context) error { // Kubernetes auth config for both testing the "secretRef" Kubernetes // auth and the "serviceAccountRef" Kubernetes auth because the former // relies on static tokens for which "iss" is - // "kubernetes/serviceaccount", and the later relies on bound tokens for + // "kubernetes/serviceaccount", and the latter relies on bound tokens for // which "iss" is "https://kubernetes.default.svc.cluster.local". // https://www.vaultproject.io/docs/auth/kubernetes#kubernetes-1-21 DisableIssValidation: true, @@ -626,7 +670,7 @@ func (v *VaultInitializer) setupKubernetesBasedAuth(ctx context.Context) error { return nil } -// CreateKubernetesrole creates a service account and ClusterRoleBinding for +// CreateKubernetesRole creates a service account and ClusterRoleBinding for // Kubernetes auth delegation. The name "boundSA" refers to the Vault param // "bound_service_account_names". func (v *VaultInitializer) CreateKubernetesRole(ctx context.Context, client kubernetes.Interface, boundNS, boundSA string) error { @@ -755,9 +799,86 @@ func CleanKubernetesRoleForServiceAccountRefAuth(ctx context.Context, client kub return err } - if err := client.CoreV1().ServiceAccounts(saNS).Delete(ctx, saName, metav1.DeleteOptions{}); err != nil { - return err + return nil +} + +func (v *VaultInitializer) setupClientCertAuth(ctx context.Context) error { + // vault auth-enable cert + resp, err := v.client.System.AuthListEnabledMethods(ctx) + if err != nil { + return fmt.Errorf("error fetching auth mounts: %s", err.Error()) + } + + if _, ok := resp.Data[v.clientCertAuthPath]; ok { + return nil + } + + _, err = v.client.System.AuthEnableMethod( + ctx, + v.clientCertAuthPath, + schema.AuthEnableMethodRequest{ + Type: "cert", + }, + ) + if err != nil { + return fmt.Errorf("error enabling cert auth: %s", err.Error()) } return nil } + +func (v *VaultInitializer) CreateClientCertRole(ctx context.Context) (key []byte, cert []byte, _ error) { + privateKey, err := rsa.GenerateKey(cryptorand.Reader, 2048) + if err != nil { + return nil, nil, err + } + + template := x509.Certificate{ + SerialNumber: big.NewInt(1), + Subject: pkix.Name{CommonName: "example.com"}, + NotBefore: time.Now(), + NotAfter: time.Now().AddDate(1, 0, 0), + BasicConstraintsValid: true, + ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth}, + } + + certificateBytes, err := x509.CreateCertificate(cryptorand.Reader, &template, &template, &privateKey.PublicKey, privateKey) + if err != nil { + return nil, nil, err + } + + privateKeyBytes := x509.MarshalPKCS1PrivateKey(privateKey) + privateKeyPEM := pem.EncodeToMemory(&pem.Block{Type: "RSA PRIVATE KEY", Bytes: privateKeyBytes}) + certificatePEM := pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE", Bytes: certificateBytes}) + + role_path := v.IntermediateSignPath() + policy := fmt.Sprintf(`path "%s" { capabilities = [ "create", "update" ] } `, role_path) + _, err = v.client.System.PoliciesWriteAclPolicy( + ctx, + v.role, + schema.PoliciesWriteAclPolicyRequest{ + Policy: policy, + }, + ) + if err != nil { + return nil, nil, fmt.Errorf("error creating policy: %s", err.Error()) + } + + // vault write auth/cert/certs/web + _, err = v.client.Auth.CertWriteCertificate( + ctx, + v.role, + schema.CertWriteCertificateRequest{ + DisplayName: v.role, + Certificate: string(certificatePEM), + TokenPolicies: []string{v.role}, + TokenTtl: "3600", + }, + vault.WithMountPath(v.clientCertAuthPath), + ) + if err != nil { + return nil, nil, fmt.Errorf("error creating cert auth role: %s", err.Error()) + } + + return privateKeyPEM, certificatePEM, nil +} diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index 7712f3db7f5..275726a6c15 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -95,10 +95,10 @@ func NewDefaultFramework(baseName string) *Framework { // It uses the config provided to it for the duration of the tests. func NewFramework(baseName string, cfg *config.Config) *Framework { scheme := runtime.NewScheme() - kscheme.AddToScheme(scheme) - certmgrscheme.AddToScheme(scheme) - apiext.AddToScheme(scheme) - apireg.AddToScheme(scheme) + Expect(kscheme.AddToScheme(scheme)).NotTo(HaveOccurred()) + Expect(certmgrscheme.AddToScheme(scheme)).NotTo(HaveOccurred()) + Expect(apiext.AddToScheme(scheme)).NotTo(HaveOccurred()) + Expect(apireg.AddToScheme(scheme)).NotTo(HaveOccurred()) f := &Framework{ Config: cfg, diff --git a/test/e2e/framework/helper/certificaterequests.go b/test/e2e/framework/helper/certificaterequests.go index c4ce6f3d30c..bb026f6e19e 100644 --- a/test/e2e/framework/helper/certificaterequests.go +++ b/test/e2e/framework/helper/certificaterequests.go @@ -28,6 +28,7 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + kerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/wait" "github.com/cert-manager/cert-manager/e2e-tests/framework/log" @@ -213,17 +214,21 @@ func (h *Helper) WaitCertificateRequestIssuedValidTLS(ctx context.Context, ns, n cr, err := h.WaitForCertificateRequestReady(ctx, ns, name, timeout) if err != nil { log.Logf("Error waiting for CertificateRequest to become Ready: %v", err) - h.Kubectl(ns).DescribeResource("certificaterequest", name) - h.Kubectl(ns).Describe("order", "challenge") - return err + return kerrors.NewAggregate([]error{ + err, + h.Kubectl(ns).DescribeResource("certificaterequest", name), + h.Kubectl(ns).Describe("order", "challenge"), + }) } _, err = h.ValidateIssuedCertificateRequest(ctx, cr, key, rootCAPEM) if err != nil { log.Logf("Error validating issued certificate: %v", err) - h.Kubectl(ns).DescribeResource("certificaterequest", name) - h.Kubectl(ns).Describe("order", "challenge") - return err + return kerrors.NewAggregate([]error{ + err, + h.Kubectl(ns).DescribeResource("certificaterequest", name), + h.Kubectl(ns).Describe("order", "challenge"), + }) } return nil diff --git a/test/e2e/framework/helper/certificates.go b/test/e2e/framework/helper/certificates.go index 262281649f2..7bdfd76805d 100644 --- a/test/e2e/framework/helper/certificates.go +++ b/test/e2e/framework/helper/certificates.go @@ -25,6 +25,7 @@ import ( errors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + kerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/wait" "github.com/cert-manager/cert-manager/e2e-tests/framework/log" @@ -74,19 +75,23 @@ func (h *Helper) waitForCertificateCondition(ctx context.Context, client clients if pollErr != nil && certificate != nil { log.Logf("Failed waiting for certificate %v: %v\n", name, pollErr.Error()) + errs := []error{pollErr} + log.Logf("Certificate:\n") - h.describeCMObject(certificate) + errs = append(errs, h.describeCMObject(certificate)) log.Logf("Order and challenge descriptions:\n") - h.Kubectl(certificate.Namespace).Describe("order", "challenge") + errs = append(errs, h.Kubectl(certificate.Namespace).Describe("order", "challenge")) log.Logf("CertificateRequest description:\n") crName, err := apiutil.ComputeName(certificate.Name, certificate.Spec) if err != nil { - log.Logf("Failed to compute CertificateRequest name from certificate: %s", err) + errs = append(errs, fmt.Errorf("failed to compute CertificateRequest name from certificate: %w", err)) } else { - h.Kubectl(certificate.Namespace).DescribeResource("certificaterequest", crName) + errs = append(errs, h.Kubectl(certificate.Namespace).DescribeResource("certificaterequest", crName)) } + + pollErr = kerrors.NewAggregate(errs) } return certificate, pollErr } @@ -189,14 +194,14 @@ func (h *Helper) waitForIssuerCondition(ctx context.Context, client clientset.Is log.Logf("Failed waiting for issuer %v :%v\n", name, pollErr.Error()) log.Logf("Issuer:\n") - h.describeCMObject(issuer) + pollErr = kerrors.NewAggregate([]error{pollErr, h.describeCMObject(issuer)}) } return issuer, pollErr } // WaitIssuerReady waits for the Issuer resource to be in a Ready=True state -// The Ready=True condition will be checked against the provided issuer to make sure its ready. +// The Ready=True condition will be checked against the provided issuer to make sure it's ready. func (h *Helper) WaitIssuerReady(ctx context.Context, issuer *cmapi.Issuer, timeout time.Duration) (*cmapi.Issuer, error) { ready_true_condition := cmapi.IssuerCondition{ Type: cmapi.IssuerConditionReady, @@ -236,14 +241,14 @@ func (h *Helper) waitForClusterIssuerCondition(ctx context.Context, client clien log.Logf("Failed waiting for issuer %v :%v\n", name, pollErr.Error()) log.Logf("Issuer:\n") - h.describeCMObject(issuer) + pollErr = kerrors.NewAggregate([]error{pollErr, h.describeCMObject(issuer)}) } return issuer, pollErr } // WaitClusterIssuerReady waits for the Cluster Issuer resource to be in a Ready=True state -// The Ready=True condition will be checked against the provided issuer to make sure its ready. +// The Ready=True condition will be checked against the provided issuer to make sure it's ready. func (h *Helper) WaitClusterIssuerReady(ctx context.Context, issuer *cmapi.ClusterIssuer, timeout time.Duration) (*cmapi.ClusterIssuer, error) { ready_true_condition := cmapi.IssuerCondition{ Type: cmapi.IssuerConditionReady, diff --git a/test/e2e/framework/helper/describe.go b/test/e2e/framework/helper/describe.go index 4d1933537aa..c226c0afe15 100644 --- a/test/e2e/framework/helper/describe.go +++ b/test/e2e/framework/helper/describe.go @@ -17,12 +17,11 @@ limitations under the License. package helper import ( - "os" - "k8s.io/apimachinery/pkg/runtime" runtimejson "k8s.io/apimachinery/pkg/runtime/serializer/json" kscheme "k8s.io/client-go/kubernetes/scheme" + "github.com/cert-manager/cert-manager/e2e-tests/framework/log" cmscheme "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/scheme" ) @@ -32,7 +31,7 @@ func (h *Helper) describeKubeObject(object runtime.Object) error { Pretty: true, }) encoder := kscheme.Codecs.WithoutConversion().EncoderForVersion(serializer, nil) - return encoder.Encode(object, os.Stdout) + return encoder.Encode(object, log.Writer) } func (h *Helper) describeCMObject(object runtime.Object) error { @@ -41,5 +40,5 @@ func (h *Helper) describeCMObject(object runtime.Object) error { Pretty: true, }) encoder := cmscheme.Codecs.WithoutConversion().EncoderForVersion(serializer, nil) - return encoder.Encode(object, os.Stdout) + return encoder.Encode(object, log.Writer) } diff --git a/test/e2e/framework/helper/validate.go b/test/e2e/framework/helper/validate.go index a2cd5d739a6..dc92a10e173 100644 --- a/test/e2e/framework/helper/validate.go +++ b/test/e2e/framework/helper/validate.go @@ -21,6 +21,7 @@ import ( "crypto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + kerrors "k8s.io/apimachinery/pkg/util/errors" "github.com/cert-manager/cert-manager/e2e-tests/framework/helper/validation" "github.com/cert-manager/cert-manager/e2e-tests/framework/helper/validation/certificates" @@ -43,13 +44,14 @@ func (h *Helper) ValidateCertificate(certificate *cmapi.Certificate, validations for _, fn := range validations { err := fn(certificate, secret) if err != nil { + errs := []error{err} log.Logf("Certificate:\n") - h.describeCMObject(certificate) + errs = append(errs, h.describeCMObject(certificate)) log.Logf("Secret:\n") - h.describeKubeObject(secret) + errs = append(errs, h.describeKubeObject(secret)) - return err + return kerrors.NewAggregate(errs) } } diff --git a/test/e2e/framework/helper/validation/certificates/certificates.go b/test/e2e/framework/helper/validation/certificates/certificates.go index 45493bd3a59..1ddd2140dce 100644 --- a/test/e2e/framework/helper/validation/certificates/certificates.go +++ b/test/e2e/framework/helper/validation/certificates/certificates.go @@ -138,6 +138,22 @@ func ExpectCertificateOrganizationToMatch(certificate *cmapi.Certificate, secret if certificate.Spec.Subject != nil { expectedOrganization = certificate.Spec.Subject.Organizations } + if certificate.Spec.LiteralSubject != "" { + sequence, err := pki.UnmarshalSubjectStringToRDNSequence(certificate.Spec.LiteralSubject) + if err != nil { + return err + } + + for _, rdns := range sequence { + for _, atv := range rdns { + if atv.Type.Equal(pki.OIDConstants.Organization) { + if str, ok := atv.Value.(string); ok { + expectedOrganization = append(expectedOrganization, str) + } + } + } + } + } if !util.EqualUnsorted(cert.Subject.Organization, expectedOrganization) { return fmt.Errorf("Expected certificate valid for O %v, but got a certificate valid for O %v", expectedOrganization, cert.Subject.Organization) @@ -381,7 +397,7 @@ func ExpectValidAdditionalOutputFormats(certificate *cmapi.Certificate, secret * privateKey := secret.Data[corev1.TLSPrivateKeyKey] block, _ := pem.Decode(privateKey) if !bytes.Equal(derKey, block.Bytes) { - return fmt.Errorf("expected additional output Format DER %s to contain the binary formated private Key", cmapi.CertificateOutputFormatDERKey) + return fmt.Errorf("expected additional output Format DER %s to contain the binary formatted private Key", cmapi.CertificateOutputFormatDERKey) } } else { return fmt.Errorf("expected additional output format DER key %s to be present in secret", cmapi.CertificateOutputFormatDERKey) diff --git a/test/e2e/framework/helper/validation/certificatesigningrequests/certificatesigningrequests.go b/test/e2e/framework/helper/validation/certificatesigningrequests/certificatesigningrequests.go index 909e79c411b..7ae259488f0 100644 --- a/test/e2e/framework/helper/validation/certificatesigningrequests/certificatesigningrequests.go +++ b/test/e2e/framework/helper/validation/certificatesigningrequests/certificatesigningrequests.go @@ -331,10 +331,9 @@ func ExpectIsCA(csr *certificatesv1.CertificateSigningRequest, _ crypto.Signer) markedIsCA, cert.IsCA) } - hasCertSign := (cert.KeyUsage & x509.KeyUsageCertSign) == x509.KeyUsageCertSign - if hasCertSign != markedIsCA { - return fmt.Errorf("Expected certificate to have KeyUsageCertSign=%t, but got=%t", markedIsCA, hasCertSign) - } + // NOTE: For CertificateSigningRequests that are marked as CA, we do not automatically + // add the KeyUsageCertSign bit to the KeyUsage field. This behaviour is different + // to the behaviour of the cert-manager Certificate resource. return nil } diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index 7a3f2276306..05a4337ddbf 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -49,7 +49,7 @@ func Skipf(format string, args ...interface{}) { Skip(nowStamp() + ": " + msg) } -func RequireFeatureGate(f *Framework, featureSet featuregate.FeatureGate, gate featuregate.Feature) { +func RequireFeatureGate(featureSet featuregate.FeatureGate, gate featuregate.Feature) { if !featureSet.Enabled(gate) { Skipf("feature gate %q is not enabled, skipping test", gate) } diff --git a/test/e2e/go.mod b/test/e2e/go.mod index ef7d52d0ade..c63b226cbb4 100644 --- a/test/e2e/go.mod +++ b/test/e2e/go.mod @@ -6,15 +6,6 @@ go 1.22.0 // please place any replace statements here at the top for visibility and add a // comment to it as to when it can be removed -// In prometheus/common v0.47.0 and v0.48.0, breaking changes were introduced in the "github.com/prometheus/common/expfmt" -// package. Not all our dependencies have been upgraded to use the new API. Until then, compiling cert-manager -// with the newer versions of "github.com/prometheus/common/expfmt" and "github.com/prometheus/client_golang" -// fails. These replace statements can be removed once expfmt.FmtText is no longer used by any of the libraries -// we depend on. -replace github.com/prometheus/common => github.com/prometheus/common v0.46.0 - -replace github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.18.0 - // Can be removed once github.com/go-ldap/ldap/v3 releases a version that requires this version. replace github.com/go-asn1-ber/asn1-ber => github.com/go-asn1-ber/asn1-ber v1.5.6 @@ -22,20 +13,20 @@ replace github.com/cert-manager/cert-manager => ../../ require ( github.com/cert-manager/cert-manager v0.0.0-00010101000000-000000000000 - github.com/cloudflare/cloudflare-go v0.88.0 + github.com/cloudflare/cloudflare-go v0.102.0 github.com/hashicorp/vault-client-go v0.4.3 github.com/kr/pretty v0.3.1 - github.com/onsi/ginkgo/v2 v2.17.2 - github.com/onsi/gomega v1.33.1 + github.com/onsi/ginkgo/v2 v2.20.0 + github.com/onsi/gomega v1.34.1 github.com/spf13/pflag v1.0.5 - k8s.io/api v0.30.1 - k8s.io/apiextensions-apiserver v0.30.1 - k8s.io/apimachinery v0.30.1 - k8s.io/client-go v0.30.1 - k8s.io/component-base v0.30.1 - k8s.io/kube-aggregator v0.30.1 - k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 - sigs.k8s.io/controller-runtime v0.18.2 + k8s.io/api v0.31.1 + k8s.io/apiextensions-apiserver v0.31.1 + k8s.io/apimachinery v0.31.1 + k8s.io/client-go v0.31.1 + k8s.io/component-base v0.31.1 + k8s.io/kube-aggregator v0.31.1 + k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 + sigs.k8s.io/controller-runtime v0.19.0 sigs.k8s.io/gateway-api v1.1.0 sigs.k8s.io/structured-merge-diff/v4 v4.4.1 ) @@ -46,18 +37,19 @@ require ( github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/emicklei/go-restful/v3 v3.12.0 // indirect + github.com/emicklei/go-restful/v3 v3.12.1 // indirect github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/go-asn1-ber/asn1-ber v1.5.6 // indirect github.com/go-ldap/ldap/v3 v3.4.8 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/zapr v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect - github.com/goccy/go-json v0.10.2 // indirect + github.com/goccy/go-json v0.10.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect @@ -65,7 +57,7 @@ require ( github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect + github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.1 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -76,40 +68,42 @@ require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/kr/text v0.2.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/moby/spdystream v0.2.0 // indirect + github.com/moby/spdystream v0.4.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.20.4 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.48.0 // indirect - github.com/prometheus/procfs v0.15.0 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect - github.com/spf13/cobra v1.8.0 // indirect + github.com/spf13/cobra v1.8.1 // indirect + github.com/x448/float16 v0.8.4 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/crypto v0.24.0 // indirect - golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/oauth2 v0.20.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/term v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect + golang.org/x/crypto v0.27.0 // indirect + golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect + golang.org/x/net v0.29.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.24.0 // indirect + golang.org/x/text v0.18.0 // indirect + golang.org/x/time v0.6.0 // indirect + golang.org/x/tools v0.24.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/protobuf v1.34.1 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/klog/v2 v2.120.1 // indirect - k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f // indirect + k8s.io/klog/v2 v2.130.1 // indirect + k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/test/e2e/go.sum b/test/e2e/go.sum index 67507a9dfef..d7619abe96c 100644 --- a/test/e2e/go.sum +++ b/test/e2e/go.sum @@ -10,16 +10,16 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cloudflare/cloudflare-go v0.88.0 h1:9CEnvaDMs8ydEBUSPChXmHDe2uJJKZoPpBO2QEr41gY= -github.com/cloudflare/cloudflare-go v0.88.0/go.mod h1:eyuehb1i6BNRc+ZwaTZAiRHeE+4jbKvHAns19oGeakg= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cloudflare/cloudflare-go v0.102.0 h1:+0MGbkirM/yzVLOYpWMgW7CDdKzesSbdwA2Y+rABrWI= +github.com/cloudflare/cloudflare-go v0.102.0/go.mod h1:BOB41tXf31ti/qtBO9paYhyapotQbGRDbQoLOAF7pSg= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emicklei/go-restful/v3 v3.12.0 h1:y2DdzBAURM29NFF94q6RaY4vjIH1rtwDapwQtU84iWk= -github.com/emicklei/go-restful/v3 v3.12.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= +github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lShz4oaXpDTX2bLe7ls= github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= @@ -28,12 +28,14 @@ github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/go-asn1-ber/asn1-ber v1.5.6 h1:CYsqysemXfEaQbyrLJmdsCRuufHoLa3P/gGWGl5TDrM= github.com/go-asn1-ber/asn1-ber v1.5.6/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= github.com/go-ldap/ldap/v3 v3.4.8 h1:loKJyspcRezt2Q3ZRMq2p/0v8iOurlmeXDPw6fikSvQ= github.com/go-ldap/ldap/v3 v3.4.8/go.mod h1:qS3Sjlu76eHfHGpUdWkAXQTw4beih+cHsco2jXlIXrk= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= @@ -44,8 +46,8 @@ github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+Gr github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= -github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= -github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= +github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= @@ -63,13 +65,12 @@ github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17 github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= @@ -109,10 +110,14 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -121,8 +126,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= -github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/spdystream v0.4.0 h1:Vy79D6mHeJJjiPdFEL2yku1kl0chZpJfZcPpb16BRl8= +github.com/moby/spdystream v0.4.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= 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= @@ -132,32 +137,32 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/onsi/ginkgo/v2 v2.17.2 h1:7eMhcy3GimbsA3hEnVKdw/PQM9XN9krpKVXsZdph0/g= -github.com/onsi/ginkgo/v2 v2.17.2/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc= -github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= -github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= +github.com/onsi/ginkgo/v2 v2.20.0 h1:PE84V2mHqoT1sglvHc8ZdQtPcwmvvt29WLEEO3xmdZw= +github.com/onsi/ginkgo/v2 v2.20.0/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI= +github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= +github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= -github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= +github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.46.0 h1:doXzt5ybi1HBKpsZOL0sSkaNHJJqkyfEWZGGqqScV0Y= -github.com/prometheus/common v0.46.0/go.mod h1:Tp0qkxpb9Jsg54QMe+EAmqXkSV7Evdy1BTn+g2pa/hQ= -github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= -github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -170,6 +175,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= @@ -186,10 +193,10 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -206,10 +213,10 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo= -golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -226,45 +233,47 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= +golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -274,26 +283,26 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.30.1 h1:kCm/6mADMdbAxmIh0LBjS54nQBE+U4KmbCfIkF5CpJY= -k8s.io/api v0.30.1/go.mod h1:ddbN2C0+0DIiPntan/bye3SW3PdwLa11/0yqwvuRrJM= -k8s.io/apiextensions-apiserver v0.30.1 h1:4fAJZ9985BmpJG6PkoxVRpXv9vmPUOVzl614xarePws= -k8s.io/apiextensions-apiserver v0.30.1/go.mod h1:R4GuSrlhgq43oRY9sF2IToFh7PVlF1JjfWdoG3pixk4= -k8s.io/apimachinery v0.30.1 h1:ZQStsEfo4n65yAdlGTfP/uSHMQSoYzU/oeEbkmF7P2U= -k8s.io/apimachinery v0.30.1/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= -k8s.io/client-go v0.30.1 h1:uC/Ir6A3R46wdkgCV3vbLyNOYyCJ8oZnjtJGKfytl/Q= -k8s.io/client-go v0.30.1/go.mod h1:wrAqLNs2trwiCH/wxxmT/x3hKVH9PuV0GGW0oDoHVqc= -k8s.io/component-base v0.30.1 h1:bvAtlPh1UrdaZL20D9+sWxsJljMi0QZ3Lmw+kmZAaxQ= -k8s.io/component-base v0.30.1/go.mod h1:e/X9kDiOebwlI41AvBHuWdqFriSRrX50CdwA9TFaHLI= -k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= -k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-aggregator v0.30.1 h1:ymR2BsxDacTKwzKTuNhGZttuk009c+oZbSeD+IPX5q4= -k8s.io/kube-aggregator v0.30.1/go.mod h1:SFbqWsM6ea8dHd3mPLsZFzJHbjBOS5ykIgJh4znZ5iQ= -k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f h1:0LQagt0gDpKqvIkAMPaRGcXawNMouPECM1+F9BVxEaM= -k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f/go.mod h1:S9tOR0FxgyusSNR+MboCuiDpVWkAifZvaYI1Q2ubgro= -k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak= -k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.18.2 h1:RqVW6Kpeaji67CY5nPEfRz6ZfFMk0lWQlNrLqlNpx+Q= -sigs.k8s.io/controller-runtime v0.18.2/go.mod h1:tuAt1+wbVsXIT8lPtk5RURxqAnq7xkpv2Mhttslg7Hw= +k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU= +k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI= +k8s.io/apiextensions-apiserver v0.31.1 h1:L+hwULvXx+nvTYX/MKM3kKMZyei+UiSXQWciX/N6E40= +k8s.io/apiextensions-apiserver v0.31.1/go.mod h1:tWMPR3sgW+jsl2xm9v7lAyRF1rYEK71i9G5dRtkknoQ= +k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= +k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= +k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= +k8s.io/component-base v0.31.1 h1:UpOepcrX3rQ3ab5NB6g5iP0tvsgJWzxTyAo20sgYSy8= +k8s.io/component-base v0.31.1/go.mod h1:WGeaw7t/kTsqpVTaCoVEtillbqAhF2/JgvO0LDOMa0w= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-aggregator v0.31.1 h1:vrYBTTs3xMrpiEsmBjsLETZE9uuX67oQ8B3i1BFfMPw= +k8s.io/kube-aggregator v0.31.1/go.mod h1:+aW4NX50uneozN+BtoCxI4g7ND922p8Wy3tWKFDiWVk= +k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 h1:1dWzkmJrrprYvjGwh9kEUxmcUV/CtNU8QM7h1FLWQOo= +k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38/go.mod h1:coRQXBK9NxO98XUv3ZD6AK3xzHCxV6+b7lrquKwaKzA= +k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 h1:MDF6h2H/h4tbzmtIKTuctcwZmY0tY9mD9fNT47QO6HI= +k8s.io/utils v0.0.0-20240921022957-49e7df575cb6/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/controller-runtime v0.19.0 h1:nWVM7aq+Il2ABxwiCizrVDSlmDcshi9llbaFbC0ji/Q= +sigs.k8s.io/controller-runtime v0.19.0/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= sigs.k8s.io/gateway-api v1.1.0 h1:DsLDXCi6jR+Xz8/xd0Z1PYl2Pn0TyaFMOPPZIj4inDM= sigs.k8s.io/gateway-api v1.1.0/go.mod h1:ZH4lHrL2sDi0FHZ9jjneb8kKnGzFWyrTya35sWUTrRs= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= diff --git a/test/e2e/suite/certificaterequests/approval/approval.go b/test/e2e/suite/certificaterequests/approval/approval.go index 70db251f990..5366059a72c 100644 --- a/test/e2e/suite/certificaterequests/approval/approval.go +++ b/test/e2e/suite/certificaterequests/approval/approval.go @@ -62,7 +62,7 @@ var _ = framework.CertManagerDescribe("Approval CertificateRequests", func() { ) // isNotFoundError returns true if an error from the cert-manager admission - // webhook contains a is not found error. + // webhook contains an is not found error. isNotFoundError := func(issuerRef cmmeta.ObjectReference, err error) bool { if err == nil { return false diff --git a/test/e2e/suite/certificaterequests/approval/userinfo.go b/test/e2e/suite/certificaterequests/approval/userinfo.go index ac4f0c1a02d..b4e2b20cff9 100644 --- a/test/e2e/suite/certificaterequests/approval/userinfo.go +++ b/test/e2e/suite/certificaterequests/approval/userinfo.go @@ -82,7 +82,7 @@ var _ = framework.CertManagerDescribe("UserInfo CertificateRequests", func() { By("Should error when attempting to update UserInfo fields") cr.Spec.Username = "abc" cr.Spec.UID = "123" - cr, err = f.CertManagerClientSet.CertmanagerV1().CertificateRequests(f.Namespace.Name).Update(context.TODO(), cr, metav1.UpdateOptions{}) + _, err = f.CertManagerClientSet.CertmanagerV1().CertificateRequests(f.Namespace.Name).Update(context.TODO(), cr, metav1.UpdateOptions{}) Expect(err).To(HaveOccurred()) }) diff --git a/test/e2e/suite/certificates/additionaloutputformats.go b/test/e2e/suite/certificates/additionaloutputformats.go index 6b0d3bb2810..6659a2d190c 100644 --- a/test/e2e/suite/certificates/additionaloutputformats.go +++ b/test/e2e/suite/certificates/additionaloutputformats.go @@ -54,7 +54,7 @@ var _ = framework.CertManagerDescribe("Certificate AdditionalCertificateOutputFo f := framework.NewDefaultFramework("certificates-additional-output-formats") createCertificate := func(f *framework.Framework, aof []cmapi.CertificateAdditionalOutputFormat) (string, *cmapi.Certificate) { - framework.RequireFeatureGate(f, utilfeature.DefaultFeatureGate, feature.AdditionalCertificateOutputFormats) + framework.RequireFeatureGate(utilfeature.DefaultFeatureGate, feature.AdditionalCertificateOutputFormats) crt := &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{ @@ -332,7 +332,7 @@ var _ = framework.CertManagerDescribe("Certificate AdditionalCertificateOutputFo It("if a third party set additional output formats, they then get added to the Certificate, when they are removed again they should persist as they are still owned by a third party", func() { // This e2e test requires that the ServerSideApply feature gate is enabled. - framework.RequireFeatureGate(f, utilfeature.DefaultFeatureGate, feature.ServerSideApply) + framework.RequireFeatureGate(utilfeature.DefaultFeatureGate, feature.ServerSideApply) crtName, crt := createCertificate(f, nil) diff --git a/test/e2e/suite/certificates/literalsubjectrdns.go b/test/e2e/suite/certificates/literalsubjectrdns.go index 3e4fec9e3c7..f67df514404 100644 --- a/test/e2e/suite/certificates/literalsubjectrdns.go +++ b/test/e2e/suite/certificates/literalsubjectrdns.go @@ -49,7 +49,7 @@ var _ = framework.CertManagerDescribe("literalsubject rdn parsing", func() { f := framework.NewDefaultFramework("certificate-literalsubject-rdns") createCertificate := func(f *framework.Framework, literalSubject string) (*cmapi.Certificate, error) { - framework.RequireFeatureGate(f, utilfeature.DefaultFeatureGate, feature.LiteralCertificateSubject) + framework.RequireFeatureGate(utilfeature.DefaultFeatureGate, feature.LiteralCertificateSubject) crt := &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{ GenerateName: testName + "-", diff --git a/test/e2e/suite/certificates/othernamesan.go b/test/e2e/suite/certificates/othernamesan.go index 39f24b6d908..37a57c09dc8 100644 --- a/test/e2e/suite/certificates/othernamesan.go +++ b/test/e2e/suite/certificates/othernamesan.go @@ -74,7 +74,7 @@ var _ = framework.CertManagerDescribe("othername san processing", func() { } BeforeEach(func() { - framework.RequireFeatureGate(f, utilfeature.DefaultFeatureGate, feature.OtherNames) + framework.RequireFeatureGate(utilfeature.DefaultFeatureGate, feature.OtherNames) By("creating a self-signing issuer") issuer := gen.Issuer(issuerName, diff --git a/test/e2e/suite/certificates/secrettemplate.go b/test/e2e/suite/certificates/secrettemplate.go index eb5fb58d46c..4f4e36f8456 100644 --- a/test/e2e/suite/certificates/secrettemplate.go +++ b/test/e2e/suite/certificates/secrettemplate.go @@ -268,7 +268,7 @@ var _ = framework.CertManagerDescribe("Certificate SecretTemplate", func() { secret.Labels["abc"] = "123" secret.Labels["foo"] = "bar" - secret, err = f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Update(ctx, secret, metav1.UpdateOptions{}) + _, err = f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Update(ctx, secret, metav1.UpdateOptions{}) Expect(err).NotTo(HaveOccurred()) secret, err = f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Get(ctx, secretName, metav1.GetOptions{}) @@ -278,7 +278,7 @@ var _ = framework.CertManagerDescribe("Certificate SecretTemplate", func() { Expect(secret.Labels).To(HaveKeyWithValue("abc", "123")) Expect(secret.Labels).To(HaveKeyWithValue("foo", "bar")) - secret, err = f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Apply(context.Background(), + _, err = f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Apply(context.Background(), applycorev1.Secret(secret.Name, secret.Namespace). WithAnnotations(secret.Annotations). WithLabels(secret.Labels), @@ -343,10 +343,10 @@ var _ = framework.CertManagerDescribe("Certificate SecretTemplate", func() { }) } - for _, expectedAnnoation := range []string{"an-annotation", "another-annotation"} { + for _, expectedAnnotation := range []string{"an-annotation", "another-annotation"} { var found bool for _, managedAnnotation := range managedAnnotations { - if expectedAnnoation == managedAnnotation { + if expectedAnnotation == managedAnnotation { found = true break } diff --git a/test/e2e/suite/certificatesigningrequests/selfsigned/selfsigned.go b/test/e2e/suite/certificatesigningrequests/selfsigned/selfsigned.go index 1963f8726ff..845802162d8 100644 --- a/test/e2e/suite/certificatesigningrequests/selfsigned/selfsigned.go +++ b/test/e2e/suite/certificatesigningrequests/selfsigned/selfsigned.go @@ -63,7 +63,7 @@ var _ = framework.CertManagerDescribe("CertificateSigningRequests SelfSigned Sec }) It("Issuer: the private key Secret is created after the request is created should still be signed", func() { - framework.RequireFeatureGate(f, utilfeature.DefaultFeatureGate, feature.ExperimentalCertificateSigningRequestControllers) + framework.RequireFeatureGate(utilfeature.DefaultFeatureGate, feature.ExperimentalCertificateSigningRequestControllers) var err error issuer, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(context.TODO(), &cmapi.Issuer{ @@ -125,7 +125,7 @@ var _ = framework.CertManagerDescribe("CertificateSigningRequests SelfSigned Sec }) It("Issuer: private key Secret is updated with a valid private key after the request is created should still be signed", func() { - framework.RequireFeatureGate(f, utilfeature.DefaultFeatureGate, feature.ExperimentalCertificateSigningRequestControllers) + framework.RequireFeatureGate(utilfeature.DefaultFeatureGate, feature.ExperimentalCertificateSigningRequestControllers) var err error By("creating Secret with missing private key") @@ -190,7 +190,7 @@ var _ = framework.CertManagerDescribe("CertificateSigningRequests SelfSigned Sec }) It("ClusterIssuer: the private key Secret is created after the request is created should still be signed", func() { - framework.RequireFeatureGate(f, utilfeature.DefaultFeatureGate, feature.ExperimentalCertificateSigningRequestControllers) + framework.RequireFeatureGate(utilfeature.DefaultFeatureGate, feature.ExperimentalCertificateSigningRequestControllers) var err error issuer, err = f.CertManagerClientSet.CertmanagerV1().ClusterIssuers().Create(context.TODO(), &cmapi.ClusterIssuer{ @@ -252,7 +252,7 @@ var _ = framework.CertManagerDescribe("CertificateSigningRequests SelfSigned Sec }) It("ClusterIssuer: private key Secret is updated with a valid private key after the request is created should still be signed", func() { - framework.RequireFeatureGate(f, utilfeature.DefaultFeatureGate, feature.ExperimentalCertificateSigningRequestControllers) + framework.RequireFeatureGate(utilfeature.DefaultFeatureGate, feature.ExperimentalCertificateSigningRequestControllers) var err error By("creating Secret with missing private key") diff --git a/test/e2e/suite/conformance/certificates/suite.go b/test/e2e/suite/conformance/certificates/suite.go index 595814fc306..c809aa04600 100644 --- a/test/e2e/suite/conformance/certificates/suite.go +++ b/test/e2e/suite/conformance/certificates/suite.go @@ -21,7 +21,9 @@ import ( "github.com/cert-manager/cert-manager/e2e-tests/framework" "github.com/cert-manager/cert-manager/e2e-tests/framework/helper/featureset" + "github.com/cert-manager/cert-manager/internal/controller/feature" cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" + utilfeature "github.com/cert-manager/cert-manager/pkg/util/feature" . "github.com/onsi/ginkgo/v2" ) @@ -46,6 +48,11 @@ type Suite struct { // If not specified, this function will be skipped. DeleteIssuerFunc func(context.Context, *framework.Framework, cmmeta.ObjectReference) + // SharedIPAddress is the IP address that will be used in all certificates + // that require an IP address to be set. For HTTP-01 tests, this IP address + // will be set to the IP address of the Ingress/ Gateway controller. + SharedIPAddress string + // DomainSuffix is a suffix used on all domain requests. // This is useful when the issuer being tested requires special // configuration for a set of domains in order for certificates to be @@ -64,18 +71,21 @@ type Suite struct { // certain features due to restrictions in their implementation. UnsupportedFeatures featureset.FeatureSet - // completed is used internally to track whether Complete() has been called - completed bool + // validated is used internally to track whether Validate has been called already. + validated bool } -// complete will validate configuration and set default values. -func (s *Suite) complete(f *framework.Framework) { - if s.Name == "" { - Fail("Name must be set") - } - - if s.CreateIssuerFunc == nil { - Fail("CreateIssuerFunc must be set") +// setup will set default values for fields on the Suite struct. +func (s *Suite) setup(f *framework.Framework) { + if s.SharedIPAddress == "" { + switch s.HTTP01TestType { + case "Ingress": + s.SharedIPAddress = f.Config.Addons.ACMEServer.IngressIP + case "Gateway": + s.SharedIPAddress = f.Config.Addons.ACMEServer.GatewayIP + default: + s.SharedIPAddress = "127.0.0.1" + } } if s.DomainSuffix == "" { @@ -92,8 +102,27 @@ func (s *Suite) complete(f *framework.Framework) { if s.UnsupportedFeatures == nil { s.UnsupportedFeatures = make(featureset.FeatureSet) } +} + +// validate will validate the Suite struct to ensure all required fields are set. +func (s *Suite) validate() { + if s.validated { + return + } + + if s.Name == "" { + Fail("Name must be set") + } + + if s.CreateIssuerFunc == nil { + Fail("CreateIssuerFunc must be set") + } + + if s.HTTP01TestType == "Gateway" { + framework.RequireFeatureGate(utilfeature.DefaultFeatureGate, feature.ExperimentalGatewayAPISupport) + } - s.completed = true + s.validated = true } // it is called by the tests to in Define() to setup and run the test diff --git a/test/e2e/suite/conformance/certificates/tests.go b/test/e2e/suite/conformance/certificates/tests.go index f104a4b0e10..04c627f15e6 100644 --- a/test/e2e/suite/conformance/certificates/tests.go +++ b/test/e2e/suite/conformance/certificates/tests.go @@ -35,6 +35,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/rand" + "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/util/retry" "k8s.io/utils/ptr" @@ -48,6 +49,7 @@ import ( cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" utilfeature "github.com/cert-manager/cert-manager/pkg/util/feature" "github.com/cert-manager/cert-manager/pkg/util/pki" + "github.com/cert-manager/cert-manager/test/unit/gen" . "github.com/cert-manager/cert-manager/e2e-tests/framework/matcher" . "github.com/onsi/ginkgo/v2" @@ -61,756 +63,398 @@ func (s *Suite) Define() { Describe("with issuer type "+s.Name, func() { ctx := context.Background() f := framework.NewDefaultFramework("certificates") + s.setup(f) - sharedIPAddress := "127.0.0.1" - - // Wrap this in a BeforeEach else flags will not have been parsed and - // f.Config will not be populated at the time that this code is run. - BeforeEach(func() { - // Special case Public ACME Servers against being run in the standard - // e2e tests. - if strings.Contains(s.Name, "Public ACME Server") && strings.Contains(f.Config.Addons.ACMEServer.URL, "pebble") { - Skip("Not running public ACME tests against local cluster.") - return - } - - if s.HTTP01TestType == "Gateway" { - framework.RequireFeatureGate(f, utilfeature.DefaultFeatureGate, feature.ExperimentalGatewayAPISupport) - } - - if s.completed { - return - } - s.complete(f) - - switch s.HTTP01TestType { - case "Ingress": - sharedIPAddress = f.Config.Addons.ACMEServer.IngressIP - case "Gateway": - sharedIPAddress = f.Config.Addons.ACMEServer.GatewayIP - } - }) - - s.it(f, "should issue a basic, defaulted certificate for a single distinct DNS Name", func(issuerRef cmmeta.ObjectReference) { - testCertificate := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testcert", - Namespace: f.Namespace.Name, - }, - Spec: cmapi.CertificateSpec{ - SecretName: "testcert-tls", - IssuerRef: issuerRef, - DNSNames: []string{e2eutil.RandomSubdomain(s.DomainSuffix)}, - }, - } - By("Creating a Certificate") - err := f.CRClient.Create(ctx, testCertificate) - Expect(err).NotTo(HaveOccurred()) - - By("Waiting for the Certificate to be issued...") - testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*8) - Expect(err).NotTo(HaveOccurred()) - - By("Validating the issued Certificate...") - err = f.Helper().ValidateCertificate(testCertificate, validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) - Expect(err).NotTo(HaveOccurred()) - }, featureset.OnlySAN) - - s.it(f, "should issue a CA certificate with the CA basicConstraint set", func(issuerRef cmmeta.ObjectReference) { - testCertificate := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testcert", - Namespace: f.Namespace.Name, - }, - Spec: cmapi.CertificateSpec{ - SecretName: "testcert-tls", - IsCA: true, - IssuerRef: issuerRef, - DNSNames: []string{e2eutil.RandomSubdomain(s.DomainSuffix)}, - }, - } - By("Creating a Certificate") - err := f.CRClient.Create(ctx, testCertificate) - Expect(err).NotTo(HaveOccurred()) - - By("Waiting for the Certificate to be issued...") - testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*8) - Expect(err).NotTo(HaveOccurred()) - - By("Validating the issued Certificate...") - err = f.Helper().ValidateCertificate(testCertificate, validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) - Expect(err).NotTo(HaveOccurred()) - }, featureset.IssueCAFeature) - - s.it(f, "should issue an ECDSA, defaulted certificate for a single distinct DNS Name", func(issuerRef cmmeta.ObjectReference) { - testCertificate := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testcert", - Namespace: f.Namespace.Name, - }, - Spec: cmapi.CertificateSpec{ - SecretName: "testcert-tls", - PrivateKey: &cmapi.CertificatePrivateKey{ - Algorithm: cmapi.ECDSAKeyAlgorithm, - }, - DNSNames: []string{e2eutil.RandomSubdomain(s.DomainSuffix)}, - IssuerRef: issuerRef, - }, - } - By("Creating a Certificate") - err := f.CRClient.Create(ctx, testCertificate) - Expect(err).NotTo(HaveOccurred()) - - By("Waiting for the Certificate to be issued...") - testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*8) - Expect(err).NotTo(HaveOccurred()) - - By("Validating the issued Certificate...") - err = f.Helper().ValidateCertificate(testCertificate, validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) - Expect(err).NotTo(HaveOccurred()) - }, featureset.ECDSAFeature, featureset.OnlySAN) - - s.it(f, "should issue an Ed25519, defaulted certificate for a single distinct DNS Name", func(issuerRef cmmeta.ObjectReference) { - testCertificate := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testcert", - Namespace: f.Namespace.Name, - }, - Spec: cmapi.CertificateSpec{ - SecretName: "testcert-tls", - PrivateKey: &cmapi.CertificatePrivateKey{ - Algorithm: cmapi.Ed25519KeyAlgorithm, - }, - DNSNames: []string{e2eutil.RandomSubdomain(s.DomainSuffix)}, - IssuerRef: issuerRef, - }, - } - By("Creating a Certificate") - err := f.CRClient.Create(ctx, testCertificate) - Expect(err).NotTo(HaveOccurred()) - - By("Waiting for the Certificate to be issued...") - testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*8) - Expect(err).NotTo(HaveOccurred()) - - By("Validating the issued Certificate...") - err = f.Helper().ValidateCertificate(testCertificate, validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) - Expect(err).NotTo(HaveOccurred()) - }, featureset.OnlySAN, featureset.Ed25519FeatureSet) - - s.it(f, "should issue a basic, defaulted certificate for a single Common Name", func(issuerRef cmmeta.ObjectReference) { - // Some issuers use the CN to define the cert's "ID" - // if one cert manages to be in an error state in the issuer it might throw an error - // this makes the CN more unique - cn := "test-common-name-" + rand.String(10) - testCertificate := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testcert", - Namespace: f.Namespace.Name, - }, - Spec: cmapi.CertificateSpec{ - SecretName: "testcert-tls", - IssuerRef: issuerRef, - CommonName: cn, - }, - } - By("Creating a Certificate") - err := f.CRClient.Create(ctx, testCertificate) - Expect(err).NotTo(HaveOccurred()) - - By("Waiting for the Certificate to be issued...") - testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*8) - Expect(err).NotTo(HaveOccurred()) - - By("Validating the issued Certificate...") - err = f.Helper().ValidateCertificate(testCertificate, validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) - Expect(err).NotTo(HaveOccurred()) - }, featureset.CommonNameFeature) - - s.it(f, "should issue a certificate with a couple valid otherName SAN values set as well as an emailAddress", func(issuerRef cmmeta.ObjectReference) { - framework.RequireFeatureGate(f, utilfeature.DefaultFeatureGate, feature.OtherNames) - emailAddresses := []string{"email@domain.test"} - otherNames := []cmapi.OtherName{ - { - OID: "1.3.6.1.4.1.311.20.2.3", - UTF8Value: "upn@domain.test", - }, - { - OID: "1.3.6.1.4.1.311.20.2.3", - UTF8Value: "upn@domain2.test", - }, - } - - testCertificate := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testcert", - Namespace: f.Namespace.Name, - }, - Spec: cmapi.CertificateSpec{ - SecretName: "testcert-tls", - IssuerRef: issuerRef, - OtherNames: otherNames, - EmailAddresses: emailAddresses, - CommonName: "someCN", - }} - - By("Creating a Certificate") - err := f.CRClient.Create(ctx, testCertificate) - Expect(err).NotTo(HaveOccurred()) - - By("Waiting for the Certificate to be issued...") - - testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*5) - Expect(err).NotTo(HaveOccurred()) - - valFunc := func(certificate *cmapi.Certificate, secret *corev1.Secret) error { - certBytes, ok := secret.Data[corev1.TLSCertKey] - if !ok { - return fmt.Errorf("no certificate data found for Certificate %q (secret %q)", certificate.Name, certificate.Spec.SecretName) - } - - pemBlock, _ := pem.Decode(certBytes) - cert, err := x509.ParseCertificate(pemBlock.Bytes) - Expect(err).ToNot(HaveOccurred()) - - By("Including the appropriate GeneralNames ( RFC822 email Address and OtherName) in generated Certificate") - /* openssl req -nodes -newkey rsa:2048 -subj "/CN=someCN" \ - -addext 'subjectAltName=email:email@domain.test,otherName:msUPN;utf8:upn@domain2.test,otherName:msUPN;UTF8:upn@domain.test' -x509 -out server.crt - */ - Expect(cert.Extensions).Should(HaveSameSANsAs(`-----BEGIN CERTIFICATE----- -MIIDZjCCAk6gAwIBAgIUWmJ+z4OCWZg4V3XjSfEN+hItXjUwDQYJKoZIhvcNAQEL -BQAwETEPMA0GA1UEAwwGc29tZUNOMB4XDTI0MDEwMzA4NTU1NloXDTI0MDIwMjA4 -NTU1NlowETEPMA0GA1UEAwwGc29tZUNOMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A -MIIBCgKCAQEAr5xmoX7/vp+wid+gOvbigYXLP/OvILyRpyj/e6IqJqj83+ImMtHt -QtOHN/E1bYQ8juVXqhhwy5BDXV6qHCfEjAKJF/oHpdVGk4GoMV/noAjbyAdqxFb+ -Cr/62sZWFHcuBuh/msJj6MWWAYZkb6HPiyDaV4HdRrrefifQnBGmsO0DE2guy7Yr -CMnE25H0yZ6z1e2tecsXSEkHyPNpil39oJ+1dT3UG8coU32rMOMKs7Za/xF0yMtU -TrCzZ/ylFL4vJi/s0i9zgjBQloJud+s3J+MnbYFgv0MIaosZXuk7/FR0HNIM19Zw -VLH6dgVCcF02bnnVpOAd6KPEzdqjYdDv/QIDAQABo4G1MIGyMB0GA1UdDgQWBBRF -KVGbYoD2H1NE47wJL6xFQ83Q+DAfBgNVHSMEGDAWgBRFKVGbYoD2H1NE47wJL6xF -Q83Q+DAPBgNVHRMBAf8EBTADAQH/MF8GA1UdEQRYMFaBEWVtYWlsQGRvbWFpbi50 -ZXN0oCAGCisGAQQBgjcUAgOgEgwQdXBuQGRvbWFpbjIudGVzdKAfBgorBgEEAYI3 -FAIDoBEMD3VwbkBkb21haW4udGVzdDANBgkqhkiG9w0BAQsFAAOCAQEAmrouGUth -yyL3jJTe2XZCqbjNgwXrT5N8SwF8JrPNzTyuh4Qiug3N/3djmq4N4V60UAJU8Xpr -Uf8TZBQwF6VD/TSvvJKB3qjSW0T46cF++10ueEgT7mT/icyPeiMw1syWpQlciIvv -WZ/PIvHm2sTB+v8v9rhiFDyQxlnvbtG0D0TV/dEZmyrqfrBpWOP8TFgexRMQU2/4 -Gb9fYHRK+LBKRTFudEXNWcDYxK3umfht/ZUsMeWUP70XaNsTd9tQWRsctxGpU10s -cKK5t8N1YDX5CV+01X3vvxpM3ciYuCY9y+lSegrIEI+izRyD7P9KaZlwMaYmsBZq -/XMa5c3nWcbXcA== ------END CERTIFICATE----- -`)) - return nil - } - - By("Validating the issued Certificate...") - - err = f.Helper().ValidateCertificate(testCertificate, valFunc) - Expect(err).NotTo(HaveOccurred()) - }, featureset.OtherNamesFeature) - - s.it(f, "should issue a basic, defaulted certificate for a single distinct DNS Name with a literal subject", func(issuerRef cmmeta.ObjectReference) { - framework.RequireFeatureGate(f, utilfeature.DefaultFeatureGate, feature.LiteralCertificateSubject) - // Some issuers use the CN to define the cert's "ID" - // if one cert manages to be in an error state in the issuer it might throw an error - // this makes the CN more unique - host := fmt.Sprintf("*.%s.foo-long.bar.com", rand.String(10)) - literalSubject := fmt.Sprintf("CN=%s,OU=FooLong,OU=Bar,OU=Baz,OU=Dept.,O=Corp.", host) - testCertificate := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testcert", - Namespace: f.Namespace.Name, - }, - Spec: cmapi.CertificateSpec{ - SecretName: "testcert-tls", - IssuerRef: issuerRef, - LiteralSubject: literalSubject, - DNSNames: []string{host}, - }, - } - By("Creating a Certificate") - err := f.CRClient.Create(ctx, testCertificate) - Expect(err).NotTo(HaveOccurred()) - - By("Waiting for the Certificate to be issued...") - - testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*5) - Expect(err).NotTo(HaveOccurred()) - - valFunc := func(certificate *cmapi.Certificate, secret *corev1.Secret) error { - certBytes, ok := secret.Data[corev1.TLSCertKey] - if !ok { - return fmt.Errorf("no certificate data found for Certificate %q (secret %q)", certificate.Name, certificate.Spec.SecretName) - } - - createdCert, err := pki.DecodeX509CertificateBytes(certBytes) - if err != nil { - return err - } - - var dns pkix.RDNSequence - rest, err := asn1.Unmarshal(createdCert.RawSubject, &dns) - - if err != nil { - return err - } - - rdnSeq, err2 := pki.UnmarshalSubjectStringToRDNSequence(literalSubject) - - if err2 != nil { - return err2 - } - - fmt.Fprintln(GinkgoWriter, "cert", base64.StdEncoding.EncodeToString(createdCert.RawSubject), dns, err, rest) - if !reflect.DeepEqual(rdnSeq, dns) { - return fmt.Errorf("generated certificate's subject [%s] does not match expected subject [%s]", dns.String(), literalSubject) - } - return nil - } - - By("Validating the issued Certificate...") - - err = f.Helper().ValidateCertificate(testCertificate, valFunc) - Expect(err).NotTo(HaveOccurred()) - }, featureset.LiteralSubjectFeature) - - s.it(f, "should issue an ECDSA, defaulted certificate for a single Common Name", func(issuerRef cmmeta.ObjectReference) { - // Some issuers use the CN to define the cert's "ID" - // if one cert manages to be in an error state in the issuer it might throw an error - // this makes the CN more unique - cn := "test-common-name-" + rand.String(10) - testCertificate := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testcert", - Namespace: f.Namespace.Name, - }, - Spec: cmapi.CertificateSpec{ - SecretName: "testcert-tls", - PrivateKey: &cmapi.CertificatePrivateKey{ - Algorithm: cmapi.ECDSAKeyAlgorithm, - }, - CommonName: cn, - IssuerRef: issuerRef, - }, - } - By("Creating a Certificate") - err := f.CRClient.Create(ctx, testCertificate) - Expect(err).NotTo(HaveOccurred()) - - By("Waiting for the Certificate to be issued...") - testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*8) - Expect(err).NotTo(HaveOccurred()) - - By("Validating the issued Certificate...") - err = f.Helper().ValidateCertificate(testCertificate, validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) - Expect(err).NotTo(HaveOccurred()) - }, featureset.ECDSAFeature, featureset.CommonNameFeature) - - s.it(f, "should issue an Ed25519, defaulted certificate for a single Common Name", func(issuerRef cmmeta.ObjectReference) { - // Some issuers use the CN to define the cert's "ID" - // if one cert manages to be in an error state in the issuer it might throw an error - // this makes the CN more unique - cn := "test-common-name-" + rand.String(10) - testCertificate := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testcert", - Namespace: f.Namespace.Name, - }, - Spec: cmapi.CertificateSpec{ - SecretName: "testcert-tls", - PrivateKey: &cmapi.CertificatePrivateKey{ - Algorithm: cmapi.Ed25519KeyAlgorithm, - }, - CommonName: cn, - IssuerRef: issuerRef, - }, - } - By("Creating a Certificate") - err := f.CRClient.Create(ctx, testCertificate) - Expect(err).NotTo(HaveOccurred()) - - By("Waiting for the Certificate to be issued...") - testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*8) - Expect(err).NotTo(HaveOccurred()) - - By("Validating the issued Certificate...") - err = f.Helper().ValidateCertificate(testCertificate, validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) - Expect(err).NotTo(HaveOccurred()) - }, featureset.Ed25519FeatureSet, featureset.CommonNameFeature) - - s.it(f, "should issue a certificate that defines an IP Address", func(issuerRef cmmeta.ObjectReference) { - testCertificate := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testcert", - Namespace: f.Namespace.Name, - }, - Spec: cmapi.CertificateSpec{ - SecretName: "testcert-tls", - IPAddresses: []string{sharedIPAddress}, - IssuerRef: issuerRef, - }, - } - By("Creating a Certificate") - err := f.CRClient.Create(ctx, testCertificate) - Expect(err).NotTo(HaveOccurred()) - - By("Waiting for the Certificate to be issued...") - testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*8) - Expect(err).NotTo(HaveOccurred()) - - By("Validating the issued Certificate...") - err = f.Helper().ValidateCertificate(testCertificate, validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) - Expect(err).NotTo(HaveOccurred()) - }, featureset.IPAddressFeature) - - s.it(f, "should issue a certificate that defines a DNS Name and IP Address", func(issuerRef cmmeta.ObjectReference) { - testCertificate := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testcert", - Namespace: f.Namespace.Name, - }, - Spec: cmapi.CertificateSpec{ - SecretName: "testcert-tls", - IPAddresses: []string{sharedIPAddress}, - DNSNames: []string{e2eutil.RandomSubdomain(s.DomainSuffix)}, - IssuerRef: issuerRef, - }, - } - By("Creating a Certificate") - err := f.CRClient.Create(ctx, testCertificate) - Expect(err).NotTo(HaveOccurred()) - - By("Waiting for the Certificate to be issued...") - testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*8) - Expect(err).NotTo(HaveOccurred()) - - By("Validating the issued Certificate...") - err = f.Helper().ValidateCertificate(testCertificate, validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) - Expect(err).NotTo(HaveOccurred()) - }, featureset.OnlySAN, featureset.IPAddressFeature) - - s.it(f, "should issue a certificate that defines a Common Name and IP Address", func(issuerRef cmmeta.ObjectReference) { - // Some issuers use the CN to define the cert's "ID" - // if one cert manages to be in an error state in the issuer it might throw an error - // this makes the CN more unique - cn := "test-common-name-" + rand.String(10) - testCertificate := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testcert", - Namespace: f.Namespace.Name, - }, - Spec: cmapi.CertificateSpec{ - SecretName: "testcert-tls", - CommonName: cn, - IPAddresses: []string{sharedIPAddress}, - IssuerRef: issuerRef, - }, - } - By("Creating a Certificate") - err := f.CRClient.Create(ctx, testCertificate) - Expect(err).NotTo(HaveOccurred()) - - By("Waiting for the Certificate to be issued...") - testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*8) - Expect(err).NotTo(HaveOccurred()) - - By("Validating the issued Certificate...") - err = f.Helper().ValidateCertificate(testCertificate, validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) - Expect(err).NotTo(HaveOccurred()) - }, featureset.CommonNameFeature, featureset.IPAddressFeature) - - s.it(f, "should issue a certificate that defines an Email Address", func(issuerRef cmmeta.ObjectReference) { - testCertificate := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testcert", - Namespace: f.Namespace.Name, - }, - Spec: cmapi.CertificateSpec{ - SecretName: "testcert-tls", - EmailAddresses: []string{"alice@example.com"}, - IssuerRef: issuerRef, - }, - } - By("Creating a Certificate") - err := f.CRClient.Create(ctx, testCertificate) - Expect(err).NotTo(HaveOccurred()) - - By("Waiting for the Certificate to be issued...") - testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*8) - Expect(err).NotTo(HaveOccurred()) - - By("Validating the issued Certificate...") - err = f.Helper().ValidateCertificate(testCertificate, validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) - Expect(err).NotTo(HaveOccurred()) - }, featureset.EmailSANsFeature, featureset.OnlySAN) - - s.it(f, "should issue a certificate that defines a Common Name and URI SAN", func(issuerRef cmmeta.ObjectReference) { - // Some issuers use the CN to define the cert's "ID" - // if one cert manages to be in an error state in the issuer it might throw an error - // this makes the CN more unique - cn := "test-common-name-" + rand.String(10) - testCertificate := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testcert", - Namespace: f.Namespace.Name, - }, - Spec: cmapi.CertificateSpec{ - SecretName: "testcert-tls", - CommonName: cn, - URIs: []string{"spiffe://cluster.local/ns/sandbox/sa/foo"}, - IssuerRef: issuerRef, - }, - } - By("Creating a Certificate") - err := f.CRClient.Create(ctx, testCertificate) - Expect(err).NotTo(HaveOccurred()) - - By("Waiting for the Certificate to be issued...") - testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*8) - Expect(err).NotTo(HaveOccurred()) - - By("Validating the issued Certificate...") - err = f.Helper().ValidateCertificate(testCertificate, validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) - Expect(err).NotTo(HaveOccurred()) - }, featureset.URISANsFeature, featureset.CommonNameFeature) - - s.it(f, "should issue a certificate that defines a 2 distinct DNS Names with one copied to the Common Name", func(issuerRef cmmeta.ObjectReference) { - testCertificate := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testcert", - Namespace: f.Namespace.Name, - }, - Spec: cmapi.CertificateSpec{ - SecretName: "testcert-tls", - CommonName: e2eutil.RandomSubdomain(s.DomainSuffix), - IssuerRef: issuerRef, - }, - } - testCertificate.Spec.DNSNames = []string{ - testCertificate.Spec.CommonName, e2eutil.RandomSubdomain(s.DomainSuffix), - } - - By("Creating a Certificate") - err := f.CRClient.Create(ctx, testCertificate) - Expect(err).NotTo(HaveOccurred()) - - By("Waiting for the Certificate to be issued...") - testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*8) - Expect(err).NotTo(HaveOccurred()) - - By("Validating the issued Certificate...") - err = f.Helper().ValidateCertificate(testCertificate, validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) - Expect(err).NotTo(HaveOccurred()) - }, featureset.CommonNameFeature) - - s.it(f, "should issue a certificate that defines a distinct DNS Name and another distinct Common Name", func(issuerRef cmmeta.ObjectReference) { - testCertificate := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testcert", - Namespace: f.Namespace.Name, - }, - Spec: cmapi.CertificateSpec{ - SecretName: "testcert-tls", - CommonName: e2eutil.RandomSubdomain(s.DomainSuffix), - IssuerRef: issuerRef, - DNSNames: []string{e2eutil.RandomSubdomain(s.DomainSuffix)}, - }, + BeforeEach(func() { + // Special case Public ACME Servers against being run in the standard + // e2e tests. + if strings.Contains(s.Name, "Public ACME Server") && strings.Contains(f.Config.Addons.ACMEServer.URL, "pebble") { + Skip("Not running public ACME tests against local cluster.") + return } + s.validate() + }) - By("Creating a Certificate") - err := f.CRClient.Create(ctx, testCertificate) - Expect(err).NotTo(HaveOccurred()) - - By("Waiting for the Certificate to be issued...") - testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*8) - Expect(err).NotTo(HaveOccurred()) - - By("Validating the issued Certificate...") - err = f.Helper().ValidateCertificate(testCertificate, validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) - Expect(err).NotTo(HaveOccurred()) - }, featureset.CommonNameFeature) - - s.it(f, "should issue a certificate that defines a DNS Name and sets a duration", func(issuerRef cmmeta.ObjectReference) { - testCertificate := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testcert", - Namespace: f.Namespace.Name, - }, - Spec: cmapi.CertificateSpec{ - SecretName: "testcert-tls", - IssuerRef: issuerRef, - DNSNames: []string{e2eutil.RandomSubdomain(s.DomainSuffix)}, - Duration: &metav1.Duration{ - Duration: time.Hour * 896, + type testCase struct { + name string // ginkgo v2 does not support using map[string] to store the test names (#5345) + certModifiers []gen.CertificateModifier + // The list of features that are required by the Issuer for the test to + // run. + requiredFeatures []featureset.Feature + // Extra validations which may be needed for testing, on a test case by + // case basis. All default validations will be run on every test. + extraValidations []certificates.ValidationFunc + } + + tests := []testCase{ + { + name: "should issue a basic, defaulted certificate for a single distinct DNS Name", + certModifiers: []gen.CertificateModifier{ + gen.SetCertificateDNSNames(e2eutil.RandomSubdomain(s.DomainSuffix)), + }, + requiredFeatures: []featureset.Feature{featureset.OnlySAN}, + }, + { + name: "should issue a CA certificate with the CA basicConstraint set", + certModifiers: []gen.CertificateModifier{ + gen.SetCertificateIsCA(true), + gen.SetCertificateDNSNames(e2eutil.RandomSubdomain(s.DomainSuffix)), + }, + requiredFeatures: []featureset.Feature{featureset.IssueCAFeature}, + }, + { + name: "should issue an ECDSA, defaulted certificate for a single distinct DNS Name", + certModifiers: []gen.CertificateModifier{ + func(c *cmapi.Certificate) { + c.Spec.PrivateKey = &cmapi.CertificatePrivateKey{ + Algorithm: cmapi.ECDSAKeyAlgorithm, + } }, - }, - } - By("Creating a Certificate") - err := f.CRClient.Create(ctx, testCertificate) - Expect(err).NotTo(HaveOccurred()) - - By("Waiting for the Certificate to be issued...") - testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*8) - Expect(err).NotTo(HaveOccurred()) - - By("Validating the issued Certificate...") - err = f.Helper().ValidateCertificate(testCertificate, validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) - Expect(err).NotTo(HaveOccurred()) - - // We set a weird time here as the duration with should never be used as - // a default by an issuer. This lets us test issuers are using our given - // duration. - // We set a 30 second buffer time here since Vault issues certificates - // with an extra 30 seconds on its duration. - f.CertificateDurationValid(ctx, testCertificate, time.Hour*896, 30*time.Second) - }, featureset.DurationFeature, featureset.OnlySAN) - - s.it(f, "should issue a certificate that defines a wildcard DNS Name", func(issuerRef cmmeta.ObjectReference) { - testCertificate := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testcert", - Namespace: f.Namespace.Name, - }, - Spec: cmapi.CertificateSpec{ - SecretName: "testcert-tls", - IssuerRef: issuerRef, - DNSNames: []string{"*." + e2eutil.RandomSubdomain(s.DomainSuffix)}, - }, - } - By("Creating a Certificate") - err := f.CRClient.Create(ctx, testCertificate) - Expect(err).NotTo(HaveOccurred()) - - By("Waiting for the Certificate to be issued...") - testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*8) - Expect(err).NotTo(HaveOccurred()) - - By("Validating the issued Certificate...") - err = f.Helper().ValidateCertificate(testCertificate, validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) - Expect(err).NotTo(HaveOccurred()) - }, featureset.WildcardsFeature, featureset.OnlySAN) - - s.it(f, "should issue a certificate that includes only a URISANs name", func(issuerRef cmmeta.ObjectReference) { - testCertificate := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testcert", - Namespace: f.Namespace.Name, - }, - Spec: cmapi.CertificateSpec{ - SecretName: "testcert-tls", - URIs: []string{ - "spiffe://cluster.local/ns/sandbox/sa/foo", + gen.SetCertificateDNSNames(e2eutil.RandomSubdomain(s.DomainSuffix)), + }, + requiredFeatures: []featureset.Feature{featureset.ECDSAFeature, featureset.OnlySAN}, + }, + { + name: "should issue an Ed25519, defaulted certificate for a single distinct DNS Name", + certModifiers: []gen.CertificateModifier{ + func(c *cmapi.Certificate) { + c.Spec.PrivateKey = &cmapi.CertificatePrivateKey{ + Algorithm: cmapi.Ed25519KeyAlgorithm, + } + }, + gen.SetCertificateDNSNames(e2eutil.RandomSubdomain(s.DomainSuffix)), + }, + requiredFeatures: []featureset.Feature{featureset.OnlySAN, featureset.Ed25519FeatureSet}, + }, + { + name: "should issue a basic, defaulted certificate for a single Common Name", + certModifiers: []gen.CertificateModifier{ + // Some issuers use the CN to define the cert's "ID" + // if one cert manages to be in an error state in the issuer it might throw an error + // this makes the CN more unique + gen.SetCertificateCommonName("test-common-name-" + rand.String(10)), + }, + requiredFeatures: []featureset.Feature{featureset.CommonNameFeature}, + }, + { + name: "should issue a certificate with a couple valid otherName SAN values set as well as an emailAddress", + certModifiers: []gen.CertificateModifier{ + gen.SetCertificateOtherNames( + cmapi.OtherName{ + OID: "1.3.6.1.4.1.311.20.2.3", + UTF8Value: "upn@domain.test", + }, + cmapi.OtherName{ + OID: "1.3.6.1.4.1.311.20.2.3", + UTF8Value: "upn@domain2.test", + }, + ), + gen.SetCertificateEmails("email@domain.test"), + gen.SetCertificateCommonName("someCN"), + }, + extraValidations: []certificates.ValidationFunc{ + func(certificate *cmapi.Certificate, secret *corev1.Secret) error { + certBytes, ok := secret.Data[corev1.TLSCertKey] + if !ok { + return fmt.Errorf("no certificate data found for Certificate %q (secret %q)", certificate.Name, certificate.Spec.SecretName) + } + + pemBlock, _ := pem.Decode(certBytes) + cert, err := x509.ParseCertificate(pemBlock.Bytes) + Expect(err).ToNot(HaveOccurred()) + + By("Including the appropriate GeneralNames ( RFC822 email Address and OtherName) in generated Certificate") + /* openssl req -nodes -newkey rsa:2048 -subj "/CN=someCN" \ + -addext 'subjectAltName=email:email@domain.test,otherName:msUPN;utf8:upn@domain2.test,otherName:msUPN;UTF8:upn@domain.test' -x509 -out server.crt + */ + Expect(cert.Extensions).Should(HaveSameSANsAs(`-----BEGIN CERTIFICATE----- +MIIDZjCCAk6gAwIBAgIUWmJ+z4OCWZg4V3XjSfEN+hItXjUwDQYJKoZIhvcNAQEL +BQAwETEPMA0GA1UEAwwGc29tZUNOMB4XDTI0MDEwMzA4NTU1NloXDTI0MDIwMjA4 +NTU1NlowETEPMA0GA1UEAwwGc29tZUNOMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEAr5xmoX7/vp+wid+gOvbigYXLP/OvILyRpyj/e6IqJqj83+ImMtHt +QtOHN/E1bYQ8juVXqhhwy5BDXV6qHCfEjAKJF/oHpdVGk4GoMV/noAjbyAdqxFb+ +Cr/62sZWFHcuBuh/msJj6MWWAYZkb6HPiyDaV4HdRrrefifQnBGmsO0DE2guy7Yr +CMnE25H0yZ6z1e2tecsXSEkHyPNpil39oJ+1dT3UG8coU32rMOMKs7Za/xF0yMtU +TrCzZ/ylFL4vJi/s0i9zgjBQloJud+s3J+MnbYFgv0MIaosZXuk7/FR0HNIM19Zw +VLH6dgVCcF02bnnVpOAd6KPEzdqjYdDv/QIDAQABo4G1MIGyMB0GA1UdDgQWBBRF +KVGbYoD2H1NE47wJL6xFQ83Q+DAfBgNVHSMEGDAWgBRFKVGbYoD2H1NE47wJL6xF +Q83Q+DAPBgNVHRMBAf8EBTADAQH/MF8GA1UdEQRYMFaBEWVtYWlsQGRvbWFpbi50 +ZXN0oCAGCisGAQQBgjcUAgOgEgwQdXBuQGRvbWFpbjIudGVzdKAfBgorBgEEAYI3 +FAIDoBEMD3VwbkBkb21haW4udGVzdDANBgkqhkiG9w0BAQsFAAOCAQEAmrouGUth +yyL3jJTe2XZCqbjNgwXrT5N8SwF8JrPNzTyuh4Qiug3N/3djmq4N4V60UAJU8Xpr +Uf8TZBQwF6VD/TSvvJKB3qjSW0T46cF++10ueEgT7mT/icyPeiMw1syWpQlciIvv +WZ/PIvHm2sTB+v8v9rhiFDyQxlnvbtG0D0TV/dEZmyrqfrBpWOP8TFgexRMQU2/4 +Gb9fYHRK+LBKRTFudEXNWcDYxK3umfht/ZUsMeWUP70XaNsTd9tQWRsctxGpU10s +cKK5t8N1YDX5CV+01X3vvxpM3ciYuCY9y+lSegrIEI+izRyD7P9KaZlwMaYmsBZq +/XMa5c3nWcbXcA== +-----END CERTIFICATE----- +`)) + return nil }, - IssuerRef: issuerRef, }, - } - By("Creating a Certificate") - err := f.CRClient.Create(ctx, testCertificate) - Expect(err).NotTo(HaveOccurred()) - - By("Waiting for the Certificate to be issued...") - testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*8) - Expect(err).NotTo(HaveOccurred()) - - By("Validating the issued Certificate...") - err = f.Helper().ValidateCertificate(testCertificate, validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) - Expect(err).NotTo(HaveOccurred()) - }, featureset.URISANsFeature, featureset.OnlySAN) - - s.it(f, "should issue a certificate that includes arbitrary key usages", func(issuerRef cmmeta.ObjectReference) { - testCertificate := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testcert", - Namespace: f.Namespace.Name, + requiredFeatures: []featureset.Feature{featureset.OtherNamesFeature}, + }, + { + name: "should issue a basic, defaulted certificate for a single distinct DNS Name with a literal subject", + certModifiers: func() []gen.CertificateModifier { + host := fmt.Sprintf("*.%s.foo-long.bar.com", rand.String(10)) + literalSubject := fmt.Sprintf("CN=%s,OU=FooLong,OU=Bar,OU=Baz,OU=Dept.,O=Corp.", host) + + return []gen.CertificateModifier{ + func(c *cmapi.Certificate) { + c.Spec.LiteralSubject = literalSubject + }, + gen.SetCertificateDNSNames(host), + } + }(), + extraValidations: []certificates.ValidationFunc{ + func(certificate *cmapi.Certificate, secret *corev1.Secret) error { + certBytes, ok := secret.Data[corev1.TLSCertKey] + if !ok { + return fmt.Errorf("no certificate data found for Certificate %q (secret %q)", certificate.Name, certificate.Spec.SecretName) + } + + createdCert, err := pki.DecodeX509CertificateBytes(certBytes) + if err != nil { + return err + } + + var dns pkix.RDNSequence + rest, err := asn1.Unmarshal(createdCert.RawSubject, &dns) + + if err != nil { + return err + } + + rdnSeq, err2 := pki.UnmarshalSubjectStringToRDNSequence(certificate.Spec.LiteralSubject) + + if err2 != nil { + return err2 + } + + fmt.Fprintln(GinkgoWriter, "cert", base64.StdEncoding.EncodeToString(createdCert.RawSubject), dns, err, rest) + if !reflect.DeepEqual(rdnSeq, dns) { + return fmt.Errorf("generated certificate's subject [%s] does not match expected subject [%s]", dns.String(), certificate.Spec.LiteralSubject) + } + return nil + }, }, - Spec: cmapi.CertificateSpec{ - SecretName: "testcert-tls", - DNSNames: []string{e2eutil.RandomSubdomain(s.DomainSuffix)}, - IssuerRef: issuerRef, - Usages: []cmapi.KeyUsage{ + requiredFeatures: []featureset.Feature{featureset.LiteralSubjectFeature}, + }, + { + name: "should issue an ECDSA, defaulted certificate for a single Common Name", + certModifiers: []gen.CertificateModifier{ + func(c *cmapi.Certificate) { + c.Spec.PrivateKey = &cmapi.CertificatePrivateKey{ + Algorithm: cmapi.ECDSAKeyAlgorithm, + } + }, + // Some issuers use the CN to define the cert's "ID" + // if one cert manages to be in an error state in the issuer it might throw an error + // this makes the CN more unique + gen.SetCertificateCommonName("test-common-name-" + rand.String(10)), + }, + requiredFeatures: []featureset.Feature{featureset.ECDSAFeature, featureset.CommonNameFeature}, + }, + { + name: "should issue an Ed25519, defaulted certificate for a single Common Name", + certModifiers: []gen.CertificateModifier{ + func(c *cmapi.Certificate) { + c.Spec.PrivateKey = &cmapi.CertificatePrivateKey{ + Algorithm: cmapi.Ed25519KeyAlgorithm, + } + }, + // Some issuers use the CN to define the cert's "ID" + // if one cert manages to be in an error state in the issuer it might throw an error + // this makes the CN more unique + gen.SetCertificateCommonName("test-common-name-" + rand.String(10)), + }, + requiredFeatures: []featureset.Feature{featureset.Ed25519FeatureSet, featureset.CommonNameFeature}, + }, + { + name: "should issue a certificate that defines an IP Address", + certModifiers: []gen.CertificateModifier{ + gen.SetCertificateIPs(s.SharedIPAddress), + }, + requiredFeatures: []featureset.Feature{featureset.IPAddressFeature}, + }, + { + name: "should issue a certificate that defines a DNS Name and IP Address", + certModifiers: []gen.CertificateModifier{ + gen.SetCertificateIPs(s.SharedIPAddress), + gen.SetCertificateDNSNames(e2eutil.RandomSubdomain(s.DomainSuffix)), + }, + requiredFeatures: []featureset.Feature{featureset.OnlySAN, featureset.IPAddressFeature}, + }, + { + name: "should issue a certificate that defines a Common Name and IP Address", + certModifiers: []gen.CertificateModifier{ + gen.SetCertificateIPs(s.SharedIPAddress), + // Some issuers use the CN to define the cert's "ID" + // if one cert manages to be in an error state in the issuer it might throw an error + // this makes the CN more unique + gen.SetCertificateCommonName("test-common-name-" + rand.String(10)), + }, + requiredFeatures: []featureset.Feature{featureset.CommonNameFeature, featureset.IPAddressFeature}, + }, + { + name: "should issue a certificate that defines an Email Address", + certModifiers: []gen.CertificateModifier{ + gen.SetCertificateEmails("alice@example.com"), + }, + requiredFeatures: []featureset.Feature{featureset.EmailSANsFeature, featureset.OnlySAN}, + }, + { + name: "should issue a certificate that defines a Common Name and URI SAN", + certModifiers: []gen.CertificateModifier{ + gen.SetCertificateURIs("spiffe://cluster.local/ns/sandbox/sa/foo"), + // Some issuers use the CN to define the cert's "ID" + // if one cert manages to be in an error state in the issuer it might throw an error + // this makes the CN more unique + gen.SetCertificateCommonName("test-common-name-" + rand.String(10)), + }, + requiredFeatures: []featureset.Feature{featureset.URISANsFeature, featureset.CommonNameFeature}, + }, + { + name: "should issue a certificate that defines a 2 distinct DNS Names with one copied to the Common Name", + certModifiers: func() []gen.CertificateModifier { + commonName := e2eutil.RandomSubdomain(s.DomainSuffix) + + return []gen.CertificateModifier{ + gen.SetCertificateCommonName(commonName), + gen.SetCertificateDNSNames(commonName, e2eutil.RandomSubdomain(s.DomainSuffix)), + } + }(), + requiredFeatures: []featureset.Feature{featureset.CommonNameFeature}, + }, + { + name: "should issue a certificate that defines a distinct DNS Name and another distinct Common Name", + certModifiers: []gen.CertificateModifier{ + gen.SetCertificateCommonName(e2eutil.RandomSubdomain(s.DomainSuffix)), + gen.SetCertificateDNSNames(e2eutil.RandomSubdomain(s.DomainSuffix)), + }, + requiredFeatures: []featureset.Feature{featureset.CommonNameFeature}, + }, + { + name: "should issue a certificate that defines a DNS Name and sets a duration", + certModifiers: []gen.CertificateModifier{ + gen.SetCertificateDNSNames(e2eutil.RandomSubdomain(s.DomainSuffix)), + gen.SetCertificateDuration(&metav1.Duration{Duration: time.Hour * 896}), + }, + requiredFeatures: []featureset.Feature{featureset.DurationFeature, featureset.OnlySAN}, + }, + { + name: "should issue a certificate that defines a wildcard DNS Name", + certModifiers: []gen.CertificateModifier{ + gen.SetCertificateDNSNames("*." + e2eutil.RandomSubdomain(s.DomainSuffix)), + }, + requiredFeatures: []featureset.Feature{featureset.WildcardsFeature, featureset.OnlySAN}, + }, + { + name: "should issue a certificate that includes only a URISANs name", + certModifiers: []gen.CertificateModifier{ + gen.SetCertificateURIs("spiffe://cluster.local/ns/sandbox/sa/foo"), + }, + requiredFeatures: []featureset.Feature{featureset.URISANsFeature, featureset.OnlySAN}, + }, + { + name: "should issue a certificate that includes arbitrary key usages", + certModifiers: []gen.CertificateModifier{ + gen.SetCertificateDNSNames(e2eutil.RandomSubdomain(s.DomainSuffix)), + gen.SetCertificateKeyUsages( cmapi.UsageSigning, cmapi.UsageDataEncipherment, cmapi.UsageServerAuth, cmapi.UsageClientAuth, - }, - }, - } - By("Creating a Certificate") - err := f.CRClient.Create(ctx, testCertificate) - Expect(err).NotTo(HaveOccurred()) - - By("Waiting for the Certificate to be issued...") - testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*8) - Expect(err).NotTo(HaveOccurred()) - - By("Validating the issued Certificate...") - - validations := []certificates.ValidationFunc{ - certificates.ExpectKeyUsageExtKeyUsageClientAuth, - certificates.ExpectKeyUsageExtKeyUsageServerAuth, - certificates.ExpectKeyUsageUsageDigitalSignature, - certificates.ExpectKeyUsageUsageDataEncipherment, - } - validations = append(validations, validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) - - err = f.Helper().ValidateCertificate(testCertificate, validations...) - Expect(err).NotTo(HaveOccurred()) - }, featureset.KeyUsagesFeature, featureset.OnlySAN) - - s.it(f, "should issue another certificate with the same private key if the existing certificate and CertificateRequest are deleted", func(issuerRef cmmeta.ObjectReference) { - testCertificate := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testcert", - Namespace: f.Namespace.Name, - }, - Spec: cmapi.CertificateSpec{ - SecretName: "testcert-tls", - DNSNames: []string{e2eutil.RandomSubdomain(s.DomainSuffix)}, - IssuerRef: issuerRef, - }, - } - By("Creating a Certificate") - err := f.CRClient.Create(ctx, testCertificate) - Expect(err).NotTo(HaveOccurred()) - - By("Waiting for the Certificate to be issued...") - testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*8) - Expect(err).NotTo(HaveOccurred()) - - By("Validating the issued Certificate...") - err = f.Helper().ValidateCertificate(testCertificate, validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) - Expect(err).NotTo(HaveOccurred()) + ), + }, + extraValidations: []certificates.ValidationFunc{ + certificates.ExpectKeyUsageExtKeyUsageClientAuth, + certificates.ExpectKeyUsageExtKeyUsageServerAuth, + certificates.ExpectKeyUsageUsageDigitalSignature, + certificates.ExpectKeyUsageUsageDataEncipherment, + }, + requiredFeatures: []featureset.Feature{featureset.KeyUsagesFeature, featureset.OnlySAN}, + }, + { + name: "should issue a certificate that defines a long domain", + certModifiers: func() []gen.CertificateModifier { + const maxLengthOfDomainSegment = 63 + return []gen.CertificateModifier{ + gen.SetCertificateDNSNames(e2eutil.RandomSubdomainLength(s.DomainSuffix, maxLengthOfDomainSegment)), + } + }(), + requiredFeatures: []featureset.Feature{featureset.OnlySAN, featureset.LongDomainFeatureSet}, + }, + { + name: "should issue a certificate that defines a wildcard DNS Name and its apex DNS Name", + certModifiers: func() []gen.CertificateModifier { + dnsDomain := e2eutil.RandomSubdomain(s.DomainSuffix) + + return []gen.CertificateModifier{ + gen.SetCertificateDNSNames("*."+dnsDomain, dnsDomain), + } + }(), + requiredFeatures: []featureset.Feature{featureset.WildcardsFeature, featureset.OnlySAN}, + }, + } + + defineTest := func(test testCase) { + s.it(f, test.name, func(issuerRef cmmeta.ObjectReference) { + requiredFeatures := sets.New(test.requiredFeatures...) + + if requiredFeatures.Has(featureset.OtherNamesFeature) { + framework.RequireFeatureGate(utilfeature.DefaultFeatureGate, feature.OtherNames) + } - By("Deleting existing certificate data in Secret") - sec, err := f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name). - Get(ctx, testCertificate.Spec.SecretName, metav1.GetOptions{}) - Expect(err).NotTo(HaveOccurred(), "failed to get secret containing signed certificate key pair data") + if requiredFeatures.Has(featureset.LiteralSubjectFeature) { + framework.RequireFeatureGate(utilfeature.DefaultFeatureGate, feature.LiteralCertificateSubject) + } - sec = sec.DeepCopy() - crtPEM1 := sec.Data[corev1.TLSCertKey] - crt1, err := pki.DecodeX509CertificateBytes(crtPEM1) - Expect(err).NotTo(HaveOccurred(), "failed to get decode first signed certificate data") + randomTestID := rand.String(10) + certificate := &cmapi.Certificate{ + ObjectMeta: metav1.ObjectMeta{ + Name: "e2e-conformance-" + randomTestID, + Namespace: f.Namespace.Name, + Annotations: map[string]string{ + "conformance.cert-manager.io/test-name": s.Name + " " + test.name, + }, + }, + Spec: cmapi.CertificateSpec{ + SecretName: "e2e-conformance-tls-" + randomTestID, + IssuerRef: issuerRef, + }, + } - sec.Data[corev1.TLSCertKey] = []byte{} + certificate = gen.CertificateFrom( + certificate, + test.certModifiers..., + ) - _, err = f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Update(ctx, sec, metav1.UpdateOptions{}) - Expect(err).NotTo(HaveOccurred(), "failed to update secret by deleting the signed certificate data") + By("Creating a Certificate") + err := f.CRClient.Create(ctx, certificate) + Expect(err).NotTo(HaveOccurred()) - By("Waiting for the Certificate to re-issue a certificate") - sec, err = f.Helper().WaitForSecretCertificateData(ctx, f.Namespace.Name, sec.Name, time.Minute*8) - Expect(err).NotTo(HaveOccurred(), "failed to wait for secret to have a valid 2nd certificate") + By("Waiting for the Certificate to be issued...") + certificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, certificate, time.Minute*8) + Expect(err).NotTo(HaveOccurred()) - crtPEM2 := sec.Data[corev1.TLSCertKey] - crt2, err := pki.DecodeX509CertificateBytes(crtPEM2) - Expect(err).NotTo(HaveOccurred(), "failed to get decode second signed certificate data") + By("Validating the issued Certificate...") + validations := []certificates.ValidationFunc(nil) + validations = append(validations, test.extraValidations...) + validations = append(validations, validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) + err = f.Helper().ValidateCertificate(certificate, validations...) + Expect(err).NotTo(HaveOccurred()) + }, test.requiredFeatures...) + } - By("Ensuing both certificates are signed by same private key") - match, err := pki.PublicKeysEqual(crt1.PublicKey, crt2.PublicKey) - Expect(err).NotTo(HaveOccurred(), "failed to check public keys of both signed certificates") + for _, test := range tests { + defineTest(test) + } - if !match { - Fail("Both signed certificates not signed by same private key") - } - }, featureset.ReusePrivateKeyFeature, featureset.OnlySAN) + ///////////////////////////////////// + ////// Gateway/ Ingress Tests /////// + ///////////////////////////////////// s.it(f, "should issue a certificate for a single distinct DNS Name defined by an ingress with annotations", func(issuerRef cmmeta.ObjectReference) { if s.HTTP01TestType != "Ingress" { @@ -967,7 +611,7 @@ cKK5t8N1YDX5CV+01X3vvxpM3ciYuCY9y+lSegrIEI+izRyD7P9KaZlwMaYmsBZq }) s.it(f, "Creating a Gateway with annotations for issuerRef and other Certificate fields", func(issuerRef cmmeta.ObjectReference) { - framework.RequireFeatureGate(f, utilfeature.DefaultFeatureGate, feature.ExperimentalGatewayAPISupport) + framework.RequireFeatureGate(utilfeature.DefaultFeatureGate, feature.ExperimentalGatewayAPISupport) name := "testcert-gateway" secretName := "testcert-gateway-tls" @@ -1010,10 +654,11 @@ cKK5t8N1YDX5CV+01X3vvxpM3ciYuCY9y+lSegrIEI+izRyD7P9KaZlwMaYmsBZq Expect(cert.Spec.RenewBefore.Duration).To(Equal(renewBefore)) }) - s.it(f, "should issue a certificate that defines a long domain", func(issuerRef cmmeta.ObjectReference) { - // the maximum length of a single segment of the domain being requested - const maxLengthOfDomainSegment = 63 + //////////////////////////////////////// + /////// Complex behavioral tests /////// + //////////////////////////////////////// + s.it(f, "should issue another certificate with the same private key if the existing certificate and CertificateRequest are deleted", func(issuerRef cmmeta.ObjectReference) { testCertificate := &cmapi.Certificate{ ObjectMeta: metav1.ObjectMeta{ Name: "testcert", @@ -1021,12 +666,10 @@ cKK5t8N1YDX5CV+01X3vvxpM3ciYuCY9y+lSegrIEI+izRyD7P9KaZlwMaYmsBZq }, Spec: cmapi.CertificateSpec{ SecretName: "testcert-tls", - DNSNames: []string{e2eutil.RandomSubdomainLength(s.DomainSuffix, maxLengthOfDomainSegment)}, + DNSNames: []string{e2eutil.RandomSubdomain(s.DomainSuffix)}, IssuerRef: issuerRef, }, } - validations := validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures) - By("Creating a Certificate") err := f.CRClient.Create(ctx, testCertificate) Expect(err).NotTo(HaveOccurred()) @@ -1035,10 +678,41 @@ cKK5t8N1YDX5CV+01X3vvxpM3ciYuCY9y+lSegrIEI+izRyD7P9KaZlwMaYmsBZq testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*8) Expect(err).NotTo(HaveOccurred()) - By("Sanity-check the issued Certificate") - err = f.Helper().ValidateCertificate(testCertificate, validations...) + By("Validating the issued Certificate...") + err = f.Helper().ValidateCertificate(testCertificate, validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) Expect(err).NotTo(HaveOccurred()) - }, featureset.OnlySAN, featureset.LongDomainFeatureSet) + + By("Deleting existing certificate data in Secret") + sec, err := f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name). + Get(ctx, testCertificate.Spec.SecretName, metav1.GetOptions{}) + Expect(err).NotTo(HaveOccurred(), "failed to get secret containing signed certificate key pair data") + + sec = sec.DeepCopy() + crtPEM1 := sec.Data[corev1.TLSCertKey] + crt1, err := pki.DecodeX509CertificateBytes(crtPEM1) + Expect(err).NotTo(HaveOccurred(), "failed to get decode first signed certificate data") + + sec.Data[corev1.TLSCertKey] = []byte{} + + _, err = f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Update(ctx, sec, metav1.UpdateOptions{}) + Expect(err).NotTo(HaveOccurred(), "failed to update secret by deleting the signed certificate data") + + By("Waiting for the Certificate to re-issue a certificate") + sec, err = f.Helper().WaitForSecretCertificateData(ctx, f.Namespace.Name, sec.Name, time.Minute*8) + Expect(err).NotTo(HaveOccurred(), "failed to wait for secret to have a valid 2nd certificate") + + crtPEM2 := sec.Data[corev1.TLSCertKey] + crt2, err := pki.DecodeX509CertificateBytes(crtPEM2) + Expect(err).NotTo(HaveOccurred(), "failed to get decode second signed certificate data") + + By("Ensuing both certificates are signed by same private key") + match, err := pki.PublicKeysEqual(crt1.PublicKey, crt2.PublicKey) + Expect(err).NotTo(HaveOccurred(), "failed to check public keys of both signed certificates") + + if !match { + Fail("Both signed certificates not signed by same private key") + } + }, featureset.ReusePrivateKeyFeature, featureset.OnlySAN) s.it(f, "should allow updating an existing certificate with a new DNS Name", func(issuerRef cmmeta.ObjectReference) { testCertificate := &cmapi.Certificate{ @@ -1068,8 +742,8 @@ cKK5t8N1YDX5CV+01X3vvxpM3ciYuCY9y+lSegrIEI+izRyD7P9KaZlwMaYmsBZq By("Updating the Certificate after having added an additional dnsName") newDNSName := e2eutil.RandomSubdomain(s.DomainSuffix) - retry.RetryOnConflict(retry.DefaultRetry, func() error { - err = f.CRClient.Get(ctx, types.NamespacedName{Name: testCertificate.Name, Namespace: testCertificate.Namespace}, testCertificate) + err = retry.RetryOnConflict(retry.DefaultRetry, func() error { + err := f.CRClient.Get(ctx, types.NamespacedName{Name: testCertificate.Name, Namespace: testCertificate.Namespace}, testCertificate) if err != nil { return err } @@ -1081,7 +755,6 @@ cKK5t8N1YDX5CV+01X3vvxpM3ciYuCY9y+lSegrIEI+izRyD7P9KaZlwMaYmsBZq } return nil }) - Expect(err).NotTo(HaveOccurred()) By("Waiting for the Certificate Ready condition to be updated") @@ -1092,32 +765,5 @@ cKK5t8N1YDX5CV+01X3vvxpM3ciYuCY9y+lSegrIEI+izRyD7P9KaZlwMaYmsBZq err = f.Helper().ValidateCertificate(testCertificate, validations...) Expect(err).NotTo(HaveOccurred()) }, featureset.OnlySAN) - - s.it(f, "should issue a certificate that defines a wildcard DNS Name and its apex DNS Name", func(issuerRef cmmeta.ObjectReference) { - dnsDomain := e2eutil.RandomSubdomain(s.DomainSuffix) - testCertificate := &cmapi.Certificate{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testcert", - Namespace: f.Namespace.Name, - }, - Spec: cmapi.CertificateSpec{ - SecretName: "testcert-tls", - IssuerRef: issuerRef, - DNSNames: []string{"*." + dnsDomain, dnsDomain}, - }, - } - By("Creating a Certificate") - err := f.CRClient.Create(ctx, testCertificate) - Expect(err).NotTo(HaveOccurred()) - - // use a longer timeout for this, as it requires performing 2 dns validations in serial - By("Waiting for the Certificate to be issued...") - testCertificate, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, testCertificate, time.Minute*10) - Expect(err).NotTo(HaveOccurred()) - - By("Validating the issued Certificate...") - err = f.Helper().ValidateCertificate(testCertificate, validation.CertificateSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) - Expect(err).NotTo(HaveOccurred()) - }, featureset.WildcardsFeature, featureset.OnlySAN) }) } diff --git a/test/e2e/suite/conformance/certificatesigningrequests/acme/acme.go b/test/e2e/suite/conformance/certificatesigningrequests/acme/acme.go index e9a7e0e79f3..29d5b19b8f7 100644 --- a/test/e2e/suite/conformance/certificatesigningrequests/acme/acme.go +++ b/test/e2e/suite/conformance/certificatesigningrequests/acme/acme.go @@ -46,13 +46,15 @@ func runACMEIssuerTests(eab *cmacme.ACMEExternalAccountBinding) { // unsupportedHTTP01Features is a list of features that are not supported by the ACME // issuer type using HTTP01 var unsupportedHTTP01Features = featureset.NewFeatureSet( - featureset.IPAddressFeature, featureset.DurationFeature, featureset.WildcardsFeature, featureset.URISANsFeature, featureset.CommonNameFeature, featureset.KeyUsagesFeature, featureset.EmailSANsFeature, + featureset.SaveCAToSecret, + featureset.IssueCAFeature, + featureset.OtherNamesFeature, ) // unsupportedDNS01Features is a list of features that are not supported by the ACME @@ -64,6 +66,9 @@ func runACMEIssuerTests(eab *cmacme.ACMEExternalAccountBinding) { featureset.CommonNameFeature, featureset.KeyUsagesFeature, featureset.EmailSANsFeature, + featureset.SaveCAToSecret, + featureset.IssueCAFeature, + featureset.OtherNamesFeature, ) http01 := &acme{ @@ -75,8 +80,8 @@ func runACMEIssuerTests(eab *cmacme.ACMEExternalAccountBinding) { } (&certificatesigningrequests.Suite{ - Name: "ACME HTTP01 Issuer", - DomainSuffix: "ingress-nginx.http01.example.com", + Name: "ACME HTTP01 Issuer (Ingress)", + HTTP01TestType: "Ingress", CreateIssuerFunc: http01.createHTTP01Issuer, DeleteIssuerFunc: http01.delete, UnsupportedFeatures: unsupportedHTTP01Features, @@ -91,8 +96,8 @@ func runACMEIssuerTests(eab *cmacme.ACMEExternalAccountBinding) { }).Define() (&certificatesigningrequests.Suite{ - Name: "ACME HTTP01 ClusterIssuer", - DomainSuffix: "ingress-nginx.http01.example.com", + Name: "ACME HTTP01 ClusterIssuer (Ingress)", + HTTP01TestType: "Ingress", CreateIssuerFunc: http01.createHTTP01ClusterIssuer, DeleteIssuerFunc: http01.delete, UnsupportedFeatures: unsupportedHTTP01Features, diff --git a/test/e2e/suite/conformance/certificatesigningrequests/suite.go b/test/e2e/suite/conformance/certificatesigningrequests/suite.go index 6dec02dfaf2..81af69c7e76 100644 --- a/test/e2e/suite/conformance/certificatesigningrequests/suite.go +++ b/test/e2e/suite/conformance/certificatesigningrequests/suite.go @@ -64,6 +64,11 @@ type Suite struct { // If not specified, this function will be skipped. DeProvisionFunc func(context.Context, *framework.Framework, *certificatesv1.CertificateSigningRequest) + // SharedIPAddress is the IP address that will be used in all certificates + // that require an IP address to be set. For HTTP-01 tests, this IP address + // will be set to the IP address of the Ingress/ Gateway controller. + SharedIPAddress string + // DomainSuffix is a suffix used on all domain requests. // This is useful when the issuer being tested requires special // configuration for a set of domains in order for certificates to be @@ -72,18 +77,55 @@ type Suite struct { // nginx-ingress addon. DomainSuffix string + // HTTP01TestType is set to "Ingress" or "Gateway" to determine which IPs + // and Domains will be used to run the ACME HTTP-01 test suites. + HTTP01TestType string + // UnsupportedFeatures is a list of features that are not supported by this // invocation of the test suite. // This is useful if a particular issuers explicitly does not support // certain features due to restrictions in their implementation. UnsupportedFeatures featureset.FeatureSet - // completed is used internally to track whether Complete() has been called - completed bool + // validated is used internally to track whether Validate has been called already. + validated bool +} + +// setup will set default values for fields on the Suite struct. +func (s *Suite) setup(f *framework.Framework) { + if s.SharedIPAddress == "" { + switch s.HTTP01TestType { + case "Ingress": + s.SharedIPAddress = f.Config.Addons.ACMEServer.IngressIP + case "Gateway": + s.SharedIPAddress = f.Config.Addons.ACMEServer.GatewayIP + default: + s.SharedIPAddress = "127.0.0.1" + } + } + + if s.DomainSuffix == "" { + switch s.HTTP01TestType { + case "Ingress": + s.DomainSuffix = f.Config.Addons.IngressController.Domain + case "Gateway": + s.DomainSuffix = f.Config.Addons.Gateway.Domain + default: + s.DomainSuffix = "example.com" + } + } + + if s.UnsupportedFeatures == nil { + s.UnsupportedFeatures = make(featureset.FeatureSet) + } } -// complete will validate configuration and set default values. -func (s *Suite) complete(f *framework.Framework) { +// validate will validate the Suite struct to ensure all required fields are set. +func (s *Suite) validate() { + if s.validated { + return + } + if s.Name == "" { Fail("Name must be set") } @@ -92,15 +134,11 @@ func (s *Suite) complete(f *framework.Framework) { Fail("CreateIssuerFunc must be set") } - if s.DomainSuffix == "" { - s.DomainSuffix = f.Config.Addons.IngressController.Domain - } - - if s.UnsupportedFeatures == nil { - s.UnsupportedFeatures = make(featureset.FeatureSet) + if s.HTTP01TestType == "Gateway" { + framework.RequireFeatureGate(utilfeature.DefaultFeatureGate, feature.ExperimentalGatewayAPISupport) } - s.completed = true + s.validated = true } // it is called by the tests to in Define() to setup and run the test @@ -109,7 +147,7 @@ func (s *Suite) it(f *framework.Framework, name string, fn func(context.Context, return } It(name, func(ctx context.Context) { - framework.RequireFeatureGate(f, utilfeature.DefaultFeatureGate, feature.ExperimentalCertificateSigningRequestControllers) + framework.RequireFeatureGate(utilfeature.DefaultFeatureGate, feature.ExperimentalCertificateSigningRequestControllers) By("Creating an issuer resource") signerName := s.CreateIssuerFunc(ctx, f) diff --git a/test/e2e/suite/conformance/certificatesigningrequests/tests.go b/test/e2e/suite/conformance/certificatesigningrequests/tests.go index f837d0ef63f..506466b717c 100644 --- a/test/e2e/suite/conformance/certificatesigningrequests/tests.go +++ b/test/e2e/suite/conformance/certificatesigningrequests/tests.go @@ -51,8 +51,8 @@ import ( func (s *Suite) Define() { Describe("CertificateSigningRequest with issuer type "+s.Name, func() { f := framework.NewDefaultFramework("certificatesigningrequests") + s.setup(f) - sharedCommonName := "" sharedURI, err := url.Parse("spiffe://cluster.local/ns/sandbox/sa/foo") if err != nil { // This should never happen, and is a bug. Panic to prevent garbage test @@ -63,22 +63,16 @@ func (s *Suite) Define() { // Wrap this in a BeforeEach else flags will not have been parsed and // f.Config will not be populated at the time that this code is run. BeforeEach(func() { - if s.completed { - return - } - - s.complete(f) - - sharedCommonName = e2eutil.RandomSubdomain(s.DomainSuffix) + s.validate() }) type testCase struct { name string // ginkgo v2 does not support using map[string] to store the test names (#5345) keyAlgo x509.PublicKeyAlgorithm - // csrModifers define the shape of the X.509 CSR which is used in the + // csrModifiers define the shape of the X.509 CSR which is used in the // test case. We use a function to allow access to variables that are // initialized at test runtime by complete(). - csrModifiers func() []gen.CSRModifier + csrModifiers []gen.CSRModifier kubeCSRUsages []certificatesv1.KeyUsage kubeCSRAnnotations map[string]string kubeCSRExpirationSeconds *int32 @@ -94,8 +88,8 @@ func (s *Suite) Define() { { name: "should issue an RSA certificate for a single distinct DNS Name", keyAlgo: x509.RSA, - csrModifiers: func() []gen.CSRModifier { - return []gen.CSRModifier{gen.SetCSRDNSNames(e2eutil.RandomSubdomain(s.DomainSuffix))} + csrModifiers: []gen.CSRModifier{ + gen.SetCSRDNSNames(e2eutil.RandomSubdomain(s.DomainSuffix)), }, kubeCSRUsages: []certificatesv1.KeyUsage{ certificatesv1.UsageDigitalSignature, @@ -106,8 +100,8 @@ func (s *Suite) Define() { { name: "should issue an ECDSA certificate for a single distinct DNS Name", keyAlgo: x509.ECDSA, - csrModifiers: func() []gen.CSRModifier { - return []gen.CSRModifier{gen.SetCSRDNSNames(e2eutil.RandomSubdomain(s.DomainSuffix))} + csrModifiers: []gen.CSRModifier{ + gen.SetCSRDNSNames(e2eutil.RandomSubdomain(s.DomainSuffix)), }, kubeCSRUsages: []certificatesv1.KeyUsage{ certificatesv1.UsageDigitalSignature, @@ -118,8 +112,8 @@ func (s *Suite) Define() { { name: "should issue an Ed25519 certificate for a single distinct DNS Name", keyAlgo: x509.Ed25519, - csrModifiers: func() []gen.CSRModifier { - return []gen.CSRModifier{gen.SetCSRDNSNames(e2eutil.RandomSubdomain(s.DomainSuffix))} + csrModifiers: []gen.CSRModifier{ + gen.SetCSRDNSNames(e2eutil.RandomSubdomain(s.DomainSuffix)), }, kubeCSRUsages: []certificatesv1.KeyUsage{ certificatesv1.UsageDigitalSignature, @@ -130,8 +124,8 @@ func (s *Suite) Define() { { name: "should issue an RSA certificate for a single Common Name", keyAlgo: x509.RSA, - csrModifiers: func() []gen.CSRModifier { - return []gen.CSRModifier{gen.SetCSRCommonName("test-common-name-" + rand.String(10))} + csrModifiers: []gen.CSRModifier{ + gen.SetCSRCommonName("test-common-name-" + rand.String(10)), }, kubeCSRUsages: []certificatesv1.KeyUsage{ certificatesv1.UsageDigitalSignature, @@ -142,8 +136,8 @@ func (s *Suite) Define() { { name: "should issue an ECDSA certificate for a single Common Name", keyAlgo: x509.ECDSA, - csrModifiers: func() []gen.CSRModifier { - return []gen.CSRModifier{gen.SetCSRCommonName("test-common-name-" + rand.String(10))} + csrModifiers: []gen.CSRModifier{ + gen.SetCSRCommonName("test-common-name-" + rand.String(10)), }, kubeCSRUsages: []certificatesv1.KeyUsage{ certificatesv1.UsageDigitalSignature, @@ -154,8 +148,8 @@ func (s *Suite) Define() { { name: "should issue an Ed25519 certificate for a single Common Name", keyAlgo: x509.Ed25519, - csrModifiers: func() []gen.CSRModifier { - return []gen.CSRModifier{gen.SetCSRCommonName("test-common-name-" + rand.String(10))} + csrModifiers: []gen.CSRModifier{ + gen.SetCSRCommonName("test-common-name-" + rand.String(10)), }, kubeCSRUsages: []certificatesv1.KeyUsage{ certificatesv1.UsageDigitalSignature, @@ -166,11 +160,9 @@ func (s *Suite) Define() { { name: "should issue a certificate that defines a Common Name and IP Address", keyAlgo: x509.RSA, - csrModifiers: func() []gen.CSRModifier { - return []gen.CSRModifier{ - gen.SetCSRCommonName("test-common-name-" + rand.String(10)), - gen.SetCSRIPAddresses(net.IPv4(127, 0, 0, 1), net.IPv4(8, 8, 8, 8)), - } + csrModifiers: []gen.CSRModifier{ + gen.SetCSRCommonName("test-common-name-" + rand.String(10)), + gen.SetCSRIPAddresses(net.ParseIP(s.SharedIPAddress)), }, kubeCSRUsages: []certificatesv1.KeyUsage{ certificatesv1.UsageDigitalSignature, @@ -178,13 +170,51 @@ func (s *Suite) Define() { }, requiredFeatures: []featureset.Feature{featureset.CommonNameFeature, featureset.IPAddressFeature}, }, + { + name: "should issue a certificate that defines an IP Address", + keyAlgo: x509.RSA, + csrModifiers: []gen.CSRModifier{ + gen.SetCSRIPAddresses(net.ParseIP(s.SharedIPAddress)), + }, + kubeCSRUsages: []certificatesv1.KeyUsage{ + certificatesv1.UsageDigitalSignature, + certificatesv1.UsageKeyEncipherment, + }, + requiredFeatures: []featureset.Feature{featureset.IPAddressFeature}, + }, + { + name: "should issue a certificate that defines a DNS Name and IP Address", + keyAlgo: x509.RSA, + csrModifiers: []gen.CSRModifier{ + gen.SetCSRIPAddresses(net.ParseIP(s.SharedIPAddress)), + gen.SetCSRDNSNames(e2eutil.RandomSubdomain(s.DomainSuffix)), + }, + kubeCSRUsages: []certificatesv1.KeyUsage{ + certificatesv1.UsageDigitalSignature, + certificatesv1.UsageKeyEncipherment, + }, + requiredFeatures: []featureset.Feature{featureset.OnlySAN, featureset.IPAddressFeature}, + }, + { + name: "should issue a CA certificate with the CA basicConstraint set", + keyAlgo: x509.RSA, + csrModifiers: []gen.CSRModifier{ + gen.SetCSRDNSNames(e2eutil.RandomSubdomain(s.DomainSuffix)), + }, + kubeCSRAnnotations: map[string]string{ + experimentalapi.CertificateSigningRequestIsCAAnnotationKey: "true", + }, + kubeCSRUsages: []certificatesv1.KeyUsage{ + certificatesv1.UsageDigitalSignature, + certificatesv1.UsageKeyEncipherment, + }, + requiredFeatures: []featureset.Feature{featureset.OnlySAN, featureset.IssueCAFeature}, + }, { name: "should issue a certificate that defines an Email Address", keyAlgo: x509.RSA, - csrModifiers: func() []gen.CSRModifier { - return []gen.CSRModifier{ - gen.SetCSREmails([]string{"alice@example.com", "bob@cert-manager.io"}), - } + csrModifiers: []gen.CSRModifier{ + gen.SetCSREmails([]string{"alice@example.com", "bob@cert-manager.io"}), }, kubeCSRUsages: []certificatesv1.KeyUsage{ certificatesv1.UsageDigitalSignature, @@ -195,11 +225,9 @@ func (s *Suite) Define() { { name: "should issue a certificate that defines a Common Name and URI SAN", keyAlgo: x509.RSA, - csrModifiers: func() []gen.CSRModifier { - return []gen.CSRModifier{ - gen.SetCSRCommonName("test-common-name-" + rand.String(10)), - gen.SetCSRURIs(sharedURI), - } + csrModifiers: []gen.CSRModifier{ + gen.SetCSRCommonName("test-common-name-" + rand.String(10)), + gen.SetCSRURIs(sharedURI), }, kubeCSRUsages: []certificatesv1.KeyUsage{ certificatesv1.UsageDigitalSignature, @@ -208,28 +236,28 @@ func (s *Suite) Define() { requiredFeatures: []featureset.Feature{featureset.CommonNameFeature, featureset.URISANsFeature}, }, { - name: "should issue a certificate that defines a 2 distinct DNS Name with one copied to the Common Name", + name: "should issue a certificate that define 2 distinct DNS Names with one copied to the Common Name", keyAlgo: x509.RSA, csrModifiers: func() []gen.CSRModifier { + commonName := e2eutil.RandomSubdomain(s.DomainSuffix) + return []gen.CSRModifier{ - gen.SetCSRCommonName(sharedCommonName), - gen.SetCSRDNSNames(sharedCommonName, e2eutil.RandomSubdomain(s.DomainSuffix)), + gen.SetCSRCommonName(commonName), + gen.SetCSRDNSNames(commonName, e2eutil.RandomSubdomain(s.DomainSuffix)), } - }, + }(), kubeCSRUsages: []certificatesv1.KeyUsage{ certificatesv1.UsageDigitalSignature, certificatesv1.UsageKeyEncipherment, }, - requiredFeatures: []featureset.Feature{}, + requiredFeatures: []featureset.Feature{featureset.CommonNameFeature}, }, { name: "should issue a certificate that defines a distinct DNS Name and another distinct Common Name", keyAlgo: x509.RSA, - csrModifiers: func() []gen.CSRModifier { - return []gen.CSRModifier{ - gen.SetCSRCommonName(e2eutil.RandomSubdomain(s.DomainSuffix)), - gen.SetCSRDNSNames(e2eutil.RandomSubdomain(s.DomainSuffix)), - } + csrModifiers: []gen.CSRModifier{ + gen.SetCSRCommonName(e2eutil.RandomSubdomain(s.DomainSuffix)), + gen.SetCSRDNSNames(e2eutil.RandomSubdomain(s.DomainSuffix)), }, kubeCSRUsages: []certificatesv1.KeyUsage{ certificatesv1.UsageDigitalSignature, @@ -241,11 +269,13 @@ func (s *Suite) Define() { name: "should issue a certificate that defines a Common Name, DNS Name, and sets a duration", keyAlgo: x509.RSA, csrModifiers: func() []gen.CSRModifier { + commonName := e2eutil.RandomSubdomain(s.DomainSuffix) + return []gen.CSRModifier{ - gen.SetCSRDNSNames(sharedCommonName), - gen.SetCSRDNSNames(sharedCommonName), + gen.SetCSRCommonName(commonName), + gen.SetCSRDNSNames(commonName), } - }, + }(), kubeCSRUsages: []certificatesv1.KeyUsage{ certificatesv1.UsageDigitalSignature, certificatesv1.UsageKeyEncipherment, @@ -259,11 +289,13 @@ func (s *Suite) Define() { name: "should issue a certificate that defines a Common Name, DNS Name, and sets a duration via expiration seconds", keyAlgo: x509.RSA, csrModifiers: func() []gen.CSRModifier { + commonName := e2eutil.RandomSubdomain(s.DomainSuffix) + return []gen.CSRModifier{ - gen.SetCSRDNSNames(sharedCommonName), - gen.SetCSRDNSNames(sharedCommonName), + gen.SetCSRCommonName(commonName), + gen.SetCSRDNSNames(commonName), } - }, + }(), kubeCSRUsages: []certificatesv1.KeyUsage{ certificatesv1.UsageDigitalSignature, certificatesv1.UsageKeyEncipherment, @@ -274,10 +306,8 @@ func (s *Suite) Define() { { name: "should issue a certificate that defines a DNS Name and sets a duration", keyAlgo: x509.RSA, - csrModifiers: func() []gen.CSRModifier { - return []gen.CSRModifier{ - gen.SetCSRDNSNames(e2eutil.RandomSubdomain(s.DomainSuffix)), - } + csrModifiers: []gen.CSRModifier{ + gen.SetCSRDNSNames(e2eutil.RandomSubdomain(s.DomainSuffix)), }, kubeCSRUsages: []certificatesv1.KeyUsage{ certificatesv1.UsageDigitalSignature, @@ -291,10 +321,8 @@ func (s *Suite) Define() { { name: "should issue a certificate which has a wildcard DNS Name defined", keyAlgo: x509.RSA, - csrModifiers: func() []gen.CSRModifier { - return []gen.CSRModifier{ - gen.SetCSRDNSNames("*." + e2eutil.RandomSubdomain(s.DomainSuffix)), - } + csrModifiers: []gen.CSRModifier{ + gen.SetCSRDNSNames("*." + e2eutil.RandomSubdomain(s.DomainSuffix)), }, kubeCSRUsages: []certificatesv1.KeyUsage{ certificatesv1.UsageDigitalSignature, @@ -303,12 +331,26 @@ func (s *Suite) Define() { requiredFeatures: []featureset.Feature{featureset.WildcardsFeature, featureset.OnlySAN}, }, { - name: "should issue a certificate that includes only a URISANs name", + name: "should issue a certificate which has a wildcard DNS Name and its apex DNS Name defined", keyAlgo: x509.RSA, csrModifiers: func() []gen.CSRModifier { + dnsDomain := e2eutil.RandomSubdomain(s.DomainSuffix) + return []gen.CSRModifier{ - gen.SetCSRURIs(sharedURI), + gen.SetCSRDNSNames("*."+dnsDomain, dnsDomain), } + }(), + kubeCSRUsages: []certificatesv1.KeyUsage{ + certificatesv1.UsageDigitalSignature, + certificatesv1.UsageKeyEncipherment, + }, + requiredFeatures: []featureset.Feature{featureset.WildcardsFeature, featureset.OnlySAN}, + }, + { + name: "should issue a certificate that includes only a URISANs name", + keyAlgo: x509.RSA, + csrModifiers: []gen.CSRModifier{ + gen.SetCSRURIs(sharedURI), }, kubeCSRUsages: []certificatesv1.KeyUsage{ certificatesv1.UsageDigitalSignature, @@ -317,13 +359,10 @@ func (s *Suite) Define() { requiredFeatures: []featureset.Feature{featureset.URISANsFeature, featureset.OnlySAN}, }, { - name: "should issue a certificate that includes arbitrary key usages", + name: "should issue a certificate that includes arbitrary key usages with common name", keyAlgo: x509.RSA, - csrModifiers: func() []gen.CSRModifier { - return []gen.CSRModifier{ - gen.SetCSRCommonName(sharedCommonName), - gen.SetCSRDNSNames(sharedCommonName), - } + csrModifiers: []gen.CSRModifier{ + gen.SetCSRCommonName(e2eutil.RandomSubdomain(s.DomainSuffix)), }, kubeCSRUsages: []certificatesv1.KeyUsage{ certificatesv1.UsageServerAuth, @@ -331,21 +370,19 @@ func (s *Suite) Define() { certificatesv1.UsageDigitalSignature, certificatesv1.UsageDataEncipherment, }, - requiredFeatures: []featureset.Feature{featureset.KeyUsagesFeature}, extraValidations: []certificatesigningrequests.ValidationFunc{ certificatesigningrequests.ExpectKeyUsageExtKeyUsageClientAuth, certificatesigningrequests.ExpectKeyUsageExtKeyUsageServerAuth, certificatesigningrequests.ExpectKeyUsageUsageDigitalSignature, certificatesigningrequests.ExpectKeyUsageUsageDataEncipherment, }, + requiredFeatures: []featureset.Feature{featureset.KeyUsagesFeature}, }, { name: "should issue a signing CA certificate that has a large duration", keyAlgo: x509.RSA, - csrModifiers: func() []gen.CSRModifier { - return []gen.CSRModifier{ - gen.SetCSRCommonName("cert-manager-ca"), - } + csrModifiers: []gen.CSRModifier{ + gen.SetCSRCommonName("cert-manager-ca"), }, kubeCSRUsages: []certificatesv1.KeyUsage{ certificatesv1.UsageDigitalSignature, @@ -358,19 +395,47 @@ func (s *Suite) Define() { }, requiredFeatures: []featureset.Feature{featureset.KeyUsagesFeature, featureset.DurationFeature, featureset.CommonNameFeature}, }, + { + name: "should issue a certificate that defines a long domain", + keyAlgo: x509.RSA, + csrModifiers: func() []gen.CSRModifier { + const maxLengthOfDomainSegment = 63 + return []gen.CSRModifier{ + gen.SetCSRDNSNames(e2eutil.RandomSubdomainLength(s.DomainSuffix, maxLengthOfDomainSegment)), + } + }(), + kubeCSRUsages: []certificatesv1.KeyUsage{ + certificatesv1.UsageDigitalSignature, + certificatesv1.UsageKeyEncipherment, + }, + requiredFeatures: []featureset.Feature{featureset.OnlySAN, featureset.LongDomainFeatureSet}, + }, + } + + addAnnotation := func(annotations map[string]string, key, value string) map[string]string { + if annotations == nil { + annotations = map[string]string{} + } + annotations[key] = value + return annotations } defineTest := func(test testCase) { s.it(f, test.name, func(ctx context.Context, signerName string) { // Generate request CSR - csr, key, err := gen.CSR(test.keyAlgo, test.csrModifiers()...) + csr, key, err := gen.CSR(test.keyAlgo, test.csrModifiers...) Expect(err).NotTo(HaveOccurred()) // Create CertificateSigningRequest + randomTestID := rand.String(10) kubeCSR := &certificatesv1.CertificateSigningRequest{ ObjectMeta: metav1.ObjectMeta{ - GenerateName: "e2e-conformance-", - Annotations: test.kubeCSRAnnotations, + Name: "e2e-conformance-" + randomTestID, + Annotations: addAnnotation( + test.kubeCSRAnnotations, + "conformance.cert-manager.io/test-name", + s.Name+" "+test.name, + ), }, Spec: certificatesv1.CertificateSigningRequestSpec{ Request: csr, @@ -397,7 +462,8 @@ func (s *Suite) Define() { defer func() { cleanupCtx := context.Background() - f.CRClient.Delete(cleanupCtx, kubeCSR) + err := f.CRClient.Delete(cleanupCtx, kubeCSR) + Expect(err).NotTo(HaveOccurred()) }() // Approve the request for testing, so that cert-manager may sign the @@ -421,7 +487,8 @@ func (s *Suite) Define() { // Validate that the request was signed as expected. Add extra // validations which may be required for this test. By("Validating the issued CertificateSigningRequest...") - validations := append([]certificatesigningrequests.ValidationFunc(nil), test.extraValidations...) + validations := []certificatesigningrequests.ValidationFunc(nil) + validations = append(validations, test.extraValidations...) validations = append(validations, validation.CertificateSigningRequestSetForUnsupportedFeatureSet(s.UnsupportedFeatures)...) err = f.Helper().ValidateCertificateSigningRequest(kubeCSR.Name, key, validations...) Expect(err).NotTo(HaveOccurred()) diff --git a/test/e2e/suite/conformance/certificatesigningrequests/vault/approle.go b/test/e2e/suite/conformance/certificatesigningrequests/vault/approle.go index 256c9c992a2..c14514479f0 100644 --- a/test/e2e/suite/conformance/certificatesigningrequests/vault/approle.go +++ b/test/e2e/suite/conformance/certificatesigningrequests/vault/approle.go @@ -53,56 +53,50 @@ type secrets struct { } var _ = framework.ConformanceDescribe("CertificateSigningRequests", func() { + var unsupportedFeatures = featureset.NewFeatureSet( + featureset.KeyUsagesFeature, + featureset.Ed25519FeatureSet, + featureset.IssueCAFeature, + ) + issuer := &approle{ testWithRootCA: true, } (&certificatesigningrequests.Suite{ - Name: "Vault AppRole Issuer With Root CA", - CreateIssuerFunc: issuer.createIssuer, - DeleteIssuerFunc: issuer.delete, - UnsupportedFeatures: featureset.NewFeatureSet( - featureset.KeyUsagesFeature, - featureset.Ed25519FeatureSet, - ), + Name: "Vault AppRole Issuer With Root CA", + CreateIssuerFunc: issuer.createIssuer, + DeleteIssuerFunc: issuer.delete, + UnsupportedFeatures: unsupportedFeatures, }).Define() issuerNoRoot := &approle{ testWithRootCA: false, } (&certificatesigningrequests.Suite{ - Name: "Vault AppRole Issuer Without Root CA", - CreateIssuerFunc: issuerNoRoot.createIssuer, - DeleteIssuerFunc: issuerNoRoot.delete, - UnsupportedFeatures: featureset.NewFeatureSet( - featureset.KeyUsagesFeature, - featureset.Ed25519FeatureSet, - ), + Name: "Vault AppRole Issuer Without Root CA", + CreateIssuerFunc: issuerNoRoot.createIssuer, + DeleteIssuerFunc: issuerNoRoot.delete, + UnsupportedFeatures: unsupportedFeatures, }).Define() clusterIssuer := &approle{ testWithRootCA: true, } (&certificatesigningrequests.Suite{ - Name: "Vault AppRole ClusterIssuer With Root CA", - CreateIssuerFunc: clusterIssuer.createClusterIssuer, - DeleteIssuerFunc: clusterIssuer.delete, - UnsupportedFeatures: featureset.NewFeatureSet( - featureset.KeyUsagesFeature, - featureset.Ed25519FeatureSet, - ), + Name: "Vault AppRole ClusterIssuer With Root CA", + CreateIssuerFunc: clusterIssuer.createClusterIssuer, + DeleteIssuerFunc: clusterIssuer.delete, + UnsupportedFeatures: unsupportedFeatures, }).Define() clusterIssuerNoRoot := &approle{ testWithRootCA: false, } (&certificatesigningrequests.Suite{ - Name: "Vault AppRole ClusterIssuer Without Root CA", - CreateIssuerFunc: clusterIssuerNoRoot.createClusterIssuer, - DeleteIssuerFunc: clusterIssuerNoRoot.delete, - UnsupportedFeatures: featureset.NewFeatureSet( - featureset.KeyUsagesFeature, - featureset.Ed25519FeatureSet, - ), + Name: "Vault AppRole ClusterIssuer Without Root CA", + CreateIssuerFunc: clusterIssuerNoRoot.createClusterIssuer, + DeleteIssuerFunc: clusterIssuerNoRoot.delete, + UnsupportedFeatures: unsupportedFeatures, }).Define() }) diff --git a/test/e2e/suite/conformance/certificatesigningrequests/vault/kubernetes.go b/test/e2e/suite/conformance/certificatesigningrequests/vault/kubernetes.go index 6fd8ed86f5e..3fcb6726c15 100644 --- a/test/e2e/suite/conformance/certificatesigningrequests/vault/kubernetes.go +++ b/test/e2e/suite/conformance/certificatesigningrequests/vault/kubernetes.go @@ -38,30 +38,30 @@ import ( ) var _ = framework.ConformanceDescribe("CertificateSigningRequests", func() { + var unsupportedFeatures = featureset.NewFeatureSet( + featureset.KeyUsagesFeature, + featureset.Ed25519FeatureSet, + featureset.IssueCAFeature, + ) + issuer := &kubernetes{ testWithRootCA: true, } (&certificatesigningrequests.Suite{ - Name: "Vault Kubernetes Auth Issuer With Root CA", - CreateIssuerFunc: issuer.createIssuer, - DeleteIssuerFunc: issuer.delete, - UnsupportedFeatures: featureset.NewFeatureSet( - featureset.KeyUsagesFeature, - featureset.Ed25519FeatureSet, - ), + Name: "Vault Kubernetes Auth Issuer With Root CA", + CreateIssuerFunc: issuer.createIssuer, + DeleteIssuerFunc: issuer.delete, + UnsupportedFeatures: unsupportedFeatures, }).Define() clusterIssuer := &kubernetes{ testWithRootCA: true, } (&certificatesigningrequests.Suite{ - Name: "Vault Kubernetes Auth ClusterIssuer With Root CA", - CreateIssuerFunc: clusterIssuer.createClusterIssuer, - DeleteIssuerFunc: clusterIssuer.delete, - UnsupportedFeatures: featureset.NewFeatureSet( - featureset.KeyUsagesFeature, - featureset.Ed25519FeatureSet, - ), + Name: "Vault Kubernetes Auth ClusterIssuer With Root CA", + CreateIssuerFunc: clusterIssuer.createClusterIssuer, + DeleteIssuerFunc: clusterIssuer.delete, + UnsupportedFeatures: unsupportedFeatures, }).Define() }) @@ -69,6 +69,8 @@ type kubernetes struct { testWithRootCA bool // saTokenSecretName is the name of the Secret containing the service account token saTokenSecretName string + // saBoundSA is the name of the service account which is used in the test, will be cleaned up after the test + saBoundSA string setup *vault.VaultInitializer } @@ -120,7 +122,14 @@ func (k *kubernetes) delete(ctx context.Context, f *framework.Framework, signerN err := f.CertManagerClientSet.CertmanagerV1().ClusterIssuers().Delete(ctx, ref.Name, metav1.DeleteOptions{}) Expect(err).NotTo(HaveOccurred()) - k.setup.CleanKubernetesRole(ctx, f.KubeClientSet, f.Config.Addons.CertManager.ClusterResourceNamespace, k.setup.Role()) + err = k.setup.CleanKubernetesRole(ctx, f.KubeClientSet, f.Config.Addons.CertManager.ClusterResourceNamespace, k.saBoundSA) + Expect(err).NotTo(HaveOccurred()) + } else { + err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, ref.Name, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) + + err = k.setup.CleanKubernetesRole(ctx, f.KubeClientSet, f.Namespace.Name, k.saBoundSA) + Expect(err).NotTo(HaveOccurred()) } Expect(k.setup.Clean(ctx)).NotTo(HaveOccurred(), "failed to deprovision vault initializer") @@ -141,12 +150,12 @@ func (k *kubernetes) initVault(ctx context.Context, f *framework.Framework, boun By("Creating a ServiceAccount for Vault authentication") // boundNS is name of the service account for which a Secret containing the service account token will be created - boundSA := "vault-issuer-" + rand.String(5) - err := k.setup.CreateKubernetesRole(ctx, f.KubeClientSet, boundNS, boundSA) + k.saBoundSA = "vault-issuer-" + rand.String(5) + err := k.setup.CreateKubernetesRole(ctx, f.KubeClientSet, boundNS, k.saBoundSA) Expect(err).NotTo(HaveOccurred()) k.saTokenSecretName = "vault-sa-secret-" + rand.String(5) - _, err = f.KubeClientSet.CoreV1().Secrets(boundNS).Create(ctx, vault.NewVaultKubernetesSecret(k.saTokenSecretName, boundSA), metav1.CreateOptions{}) + _, err = f.KubeClientSet.CoreV1().Secrets(boundNS).Create(ctx, vault.NewVaultKubernetesSecret(k.saTokenSecretName, k.saBoundSA), metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) } diff --git a/test/e2e/suite/issuers/acme/certificate/http01.go b/test/e2e/suite/issuers/acme/certificate/http01.go index 2dd440d9fc6..804ec0b737f 100644 --- a/test/e2e/suite/issuers/acme/certificate/http01.go +++ b/test/e2e/suite/issuers/acme/certificate/http01.go @@ -131,8 +131,10 @@ var _ = framework.CertManagerDescribe("ACME Certificate (HTTP01)", func() { AfterEach(func() { By("Cleaning up") - f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, issuerName, metav1.DeleteOptions{}) - f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(ctx, f.Config.Addons.ACMEServer.TestingACMEPrivateKey, metav1.DeleteOptions{}) + err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, issuerName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) + err = f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(ctx, f.Config.Addons.ACMEServer.TestingACMEPrivateKey, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) }) It("should allow updating an existing failing certificate that had a blocked dns name", func() { diff --git a/test/e2e/suite/issuers/acme/certificate/notafter.go b/test/e2e/suite/issuers/acme/certificate/notafter.go index 454158e1ce6..604317cfac0 100644 --- a/test/e2e/suite/issuers/acme/certificate/notafter.go +++ b/test/e2e/suite/issuers/acme/certificate/notafter.go @@ -123,8 +123,10 @@ var _ = framework.CertManagerDescribe("ACME Certificate (HTTP01 + Not After)", f AfterEach(func() { By("Cleaning up") - f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, issuerName, metav1.DeleteOptions{}) - f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(ctx, f.Config.Addons.ACMEServer.TestingACMEPrivateKey, metav1.DeleteOptions{}) + err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, issuerName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) + err = f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(ctx, f.Config.Addons.ACMEServer.TestingACMEPrivateKey, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) }) It("should obtain a signed certificate with a single CN from the ACME server with 1 hour validity", func() { diff --git a/test/e2e/suite/issuers/acme/certificate/webhook.go b/test/e2e/suite/issuers/acme/certificate/webhook.go index 851c6970690..ae8c351d1e1 100644 --- a/test/e2e/suite/issuers/acme/certificate/webhook.go +++ b/test/e2e/suite/issuers/acme/certificate/webhook.go @@ -76,7 +76,7 @@ var _ = framework.CertManagerDescribe("ACME webhook DNS provider", func() { }, })) issuer.Namespace = f.Namespace.Name - issuer, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, issuer, metav1.CreateOptions{}) + _, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, issuer, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) By("Waiting for Issuer to become Ready") err = util.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), @@ -106,9 +106,10 @@ var _ = framework.CertManagerDescribe("ACME webhook DNS provider", func() { AfterEach(func() { By("Cleaning up") - f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, issuerName, metav1.DeleteOptions{}) - f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(ctx, f.Config.Addons.ACMEServer.TestingACMEPrivateKey, metav1.DeleteOptions{}) - f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(ctx, certificateSecretName, metav1.DeleteOptions{}) + err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, issuerName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) + err = f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(ctx, f.Config.Addons.ACMEServer.TestingACMEPrivateKey, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) }) It("should call the dummy webhook provider and mark the challenges as presented=true", func() { @@ -182,7 +183,6 @@ func listOwnedChallenges(ctx context.Context, cl versioned.Interface, owner *cma var owned []*cmacme.Challenge for _, ch := range l.Items { - ch := ch // G601: Remove after Go 1.22. https://go.dev/wiki/LoopvarExperiment if !metav1.IsControlledBy(&ch, owner) { continue } @@ -200,7 +200,6 @@ func listOwnedOrders(ctx context.Context, cl versioned.Interface, owner *v1.Cert var owned []*cmacme.Order for _, o := range l.Items { - o := o // G601: Remove after Go 1.22. https://go.dev/wiki/LoopvarExperiment v, ok := o.Annotations[v1.CertificateNameKey] if !ok || v != owner.Name { continue diff --git a/test/e2e/suite/issuers/acme/certificaterequest/dns01.go b/test/e2e/suite/issuers/acme/certificaterequest/dns01.go index 363b7b76115..7dfbc863203 100644 --- a/test/e2e/suite/issuers/acme/certificaterequest/dns01.go +++ b/test/e2e/suite/issuers/acme/certificaterequest/dns01.go @@ -107,8 +107,10 @@ func testRFC2136DNSProvider() bool { AfterEach(func() { By("Cleaning up") - f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, issuerName, metav1.DeleteOptions{}) - f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(ctx, testingACMEPrivateKey, metav1.DeleteOptions{}) + err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, issuerName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) + err = f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(ctx, testingACMEPrivateKey, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) }) It("should obtain a signed certificate for a regular domain", func() { @@ -116,7 +118,7 @@ func testRFC2136DNSProvider() bool { crClient := f.CertManagerClientSet.CertmanagerV1().CertificateRequests(f.Namespace.Name) - cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, issuerName, v1.IssuerKind, nil, + cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, f.Namespace.Name, issuerName, v1.IssuerKind, nil, []string{dnsDomain}, nil, nil, x509.RSA) Expect(err).NotTo(HaveOccurred()) @@ -129,7 +131,7 @@ func testRFC2136DNSProvider() bool { It("should obtain a signed certificate for a wildcard domain", func() { By("Creating a CertificateRequest") - cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, issuerName, v1.IssuerKind, nil, + cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, f.Namespace.Name, issuerName, v1.IssuerKind, nil, []string{"*." + dnsDomain}, nil, nil, x509.RSA) Expect(err).NotTo(HaveOccurred()) @@ -142,7 +144,7 @@ func testRFC2136DNSProvider() bool { It("should obtain a signed certificate for a wildcard and apex domain", func() { By("Creating a CertificateRequest") - cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, issuerName, v1.IssuerKind, nil, + cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, f.Namespace.Name, issuerName, v1.IssuerKind, nil, []string{"*." + dnsDomain, dnsDomain}, nil, nil, x509.RSA) Expect(err).NotTo(HaveOccurred()) diff --git a/test/e2e/suite/issuers/acme/certificaterequest/http01.go b/test/e2e/suite/issuers/acme/certificaterequest/http01.go index e8bc7af2839..217be690486 100644 --- a/test/e2e/suite/issuers/acme/certificaterequest/http01.go +++ b/test/e2e/suite/issuers/acme/certificaterequest/http01.go @@ -117,15 +117,17 @@ var _ = framework.CertManagerDescribe("ACME CertificateRequest (HTTP01)", func() AfterEach(func() { By("Cleaning up") - f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, issuerName, metav1.DeleteOptions{}) - f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(ctx, testingACMEPrivateKey, metav1.DeleteOptions{}) + err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, issuerName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) + err = f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(ctx, testingACMEPrivateKey, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) }) It("should obtain a signed certificate with a single CN from the ACME server", func() { crClient := f.CertManagerClientSet.CertmanagerV1().CertificateRequests(f.Namespace.Name) By("Creating a CertificateRequest") - cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, issuerName, v1.IssuerKind, nil, + cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, f.Namespace.Name, issuerName, v1.IssuerKind, nil, []string{acmeIngressDomain}, nil, nil, x509.RSA) Expect(err).NotTo(HaveOccurred()) @@ -141,7 +143,7 @@ var _ = framework.CertManagerDescribe("ACME CertificateRequest (HTTP01)", func() crClient := f.CertManagerClientSet.CertmanagerV1().CertificateRequests(f.Namespace.Name) By("Creating a CertificateRequest") - cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, issuerName, v1.IssuerKind, nil, + cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, f.Namespace.Name, issuerName, v1.IssuerKind, nil, []string{acmeIngressDomain}, nil, nil, x509.ECDSA) Expect(err).NotTo(HaveOccurred()) @@ -158,7 +160,7 @@ var _ = framework.CertManagerDescribe("ACME CertificateRequest (HTTP01)", func() // the maximum length of a single segment of the domain being requested const maxLengthOfDomainSegment = 63 By("Creating a CertificateRequest") - cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, issuerName, v1.IssuerKind, nil, + cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, f.Namespace.Name, issuerName, v1.IssuerKind, nil, []string{ acmeIngressDomain, e2eutil.RandomSubdomainLength(acmeIngressDomain, maxLengthOfDomainSegment), @@ -176,7 +178,7 @@ var _ = framework.CertManagerDescribe("ACME CertificateRequest (HTTP01)", func() crClient := f.CertManagerClientSet.CertmanagerV1().CertificateRequests(f.Namespace.Name) By("Creating a CertificateRequest") - cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, issuerName, v1.IssuerKind, nil, + cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, f.Namespace.Name, issuerName, v1.IssuerKind, nil, []string{e2eutil.RandomSubdomain(acmeIngressDomain)}, nil, nil, x509.RSA) Expect(err).NotTo(HaveOccurred()) @@ -191,7 +193,7 @@ var _ = framework.CertManagerDescribe("ACME CertificateRequest (HTTP01)", func() It("should fail to obtain a certificate for an invalid ACME dns name", func() { // create test fixture By("Creating a CertificateRequest") - cr, _, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, issuerName, v1.IssuerKind, nil, + cr, _, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, f.Namespace.Name, issuerName, v1.IssuerKind, nil, []string{"google.com"}, nil, nil, x509.RSA) Expect(err).NotTo(HaveOccurred()) @@ -210,7 +212,7 @@ var _ = framework.CertManagerDescribe("ACME CertificateRequest (HTTP01)", func() crClient := f.CertManagerClientSet.CertmanagerV1().CertificateRequests(f.Namespace.Name) By("Creating a CertificateRequest") - cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, issuerName, v1.IssuerKind, nil, + cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, f.Namespace.Name, issuerName, v1.IssuerKind, nil, []string{acmeIngressDomain}, nil, nil, x509.RSA) Expect(err).NotTo(HaveOccurred()) diff --git a/test/e2e/suite/issuers/acme/dnsproviders/cloudflare.go b/test/e2e/suite/issuers/acme/dnsproviders/cloudflare.go index 10276c48be8..c31412759ab 100644 --- a/test/e2e/suite/issuers/acme/dnsproviders/cloudflare.go +++ b/test/e2e/suite/issuers/acme/dnsproviders/cloudflare.go @@ -103,8 +103,7 @@ func (b *Cloudflare) Provision() error { } func (b *Cloudflare) Deprovision() error { - b.Base.Details().KubeClient.CoreV1().Secrets(b.createdSecret.Namespace).Delete(context.TODO(), b.createdSecret.Name, metav1.DeleteOptions{}) - return nil + return b.Base.Details().KubeClient.CoreV1().Secrets(b.createdSecret.Namespace).Delete(context.TODO(), b.createdSecret.Name, metav1.DeleteOptions{}) } func (b *Cloudflare) Details() *Details { diff --git a/test/e2e/suite/issuers/acme/issuer.go b/test/e2e/suite/issuers/acme/issuer.go index 82a985ba032..9878749b585 100644 --- a/test/e2e/suite/issuers/acme/issuer.go +++ b/test/e2e/suite/issuers/acme/issuer.go @@ -46,8 +46,10 @@ var _ = framework.CertManagerDescribe("ACME Issuer", func() { AfterEach(func() { By("Cleaning up") - f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(context.TODO(), issuerName, metav1.DeleteOptions{}) - f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(context.TODO(), f.Config.Addons.ACMEServer.TestingACMEPrivateKey, metav1.DeleteOptions{}) + err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(context.TODO(), issuerName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) + err = f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(context.TODO(), f.Config.Addons.ACMEServer.TestingACMEPrivateKey, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) }) It("should register ACME account", func() { diff --git a/test/e2e/suite/issuers/ca/certificate.go b/test/e2e/suite/issuers/ca/certificate.go index 879885cdab0..64d44db46fe 100644 --- a/test/e2e/suite/issuers/ca/certificate.go +++ b/test/e2e/suite/issuers/ca/certificate.go @@ -62,8 +62,10 @@ var _ = framework.CertManagerDescribe("CA Certificate", func() { AfterEach(func() { By("Cleaning up") - f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(ctx, issuerSecretName, metav1.DeleteOptions{}) - f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, issuerName, metav1.DeleteOptions{}) + err := f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(ctx, issuerSecretName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) + err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, issuerName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) }) Context("when the CA is the root", func() { @@ -157,7 +159,7 @@ var _ = framework.CertManagerDescribe("CA Certificate", func() { It("should be able to create a certificate with additional output formats", func() { // Output formats is only enabled via this feature gate being enabled. // Don't run test if the gate isn't enabled. - framework.RequireFeatureGate(f, utilfeature.DefaultFeatureGate, feature.AdditionalCertificateOutputFormats) + framework.RequireFeatureGate(utilfeature.DefaultFeatureGate, feature.AdditionalCertificateOutputFormats) certClient := f.CertManagerClientSet.CertmanagerV1().Certificates(f.Namespace.Name) @@ -208,7 +210,6 @@ var _ = framework.CertManagerDescribe("CA Certificate", func() { }, } for _, v := range cases { - v := v It("should generate a signed keypair valid for "+v.label, func() { certClient := f.CertManagerClientSet.CertmanagerV1().Certificates(f.Namespace.Name) diff --git a/test/e2e/suite/issuers/ca/certificaterequest.go b/test/e2e/suite/issuers/ca/certificaterequest.go index 1967be860f8..1e99af4c6df 100644 --- a/test/e2e/suite/issuers/ca/certificaterequest.go +++ b/test/e2e/suite/issuers/ca/certificaterequest.go @@ -77,8 +77,10 @@ var _ = framework.CertManagerDescribe("CA CertificateRequest", func() { AfterEach(func() { By("Cleaning up") - f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(ctx, issuerSecretName, metav1.DeleteOptions{}) - f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, issuerName, metav1.DeleteOptions{}) + err := f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(ctx, issuerSecretName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) + err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, issuerName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) }) Context("when the CA is the root", func() { @@ -92,7 +94,7 @@ var _ = framework.CertManagerDescribe("CA CertificateRequest", func() { certRequestClient := f.CertManagerClientSet.CertmanagerV1().CertificateRequests(f.Namespace.Name) By("Creating a CertificateRequest") - cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, issuerName, v1.IssuerKind, + cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, f.Namespace.Name, issuerName, v1.IssuerKind, &metav1.Duration{ Duration: time.Hour * 24 * 90, }, @@ -109,7 +111,7 @@ var _ = framework.CertManagerDescribe("CA CertificateRequest", func() { certRequestClient := f.CertManagerClientSet.CertmanagerV1().CertificateRequests(f.Namespace.Name) By("Creating a CertificateRequest") - cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, issuerName, v1.IssuerKind, + cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, f.Namespace.Name, issuerName, v1.IssuerKind, &metav1.Duration{ Duration: time.Hour * 24 * 90, }, @@ -126,7 +128,7 @@ var _ = framework.CertManagerDescribe("CA CertificateRequest", func() { certRequestClient := f.CertManagerClientSet.CertmanagerV1().CertificateRequests(f.Namespace.Name) By("Creating a CertificateRequest") - cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, issuerName, v1.IssuerKind, + cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, f.Namespace.Name, issuerName, v1.IssuerKind, &metav1.Duration{ Duration: time.Hour * 24 * 90, }, @@ -156,7 +158,6 @@ var _ = framework.CertManagerDescribe("CA CertificateRequest", func() { }, } for _, v := range cases { - v := v It("should generate a signed certificate valid for "+v.label, func() { crClient := f.CertManagerClientSet.CertmanagerV1().CertificateRequests(f.Namespace.Name) diff --git a/test/e2e/suite/issuers/ca/clusterissuer.go b/test/e2e/suite/issuers/ca/clusterissuer.go index 926651b0fe3..c8cc1acef6c 100644 --- a/test/e2e/suite/issuers/ca/clusterissuer.go +++ b/test/e2e/suite/issuers/ca/clusterissuer.go @@ -47,8 +47,10 @@ var _ = framework.CertManagerDescribe("CA ClusterIssuer", func() { AfterEach(func() { By("Cleaning up") - f.KubeClientSet.CoreV1().Secrets(f.Config.Addons.CertManager.ClusterResourceNamespace).Delete(ctx, secretName, metav1.DeleteOptions{}) - f.CertManagerClientSet.CertmanagerV1().ClusterIssuers().Delete(ctx, issuerName, metav1.DeleteOptions{}) + err := f.KubeClientSet.CoreV1().Secrets(f.Config.Addons.CertManager.ClusterResourceNamespace).Delete(ctx, secretName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) + err = f.CertManagerClientSet.CertmanagerV1().ClusterIssuers().Delete(ctx, issuerName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) }) It("should validate a signing keypair", func() { diff --git a/test/e2e/suite/issuers/ca/issuer.go b/test/e2e/suite/issuers/ca/issuer.go index 51de90f5f44..96494a63e56 100644 --- a/test/e2e/suite/issuers/ca/issuer.go +++ b/test/e2e/suite/issuers/ca/issuer.go @@ -46,7 +46,8 @@ var _ = framework.CertManagerDescribe("CA Issuer", func() { AfterEach(func() { By("Cleaning up") - f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(ctx, secretName, metav1.DeleteOptions{}) + err := f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(ctx, secretName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) }) It("should generate a signing keypair", func() { diff --git a/test/e2e/suite/issuers/selfsigned/certificate.go b/test/e2e/suite/issuers/selfsigned/certificate.go index 24f97b2faa1..473c60992c1 100644 --- a/test/e2e/suite/issuers/selfsigned/certificate.go +++ b/test/e2e/suite/issuers/selfsigned/certificate.go @@ -101,7 +101,6 @@ var _ = framework.CertManagerDescribe("Self Signed Certificate", func() { }, } for _, v := range cases { - v := v It("should generate a signed keypair valid for "+v.label, func() { certClient := f.CertManagerClientSet.CertmanagerV1().Certificates(f.Namespace.Name) diff --git a/test/e2e/suite/issuers/selfsigned/certificaterequest.go b/test/e2e/suite/issuers/selfsigned/certificaterequest.go index 8056969bff8..b6451a54260 100644 --- a/test/e2e/suite/issuers/selfsigned/certificaterequest.go +++ b/test/e2e/suite/issuers/selfsigned/certificaterequest.go @@ -76,8 +76,10 @@ var _ = framework.CertManagerDescribe("SelfSigned CertificateRequest", func() { AfterEach(func() { By("Cleaning up") - f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(ctx, certificateRequestSecretName, metav1.DeleteOptions{}) - f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, issuerName, metav1.DeleteOptions{}) + err := f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(ctx, certificateRequestSecretName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) + err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, issuerName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) }) Context("Self Signed and private key", func() { @@ -165,7 +167,6 @@ var _ = framework.CertManagerDescribe("SelfSigned CertificateRequest", func() { }, } for _, v := range cases { - v := v // capture range variable It("should generate a signed certificate valid for "+v.label, func() { crClient := f.CertManagerClientSet.CertmanagerV1().CertificateRequests(f.Namespace.Name) diff --git a/test/e2e/suite/issuers/vault/certificate/approle.go b/test/e2e/suite/issuers/vault/certificate/approle.go index f5c9916a3e3..64e13560123 100644 --- a/test/e2e/suite/issuers/vault/certificate/approle.go +++ b/test/e2e/suite/issuers/vault/certificate/approle.go @@ -98,12 +98,15 @@ func runVaultAppRoleTests(issuerKind string, testWithRoot bool, unsupportedFeatu Expect(setup.Clean(ctx)).NotTo(HaveOccurred()) if issuerKind == cmapi.IssuerKind { - f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, vaultIssuerName, metav1.DeleteOptions{}) + err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, vaultIssuerName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) } else { - f.CertManagerClientSet.CertmanagerV1().ClusterIssuers().Delete(ctx, vaultIssuerName, metav1.DeleteOptions{}) + err := f.CertManagerClientSet.CertmanagerV1().ClusterIssuers().Delete(ctx, vaultIssuerName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) } - f.KubeClientSet.CoreV1().Secrets(vaultSecretNamespace).Delete(ctx, vaultSecretName, metav1.DeleteOptions{}) + err := f.KubeClientSet.CoreV1().Secrets(vaultSecretNamespace).Delete(ctx, vaultSecretName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) }) It("should generate a new valid certificate", func() { @@ -204,7 +207,6 @@ func runVaultAppRoleTests(issuerKind string, testWithRoot bool, unsupportedFeatu } for _, v := range cases { - v := v It("should generate a new certificate "+v.label, func() { By("Creating an Issuer") diff --git a/test/e2e/suite/issuers/vault/certificate/cert_auth.go b/test/e2e/suite/issuers/vault/certificate/cert_auth.go new file mode 100644 index 00000000000..6bc1ab60f5d --- /dev/null +++ b/test/e2e/suite/issuers/vault/certificate/cert_auth.go @@ -0,0 +1,282 @@ +/* +Copyright 2020 The cert-manager 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" + "time" + + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/cert-manager/cert-manager/e2e-tests/framework" + "github.com/cert-manager/cert-manager/e2e-tests/framework/addon" + vaultaddon "github.com/cert-manager/cert-manager/e2e-tests/framework/addon/vault" + "github.com/cert-manager/cert-manager/e2e-tests/framework/helper/featureset" + "github.com/cert-manager/cert-manager/e2e-tests/framework/helper/validation" + "github.com/cert-manager/cert-manager/e2e-tests/util" + cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" + cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" + "github.com/cert-manager/cert-manager/test/unit/gen" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +var _ = framework.CertManagerDescribe("Vault Issuer Certificate (ClientCert, CA without root)", func() { + fs := featureset.NewFeatureSet(featureset.SaveRootCAToSecret) + runVaultClientCertAuthTest(cmapi.IssuerKind, false, fs) +}) +var _ = framework.CertManagerDescribe("Vault Issuer Certificate (ClientCert, CA with root)", func() { + fs := featureset.NewFeatureSet() + runVaultClientCertAuthTest(cmapi.IssuerKind, true, fs) +}) + +var _ = framework.CertManagerDescribe("Vault ClusterIssuer Certificate (ClientCert, CA without root)", func() { + fs := featureset.NewFeatureSet(featureset.SaveRootCAToSecret) + runVaultClientCertAuthTest(cmapi.ClusterIssuerKind, false, fs) +}) +var _ = framework.CertManagerDescribe("Vault ClusterIssuer Certificate (ClientCert, CA with root)", func() { + fs := featureset.NewFeatureSet() + runVaultClientCertAuthTest(cmapi.ClusterIssuerKind, true, fs) +}) + +func runVaultClientCertAuthTest(issuerKind string, testWithRoot bool, unsupportedFeatures featureset.FeatureSet) { + ctx := context.TODO() + f := framework.NewDefaultFramework("create-vault-certificate") + + certificateName := "test-vault-certificate" + certificateSecretName := "test-vault-certificate" + var vaultIssuerName string + + var vaultSecretName, vaultSecretNamespace string + var keyPEM, certPEM []byte + + var setup *vaultaddon.VaultInitializer + + BeforeEach(func() { + By("Configuring the Vault server") + if issuerKind == cmapi.IssuerKind { + vaultSecretNamespace = f.Namespace.Name + } else { + vaultSecretNamespace = f.Config.Addons.CertManager.ClusterResourceNamespace + } + + setup = vaultaddon.NewVaultInitializerClientCertificate( + addon.Base.Details().KubeClient, + *addon.Vault.Details(), + testWithRoot, + ) + Expect(setup.Init(ctx)).NotTo(HaveOccurred(), "failed to init vault") + Expect(setup.Setup(ctx)).NotTo(HaveOccurred(), "failed to setup vault") + + var err error + keyPEM, certPEM, err = setup.CreateClientCertRole(ctx) + Expect(err).NotTo(HaveOccurred()) + + sec, err := f.KubeClientSet.CoreV1().Secrets(vaultSecretNamespace).Create(ctx, &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{GenerateName: "vault-client-cert-"}, + StringData: map[string]string{ + "tls.key": string(keyPEM), + "tls.crt": string(certPEM), + }, + }, metav1.CreateOptions{}) + Expect(err).NotTo(HaveOccurred()) + vaultSecretName = sec.Name + }) + + JustAfterEach(func() { + By("Cleaning up") + Expect(setup.Clean(ctx)).NotTo(HaveOccurred()) + + if issuerKind == cmapi.IssuerKind { + err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, vaultIssuerName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) + } else { + err := f.CertManagerClientSet.CertmanagerV1().ClusterIssuers().Delete(ctx, vaultIssuerName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) + } + + err := f.KubeClientSet.CoreV1().Secrets(vaultSecretNamespace).Delete(ctx, vaultSecretName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) + }) + + It("should generate a new valid certificate", func() { + By("Creating an Issuer") + vaultURL := addon.Vault.Details().URL + + certClient := f.CertManagerClientSet.CertmanagerV1().Certificates(f.Namespace.Name) + + var err error + if issuerKind == cmapi.IssuerKind { + vaultIssuer := gen.IssuerWithRandomName("test-vault-issuer-", + gen.SetIssuerNamespace(f.Namespace.Name), + gen.SetIssuerVaultURL(vaultURL), + gen.SetIssuerVaultPath(setup.IntermediateSignPath()), + gen.SetIssuerVaultCABundle(addon.Vault.Details().VaultCA), + gen.SetIssuerVaultClientCertificateAuth(setup.ClientCertificateAuthPath(), vaultSecretName), + ) + iss, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) + Expect(err).NotTo(HaveOccurred()) + + vaultIssuerName = iss.Name + } else { + vaultIssuer := gen.ClusterIssuerWithRandomName("test-vault-issuer-", + gen.SetIssuerVaultURL(vaultURL), + gen.SetIssuerVaultPath(setup.IntermediateSignPath()), + gen.SetIssuerVaultCABundle(addon.Vault.Details().VaultCA), + gen.SetIssuerVaultClientCertificateAuth(setup.ClientCertificateAuthPath(), vaultSecretName), + ) + iss, err := f.CertManagerClientSet.CertmanagerV1().ClusterIssuers().Create(ctx, vaultIssuer, metav1.CreateOptions{}) + Expect(err).NotTo(HaveOccurred()) + + vaultIssuerName = iss.Name + } + + By("Waiting for Issuer to become Ready") + + if issuerKind == cmapi.IssuerKind { + err = util.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), + vaultIssuerName, + cmapi.IssuerCondition{ + Type: cmapi.IssuerConditionReady, + Status: cmmeta.ConditionTrue, + }) + } else { + err = util.WaitForClusterIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().ClusterIssuers(), + vaultIssuerName, + cmapi.IssuerCondition{ + Type: cmapi.IssuerConditionReady, + Status: cmmeta.ConditionTrue, + }) + } + + Expect(err).NotTo(HaveOccurred()) + + By("Creating a Certificate") + cert, err := certClient.Create(ctx, util.NewCertManagerVaultCertificate(certificateName, certificateSecretName, vaultIssuerName, issuerKind, nil, nil), metav1.CreateOptions{}) + Expect(err).NotTo(HaveOccurred()) + + By("Waiting for the Certificate to be issued...") + cert, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, cert, time.Minute*5) + Expect(err).NotTo(HaveOccurred()) + + By("Validating the issued Certificate...") + err = f.Helper().ValidateCertificate(cert, validation.CertificateSetForUnsupportedFeatureSet(unsupportedFeatures)...) + Expect(err).NotTo(HaveOccurred()) + + }) + + cases := []struct { + inputDuration *metav1.Duration + inputRenewBefore *metav1.Duration + expectedDuration time.Duration + label string + event string + }{ + { + inputDuration: &metav1.Duration{Duration: time.Hour * 24 * 35}, + inputRenewBefore: nil, + expectedDuration: time.Hour * 24 * 35, + label: "valid for 35 days", + }, + { + inputDuration: nil, + inputRenewBefore: nil, + expectedDuration: time.Hour * 24 * 90, + label: "valid for the default value (90 days)", + }, + { + inputDuration: &metav1.Duration{Duration: time.Hour * 24 * 365}, + inputRenewBefore: nil, + expectedDuration: time.Hour * 24 * 90, + label: "with Vault configured maximum TTL duration (90 days) when requested duration is greater than TTL", + }, + { + inputDuration: &metav1.Duration{Duration: time.Hour * 24 * 240}, + inputRenewBefore: &metav1.Duration{Duration: time.Hour * 24 * 120}, + expectedDuration: time.Hour * 24 * 90, + label: "with a warning event when renewBefore is bigger than the duration", + }, + } + + for _, v := range cases { + It("should generate a new certificate "+v.label, func() { + By("Creating an Issuer") + + var err error + if issuerKind == cmapi.IssuerKind { + vaultIssuer := gen.IssuerWithRandomName("test-vault-issuer-", + gen.SetIssuerNamespace(f.Namespace.Name), + gen.SetIssuerVaultURL(addon.Vault.Details().URL), + gen.SetIssuerVaultPath(setup.IntermediateSignPath()), + gen.SetIssuerVaultCABundle(addon.Vault.Details().VaultCA), + gen.SetIssuerVaultClientCertificateAuth(setup.ClientCertificateAuthPath(), vaultSecretName), + ) + iss, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) + Expect(err).NotTo(HaveOccurred()) + + vaultIssuerName = iss.Name + } else { + vaultIssuer := gen.ClusterIssuerWithRandomName("test-vault-issuer-", + gen.SetIssuerVaultURL(addon.Vault.Details().URL), + gen.SetIssuerVaultPath(setup.IntermediateSignPath()), + gen.SetIssuerVaultCABundle(addon.Vault.Details().VaultCA), + gen.SetIssuerVaultClientCertificateAuth(setup.ClientCertificateAuthPath(), vaultSecretName), + ) + iss, err := f.CertManagerClientSet.CertmanagerV1().ClusterIssuers().Create(ctx, vaultIssuer, metav1.CreateOptions{}) + Expect(err).NotTo(HaveOccurred()) + + vaultIssuerName = iss.Name + } + + By("Waiting for Issuer to become Ready") + + if issuerKind == cmapi.IssuerKind { + err = util.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), + vaultIssuerName, + cmapi.IssuerCondition{ + Type: cmapi.IssuerConditionReady, + Status: cmmeta.ConditionTrue, + }) + } else { + err = util.WaitForClusterIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().ClusterIssuers(), + vaultIssuerName, + cmapi.IssuerCondition{ + Type: cmapi.IssuerConditionReady, + Status: cmmeta.ConditionTrue, + }) + } + Expect(err).NotTo(HaveOccurred()) + + By("Creating a Certificate") + cert, err := f.CertManagerClientSet.CertmanagerV1().Certificates(f.Namespace.Name).Create(ctx, util.NewCertManagerVaultCertificate(certificateName, certificateSecretName, vaultIssuerName, issuerKind, v.inputDuration, v.inputRenewBefore), metav1.CreateOptions{}) + Expect(err).NotTo(HaveOccurred()) + + By("Waiting for the Certificate to be issued...") + cert, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, cert, time.Minute*5) + Expect(err).NotTo(HaveOccurred()) + + By("Validating the issued Certificate...") + err = f.Helper().ValidateCertificate(cert, validation.CertificateSetForUnsupportedFeatureSet(unsupportedFeatures)...) + Expect(err).NotTo(HaveOccurred()) + + // Vault subtract 30 seconds to the NotBefore date. + f.CertificateDurationValid(ctx, cert, v.expectedDuration, time.Second*30) + }) + } +} diff --git a/test/e2e/suite/issuers/vault/certificaterequest/approle.go b/test/e2e/suite/issuers/vault/certificaterequest/approle.go index f9e41590705..a89409f720f 100644 --- a/test/e2e/suite/issuers/vault/certificaterequest/approle.go +++ b/test/e2e/suite/issuers/vault/certificaterequest/approle.go @@ -96,12 +96,15 @@ func runVaultAppRoleTests(issuerKind string) { Expect(setup.Clean(ctx)).NotTo(HaveOccurred()) if issuerKind == cmapi.IssuerKind { - f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, vaultIssuerName, metav1.DeleteOptions{}) + err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, vaultIssuerName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) } else { - f.CertManagerClientSet.CertmanagerV1().ClusterIssuers().Delete(ctx, vaultIssuerName, metav1.DeleteOptions{}) + err := f.CertManagerClientSet.CertmanagerV1().ClusterIssuers().Delete(ctx, vaultIssuerName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) } - f.KubeClientSet.CoreV1().Secrets(vaultSecretNamespace).Delete(ctx, vaultSecretName, metav1.DeleteOptions{}) + err := f.KubeClientSet.CoreV1().Secrets(vaultSecretNamespace).Delete(ctx, vaultSecretName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) }) It("should generate a new valid certificate", func() { @@ -153,7 +156,7 @@ func runVaultAppRoleTests(issuerKind string) { Expect(err).NotTo(HaveOccurred()) By("Creating a CertificateRequest") - cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, vaultIssuerName, issuerKind, + cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, f.Namespace.Name, vaultIssuerName, issuerKind, &metav1.Duration{ Duration: time.Hour * 24 * 90, }, @@ -196,7 +199,6 @@ func runVaultAppRoleTests(issuerKind string) { } for _, v := range cases { - v := v It("should generate a new certificate "+v.label, func() { By("Creating an Issuer") @@ -245,7 +247,7 @@ func runVaultAppRoleTests(issuerKind string) { By("Creating a CertificateRequest") crClient := f.CertManagerClientSet.CertmanagerV1().CertificateRequests(f.Namespace.Name) - cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, vaultIssuerName, + cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, f.Namespace.Name, vaultIssuerName, issuerKind, v.inputDuration, crDNSNames, crIPAddresses, nil, x509.RSA) Expect(err).NotTo(HaveOccurred()) _, err = crClient.Create(ctx, cr, metav1.CreateOptions{}) diff --git a/test/e2e/suite/issuers/vault/issuer.go b/test/e2e/suite/issuers/vault/issuer.go index a6a342b99cf..caa00aa6959 100644 --- a/test/e2e/suite/issuers/vault/issuer.go +++ b/test/e2e/suite/issuers/vault/issuer.go @@ -39,7 +39,8 @@ var _ = framework.CertManagerDescribe("Vault Issuer", func() { f := framework.NewDefaultFramework("create-vault-issuer") ctx := context.TODO() - issuerName := "test-vault-issuer" + issuerGeneratorName := "test-vault-issuer-" + var issuerName string vaultSecretServiceAccount := "vault-serviceaccount" var roleId, secretId, vaultSecretName string @@ -62,6 +63,9 @@ var _ = framework.CertManagerDescribe("Vault Issuer", func() { roleId, secretId, err = setup.CreateAppRole(ctx) Expect(err).NotTo(HaveOccurred()) + issuerName = "" + vaultSecretName = "" + By("creating a service account for Vault authentication") err = setup.CreateKubernetesRole(ctx, f.KubeClientSet, f.Namespace.Name, vaultSecretServiceAccount) Expect(err).NotTo(HaveOccurred()) @@ -69,12 +73,20 @@ var _ = framework.CertManagerDescribe("Vault Issuer", func() { JustAfterEach(func() { By("Cleaning up AppRole") - f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(context.TODO(), issuerName, metav1.DeleteOptions{}) - f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(context.TODO(), vaultSecretName, metav1.DeleteOptions{}) - setup.CleanAppRole(ctx) + if issuerName != "" { // When we test validation errors, the issuer won't be created + err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(context.TODO(), issuerName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) + } + if vaultSecretName != "" { + err := f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(context.TODO(), vaultSecretName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) + } + err := setup.CleanAppRole(ctx) + Expect(err).NotTo(HaveOccurred()) By("Cleaning up Kubernetes") - setup.CleanKubernetesRole(ctx, f.KubeClientSet, f.Namespace.Name, vaultSecretServiceAccount) + err = setup.CleanKubernetesRole(ctx, f.KubeClientSet, f.Namespace.Name, vaultSecretServiceAccount) + Expect(err).NotTo(HaveOccurred()) By("Cleaning up Vault") Expect(setup.Clean(ctx)).NotTo(HaveOccurred()) @@ -86,18 +98,20 @@ var _ = framework.CertManagerDescribe("Vault Issuer", func() { vaultSecretName = sec.Name - vaultIssuer := gen.IssuerWithRandomName(issuerName, + vaultIssuer := gen.IssuerWithRandomName(issuerGeneratorName, gen.SetIssuerNamespace(f.Namespace.Name), gen.SetIssuerVaultURL(addon.Vault.Details().URL), gen.SetIssuerVaultPath(setup.IntermediateSignPath()), gen.SetIssuerVaultCABundle(addon.Vault.Details().VaultCA), gen.SetIssuerVaultAppRoleAuth("secretkey", vaultSecretName, roleId, setup.AppRoleAuthPath())) - iss, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(context.TODO(), vaultIssuer, metav1.CreateOptions{}) + vaultIssuer, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(context.TODO(), vaultIssuer, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) + issuerName = vaultIssuer.Name + By("Waiting for Issuer to become Ready") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - iss.Name, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionTrue, @@ -107,18 +121,20 @@ var _ = framework.CertManagerDescribe("Vault Issuer", func() { It("should fail to init with missing Vault AppRole", func() { By("Creating an Issuer") - vaultIssuer := gen.IssuerWithRandomName(issuerName, + vaultIssuer := gen.IssuerWithRandomName(issuerGeneratorName, gen.SetIssuerNamespace(f.Namespace.Name), gen.SetIssuerVaultURL(addon.Vault.Details().URL), gen.SetIssuerVaultPath(setup.IntermediateSignPath()), gen.SetIssuerVaultCABundle(addon.Vault.Details().VaultCA), gen.SetIssuerVaultAppRoleAuth("secretkey", roleId, setup.Role(), setup.AppRoleAuthPath())) - iss, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(context.TODO(), vaultIssuer, metav1.CreateOptions{}) + vaultIssuer, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(context.TODO(), vaultIssuer, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) + issuerName = vaultIssuer.Name + By("Waiting for Issuer to become Ready") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - iss.Name, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionFalse, @@ -128,18 +144,20 @@ var _ = framework.CertManagerDescribe("Vault Issuer", func() { It("should fail to init with missing Vault Token", func() { By("Creating an Issuer") - vaultIssuer := gen.Issuer(issuerName, + vaultIssuer := gen.IssuerWithRandomName(issuerGeneratorName, gen.SetIssuerNamespace(f.Namespace.Name), gen.SetIssuerVaultURL(addon.Vault.Details().URL), gen.SetIssuerVaultPath(setup.IntermediateSignPath()), gen.SetIssuerVaultCABundle(addon.Vault.Details().VaultCA), gen.SetIssuerVaultTokenAuth("secretkey", "vault-token")) - _, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(context.TODO(), vaultIssuer, metav1.CreateOptions{}) + vaultIssuer, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(context.TODO(), vaultIssuer, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) + issuerName = vaultIssuer.Name + By("Waiting for Issuer to become Ready") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - issuerName, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionFalse, @@ -152,18 +170,20 @@ var _ = framework.CertManagerDescribe("Vault Issuer", func() { _, err := f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Create(context.TODO(), vaultaddon.NewVaultKubernetesSecret(saTokenSecretName, vaultSecretServiceAccount), metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) - vaultIssuer := gen.Issuer(issuerName, + vaultIssuer := gen.IssuerWithRandomName(issuerGeneratorName, gen.SetIssuerNamespace(f.Namespace.Name), gen.SetIssuerVaultURL(addon.Vault.Details().URL), gen.SetIssuerVaultPath(setup.IntermediateSignPath()), gen.SetIssuerVaultCABundle(addon.Vault.Details().VaultCA), gen.SetIssuerVaultKubernetesAuthSecret("token", saTokenSecretName, setup.Role(), setup.KubernetesAuthPath())) - _, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(context.TODO(), vaultIssuer, metav1.CreateOptions{}) + vaultIssuer, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(context.TODO(), vaultIssuer, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) + issuerName = vaultIssuer.Name + By("Waiting for Issuer to become Ready") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - issuerName, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionTrue, @@ -176,17 +196,20 @@ var _ = framework.CertManagerDescribe("Vault Issuer", func() { // we test without creating the secret By("Creating an Issuer") - vaultIssuer := gen.Issuer(issuerName, + vaultIssuer := gen.IssuerWithRandomName(issuerGeneratorName, gen.SetIssuerNamespace(f.Namespace.Name), gen.SetIssuerVaultURL(addon.Vault.Details().URL), gen.SetIssuerVaultPath(setup.IntermediateSignPath()), gen.SetIssuerVaultCABundle(addon.Vault.Details().VaultCA), gen.SetIssuerVaultKubernetesAuthSecret("token", saTokenSecretName, setup.Role(), setup.KubernetesAuthPath())) - _, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(context.TODO(), vaultIssuer, metav1.CreateOptions{}) + vaultIssuer, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(context.TODO(), vaultIssuer, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) + + issuerName = vaultIssuer.Name + By("Waiting for Issuer to become Ready") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - issuerName, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionFalse, @@ -196,7 +219,7 @@ var _ = framework.CertManagerDescribe("Vault Issuer", func() { It("should fail to init when both caBundle and caBundleSecretRef are set", func() { By("Creating an Issuer") - vaultIssuer := gen.Issuer(issuerName, + vaultIssuer := gen.IssuerWithRandomName(issuerGeneratorName, gen.SetIssuerNamespace(f.Namespace.Name), gen.SetIssuerVaultURL(addon.Vault.Details().URL), gen.SetIssuerVaultPath(setup.IntermediateSignPath()), @@ -204,6 +227,7 @@ var _ = framework.CertManagerDescribe("Vault Issuer", func() { gen.SetIssuerVaultCABundleSecretRef("ca-bundle", f.Namespace.Name, "ca.crt")) _, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(context.TODO(), vaultIssuer, metav1.CreateOptions{}) Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(ContainSubstring( "spec.vault.caBundle: Invalid value: \"\": specified caBundle and caBundleSecretRef cannot be used together", )) @@ -226,18 +250,20 @@ var _ = framework.CertManagerDescribe("Vault Issuer", func() { }, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) - vaultIssuer := gen.Issuer(issuerName, + vaultIssuer := gen.IssuerWithRandomName(issuerGeneratorName, gen.SetIssuerNamespace(f.Namespace.Name), gen.SetIssuerVaultURL(addon.Vault.Details().URL), gen.SetIssuerVaultPath(setup.IntermediateSignPath()), gen.SetIssuerVaultCABundleSecretRef("ca-bundle", f.Namespace.Name, "ca.crt"), gen.SetIssuerVaultKubernetesAuthSecret("token", saTokenSecretName, setup.Role(), setup.KubernetesAuthPath())) - _, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(context.TODO(), vaultIssuer, metav1.CreateOptions{}) + vaultIssuer, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(context.TODO(), vaultIssuer, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) + issuerName = vaultIssuer.Name + By("Waiting for Issuer to become Ready") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - issuerName, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionTrue, @@ -250,18 +276,20 @@ var _ = framework.CertManagerDescribe("Vault Issuer", func() { _, err := f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Create(context.TODO(), vaultaddon.NewVaultKubernetesSecret(saTokenSecretName, vaultSecretServiceAccount), metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) - vaultIssuer := gen.Issuer(issuerName, + vaultIssuer := gen.IssuerWithRandomName(issuerGeneratorName, gen.SetIssuerNamespace(f.Namespace.Name), gen.SetIssuerVaultURL(addon.Vault.Details().URL), gen.SetIssuerVaultPath(setup.IntermediateSignPath()), gen.SetIssuerVaultCABundleSecretRef("ca-bundle", f.Namespace.Name, "ca.crt"), gen.SetIssuerVaultKubernetesAuthSecret("token", saTokenSecretName, setup.Role(), setup.KubernetesAuthPath())) - _, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(context.TODO(), vaultIssuer, metav1.CreateOptions{}) + vaultIssuer, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(context.TODO(), vaultIssuer, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) + issuerName = vaultIssuer.Name + By("Validate that the Issuer is not ready yet") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - issuerName, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionFalse, @@ -281,7 +309,7 @@ var _ = framework.CertManagerDescribe("Vault Issuer", func() { By("Waiting for Issuer to become Ready") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - issuerName, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionTrue, @@ -305,18 +333,20 @@ var _ = framework.CertManagerDescribe("Vault Issuer", func() { }, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) - vaultIssuer := gen.Issuer(issuerName, + vaultIssuer := gen.IssuerWithRandomName(issuerGeneratorName, gen.SetIssuerNamespace(f.Namespace.Name), gen.SetIssuerVaultURL(addon.Vault.Details().URL), gen.SetIssuerVaultPath(setup.IntermediateSignPath()), gen.SetIssuerVaultCABundleSecretRef("ca-bundle", f.Namespace.Name, "ca.crt"), gen.SetIssuerVaultKubernetesAuthSecret("token", saTokenSecretName, setup.Role(), setup.KubernetesAuthPath())) - _, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(context.TODO(), vaultIssuer, metav1.CreateOptions{}) + vaultIssuer, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(context.TODO(), vaultIssuer, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) + issuerName = vaultIssuer.Name + By("Waiting for Issuer to become Ready") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - issuerName, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionTrue, @@ -338,7 +368,7 @@ var _ = framework.CertManagerDescribe("Vault Issuer", func() { By("Validate that the issuer isn't ready anymore due to Vault still using the old certificate") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - issuerName, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionFalse, @@ -349,22 +379,28 @@ var _ = framework.CertManagerDescribe("Vault Issuer", func() { // Note that we reuse the same service account as for the Kubernetes // auth based on secretRef. There should be no problem doing so. By("Creating the Role and RoleBinding to let cert-manager use TokenRequest for the ServiceAccount") - vaultaddon.CreateKubernetesRoleForServiceAccountRefAuth(ctx, f.KubeClientSet, setup.Role(), f.Namespace.Name, vaultSecretServiceAccount) - defer vaultaddon.CleanKubernetesRoleForServiceAccountRefAuth(ctx, f.KubeClientSet, setup.Role(), f.Namespace.Name, vaultSecretServiceAccount) + err := vaultaddon.CreateKubernetesRoleForServiceAccountRefAuth(ctx, f.KubeClientSet, setup.Role(), f.Namespace.Name, vaultSecretServiceAccount) + Expect(err).NotTo(HaveOccurred()) + defer func() { + err := vaultaddon.CleanKubernetesRoleForServiceAccountRefAuth(ctx, f.KubeClientSet, setup.Role(), f.Namespace.Name, vaultSecretServiceAccount) + Expect(err).NotTo(HaveOccurred()) + }() By("Creating an Issuer") - vaultIssuer := gen.Issuer(issuerName, + vaultIssuer := gen.IssuerWithRandomName(issuerGeneratorName, gen.SetIssuerNamespace(f.Namespace.Name), gen.SetIssuerVaultURL(addon.Vault.Details().URL), gen.SetIssuerVaultPath(setup.IntermediateSignPath()), gen.SetIssuerVaultCABundle(addon.Vault.Details().VaultCA), gen.SetIssuerVaultKubernetesAuthServiceAccount(vaultSecretServiceAccount, setup.Role(), setup.KubernetesAuthPath())) - _, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(context.TODO(), vaultIssuer, metav1.CreateOptions{}) + vaultIssuer, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(context.TODO(), vaultIssuer, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) + issuerName = vaultIssuer.Name + By("Waiting for Issuer to become Ready") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - issuerName, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionTrue, diff --git a/test/e2e/suite/issuers/vault/mtls.go b/test/e2e/suite/issuers/vault/mtls.go index 584fbd28c52..b8c1a48c9b4 100644 --- a/test/e2e/suite/issuers/vault/mtls.go +++ b/test/e2e/suite/issuers/vault/mtls.go @@ -39,7 +39,8 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { f := framework.NewDefaultFramework("create-vault-issuer") ctx := context.TODO() - issuerName := "test-vault-issuer" + issuerGeneratorName := "test-vault-issuer-" + var issuerName string vaultSecretServiceAccount := "vault-serviceaccount" vaultClientCertificateSecretName := "vault-client-cert-secret-" + rand.String(5) var roleId, secretId, vaultSecretName string @@ -65,6 +66,9 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { roleId, secretId, err = setup.CreateAppRole(ctx) Expect(err).NotTo(HaveOccurred()) + issuerName = "" + vaultSecretName = "" + By("creating a service account for Vault authentication") err = setup.CreateKubernetesRole(ctx, f.KubeClientSet, f.Namespace.Name, vaultSecretServiceAccount) Expect(err).NotTo(HaveOccurred()) @@ -77,12 +81,20 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { JustAfterEach(func() { By("Cleaning up AppRole") - f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, issuerName, metav1.DeleteOptions{}) - f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(ctx, vaultSecretName, metav1.DeleteOptions{}) - setup.CleanAppRole(ctx) + if issuerName != "" { // When we test validation errors, the issuer won't be created + err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, issuerName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) + } + if vaultSecretName != "" { + err := f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(ctx, vaultSecretName, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) + } + err := setup.CleanAppRole(ctx) + Expect(err).NotTo(HaveOccurred()) By("Cleaning up Kubernetes") - setup.CleanKubernetesRole(ctx, f.KubeClientSet, f.Namespace.Name, vaultSecretServiceAccount) + err = setup.CleanKubernetesRole(ctx, f.KubeClientSet, f.Namespace.Name, vaultSecretServiceAccount) + Expect(err).NotTo(HaveOccurred()) By("Cleaning up Vault") Expect(setup.Clean(ctx)).NotTo(HaveOccurred()) @@ -94,7 +106,7 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { vaultSecretName = sec.Name - vaultIssuer := gen.IssuerWithRandomName(issuerName, + vaultIssuer := gen.IssuerWithRandomName(issuerGeneratorName, gen.SetIssuerNamespace(f.Namespace.Name), gen.SetIssuerVaultURL(details.URL), gen.SetIssuerVaultPath(setup.IntermediateSignPath()), @@ -102,12 +114,14 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { gen.SetIssuerVaultClientCertSecretRef(vaultClientCertificateSecretName, corev1.TLSCertKey), gen.SetIssuerVaultClientKeySecretRef(vaultClientCertificateSecretName, corev1.TLSPrivateKeyKey), gen.SetIssuerVaultAppRoleAuth("secretkey", vaultSecretName, roleId, setup.AppRoleAuthPath())) - iss, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) + vaultIssuer, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) + issuerName = vaultIssuer.Name + By("Waiting for Issuer to become Ready") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - iss.Name, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionTrue, @@ -122,18 +136,20 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { vaultSecretName = sec.Name By("Creating an Issuer") - vaultIssuer := gen.IssuerWithRandomName(issuerName, + vaultIssuer := gen.IssuerWithRandomName(issuerGeneratorName, gen.SetIssuerNamespace(f.Namespace.Name), gen.SetIssuerVaultURL(details.URL), gen.SetIssuerVaultPath(setup.IntermediateSignPath()), gen.SetIssuerVaultCABundle(details.VaultCA), gen.SetIssuerVaultAppRoleAuth("secretkey", vaultSecretName, roleId, setup.AppRoleAuthPath())) - iss, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) + vaultIssuer, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) + issuerName = vaultIssuer.Name + By("Waiting for Issuer to become Ready") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - iss.Name, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionFalse, @@ -143,7 +159,7 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { It("should fail to init with missing Vault AppRole", func() { By("Creating an Issuer") - vaultIssuer := gen.IssuerWithRandomName(issuerName, + vaultIssuer := gen.IssuerWithRandomName(issuerGeneratorName, gen.SetIssuerNamespace(f.Namespace.Name), gen.SetIssuerVaultURL(details.URL), gen.SetIssuerVaultPath(setup.IntermediateSignPath()), @@ -151,12 +167,14 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { gen.SetIssuerVaultClientCertSecretRef(vaultClientCertificateSecretName, corev1.TLSCertKey), gen.SetIssuerVaultClientKeySecretRef(vaultClientCertificateSecretName, corev1.TLSPrivateKeyKey), gen.SetIssuerVaultAppRoleAuth("secretkey", roleId, setup.Role(), setup.AppRoleAuthPath())) - iss, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) + vaultIssuer, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) + issuerName = vaultIssuer.Name + By("Waiting for Issuer to become Ready") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - iss.Name, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionFalse, @@ -166,7 +184,7 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { It("should fail to init with missing Vault Token", func() { By("Creating an Issuer") - vaultIssuer := gen.Issuer(issuerName, + vaultIssuer := gen.IssuerWithRandomName(issuerGeneratorName, gen.SetIssuerNamespace(f.Namespace.Name), gen.SetIssuerVaultURL(details.URL), gen.SetIssuerVaultPath(setup.IntermediateSignPath()), @@ -174,12 +192,14 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { gen.SetIssuerVaultClientCertSecretRef(vaultClientCertificateSecretName, corev1.TLSCertKey), gen.SetIssuerVaultClientKeySecretRef(vaultClientCertificateSecretName, corev1.TLSPrivateKeyKey), gen.SetIssuerVaultTokenAuth("secretkey", "vault-token")) - _, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) + vaultIssuer, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) + issuerName = vaultIssuer.Name + By("Waiting for Issuer to become Ready") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - issuerName, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionFalse, @@ -192,7 +212,7 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { _, err := f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Create(ctx, vaultaddon.NewVaultKubernetesSecret(saTokenSecretName, vaultSecretServiceAccount), metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) - vaultIssuer := gen.Issuer(issuerName, + vaultIssuer := gen.IssuerWithRandomName(issuerGeneratorName, gen.SetIssuerNamespace(f.Namespace.Name), gen.SetIssuerVaultURL(details.URL), gen.SetIssuerVaultPath(setup.IntermediateSignPath()), @@ -200,12 +220,14 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { gen.SetIssuerVaultClientCertSecretRef(vaultClientCertificateSecretName, corev1.TLSCertKey), gen.SetIssuerVaultClientKeySecretRef(vaultClientCertificateSecretName, corev1.TLSPrivateKeyKey), gen.SetIssuerVaultKubernetesAuthSecret("token", saTokenSecretName, setup.Role(), setup.KubernetesAuthPath())) - _, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) + vaultIssuer, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) + issuerName = vaultIssuer.Name + By("Waiting for Issuer to become Ready") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - issuerName, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionTrue, @@ -218,7 +240,7 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { // we test without creating the secret By("Creating an Issuer") - vaultIssuer := gen.Issuer(issuerName, + vaultIssuer := gen.IssuerWithRandomName(issuerGeneratorName, gen.SetIssuerNamespace(f.Namespace.Name), gen.SetIssuerVaultURL(details.URL), gen.SetIssuerVaultPath(setup.IntermediateSignPath()), @@ -226,11 +248,14 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { gen.SetIssuerVaultClientCertSecretRef(vaultClientCertificateSecretName, corev1.TLSCertKey), gen.SetIssuerVaultClientKeySecretRef(vaultClientCertificateSecretName, corev1.TLSPrivateKeyKey), gen.SetIssuerVaultKubernetesAuthSecret("token", saTokenSecretName, setup.Role(), setup.KubernetesAuthPath())) - _, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) + vaultIssuer, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) + + issuerName = vaultIssuer.Name + By("Waiting for Issuer to become Ready") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - issuerName, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionFalse, @@ -240,7 +265,7 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { It("should fail to init when both caBundle and caBundleSecretRef are set", func() { By("Creating an Issuer") - vaultIssuer := gen.Issuer(issuerName, + vaultIssuer := gen.IssuerWithRandomName(issuerGeneratorName, gen.SetIssuerNamespace(f.Namespace.Name), gen.SetIssuerVaultURL(details.URL), gen.SetIssuerVaultPath(setup.IntermediateSignPath()), @@ -250,6 +275,7 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { gen.SetIssuerVaultCABundleSecretRef("ca-bundle", f.Namespace.Name, "ca.crt")) _, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(ContainSubstring( "spec.vault.caBundle: Invalid value: \"\": specified caBundle and caBundleSecretRef cannot be used together", )) @@ -272,7 +298,7 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { }, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) - vaultIssuer := gen.Issuer(issuerName, + vaultIssuer := gen.IssuerWithRandomName(issuerGeneratorName, gen.SetIssuerNamespace(f.Namespace.Name), gen.SetIssuerVaultURL(details.URL), gen.SetIssuerVaultPath(setup.IntermediateSignPath()), @@ -280,12 +306,14 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { gen.SetIssuerVaultClientCertSecretRef(vaultClientCertificateSecretName, corev1.TLSCertKey), gen.SetIssuerVaultClientKeySecretRef(vaultClientCertificateSecretName, corev1.TLSPrivateKeyKey), gen.SetIssuerVaultKubernetesAuthSecret("token", saTokenSecretName, setup.Role(), setup.KubernetesAuthPath())) - _, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) + vaultIssuer, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) + issuerName = vaultIssuer.Name + By("Waiting for Issuer to become Ready") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - issuerName, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionTrue, @@ -298,7 +326,7 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { _, err := f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Create(ctx, vaultaddon.NewVaultKubernetesSecret(saTokenSecretName, vaultSecretServiceAccount), metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) - vaultIssuer := gen.Issuer(issuerName, + vaultIssuer := gen.IssuerWithRandomName(issuerGeneratorName, gen.SetIssuerNamespace(f.Namespace.Name), gen.SetIssuerVaultURL(details.URL), gen.SetIssuerVaultPath(setup.IntermediateSignPath()), @@ -306,12 +334,14 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { gen.SetIssuerVaultClientCertSecretRef(vaultClientCertificateSecretName, corev1.TLSCertKey), gen.SetIssuerVaultClientKeySecretRef(vaultClientCertificateSecretName, corev1.TLSPrivateKeyKey), gen.SetIssuerVaultKubernetesAuthSecret("token", saTokenSecretName, setup.Role(), setup.KubernetesAuthPath())) - _, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) + vaultIssuer, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) + issuerName = vaultIssuer.Name + By("Validate that the Issuer is not ready yet") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - issuerName, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionFalse, @@ -331,7 +361,7 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { By("Waiting for Issuer to become Ready") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - issuerName, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionTrue, @@ -346,7 +376,7 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { vaultSecretName = sec.Name customVaultClientCertificateSecretName := "vault-client-cert-secret-custom-" + rand.String(5) - vaultIssuer := gen.Issuer(issuerName, + vaultIssuer := gen.IssuerWithRandomName(issuerGeneratorName, gen.SetIssuerNamespace(f.Namespace.Name), gen.SetIssuerVaultURL(details.URL), gen.SetIssuerVaultPath(setup.IntermediateSignPath()), @@ -354,12 +384,14 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { gen.SetIssuerVaultClientCertSecretRef(customVaultClientCertificateSecretName, corev1.TLSCertKey), gen.SetIssuerVaultClientKeySecretRef(customVaultClientCertificateSecretName, corev1.TLSPrivateKeyKey), gen.SetIssuerVaultAppRoleAuth("secretkey", vaultSecretName, roleId, setup.AppRoleAuthPath())) - iss, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) + vaultIssuer, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) + issuerName = vaultIssuer.Name + By("Validate that the Issuer is not ready yet") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - issuerName, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionFalse, @@ -373,7 +405,7 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { By("Waiting for Issuer to become Ready") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - iss.Name, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionTrue, @@ -397,7 +429,7 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { }, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) - vaultIssuer := gen.Issuer(issuerName, + vaultIssuer := gen.IssuerWithRandomName(issuerGeneratorName, gen.SetIssuerNamespace(f.Namespace.Name), gen.SetIssuerVaultURL(details.URL), gen.SetIssuerVaultPath(setup.IntermediateSignPath()), @@ -405,12 +437,14 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { gen.SetIssuerVaultClientCertSecretRef(vaultClientCertificateSecretName, corev1.TLSCertKey), gen.SetIssuerVaultClientKeySecretRef(vaultClientCertificateSecretName, corev1.TLSPrivateKeyKey), gen.SetIssuerVaultKubernetesAuthSecret("token", saTokenSecretName, setup.Role(), setup.KubernetesAuthPath())) - _, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) + vaultIssuer, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) + issuerName = vaultIssuer.Name + By("Waiting for Issuer to become Ready") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - issuerName, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionTrue, @@ -432,7 +466,7 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { By("Validate that the issuer isn't ready anymore due to Vault still using the old certificate") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - issuerName, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionFalse, @@ -443,11 +477,15 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { // Note that we reuse the same service account as for the Kubernetes // auth based on secretRef. There should be no problem doing so. By("Creating the Role and RoleBinding to let cert-manager use TokenRequest for the ServiceAccount") - vaultaddon.CreateKubernetesRoleForServiceAccountRefAuth(ctx, f.KubeClientSet, setup.Role(), f.Namespace.Name, vaultSecretServiceAccount) - defer vaultaddon.CleanKubernetesRoleForServiceAccountRefAuth(ctx, f.KubeClientSet, setup.Role(), f.Namespace.Name, vaultSecretServiceAccount) + err := vaultaddon.CreateKubernetesRoleForServiceAccountRefAuth(ctx, f.KubeClientSet, setup.Role(), f.Namespace.Name, vaultSecretServiceAccount) + Expect(err).NotTo(HaveOccurred()) + defer func() { + err := vaultaddon.CleanKubernetesRoleForServiceAccountRefAuth(ctx, f.KubeClientSet, setup.Role(), f.Namespace.Name, vaultSecretServiceAccount) + Expect(err).NotTo(HaveOccurred()) + }() By("Creating an Issuer") - vaultIssuer := gen.Issuer(issuerName, + vaultIssuer := gen.IssuerWithRandomName(issuerGeneratorName, gen.SetIssuerNamespace(f.Namespace.Name), gen.SetIssuerVaultURL(details.URL), gen.SetIssuerVaultPath(setup.IntermediateSignPath()), @@ -455,12 +493,14 @@ var _ = framework.CertManagerDescribe("Vault Issuer [mtls]", func() { gen.SetIssuerVaultClientCertSecretRef(vaultClientCertificateSecretName, corev1.TLSCertKey), gen.SetIssuerVaultClientKeySecretRef(vaultClientCertificateSecretName, corev1.TLSPrivateKeyKey), gen.SetIssuerVaultKubernetesAuthServiceAccount(vaultSecretServiceAccount, setup.Role(), setup.KubernetesAuthPath())) - _, err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) + vaultIssuer, err = f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Create(ctx, vaultIssuer, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) + issuerName = vaultIssuer.Name + By("Waiting for Issuer to become Ready") err = e2eutil.WaitForIssuerCondition(ctx, f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name), - issuerName, + vaultIssuer.Name, v1.IssuerCondition{ Type: v1.IssuerConditionReady, Status: cmmeta.ConditionTrue, diff --git a/test/e2e/suite/issuers/venafi/cloud/setup.go b/test/e2e/suite/issuers/venafi/cloud/setup.go index f790e59828f..29588f6ba00 100644 --- a/test/e2e/suite/issuers/venafi/cloud/setup.go +++ b/test/e2e/suite/issuers/venafi/cloud/setup.go @@ -52,7 +52,8 @@ var _ = CloudDescribe("properly configured Venafi Cloud Issuer", func() { AfterEach(func() { By("Cleaning up") - f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(context.TODO(), issuer.Name, metav1.DeleteOptions{}) + err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(context.TODO(), issuer.Name, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) }) It("should set Ready=True accordingly", func() { diff --git a/test/e2e/suite/issuers/venafi/tpp/certificate.go b/test/e2e/suite/issuers/venafi/tpp/certificate.go index d84403c53e1..81ef117c11f 100644 --- a/test/e2e/suite/issuers/venafi/tpp/certificate.go +++ b/test/e2e/suite/issuers/venafi/tpp/certificate.go @@ -73,7 +73,8 @@ var _ = TPPDescribe("Certificate with a properly configured Issuer", func() { AfterEach(func() { By("Cleaning up") if issuer != nil { - f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(context.TODO(), issuer.Name, metav1.DeleteOptions{}) + err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(context.TODO(), issuer.Name, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) } }) diff --git a/test/e2e/suite/issuers/venafi/tpp/certificaterequest.go b/test/e2e/suite/issuers/venafi/tpp/certificaterequest.go index ecde72da404..ed4a8baebbf 100644 --- a/test/e2e/suite/issuers/venafi/tpp/certificaterequest.go +++ b/test/e2e/suite/issuers/venafi/tpp/certificaterequest.go @@ -83,7 +83,7 @@ var _ = TPPDescribe("CertificateRequest with a properly configured Issuer", func dnsNames := []string{rand.String(10) + ".venafi-e2e.example"} - cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, issuer.Name, cmapi.IssuerKind, nil, dnsNames, nil, nil, x509.RSA) + cr, key, err := util.NewCertManagerBasicCertificateRequest(certificateRequestName, f.Namespace.Name, issuer.Name, cmapi.IssuerKind, nil, dnsNames, nil, nil, x509.RSA) Expect(err).NotTo(HaveOccurred()) By("Creating a CertificateRequest") diff --git a/test/e2e/suite/issuers/venafi/tpp/setup.go b/test/e2e/suite/issuers/venafi/tpp/setup.go index 46f1a03668f..72221ba4d73 100644 --- a/test/e2e/suite/issuers/venafi/tpp/setup.go +++ b/test/e2e/suite/issuers/venafi/tpp/setup.go @@ -49,7 +49,8 @@ var _ = TPPDescribe("properly configured Venafi TPP Issuer", func() { AfterEach(func() { By("Cleaning up") if issuer != nil { - f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, issuer.Name, metav1.DeleteOptions{}) + err := f.CertManagerClientSet.CertmanagerV1().Issuers(f.Namespace.Name).Delete(ctx, issuer.Name, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) } }) diff --git a/test/e2e/suite/serving/cainjector.go b/test/e2e/suite/serving/cainjector.go index ca358a54a3a..755af4a2972 100644 --- a/test/e2e/suite/serving/cainjector.go +++ b/test/e2e/suite/serving/cainjector.go @@ -162,7 +162,7 @@ var _ = framework.CertManagerDescribe("CA Injector", func() { injectable, cert := generalSetup(test.makeInjectable("changed")) By("changing the name of the corresponding secret in the cert") - retry.RetryOnConflict(retry.DefaultRetry, func() error { + err := retry.RetryOnConflict(retry.DefaultRetry, func() error { err := f.CRClient.Get(context.Background(), types.NamespacedName{Name: cert.Name, Namespace: cert.Namespace}, cert) if err != nil { return err @@ -176,8 +176,9 @@ var _ = framework.CertManagerDescribe("CA Injector", func() { } return nil }) + Expect(err).NotTo(HaveOccurred()) - cert, err := f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, cert, time.Minute*2) + cert, err = f.Helper().WaitForCertificateReadyAndDoneIssuing(ctx, cert, time.Minute*2) Expect(err).NotTo(HaveOccurred(), "failed to wait for Certificate to become updated") By("grabbing the new secret") diff --git a/test/e2e/util/util.go b/test/e2e/util/util.go index f745b659af0..2b355892b42 100644 --- a/test/e2e/util/util.go +++ b/test/e2e/util/util.go @@ -22,8 +22,6 @@ import ( "context" "crypto" "crypto/x509" - "crypto/x509/pkix" - "encoding/pem" "fmt" "net" "net/url" @@ -46,7 +44,7 @@ import ( cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" clientset "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1" "github.com/cert-manager/cert-manager/pkg/util" - "github.com/cert-manager/cert-manager/pkg/util/pki" + "github.com/cert-manager/cert-manager/test/unit/gen" ) func CertificateOnlyValidForDomains(cert *x509.Certificate, commonName string, dnsNames ...string) bool { @@ -163,8 +161,13 @@ func WaitForCRDToNotExist(ctx context.Context, client apiextensionsv1.CustomReso } // Deprecated: use test/unit/gen/CertificateRequest in future -func NewCertManagerBasicCertificateRequest(name, issuerName string, issuerKind string, duration *metav1.Duration, - dnsNames []string, ips []net.IP, uris []string, keyAlgorithm x509.PublicKeyAlgorithm) (*v1.CertificateRequest, crypto.Signer, error) { +func NewCertManagerBasicCertificateRequest( + name, namespace string, + issuerName, issuerKind string, + duration *metav1.Duration, + dnsNames []string, ips []net.IP, uris []string, + keyAlgorithm x509.PublicKeyAlgorithm, +) (*v1.CertificateRequest, crypto.Signer, error) { cn := "test.domain.com" if len(dnsNames) > 0 { cn = dnsNames[0] @@ -179,71 +182,28 @@ func NewCertManagerBasicCertificateRequest(name, issuerName string, issuerKind s parsedURIs = append(parsedURIs, parsed) } - var sk crypto.Signer - var signatureAlgorithm x509.SignatureAlgorithm - var err error - - switch keyAlgorithm { - case x509.RSA: - sk, err = pki.GenerateRSAPrivateKey(2048) - if err != nil { - return nil, nil, err - } - signatureAlgorithm = x509.SHA256WithRSA - case x509.ECDSA: - sk, err = pki.GenerateECPrivateKey(pki.ECCurve256) - if err != nil { - return nil, nil, err - } - signatureAlgorithm = x509.ECDSAWithSHA256 - case x509.Ed25519: - sk, err = pki.GenerateEd25519PrivateKey() - if err != nil { - return nil, nil, err - } - signatureAlgorithm = x509.PureEd25519 - default: - return nil, nil, fmt.Errorf("unrecognised key algorithm: %s", err) - } - - csr := &x509.CertificateRequest{ - Version: 0, - SignatureAlgorithm: signatureAlgorithm, - PublicKeyAlgorithm: keyAlgorithm, - PublicKey: sk.Public(), - Subject: pkix.Name{ - CommonName: cn, - }, - DNSNames: dnsNames, - IPAddresses: ips, - URIs: parsedURIs, - } - - csrBytes, err := pki.EncodeCSR(csr, sk) + csrPEM, sk, err := gen.CSR(keyAlgorithm, + gen.SetCSRCommonName(cn), + gen.SetCSRDNSNames(dnsNames...), + gen.SetCSRIPAddresses(ips...), + gen.SetCSRURIs(parsedURIs...), + ) if err != nil { return nil, nil, err } - csrPEM := pem.EncodeToMemory(&pem.Block{ - Type: "CERTIFICATE REQUEST", Bytes: csrBytes, - }) - - return &v1.CertificateRequest{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - }, - Spec: v1.CertificateRequestSpec{ - Duration: duration, - Request: csrPEM, - IssuerRef: cmmeta.ObjectReference{ - Name: issuerName, - Kind: issuerKind, - }, - }, - }, sk, nil + return gen.CertificateRequest(name, + gen.SetCertificateRequestNamespace(namespace), + gen.SetCertificateRequestDuration(duration), + gen.SetCertificateRequestCSR(csrPEM), + gen.SetCertificateRequestIssuer(cmmeta.ObjectReference{ + Name: issuerName, + Kind: issuerKind, + }), + ), sk, nil } -func NewCertManagerVaultCertificate(name, secretName, issuerName string, issuerKind string, duration, renewBefore *metav1.Duration) *v1.Certificate { +func NewCertManagerVaultCertificate(name, secretName, issuerName string, issuerKind string, duration *metav1.Duration, renewBefore *metav1.Duration) *v1.Certificate { return &v1.Certificate{ ObjectMeta: metav1.ObjectMeta{ Name: name, diff --git a/test/integration/LICENSES b/test/integration/LICENSES index 26d55bc5dc8..2b045e6b2e6 100644 --- a/test/integration/LICENSES +++ b/test/integration/LICENSES @@ -1,5 +1,6 @@ github.com/Azure/go-ntlmssp,https://github.com/Azure/go-ntlmssp/blob/754e69321358/LICENSE,MIT -github.com/antlr/antlr4/runtime/Go/antlr/v4,https://github.com/antlr/antlr4/blob/8188dc5388df/runtime/Go/antlr/v4/LICENSE,BSD-3-Clause +github.com/antlr4-go/antlr/v4,https://github.com/antlr4-go/antlr/blob/v4.13.0/LICENSE,BSD-3-Clause +github.com/asaskevich/govalidator,https://github.com/asaskevich/govalidator/blob/a9d515a09cc2/LICENSE,MIT github.com/beorn7/perks/quantile,https://github.com/beorn7/perks/blob/v1.0.1/LICENSE,MIT github.com/blang/semver/v4,https://github.com/blang/semver/blob/v4.0.0/v4/LICENSE,MIT github.com/cenkalti/backoff/v4,https://github.com/cenkalti/backoff/blob/v4.3.0/LICENSE,MIT @@ -9,13 +10,14 @@ github.com/cespare/xxhash/v2,https://github.com/cespare/xxhash/blob/v2.3.0/LICEN github.com/coreos/go-semver/semver,https://github.com/coreos/go-semver/blob/v0.3.1/LICENSE,Apache-2.0 github.com/coreos/go-systemd/v22/journal,https://github.com/coreos/go-systemd/blob/v22.5.0/LICENSE,Apache-2.0 github.com/davecgh/go-spew/spew,https://github.com/davecgh/go-spew/blob/d8f796af33cc/LICENSE,ISC -github.com/emicklei/go-restful/v3,https://github.com/emicklei/go-restful/blob/v3.12.0/LICENSE,MIT +github.com/emicklei/go-restful/v3,https://github.com/emicklei/go-restful/blob/v3.12.1/LICENSE,MIT github.com/evanphx/json-patch/v5,https://github.com/evanphx/json-patch/blob/v5.9.0/v5/LICENSE,BSD-3-Clause github.com/felixge/httpsnoop,https://github.com/felixge/httpsnoop/blob/v1.0.4/LICENSE.txt,MIT github.com/fsnotify/fsnotify,https://github.com/fsnotify/fsnotify/blob/v1.7.0/LICENSE,BSD-3-Clause +github.com/fxamacker/cbor/v2,https://github.com/fxamacker/cbor/blob/v2.7.0/LICENSE,MIT github.com/go-asn1-ber/asn1-ber,https://github.com/go-asn1-ber/asn1-ber/blob/v1.5.6/LICENSE,MIT github.com/go-ldap/ldap/v3,https://github.com/go-ldap/ldap/blob/v3.4.8/v3/LICENSE,MIT -github.com/go-logr/logr,https://github.com/go-logr/logr/blob/v1.4.1/LICENSE,Apache-2.0 +github.com/go-logr/logr,https://github.com/go-logr/logr/blob/v1.4.2/LICENSE,Apache-2.0 github.com/go-logr/stdr,https://github.com/go-logr/stdr/blob/v1.2.2/LICENSE,Apache-2.0 github.com/go-logr/zapr,https://github.com/go-logr/zapr/blob/v1.3.0/LICENSE,Apache-2.0 github.com/go-openapi/jsonpointer,https://github.com/go-openapi/jsonpointer/blob/v0.21.0/LICENSE,Apache-2.0 @@ -24,8 +26,8 @@ github.com/go-openapi/swag,https://github.com/go-openapi/swag/blob/v0.23.0/LICEN github.com/gogo/protobuf,https://github.com/gogo/protobuf/blob/v1.3.2/LICENSE,BSD-3-Clause github.com/golang/groupcache/lru,https://github.com/golang/groupcache/blob/41bb18bfe9da/LICENSE,Apache-2.0 github.com/golang/protobuf,https://github.com/golang/protobuf/blob/v1.5.4/LICENSE,BSD-3-Clause -github.com/google/cel-go,https://github.com/google/cel-go/blob/v0.17.8/LICENSE,Apache-2.0 -github.com/google/cel-go,https://github.com/google/cel-go/blob/v0.17.8/LICENSE,BSD-3-Clause +github.com/google/cel-go,https://github.com/google/cel-go/blob/v0.20.1/LICENSE,Apache-2.0 +github.com/google/cel-go,https://github.com/google/cel-go/blob/v0.20.1/LICENSE,BSD-3-Clause github.com/google/gnostic-models,https://github.com/google/gnostic-models/blob/v0.6.8/LICENSE,Apache-2.0 github.com/google/go-cmp/cmp,https://github.com/google/go-cmp/blob/v0.6.0/LICENSE,BSD-3-Clause github.com/google/gofuzz,https://github.com/google/gofuzz/blob/v1.2.0/LICENSE,Apache-2.0 @@ -35,67 +37,76 @@ github.com/grpc-ecosystem/grpc-gateway/v2,https://github.com/grpc-ecosystem/grpc github.com/imdario/mergo,https://github.com/imdario/mergo/blob/v0.3.16/LICENSE,BSD-3-Clause github.com/josharian/intern,https://github.com/josharian/intern/blob/v1.0.0/license.md,MIT github.com/json-iterator/go,https://github.com/json-iterator/go/blob/v1.1.12/LICENSE,MIT +github.com/klauspost/compress,https://github.com/klauspost/compress/blob/v1.17.9/LICENSE,MIT +github.com/klauspost/compress,https://github.com/klauspost/compress/blob/v1.17.9/LICENSE,Apache-2.0 +github.com/klauspost/compress,https://github.com/klauspost/compress/blob/v1.17.9/LICENSE,BSD-3-Clause +github.com/klauspost/compress/internal/snapref,https://github.com/klauspost/compress/blob/v1.17.9/internal/snapref/LICENSE,BSD-3-Clause +github.com/klauspost/compress/zstd/internal/xxhash,https://github.com/klauspost/compress/blob/v1.17.9/zstd/internal/xxhash/LICENSE.txt,MIT +github.com/kylelemons/godebug/diff,https://github.com/kylelemons/godebug/blob/v1.1.0/LICENSE,Apache-2.0 github.com/mailru/easyjson,https://github.com/mailru/easyjson/blob/v0.7.7/LICENSE,MIT github.com/modern-go/concurrent,https://github.com/modern-go/concurrent/blob/bacd9c7ef1dd/LICENSE,Apache-2.0 github.com/modern-go/reflect2,https://github.com/modern-go/reflect2/blob/v1.0.2/LICENSE,Apache-2.0 github.com/munnerz/goautoneg,https://github.com/munnerz/goautoneg/blob/a7dc8b61c822/LICENSE,BSD-3-Clause github.com/pkg/errors,https://github.com/pkg/errors/blob/v0.9.1/LICENSE,BSD-2-Clause -github.com/prometheus/client_golang/prometheus,https://github.com/prometheus/client_golang/blob/v1.18.0/LICENSE,Apache-2.0 +github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil,https://github.com/prometheus/client_golang/blob/v1.20.4/internal/github.com/golang/gddo/LICENSE,BSD-3-Clause +github.com/prometheus/client_golang/prometheus,https://github.com/prometheus/client_golang/blob/v1.20.4/LICENSE,Apache-2.0 github.com/prometheus/client_model/go,https://github.com/prometheus/client_model/blob/v0.6.1/LICENSE,Apache-2.0 -github.com/prometheus/common,https://github.com/prometheus/common/blob/v0.46.0/LICENSE,Apache-2.0 -github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg,https://github.com/prometheus/common/blob/v0.46.0/internal/bitbucket.org/ww/goautoneg/README.txt,BSD-3-Clause -github.com/prometheus/procfs,https://github.com/prometheus/procfs/blob/v0.15.0/LICENSE,Apache-2.0 -github.com/spf13/cobra,https://github.com/spf13/cobra/blob/v1.8.0/LICENSE.txt,Apache-2.0 +github.com/prometheus/common,https://github.com/prometheus/common/blob/v0.55.0/LICENSE,Apache-2.0 +github.com/prometheus/procfs,https://github.com/prometheus/procfs/blob/v0.15.1/LICENSE,Apache-2.0 +github.com/spf13/cobra,https://github.com/spf13/cobra/blob/v1.8.1/LICENSE.txt,Apache-2.0 github.com/spf13/pflag,https://github.com/spf13/pflag/blob/v1.0.5/LICENSE,BSD-3-Clause github.com/stoewer/go-strcase,https://github.com/stoewer/go-strcase/blob/v1.3.0/LICENSE,MIT -go.etcd.io/etcd/api/v3,https://github.com/etcd-io/etcd/blob/api/v3.5.13/api/LICENSE,Apache-2.0 -go.etcd.io/etcd/client/pkg/v3,https://github.com/etcd-io/etcd/blob/client/pkg/v3.5.13/client/pkg/LICENSE,Apache-2.0 -go.etcd.io/etcd/client/v3,https://github.com/etcd-io/etcd/blob/client/v3.5.13/client/v3/LICENSE,Apache-2.0 -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc,https://github.com/open-telemetry/opentelemetry-go-contrib/blob/instrumentation/google.golang.org/grpc/otelgrpc/v0.51.0/instrumentation/google.golang.org/grpc/otelgrpc/LICENSE,Apache-2.0 -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp,https://github.com/open-telemetry/opentelemetry-go-contrib/blob/instrumentation/net/http/otelhttp/v0.51.0/instrumentation/net/http/otelhttp/LICENSE,Apache-2.0 -go.opentelemetry.io/otel,https://github.com/open-telemetry/opentelemetry-go/blob/v1.26.0/LICENSE,Apache-2.0 -go.opentelemetry.io/otel/exporters/otlp/otlptrace,https://github.com/open-telemetry/opentelemetry-go/blob/exporters/otlp/otlptrace/v1.26.0/exporters/otlp/otlptrace/LICENSE,Apache-2.0 -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc,https://github.com/open-telemetry/opentelemetry-go/blob/exporters/otlp/otlptrace/otlptracegrpc/v1.26.0/exporters/otlp/otlptrace/otlptracegrpc/LICENSE,Apache-2.0 -go.opentelemetry.io/otel/metric,https://github.com/open-telemetry/opentelemetry-go/blob/metric/v1.26.0/metric/LICENSE,Apache-2.0 -go.opentelemetry.io/otel/sdk,https://github.com/open-telemetry/opentelemetry-go/blob/sdk/v1.26.0/sdk/LICENSE,Apache-2.0 -go.opentelemetry.io/otel/trace,https://github.com/open-telemetry/opentelemetry-go/blob/trace/v1.26.0/trace/LICENSE,Apache-2.0 -go.opentelemetry.io/proto/otlp,https://github.com/open-telemetry/opentelemetry-proto-go/blob/otlp/v1.2.0/otlp/LICENSE,Apache-2.0 +github.com/x448/float16,https://github.com/x448/float16/blob/v0.8.4/LICENSE,MIT +go.etcd.io/etcd/api/v3,https://github.com/etcd-io/etcd/blob/api/v3.5.14/api/LICENSE,Apache-2.0 +go.etcd.io/etcd/client/pkg/v3,https://github.com/etcd-io/etcd/blob/client/pkg/v3.5.14/client/pkg/LICENSE,Apache-2.0 +go.etcd.io/etcd/client/v3,https://github.com/etcd-io/etcd/blob/client/v3.5.14/client/v3/LICENSE,Apache-2.0 +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc,https://github.com/open-telemetry/opentelemetry-go-contrib/blob/instrumentation/google.golang.org/grpc/otelgrpc/v0.54.0/instrumentation/google.golang.org/grpc/otelgrpc/LICENSE,Apache-2.0 +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp,https://github.com/open-telemetry/opentelemetry-go-contrib/blob/instrumentation/net/http/otelhttp/v0.54.0/instrumentation/net/http/otelhttp/LICENSE,Apache-2.0 +go.opentelemetry.io/otel,https://github.com/open-telemetry/opentelemetry-go/blob/v1.29.0/LICENSE,Apache-2.0 +go.opentelemetry.io/otel/exporters/otlp/otlptrace,https://github.com/open-telemetry/opentelemetry-go/blob/exporters/otlp/otlptrace/v1.28.0/exporters/otlp/otlptrace/LICENSE,Apache-2.0 +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc,https://github.com/open-telemetry/opentelemetry-go/blob/exporters/otlp/otlptrace/otlptracegrpc/v1.27.0/exporters/otlp/otlptrace/otlptracegrpc/LICENSE,Apache-2.0 +go.opentelemetry.io/otel/metric,https://github.com/open-telemetry/opentelemetry-go/blob/metric/v1.29.0/metric/LICENSE,Apache-2.0 +go.opentelemetry.io/otel/sdk,https://github.com/open-telemetry/opentelemetry-go/blob/sdk/v1.28.0/sdk/LICENSE,Apache-2.0 +go.opentelemetry.io/otel/trace,https://github.com/open-telemetry/opentelemetry-go/blob/trace/v1.29.0/trace/LICENSE,Apache-2.0 +go.opentelemetry.io/proto/otlp,https://github.com/open-telemetry/opentelemetry-proto-go/blob/otlp/v1.3.1/otlp/LICENSE,Apache-2.0 go.uber.org/multierr,https://github.com/uber-go/multierr/blob/v1.11.0/LICENSE.txt,MIT go.uber.org/zap,https://github.com/uber-go/zap/blob/v1.27.0/LICENSE,MIT -golang.org/x/crypto,https://cs.opensource.google/go/x/crypto/+/v0.24.0:LICENSE,BSD-3-Clause -golang.org/x/exp,https://cs.opensource.google/go/x/exp/+/9bf2ced1:LICENSE,BSD-3-Clause -golang.org/x/net,https://cs.opensource.google/go/x/net/+/v0.26.0:LICENSE,BSD-3-Clause -golang.org/x/oauth2,https://cs.opensource.google/go/x/oauth2/+/v0.20.0:LICENSE,BSD-3-Clause -golang.org/x/sync,https://cs.opensource.google/go/x/sync/+/v0.7.0:LICENSE,BSD-3-Clause -golang.org/x/sys/unix,https://cs.opensource.google/go/x/sys/+/v0.21.0:LICENSE,BSD-3-Clause -golang.org/x/term,https://cs.opensource.google/go/x/term/+/v0.21.0:LICENSE,BSD-3-Clause -golang.org/x/text,https://cs.opensource.google/go/x/text/+/v0.16.0:LICENSE,BSD-3-Clause -golang.org/x/time/rate,https://cs.opensource.google/go/x/time/+/v0.5.0:LICENSE,BSD-3-Clause +golang.org/x/crypto,https://cs.opensource.google/go/x/crypto/+/v0.27.0:LICENSE,BSD-3-Clause +golang.org/x/exp,https://cs.opensource.google/go/x/exp/+/8a7402ab:LICENSE,BSD-3-Clause +golang.org/x/net,https://cs.opensource.google/go/x/net/+/v0.29.0:LICENSE,BSD-3-Clause +golang.org/x/oauth2,https://cs.opensource.google/go/x/oauth2/+/v0.23.0:LICENSE,BSD-3-Clause +golang.org/x/sync,https://cs.opensource.google/go/x/sync/+/v0.8.0:LICENSE,BSD-3-Clause +golang.org/x/sys/unix,https://cs.opensource.google/go/x/sys/+/v0.25.0:LICENSE,BSD-3-Clause +golang.org/x/term,https://cs.opensource.google/go/x/term/+/v0.24.0:LICENSE,BSD-3-Clause +golang.org/x/text,https://cs.opensource.google/go/x/text/+/v0.18.0:LICENSE,BSD-3-Clause +golang.org/x/time/rate,https://cs.opensource.google/go/x/time/+/v0.6.0:LICENSE,BSD-3-Clause gomodules.xyz/jsonpatch/v2,https://github.com/gomodules/jsonpatch/blob/v2.4.0/v2/LICENSE,Apache-2.0 -google.golang.org/genproto/googleapis/api,https://github.com/googleapis/go-genproto/blob/fc5f0ca64291/googleapis/api/LICENSE,Apache-2.0 -google.golang.org/genproto/googleapis/rpc,https://github.com/googleapis/go-genproto/blob/fc5f0ca64291/googleapis/rpc/LICENSE,Apache-2.0 -google.golang.org/grpc,https://github.com/grpc/grpc-go/blob/v1.64.1/LICENSE,Apache-2.0 -google.golang.org/protobuf,https://github.com/protocolbuffers/protobuf-go/blob/v1.34.1/LICENSE,BSD-3-Clause +google.golang.org/genproto/googleapis/api,https://github.com/googleapis/go-genproto/blob/7e3bb234dfed/googleapis/api/LICENSE,Apache-2.0 +google.golang.org/genproto/googleapis/rpc,https://github.com/googleapis/go-genproto/blob/8af14fe29dc1/googleapis/rpc/LICENSE,Apache-2.0 +google.golang.org/grpc,https://github.com/grpc/grpc-go/blob/v1.66.2/LICENSE,Apache-2.0 +google.golang.org/protobuf,https://github.com/protocolbuffers/protobuf-go/blob/v1.34.2/LICENSE,BSD-3-Clause gopkg.in/inf.v0,https://github.com/go-inf/inf/blob/v0.9.1/LICENSE,BSD-3-Clause gopkg.in/yaml.v2,https://github.com/go-yaml/yaml/blob/v2.4.0/LICENSE,Apache-2.0 gopkg.in/yaml.v3,https://github.com/go-yaml/yaml/blob/v3.0.1/LICENSE,MIT -k8s.io/api,https://github.com/kubernetes/api/blob/v0.30.1/LICENSE,Apache-2.0 -k8s.io/apiextensions-apiserver/pkg,https://github.com/kubernetes/apiextensions-apiserver/blob/v0.30.1/LICENSE,Apache-2.0 -k8s.io/apimachinery/pkg,https://github.com/kubernetes/apimachinery/blob/v0.30.1/LICENSE,Apache-2.0 -k8s.io/apimachinery/third_party/forked/golang,https://github.com/kubernetes/apimachinery/blob/v0.30.1/third_party/forked/golang/LICENSE,BSD-3-Clause -k8s.io/apiserver,https://github.com/kubernetes/apiserver/blob/v0.30.1/LICENSE,Apache-2.0 -k8s.io/client-go,https://github.com/kubernetes/client-go/blob/v0.30.1/LICENSE,Apache-2.0 -k8s.io/component-base,https://github.com/kubernetes/component-base/blob/v0.30.1/LICENSE,Apache-2.0 -k8s.io/klog/v2,https://github.com/kubernetes/klog/blob/v2.120.1/LICENSE,Apache-2.0 -k8s.io/kube-aggregator/pkg/apis/apiregistration,https://github.com/kubernetes/kube-aggregator/blob/v0.30.1/LICENSE,Apache-2.0 -k8s.io/kube-openapi/pkg,https://github.com/kubernetes/kube-openapi/blob/f0e62f92d13f/LICENSE,Apache-2.0 -k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json,https://github.com/kubernetes/kube-openapi/blob/f0e62f92d13f/pkg/internal/third_party/go-json-experiment/json/LICENSE,BSD-3-Clause -k8s.io/kube-openapi/pkg/validation/spec,https://github.com/kubernetes/kube-openapi/blob/f0e62f92d13f/pkg/validation/spec/LICENSE,Apache-2.0 -k8s.io/kubectl/pkg/util/openapi,https://github.com/kubernetes/kubectl/blob/v0.30.0/LICENSE,Apache-2.0 -k8s.io/utils,https://github.com/kubernetes/utils/blob/fe8a2dddb1d0/LICENSE,Apache-2.0 -k8s.io/utils/internal/third_party/forked/golang,https://github.com/kubernetes/utils/blob/fe8a2dddb1d0/internal/third_party/forked/golang/LICENSE,BSD-3-Clause +k8s.io/api,https://github.com/kubernetes/api/blob/v0.31.1/LICENSE,Apache-2.0 +k8s.io/apiextensions-apiserver/pkg,https://github.com/kubernetes/apiextensions-apiserver/blob/v0.31.1/LICENSE,Apache-2.0 +k8s.io/apimachinery/pkg,https://github.com/kubernetes/apimachinery/blob/v0.31.1/LICENSE,Apache-2.0 +k8s.io/apimachinery/third_party/forked/golang,https://github.com/kubernetes/apimachinery/blob/v0.31.1/third_party/forked/golang/LICENSE,BSD-3-Clause +k8s.io/apiserver,https://github.com/kubernetes/apiserver/blob/v0.31.1/LICENSE,Apache-2.0 +k8s.io/client-go,https://github.com/kubernetes/client-go/blob/v0.31.1/LICENSE,Apache-2.0 +k8s.io/component-base,https://github.com/kubernetes/component-base/blob/v0.31.1/LICENSE,Apache-2.0 +k8s.io/klog/v2,https://github.com/kubernetes/klog/blob/v2.130.1/LICENSE,Apache-2.0 +k8s.io/kube-aggregator/pkg/apis/apiregistration,https://github.com/kubernetes/kube-aggregator/blob/v0.31.1/LICENSE,Apache-2.0 +k8s.io/kube-openapi/pkg,https://github.com/kubernetes/kube-openapi/blob/9e1beecbcb38/LICENSE,Apache-2.0 +k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json,https://github.com/kubernetes/kube-openapi/blob/9e1beecbcb38/pkg/internal/third_party/go-json-experiment/json/LICENSE,BSD-3-Clause +k8s.io/kube-openapi/pkg/validation/errors,https://github.com/kubernetes/kube-openapi/blob/9e1beecbcb38/pkg/validation/errors/LICENSE,Apache-2.0 +k8s.io/kube-openapi/pkg/validation/spec,https://github.com/kubernetes/kube-openapi/blob/9e1beecbcb38/pkg/validation/spec/LICENSE,Apache-2.0 +k8s.io/kube-openapi/pkg/validation/strfmt,https://github.com/kubernetes/kube-openapi/blob/9e1beecbcb38/pkg/validation/strfmt/LICENSE,Apache-2.0 +k8s.io/kubectl/pkg/util/openapi,https://github.com/kubernetes/kubectl/blob/v0.31.0/LICENSE,Apache-2.0 +k8s.io/utils,https://github.com/kubernetes/utils/blob/49e7df575cb6/LICENSE,Apache-2.0 +k8s.io/utils/internal/third_party/forked/golang,https://github.com/kubernetes/utils/blob/49e7df575cb6/internal/third_party/forked/golang/LICENSE,BSD-3-Clause sigs.k8s.io/apiserver-network-proxy/konnectivity-client,https://github.com/kubernetes-sigs/apiserver-network-proxy/blob/konnectivity-client/v0.30.3/konnectivity-client/LICENSE,Apache-2.0 -sigs.k8s.io/controller-runtime,https://github.com/kubernetes-sigs/controller-runtime/blob/v0.18.2/LICENSE,Apache-2.0 +sigs.k8s.io/controller-runtime,https://github.com/kubernetes-sigs/controller-runtime/blob/v0.19.0/LICENSE,Apache-2.0 sigs.k8s.io/gateway-api,https://github.com/kubernetes-sigs/gateway-api/blob/v1.1.0/LICENSE,Apache-2.0 sigs.k8s.io/json,https://github.com/kubernetes-sigs/json/blob/bc3834ca7abd/LICENSE,Apache-2.0 sigs.k8s.io/json,https://github.com/kubernetes-sigs/json/blob/bc3834ca7abd/LICENSE,BSD-3-Clause diff --git a/test/integration/acme/orders_controller_test.go b/test/integration/acme/orders_controller_test.go index d1deca46864..d3a14423d6b 100644 --- a/test/integration/acme/orders_controller_test.go +++ b/test/integration/acme/orders_controller_test.go @@ -136,11 +136,14 @@ func TestAcmeOrdersController(t *testing.T) { } // Create a new orders controller. - ctrl, queue, mustSync := acmeorders.NewController( + ctrl, queue, mustSync, err := acmeorders.NewController( logf.Log, &controllerContext, false, ) + if err != nil { + t.Fatal(err) + } c := controllerpkg.NewController( "orders_test", metrics.New(logf.Log, clock.RealClock{}), @@ -161,8 +164,7 @@ func TestAcmeOrdersController(t *testing.T) { // Create a Namespace. ns := &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: testName}} - _, err := kubeClient.CoreV1().Namespaces().Create(ctx, ns, metav1.CreateOptions{}) - if err != nil { + if _, err := kubeClient.CoreV1().Namespaces().Create(ctx, ns, metav1.CreateOptions{}); err != nil { t.Fatal(err) } @@ -242,7 +244,7 @@ func TestAcmeOrdersController(t *testing.T) { // valid. // https://github.com/cert-manager/cert-manager/issues/2868 - // Set the Challenge state to valid- the status of the ACME order remains 'pending'. + // Set the Challenge state to valid, the status of the ACME order remains 'pending'. chal = chal.DeepCopy() chal.Status.State = cmacme.Valid _, err = cmCl.AcmeV1().Challenges(testName).UpdateStatus(ctx, chal, metav1.UpdateOptions{}) diff --git a/test/integration/certificates/generates_new_private_key_per_request_test.go b/test/integration/certificates/generates_new_private_key_per_request_test.go index 88ad3708729..38d2d16646b 100644 --- a/test/integration/certificates/generates_new_private_key_per_request_test.go +++ b/test/integration/certificates/generates_new_private_key_per_request_test.go @@ -339,23 +339,41 @@ func runAllControllers(t *testing.T, config *rest.Config) framework.StopFunc { FieldManager: "cert-manager-certificates-issuing-test", } - // TODO: set field mananager before calling each of those- is that what we do in actual code? - revCtrl, revQueue, revMustSync := revisionmanager.NewController(log, &controllerContext) + // TODO: set field manager before calling each of those - is that what we do in actual code? + revCtrl, revQueue, revMustSync, err := revisionmanager.NewController(log, &controllerContext) + if err != nil { + t.Fatal(err) + } revisionManager := controllerpkg.NewController("revisionmanager_controller", metrics, revCtrl.ProcessItem, revMustSync, nil, revQueue) - readyCtrl, readyQueue, readyMustSync := readiness.NewController(log, &controllerContext, policies.NewReadinessPolicyChain(clock), pki.RenewalTime, readiness.BuildReadyConditionFromChain) + readyCtrl, readyQueue, readyMustSync, err := readiness.NewController(log, &controllerContext, policies.NewReadinessPolicyChain(clock), pki.RenewalTime, readiness.BuildReadyConditionFromChain) + if err != nil { + t.Fatal(err) + } readinessManager := controllerpkg.NewController("readiness_controller", metrics, readyCtrl.ProcessItem, readyMustSync, nil, readyQueue) - issueCtrl, issueQueue, issueMustSync := issuing.NewController(log, &controllerContext) + issueCtrl, issueQueue, issueMustSync, err := issuing.NewController(log, &controllerContext) + if err != nil { + t.Fatal(err) + } issueManager := controllerpkg.NewController("issuing_controller", metrics, issueCtrl.ProcessItem, issueMustSync, nil, issueQueue) - reqCtrl, reqQueue, reqMustSync := requestmanager.NewController(log, &controllerContext) + reqCtrl, reqQueue, reqMustSync, err := requestmanager.NewController(log, &controllerContext) + if err != nil { + t.Fatal(err) + } requestManager := controllerpkg.NewController("requestmanager_controller", metrics, reqCtrl.ProcessItem, reqMustSync, nil, reqQueue) - keyCtrl, keyQueue, keyMustSync := keymanager.NewController(log, &controllerContext) + keyCtrl, keyQueue, keyMustSync, err := keymanager.NewController(log, &controllerContext) + if err != nil { + t.Fatal(err) + } keyManager := controllerpkg.NewController("keymanager_controller", metrics, keyCtrl.ProcessItem, keyMustSync, nil, keyQueue) - triggerCtrl, triggerQueue, triggerMustSync := trigger.NewController(log, &controllerContext, policies.NewTriggerPolicyChain(clock).Evaluate) + triggerCtrl, triggerQueue, triggerMustSync, err := trigger.NewController(log, &controllerContext, policies.NewTriggerPolicyChain(clock).Evaluate) + if err != nil { + t.Fatal(err) + } triggerManager := controllerpkg.NewController("trigger_controller", metrics, triggerCtrl.ProcessItem, triggerMustSync, nil, triggerQueue) return framework.StartInformersAndControllers(t, factory, cmFactory, revisionManager, requestManager, keyManager, triggerManager, readinessManager, issueManager) diff --git a/test/integration/certificates/issuing_controller_test.go b/test/integration/certificates/issuing_controller_test.go index 9a1b7b8ff2d..54eaa30874d 100644 --- a/test/integration/certificates/issuing_controller_test.go +++ b/test/integration/certificates/issuing_controller_test.go @@ -80,7 +80,8 @@ func TestIssuingController(t *testing.T) { FieldManager: "cert-manager-certificates-issuing-test", } - ctrl, queue, mustSync := issuing.NewController(logf.Log, &controllerContext) + ctrl, queue, mustSync, err := issuing.NewController(logf.Log, &controllerContext) + require.NoError(t, err) c := controllerpkg.NewController( "issuing_test", metrics.New(logf.Log, clock.RealClock{}), @@ -102,8 +103,7 @@ func TestIssuingController(t *testing.T) { // Create Namespace ns := &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: namespace}} - _, err := kubeClient.CoreV1().Namespaces().Create(ctx, ns, metav1.CreateOptions{}) - if err != nil { + if _, err := kubeClient.CoreV1().Namespaces().Create(ctx, ns, metav1.CreateOptions{}); err != nil { t.Fatal(err) } @@ -148,22 +148,11 @@ func TestIssuingController(t *testing.T) { t.Fatal(err) } - // Create x509 CSR from Certificate - csr, err := utilpki.GenerateCSR(crt) + csrPEM, err := gen.CSRWithSignerForCertificate(crt, sk) if err != nil { t.Fatal(err) } - // Encode CSR - csrDER, err := utilpki.EncodeCSR(csr, sk) - if err != nil { - t.Fatal(err) - } - - csrPEM := pem.EncodeToMemory(&pem.Block{ - Type: "CERTIFICATE REQUEST", Bytes: csrDER, - }) - // Sign Certificate certTemplate, err := utilpki.CertificateTemplateFromCertificate(crt) if err != nil { @@ -296,7 +285,8 @@ func TestIssuingController_PKCS8_PrivateKey(t *testing.T) { FieldManager: "cert-manager-certificates-issuing-test", } - ctrl, queue, mustSync := issuing.NewController(logf.Log, &controllerContext) + ctrl, queue, mustSync, err := issuing.NewController(logf.Log, &controllerContext) + require.NoError(t, err) c := controllerpkg.NewController( "issuing_test", metrics.New(logf.Log, clock.RealClock{}), @@ -318,8 +308,7 @@ func TestIssuingController_PKCS8_PrivateKey(t *testing.T) { // Create Namespace ns := &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: namespace}} - _, err := kubeClient.CoreV1().Namespaces().Create(ctx, ns, metav1.CreateOptions{}) - if err != nil { + if _, err := kubeClient.CoreV1().Namespaces().Create(ctx, ns, metav1.CreateOptions{}); err != nil { t.Fatal(err) } @@ -371,22 +360,11 @@ func TestIssuingController_PKCS8_PrivateKey(t *testing.T) { t.Fatal(err) } - // Create x509 CSR from Certificate - csr, err := utilpki.GenerateCSR(crt) - if err != nil { - t.Fatal(err) - } - - // Encode CSR - csrDER, err := utilpki.EncodeCSR(csr, sk) + csrPEM, err := gen.CSRWithSignerForCertificate(crt, sk) if err != nil { t.Fatal(err) } - csrPEM := pem.EncodeToMemory(&pem.Block{ - Type: "CERTIFICATE REQUEST", Bytes: csrDER, - }) - // Sign Certificate certTemplate, err := utilpki.CertificateTemplateFromCertificate(crt) if err != nil { @@ -494,7 +472,7 @@ func TestIssuingController_PKCS8_PrivateKey(t *testing.T) { // Test_IssuingController_SecretTemplate performs a basic check to ensure that // values in a Certificate's SecretTemplate will be copied to the target -// Secret- when they are both added and deleted. +// Secret - when they are both added and deleted. func Test_IssuingController_SecretTemplate(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Second*40) defer cancel() @@ -521,7 +499,8 @@ func Test_IssuingController_SecretTemplate(t *testing.T) { FieldManager: "cert-manager-certificates-issuing-test", } - ctrl, queue, mustSync := issuing.NewController(logf.Log, &controllerContext) + ctrl, queue, mustSync, err := issuing.NewController(logf.Log, &controllerContext) + require.NoError(t, err) c := controllerpkg.NewController( "issuing_test", metrics.New(logf.Log, clock.RealClock{}), @@ -543,8 +522,7 @@ func Test_IssuingController_SecretTemplate(t *testing.T) { // Create Namespace ns := &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: namespace}} - _, err := kubeClient.CoreV1().Namespaces().Create(ctx, ns, metav1.CreateOptions{}) - if err != nil { + if _, err := kubeClient.CoreV1().Namespaces().Create(ctx, ns, metav1.CreateOptions{}); err != nil { t.Fatal(err) } @@ -589,22 +567,11 @@ func Test_IssuingController_SecretTemplate(t *testing.T) { t.Fatal(err) } - // Create x509 CSR from Certificate - csr, err := utilpki.GenerateCSR(crt) - if err != nil { - t.Fatal(err) - } - - // Encode CSR - csrDER, err := utilpki.EncodeCSR(csr, sk) + csrPEM, err := gen.CSRWithSignerForCertificate(crt, sk) if err != nil { t.Fatal(err) } - csrPEM := pem.EncodeToMemory(&pem.Block{ - Type: "CERTIFICATE REQUEST", Bytes: csrDER, - }) - // Sign Certificate certTemplate, err := utilpki.CertificateTemplateFromCertificate(crt) if err != nil { @@ -739,8 +706,8 @@ func Test_IssuingController_SecretTemplate(t *testing.T) { } // Test_IssuingController_AdditionalOutputFormats performs a basic check to -// ensure that values in a Certificate's AddiationOutputFormats will be copied -// to the target Secret- when they are both added and deleted. +// ensure that values in a Certificate's AdditionalOutputFormats will be copied +// to the target Secret - when they are both added and deleted. func Test_IssuingController_AdditionalOutputFormats(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Second*40) defer cancel() @@ -768,7 +735,8 @@ func Test_IssuingController_AdditionalOutputFormats(t *testing.T) { FieldManager: "cert-manager-certificates-issuing-test", } - ctrl, queue, mustSync := issuing.NewController(logf.Log, &controllerContext) + ctrl, queue, mustSync, err := issuing.NewController(logf.Log, &controllerContext) + require.NoError(t, err) c := controllerpkg.NewController( "issuing_test", metrics.New(logf.Log, clock.RealClock{}), @@ -790,8 +758,7 @@ func Test_IssuingController_AdditionalOutputFormats(t *testing.T) { // Create Namespace ns := &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: namespace}} - _, err := kubeClient.CoreV1().Namespaces().Create(ctx, ns, metav1.CreateOptions{}) - if err != nil { + if _, err := kubeClient.CoreV1().Namespaces().Create(ctx, ns, metav1.CreateOptions{}); err != nil { t.Fatal(err) } @@ -836,22 +803,11 @@ func Test_IssuingController_AdditionalOutputFormats(t *testing.T) { t.Fatal(err) } - // Create x509 CSR from Certificate - csr, err := utilpki.GenerateCSR(crt) + csrPEM, err := gen.CSRWithSignerForCertificate(crt, pk) if err != nil { t.Fatal(err) } - // Encode CSR - csrDER, err := utilpki.EncodeCSR(csr, pk) - if err != nil { - t.Fatal(err) - } - - csrPEM := pem.EncodeToMemory(&pem.Block{ - Type: "CERTIFICATE REQUEST", Bytes: csrDER, - }) - // Sign Certificate certTemplate, err := utilpki.CertificateTemplateFromCertificate(crt) if err != nil { @@ -978,7 +934,7 @@ func Test_IssuingController_AdditionalOutputFormats(t *testing.T) { // is removed again when disabled. // Also ensures that changes to the Secret which modify the owner reference, // are reverted or corrected if needed by the issuing controller. -func Test_IssuingController_OwnerRefernece(t *testing.T) { +func Test_IssuingController_OwnerReference(t *testing.T) { const ( fieldManager = "cert-manager-issuing-test" ) @@ -1006,7 +962,8 @@ func Test_IssuingController_OwnerRefernece(t *testing.T) { Recorder: framework.NewEventRecorder(t, scheme), FieldManager: fieldManager, } - ctrl, queue, mustSync := issuing.NewController(logf.Log, &controllerContext) + ctrl, queue, mustSync, err := issuing.NewController(logf.Log, &controllerContext) + require.NoError(t, err) c := controllerpkg.NewController(fieldManager, metrics.New(logf.Log, clock.RealClock{}), ctrl.ProcessItem, mustSync, nil, queue) stopControllerNoOwnerRef := framework.StartInformersAndController(t, factory, cmFactory, c) defer func() { @@ -1103,7 +1060,8 @@ func Test_IssuingController_OwnerRefernece(t *testing.T) { Recorder: framework.NewEventRecorder(t, scheme), FieldManager: fieldManager, } - ctrl, queue, mustSync = issuing.NewController(logf.Log, &controllerContext) + ctrl, queue, mustSync, err = issuing.NewController(logf.Log, &controllerContext) + require.NoError(t, err) c = controllerpkg.NewController(fieldManager, metrics.New(logf.Log, clock.RealClock{}), ctrl.ProcessItem, mustSync, nil, queue) stopControllerOwnerRef := framework.StartInformersAndController(t, factory, cmFactory, c) defer stopControllerOwnerRef() diff --git a/test/integration/certificates/metrics_controller_test.go b/test/integration/certificates/metrics_controller_test.go index b351bd80d00..5827b850d6d 100644 --- a/test/integration/certificates/metrics_controller_test.go +++ b/test/integration/certificates/metrics_controller_test.go @@ -53,7 +53,7 @@ certmanager_clock_time_seconds %.9e`, float64(fixedClock.Now().Unix())) certmanager_clock_time_seconds_gauge %.9e`, float64(fixedClock.Now().Unix())) ) -// TestMetricscontoller performs a basic test to ensure that Certificates +// TestMetricsController performs a basic test to ensure that Certificates // metrics are exposed when a Certificate is created, updated, and removed when // it is deleted. func TestMetricsController(t *testing.T) { @@ -102,7 +102,10 @@ func TestMetricsController(t *testing.T) { Metrics: metricsHandler, }, } - ctrl, queue, mustSync := controllermetrics.NewController(&controllerContext) + ctrl, queue, mustSync, err := controllermetrics.NewController(&controllerContext) + if err != nil { + t.Fatal(err) + } c := controllerpkg.NewController( "metrics_test", metricsHandler, @@ -145,7 +148,8 @@ func TestMetricsController(t *testing.T) { return err } - if strings.TrimSpace(string(output)) != strings.TrimSpace(expectedOutput) { + trimmedOutput := strings.SplitN(string(output), "# HELP go_gc_duration_seconds", 2)[0] + if strings.TrimSpace(trimmedOutput) != strings.TrimSpace(expectedOutput) { return fmt.Errorf("got unexpected metrics output\nexp:\n%s\ngot:\n%s\n", expectedOutput, output) } diff --git a/test/integration/certificates/revisionmanager_controller_test.go b/test/integration/certificates/revisionmanager_controller_test.go index a561f598689..e6a0c852569 100644 --- a/test/integration/certificates/revisionmanager_controller_test.go +++ b/test/integration/certificates/revisionmanager_controller_test.go @@ -18,7 +18,6 @@ package certificates import ( "context" - "encoding/pem" "strconv" "testing" "time" @@ -36,12 +35,11 @@ import ( "github.com/cert-manager/cert-manager/pkg/controller/certificates/revisionmanager" logf "github.com/cert-manager/cert-manager/pkg/logs" "github.com/cert-manager/cert-manager/pkg/metrics" - utilpki "github.com/cert-manager/cert-manager/pkg/util/pki" "github.com/cert-manager/cert-manager/test/unit/gen" ) // TestRevisionManagerController will ensure that the revision manager -// controller will delete old CertificateRequests occording to the +// controller will delete old CertificateRequests according to the // spec.revisionHistoryLimit value func TestRevisionManagerController(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Second*40) @@ -59,7 +57,10 @@ func TestRevisionManagerController(t *testing.T) { SharedInformerFactory: cmFactory, } - ctrl, queue, mustSync := revisionmanager.NewController(logf.Log, &controllerContext) + ctrl, queue, mustSync, err := revisionmanager.NewController(logf.Log, &controllerContext) + if err != nil { + t.Fatal(err) + } c := controllerpkg.NewController( "revisionmanager_controller_test", @@ -80,8 +81,7 @@ func TestRevisionManagerController(t *testing.T) { // Create Namespace ns := &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: namespace}} - _, err := kubeClient.CoreV1().Namespaces().Create(ctx, ns, metav1.CreateOptions{}) - if err != nil { + if _, err := kubeClient.CoreV1().Namespaces().Create(ctx, ns, metav1.CreateOptions{}); err != nil { t.Fatal(err) } @@ -107,27 +107,11 @@ func TestRevisionManagerController(t *testing.T) { t.Fatal(err) } - // Create a new private key - sk, err := utilpki.GenerateRSAPrivateKey(2048) - if err != nil { - t.Fatal(err) - } - - csr, err := utilpki.GenerateCSR(crt) + csrPEM, _, err := gen.CSRForCertificate(crt) if err != nil { t.Fatal(err) } - // Encode CSR - csrDER, err := utilpki.EncodeCSR(csr, sk) - if err != nil { - t.Fatal(err) - } - - csrPEM := pem.EncodeToMemory(&pem.Block{ - Type: "CERTIFICATE REQUEST", Bytes: csrDER, - }) - // Create 6 CertificateRequests which are owned by this Certificate for i := 0; i < 6; i++ { _, err = cmCl.CertmanagerV1().CertificateRequests(namespace).Create(ctx, &cmapi.CertificateRequest{ diff --git a/test/integration/certificates/trigger_controller_test.go b/test/integration/certificates/trigger_controller_test.go index 14f80344b26..8011e6a8528 100644 --- a/test/integration/certificates/trigger_controller_test.go +++ b/test/integration/certificates/trigger_controller_test.go @@ -81,7 +81,10 @@ func TestTriggerController(t *testing.T) { Recorder: framework.NewEventRecorder(t, scheme), FieldManager: "cert-manager-certificates-trigger-test", } - ctrl, queue, mustSync := trigger.NewController(logf.Log, controllerContext, shouldReissue) + ctrl, queue, mustSync, err := trigger.NewController(logf.Log, controllerContext, shouldReissue) + if err != nil { + t.Fatal(err) + } c := controllerpkg.NewController( "trigger_test", metrics.New(logf.Log, clock.RealClock{}), @@ -120,7 +123,7 @@ func TestTriggerController_RenewNearExpiry(t *testing.T) { // Only use the 'current certificate nearing expiry' policy chain during the // test as we want to test the very specific cases of triggering/not // triggering depending on whether a renewal is required. - shoudReissue := policies.Chain{policies.CurrentCertificateNearingExpiry(fakeClock)}.Evaluate + shouldReissue := policies.Chain{policies.CurrentCertificateNearingExpiry(fakeClock)}.Evaluate // Build, instantiate and run the trigger controller. kubeClient, factory, cmCl, cmFactory, scheme := framework.NewClients(t, config) @@ -187,7 +190,10 @@ func TestTriggerController_RenewNearExpiry(t *testing.T) { FieldManager: "cert-manager-certificates-trigger-test", } // Start the trigger controller - ctrl, queue, mustSync := trigger.NewController(logf.Log, controllerContext, shoudReissue) + ctrl, queue, mustSync, err := trigger.NewController(logf.Log, controllerContext, shouldReissue) + if err != nil { + t.Fatal(err) + } c := controllerpkg.NewController( "trigger_test", metrics.New(logf.Log, clock.RealClock{}), @@ -241,7 +247,7 @@ func TestTriggerController_ExpBackoff(t *testing.T) { // Issuing condition will be applied because SecretDoesNotExist policy // will evaluate to true. However, this is not what we are testing in // this test. - shoudReissue := policies.NewTriggerPolicyChain(fakeClock).Evaluate + shouldReissue := policies.NewTriggerPolicyChain(fakeClock).Evaluate // Build, instantiate and run the trigger controller. kubeClient, factory, cmCl, cmFactory, scheme := framework.NewClients(t, config) @@ -283,7 +289,10 @@ func TestTriggerController_ExpBackoff(t *testing.T) { } // Start the trigger controller - ctrl, queue, mustSync := trigger.NewController(logf.Log, controllerContext, shoudReissue) + ctrl, queue, mustSync, err := trigger.NewController(logf.Log, controllerContext, shouldReissue) + if err != nil { + t.Fatal(err) + } c := controllerpkg.NewController( "trigger_test", metrics.New(logf.Log, clock.RealClock{}), diff --git a/test/integration/framework/apiserver.go b/test/integration/framework/apiserver.go index 948a2f649a6..ae3c2dfbfd8 100644 --- a/test/integration/framework/apiserver.go +++ b/test/integration/framework/apiserver.go @@ -100,7 +100,10 @@ func RunControlPlane(t *testing.T, ctx context.Context, optionFunctions ...RunCo } webhookOpts, stopWebhook := webhooktesting.StartWebhookServer( - t, ctx, []string{"--kubeconfig", f.Name()}, + // Disable the metrics server to avoid multiple webhook servers + // attempting to listen on metrics port 9402 when tests are running in + // parallel. + t, ctx, []string{"--kubeconfig", f.Name(), "--metrics-listen-address=0"}, ) crds := readCustomResourcesAtPath(t, *options.crdsDir) @@ -119,13 +122,13 @@ func RunControlPlane(t *testing.T, ctx context.Context, optionFunctions ...RunCo t.Fatal(err) } - // installing the validating webhooks, not using WebhookInstallOptions as it patches the CA to be it's own + // installing the validating webhooks, not using WebhookInstallOptions as it patches the CA to be its own err = cl.Create(ctx, getValidatingWebhookConfig(webhookOpts.URL, webhookOpts.CAPEM)) if err != nil { t.Fatal(err) } - // installing the mutating webhooks, not using WebhookInstallOptions as it patches the CA to be it's own + // installing the mutating webhooks, not using WebhookInstallOptions as it patches the CA to be its own err = cl.Create(ctx, getMutatingWebhookConfig(webhookOpts.URL, webhookOpts.CAPEM)) if err != nil { t.Fatal(err) diff --git a/test/integration/framework/helpers.go b/test/integration/framework/helpers.go index 86c23171401..871c000b5fd 100644 --- a/test/integration/framework/helpers.go +++ b/test/integration/framework/helpers.go @@ -26,6 +26,7 @@ import ( apiext "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/discovery" "k8s.io/client-go/kubernetes" @@ -68,11 +69,11 @@ func NewClients(t *testing.T, config *rest.Config) (kubernetes.Interface, intern cmFactory := cminformers.NewSharedInformerFactory(cmCl, 0) scheme := runtime.NewScheme() - kscheme.AddToScheme(scheme) - certmgrscheme.AddToScheme(scheme) - apiext.AddToScheme(scheme) - apireg.AddToScheme(scheme) - gwapi.Install(scheme) + utilruntime.Must(kscheme.AddToScheme(scheme)) + utilruntime.Must(certmgrscheme.AddToScheme(scheme)) + utilruntime.Must(apiext.AddToScheme(scheme)) + utilruntime.Must(apireg.AddToScheme(scheme)) + utilruntime.Must(gwapi.Install(scheme)) return cl, factory, cmCl, cmFactory, scheme } diff --git a/test/integration/go.mod b/test/integration/go.mod index d029754d981..d4cd1bdf69f 100644 --- a/test/integration/go.mod +++ b/test/integration/go.mod @@ -6,15 +6,6 @@ go 1.22.0 // please place any replace statements here at the top for visibility and add a // comment to it as to when it can be removed -// In prometheus/common v0.47.0 and v0.48.0, breaking changes were introduced in the "github.com/prometheus/common/expfmt" -// package. Not all our dependencies have been upgraded to use the new API. Until then, compiling cert-manager -// with the newer versions of "github.com/prometheus/common/expfmt" and "github.com/prometheus/client_golang" -// fails. These replace statements can be removed once expfmt.FmtText is no longer used by any of the libraries -// we depend on. -replace github.com/prometheus/common => github.com/prometheus/common v0.46.0 - -replace github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.18.0 - // Can be removed once github.com/go-ldap/ldap/v3 releases a version that requires this version. replace github.com/go-asn1-ber/asn1-ber => github.com/go-asn1-ber/asn1-ber v1.5.6 @@ -24,27 +15,28 @@ replace github.com/cert-manager/cert-manager/webhook-binary => ../../cmd/webhook require ( github.com/cert-manager/cert-manager v0.0.0-00010101000000-000000000000 - github.com/go-logr/logr v1.4.1 - github.com/miekg/dns v1.1.59 + github.com/go-logr/logr v1.4.2 + github.com/miekg/dns v1.1.62 github.com/munnerz/crd-schema-fuzz v1.0.0 github.com/segmentio/encoding v0.4.0 github.com/stretchr/testify v1.9.0 - golang.org/x/crypto v0.24.0 - golang.org/x/sync v0.7.0 - k8s.io/api v0.30.1 - k8s.io/apiextensions-apiserver v0.30.1 - k8s.io/apimachinery v0.30.1 - k8s.io/client-go v0.30.1 - k8s.io/kube-aggregator v0.30.1 - k8s.io/kubectl v0.30.0 - k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 - sigs.k8s.io/controller-runtime v0.18.2 + golang.org/x/crypto v0.27.0 + golang.org/x/sync v0.8.0 + k8s.io/api v0.31.1 + k8s.io/apiextensions-apiserver v0.31.1 + k8s.io/apimachinery v0.31.1 + k8s.io/client-go v0.31.1 + k8s.io/kube-aggregator v0.31.1 + k8s.io/kubectl v0.31.0 + k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 + sigs.k8s.io/controller-runtime v0.19.0 sigs.k8s.io/gateway-api v1.1.0 ) require ( github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect - github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect + github.com/antlr4-go/antlr/v4 v4.13.0 // indirect + github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect @@ -52,10 +44,11 @@ require ( github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/emicklei/go-restful/v3 v3.12.0 // indirect + github.com/emicklei/go-restful/v3 v3.12.1 // indirect github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/go-asn1-ber/asn1-ber v1.5.6 // indirect github.com/go-ldap/ldap/v3 v3.4.8 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -66,7 +59,7 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect - github.com/google/cel-go v0.17.8 // indirect + github.com/google/cel-go v0.20.1 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect @@ -77,6 +70,8 @@ require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/compress v1.17.9 // indirect + github.com/kylelemons/godebug v1.1.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect @@ -84,52 +79,53 @@ require ( github.com/pavlo-v-chernykh/keystore-go/v4 v4.5.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.20.4 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.48.0 // indirect - github.com/prometheus/procfs v0.15.0 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/segmentio/asm v1.1.3 // indirect - github.com/spf13/cobra v1.8.0 // indirect + github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect - go.etcd.io/etcd/api/v3 v3.5.13 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.13 // indirect - go.etcd.io/etcd/client/v3 v3.5.13 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect - go.opentelemetry.io/otel/metric v1.26.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/trace v1.26.0 // indirect - go.opentelemetry.io/proto/otlp v1.2.0 // indirect + github.com/x448/float16 v0.8.4 // indirect + go.etcd.io/etcd/api/v3 v3.5.14 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.14 // indirect + go.etcd.io/etcd/client/v3 v3.5.14 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect + go.opentelemetry.io/otel v1.29.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.29.0 // indirect + go.opentelemetry.io/otel/sdk v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.29.0 // indirect + go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/oauth2 v0.20.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/term v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect + golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect + golang.org/x/mod v0.20.0 // indirect + golang.org/x/net v0.29.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.24.0 // indirect + golang.org/x/text v0.18.0 // indirect + golang.org/x/time v0.6.0 // indirect + golang.org/x/tools v0.24.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect - google.golang.org/grpc v1.64.1 // indirect - google.golang.org/protobuf v1.34.1 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/grpc v1.66.2 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiserver v0.30.1 // indirect - k8s.io/component-base v0.30.1 // indirect - k8s.io/klog/v2 v2.120.1 // indirect - k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f // indirect + k8s.io/apiserver v0.31.1 // indirect + k8s.io/component-base v0.31.1 // indirect + k8s.io/klog/v2 v2.130.1 // indirect + k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect - software.sslmate.com/src/go-pkcs12 v0.4.0 // indirect + software.sslmate.com/src/go-pkcs12 v0.5.0 // indirect ) diff --git a/test/integration/go.sum b/test/integration/go.sum index 912462f2e51..855e64d63ec 100644 --- a/test/integration/go.sum +++ b/test/integration/go.sum @@ -1,602 +1,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -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= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.1/go.mod h1:fs4QogzfH5n2pBXBP9vRiU+eCny7lD2vmFZy79Iuw1U= -cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= -cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= -cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= -cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= -cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= -cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= -cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= -cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= -cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= -cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= -cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= -cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= -cloud.google.com/go/accesscontextmanager v1.6.0/go.mod h1:8XCvZWfYw3K/ji0iVnp+6pu7huxoQTLmxAbVjbloTtM= -cloud.google.com/go/accesscontextmanager v1.7.0/go.mod h1:CEGLewx8dwa33aDAZQujl7Dx+uYhS0eay198wB/VumQ= -cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= -cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= -cloud.google.com/go/aiplatform v1.27.0/go.mod h1:Bvxqtl40l0WImSb04d0hXFU7gDOiq9jQmorivIiWcKg= -cloud.google.com/go/aiplatform v1.35.0/go.mod h1:7MFT/vCaOyZT/4IIFfxH4ErVg/4ku6lKv3w0+tFTgXQ= -cloud.google.com/go/aiplatform v1.36.1/go.mod h1:WTm12vJRPARNvJ+v6P52RDHCNe4AhvjcIZ/9/RRHy/k= -cloud.google.com/go/aiplatform v1.37.0/go.mod h1:IU2Cv29Lv9oCn/9LkFiiuKfwrRTq+QQMbW+hPCxJGZw= -cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= -cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= -cloud.google.com/go/analytics v0.17.0/go.mod h1:WXFa3WSym4IZ+JiKmavYdJwGG/CvpqiqczmL59bTD9M= -cloud.google.com/go/analytics v0.18.0/go.mod h1:ZkeHGQlcIPkw0R/GW+boWHhCOR43xz9RN/jn7WcqfIE= -cloud.google.com/go/analytics v0.19.0/go.mod h1:k8liqf5/HCnOUkbawNtrWWc+UAzyDlW89doe8TtoDsE= -cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= -cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= -cloud.google.com/go/apigateway v1.5.0/go.mod h1:GpnZR3Q4rR7LVu5951qfXPJCHquZt02jf7xQx7kpqN8= -cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= -cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= -cloud.google.com/go/apigeeconnect v1.5.0/go.mod h1:KFaCqvBRU6idyhSNyn3vlHXc8VMDJdRmwDF6JyFRqZ8= -cloud.google.com/go/apigeeregistry v0.4.0/go.mod h1:EUG4PGcsZvxOXAdyEghIdXwAEi/4MEaoqLMLDMIwKXY= -cloud.google.com/go/apigeeregistry v0.5.0/go.mod h1:YR5+s0BVNZfVOUkMa5pAR2xGd0A473vA5M7j247o1wM= -cloud.google.com/go/apigeeregistry v0.6.0/go.mod h1:BFNzW7yQVLZ3yj0TKcwzb8n25CFBri51GVGOEUcgQsc= -cloud.google.com/go/apikeys v0.4.0/go.mod h1:XATS/yqZbaBK0HOssf+ALHp8jAlNHUgyfprvNcBIszU= -cloud.google.com/go/apikeys v0.5.0/go.mod h1:5aQfwY4D+ewMMWScd3hm2en3hCj+BROlyrt3ytS7KLI= -cloud.google.com/go/apikeys v0.6.0/go.mod h1:kbpXu5upyiAlGkKrJgQl8A0rKNNJ7dQ377pdroRSSi8= -cloud.google.com/go/appengine v1.4.0/go.mod h1:CS2NhuBuDXM9f+qscZ6V86m1MIIqPj3WC/UoEuR1Sno= -cloud.google.com/go/appengine v1.5.0/go.mod h1:TfasSozdkFI0zeoxW3PTBLiNqRmzraodCWatWI9Dmak= -cloud.google.com/go/appengine v1.6.0/go.mod h1:hg6i0J/BD2cKmDJbaFSYHFyZkgBEfQrDg/X0V5fJn84= -cloud.google.com/go/appengine v1.7.0/go.mod h1:eZqpbHFCqRGa2aCdope7eC0SWLV1j0neb/QnMJVWx6A= -cloud.google.com/go/appengine v1.7.1/go.mod h1:IHLToyb/3fKutRysUlFO0BPt5j7RiQ45nrzEJmKTo6E= -cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= -cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= -cloud.google.com/go/area120 v0.7.0/go.mod h1:a3+8EUD1SX5RUcCs3MY5YasiO1z6yLiNLRiFrykbynY= -cloud.google.com/go/area120 v0.7.1/go.mod h1:j84i4E1RboTWjKtZVWXPqvK5VHQFJRF2c1Nm69pWm9k= -cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= -cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= -cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= -cloud.google.com/go/artifactregistry v1.9.0/go.mod h1:2K2RqvA2CYvAeARHRkLDhMDJ3OXy26h3XW+3/Jh2uYc= -cloud.google.com/go/artifactregistry v1.11.1/go.mod h1:lLYghw+Itq9SONbCa1YWBoWs1nOucMH0pwXN1rOBZFI= -cloud.google.com/go/artifactregistry v1.11.2/go.mod h1:nLZns771ZGAwVLzTX/7Al6R9ehma4WUEhZGWV6CeQNQ= -cloud.google.com/go/artifactregistry v1.12.0/go.mod h1:o6P3MIvtzTOnmvGagO9v/rOjjA0HmhJ+/6KAXrmYDCI= -cloud.google.com/go/artifactregistry v1.13.0/go.mod h1:uy/LNfoOIivepGhooAUpL1i30Hgee3Cu0l4VTWHUC08= -cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= -cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= -cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= -cloud.google.com/go/asset v1.9.0/go.mod h1:83MOE6jEJBMqFKadM9NLRcs80Gdw76qGuHn8m3h8oHQ= -cloud.google.com/go/asset v1.10.0/go.mod h1:pLz7uokL80qKhzKr4xXGvBQXnzHn5evJAEAtZiIb0wY= -cloud.google.com/go/asset v1.11.1/go.mod h1:fSwLhbRvC9p9CXQHJ3BgFeQNM4c9x10lqlrdEUYXlJo= -cloud.google.com/go/asset v1.12.0/go.mod h1:h9/sFOa4eDIyKmH6QMpm4eUK3pDojWnUhTgJlk762Hg= -cloud.google.com/go/asset v1.13.0/go.mod h1:WQAMyYek/b7NBpYq/K4KJWcRqzoalEsxz/t/dTk4THw= -cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= -cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= -cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= -cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= -cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= -cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E= -cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= -cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= -cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= -cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM= -cloud.google.com/go/automl v1.12.0/go.mod h1:tWDcHDp86aMIuHmyvjuKeeHEGq76lD7ZqfGLN6B0NuU= -cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= -cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= -cloud.google.com/go/baremetalsolution v0.5.0/go.mod h1:dXGxEkmR9BMwxhzBhV0AioD0ULBmuLZI8CdwalUxuss= -cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= -cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= -cloud.google.com/go/batch v0.7.0/go.mod h1:vLZN95s6teRUqRQ4s3RLDsH8PvboqBK+rn1oevL159g= -cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= -cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= -cloud.google.com/go/beyondcorp v0.4.0/go.mod h1:3ApA0mbhHx6YImmuubf5pyW8srKnCEPON32/5hj+RmM= -cloud.google.com/go/beyondcorp v0.5.0/go.mod h1:uFqj9X+dSfrheVp7ssLTaRHd2EHqSL4QZmH4e8WXGGU= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= -cloud.google.com/go/bigquery v1.43.0/go.mod h1:ZMQcXHsl+xmU1z36G2jNGZmKp9zNY5BUua5wDgmNCfw= -cloud.google.com/go/bigquery v1.44.0/go.mod h1:0Y33VqXTEsbamHJvJHdFmtqHvMIY28aK1+dFsvaChGc= -cloud.google.com/go/bigquery v1.47.0/go.mod h1:sA9XOgy0A8vQK9+MWhEQTY6Tix87M/ZurWFIxmF9I/E= -cloud.google.com/go/bigquery v1.48.0/go.mod h1:QAwSz+ipNgfL5jxiaK7weyOhzdoAy1zFm0Nf1fysJac= -cloud.google.com/go/bigquery v1.49.0/go.mod h1:Sv8hMmTFFYBlt/ftw2uN6dFdQPzBlREY9yBh7Oy7/4Q= -cloud.google.com/go/bigquery v1.50.0/go.mod h1:YrleYEh2pSEbgTBZYMJ5SuSr0ML3ypjRB1zgf7pvQLU= -cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= -cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= -cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= -cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOArInEiD5Y= -cloud.google.com/go/billing v1.12.0/go.mod h1:yKrZio/eu+okO/2McZEbch17O5CB5NpZhhXG6Z766ss= -cloud.google.com/go/billing v1.13.0/go.mod h1:7kB2W9Xf98hP9Sr12KfECgfGclsH3CQR0R08tnRlRbc= -cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= -cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= -cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= -cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= -cloud.google.com/go/binaryauthorization v1.5.0/go.mod h1:OSe4OU1nN/VswXKRBmciKpo9LulY41gch5c68htf3/Q= -cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= -cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= -cloud.google.com/go/certificatemanager v1.6.0/go.mod h1:3Hh64rCKjRAX8dXgRAyOcY5vQ/fE1sh8o+Mdd6KPgY8= -cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= -cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= -cloud.google.com/go/channel v1.11.0/go.mod h1:IdtI0uWGqhEeatSB62VOoJ8FSUhJ9/+iGkJVqp74CGE= -cloud.google.com/go/channel v1.12.0/go.mod h1:VkxCGKASi4Cq7TbXxlaBezonAYpp1GCnKMY6tnMQnLU= -cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= -cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= -cloud.google.com/go/cloudbuild v1.6.0/go.mod h1:UIbc/w9QCbH12xX+ezUsgblrWv+Cv4Tw83GiSMHOn9M= -cloud.google.com/go/cloudbuild v1.7.0/go.mod h1:zb5tWh2XI6lR9zQmsm1VRA+7OCuve5d8S+zJUul8KTg= -cloud.google.com/go/cloudbuild v1.9.0/go.mod h1:qK1d7s4QlO0VwfYn5YuClDGg2hfmLZEb4wQGAbIgL1s= -cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= -cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= -cloud.google.com/go/clouddms v1.5.0/go.mod h1:QSxQnhikCLUw13iAbffF2CZxAER3xDGNHjsTAkQJcQA= -cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= -cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= -cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= -cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI= -cloud.google.com/go/cloudtasks v1.9.0/go.mod h1:w+EyLsVkLWHcOaqNEyvcKAsWp9p29dL6uL9Nst1cI7Y= -cloud.google.com/go/cloudtasks v1.10.0/go.mod h1:NDSoTLkZ3+vExFEWu2UJV1arUyzVDAiZtdWcsUyNwBs= -cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= -cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= -cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= -cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= -cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= -cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= -cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= -cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= -cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= -cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= -cloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/JlizULFrI= -cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= -cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= -cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= -cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= -cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= -cloud.google.com/go/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w= -cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= -cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= -cloud.google.com/go/container v1.13.1/go.mod h1:6wgbMPeQRw9rSnKBCAJXnds3Pzj03C4JHamr8asWKy4= -cloud.google.com/go/container v1.14.0/go.mod h1:3AoJMPhHfLDxLvrlVWaK57IXzaPnLaZq63WX59aQBfM= -cloud.google.com/go/container v1.15.0/go.mod h1:ft+9S0WGjAyjDggg5S06DXj+fHJICWg8L7isCQe9pQA= -cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= -cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= -cloud.google.com/go/containeranalysis v0.7.0/go.mod h1:9aUL+/vZ55P2CXfuZjS4UjQ9AgXoSw8Ts6lemfmxBxI= -cloud.google.com/go/containeranalysis v0.9.0/go.mod h1:orbOANbwk5Ejoom+s+DUCTTJ7IBdBQJDcSylAx/on9s= -cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= -cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= -cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= -cloud.google.com/go/datacatalog v1.7.0/go.mod h1:9mEl4AuDYWw81UGc41HonIHH7/sn52H0/tc8f8ZbZIE= -cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM= -cloud.google.com/go/datacatalog v1.8.1/go.mod h1:RJ58z4rMp3gvETA465Vg+ag8BGgBdnRPEMMSTr5Uv+M= -cloud.google.com/go/datacatalog v1.12.0/go.mod h1:CWae8rFkfp6LzLumKOnmVh4+Zle4A3NXLzVJ1d1mRm0= -cloud.google.com/go/datacatalog v1.13.0/go.mod h1:E4Rj9a5ZtAxcQJlEBTLgMTphfP11/lNaAshpoBgemX8= -cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= -cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= -cloud.google.com/go/dataflow v0.8.0/go.mod h1:Rcf5YgTKPtQyYz8bLYhFoIV/vP39eL7fWNcSOyFfLJE= -cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= -cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= -cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= -cloud.google.com/go/dataform v0.6.0/go.mod h1:QPflImQy33e29VuapFdf19oPbE4aYTJxr31OAPV+ulA= -cloud.google.com/go/dataform v0.7.0/go.mod h1:7NulqnVozfHvWUBpMDfKMUESr+85aJsC/2O0o3jWPDE= -cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= -cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= -cloud.google.com/go/datafusion v1.6.0/go.mod h1:WBsMF8F1RhSXvVM8rCV3AeyWVxcC2xY6vith3iw3S+8= -cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= -cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= -cloud.google.com/go/datalabeling v0.7.0/go.mod h1:WPQb1y08RJbmpM3ww0CSUAGweL0SxByuW2E+FU+wXcM= -cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= -cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= -cloud.google.com/go/dataplex v1.5.2/go.mod h1:cVMgQHsmfRoI5KFYq4JtIBEUbYwc3c7tXmIDhRmNNVQ= -cloud.google.com/go/dataplex v1.6.0/go.mod h1:bMsomC/aEJOSpHXdFKFGQ1b0TDPIeL28nJObeO1ppRs= -cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= -cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= -cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= -cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= -cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= -cloud.google.com/go/dataqna v0.7.0/go.mod h1:Lx9OcIIeqCrw1a6KdO3/5KMP1wAmTc0slZWwP12Qq3c= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM= -cloud.google.com/go/datastore v1.11.0/go.mod h1:TvGxBIHCS50u8jzG+AW/ppf87v1of8nwzFNgEZU1D3c= -cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= -cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= -cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= -cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2/XoS5yi88q4= -cloud.google.com/go/datastream v1.6.0/go.mod h1:6LQSuswqLa7S4rPAOZFVjHIG3wJIjZcZrw8JDEDJuIs= -cloud.google.com/go/datastream v1.7.0/go.mod h1:uxVRMm2elUSPuh65IbZpzJNMbuzkcvu5CjMqVIUHrww= -cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= -cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= -cloud.google.com/go/deploy v1.6.0/go.mod h1:f9PTHehG/DjCom3QH0cntOVRm93uGBDt2vKzAPwpXQI= -cloud.google.com/go/deploy v1.8.0/go.mod h1:z3myEJnA/2wnB4sgjqdMfgxCA0EqC3RBTNcVPs93mtQ= -cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= -cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= -cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= -cloud.google.com/go/dialogflow v1.18.0/go.mod h1:trO7Zu5YdyEuR+BhSNOqJezyFQ3aUzz0njv7sMx/iek= -cloud.google.com/go/dialogflow v1.19.0/go.mod h1:JVmlG1TwykZDtxtTXujec4tQ+D8SBFMoosgy+6Gn0s0= -cloud.google.com/go/dialogflow v1.29.0/go.mod h1:b+2bzMe+k1s9V+F2jbJwpHPzrnIyHihAdRFMtn2WXuM= -cloud.google.com/go/dialogflow v1.31.0/go.mod h1:cuoUccuL1Z+HADhyIA7dci3N5zUssgpBJmCzI6fNRB4= -cloud.google.com/go/dialogflow v1.32.0/go.mod h1:jG9TRJl8CKrDhMEcvfcfFkkpp8ZhgPz3sBGmAUYJ2qE= -cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= -cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= -cloud.google.com/go/dlp v1.9.0/go.mod h1:qdgmqgTyReTz5/YNSSuueR8pl7hO0o9bQ39ZhtgkWp4= -cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= -cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= -cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= -cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc0ZvxxfQY1bg4= -cloud.google.com/go/documentai v1.16.0/go.mod h1:o0o0DLTEZ+YnJZ+J4wNfTxmDVyrkzFvttBXXtYRMHkM= -cloud.google.com/go/documentai v1.18.0/go.mod h1:F6CK6iUH8J81FehpskRmhLq/3VlwQvb7TvwOceQ2tbs= -cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= -cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= -cloud.google.com/go/domains v0.8.0/go.mod h1:M9i3MMDzGFXsydri9/vW+EWz9sWb4I6WyHqdlAk0idE= -cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= -cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= -cloud.google.com/go/edgecontainer v0.3.0/go.mod h1:FLDpP4nykgwwIfcLt6zInhprzw0lEi2P1fjO6Ie0qbc= -cloud.google.com/go/edgecontainer v1.0.0/go.mod h1:cttArqZpBB2q58W/upSG++ooo6EsblxDIolxa3jSjbY= -cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= -cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= -cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= -cloud.google.com/go/essentialcontacts v1.5.0/go.mod h1:ay29Z4zODTuwliK7SnX8E86aUF2CTzdNtvv42niCX0M= -cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= -cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= -cloud.google.com/go/eventarc v1.10.0/go.mod h1:u3R35tmZ9HvswGRBnF48IlYgYeBcPUCjkr4BTdem2Kw= -cloud.google.com/go/eventarc v1.11.0/go.mod h1:PyUjsUKPWoRBCHeOxZd/lbOOjahV41icXyUY5kSTvVY= -cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= -cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= -cloud.google.com/go/filestore v1.5.0/go.mod h1:FqBXDWBp4YLHqRnVGveOkHDf8svj9r5+mUDLupOWEDs= -cloud.google.com/go/filestore v1.6.0/go.mod h1:di5unNuss/qfZTw2U9nhFqo8/ZDSc466dre85Kydllg= -cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= -cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= -cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= -cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= -cloud.google.com/go/functions v1.9.0/go.mod h1:Y+Dz8yGguzO3PpIjhLTbnqV1CWmgQ5UwtlpzoyquQ08= -cloud.google.com/go/functions v1.10.0/go.mod h1:0D3hEOe3DbEvCXtYOZHQZmD+SzYsi1YbI7dGvHfldXw= -cloud.google.com/go/functions v1.12.0/go.mod h1:AXWGrF3e2C/5ehvwYo/GH6O5s09tOPksiKhz+hH8WkA= -cloud.google.com/go/functions v1.13.0/go.mod h1:EU4O007sQm6Ef/PwRsI8N2umygGqPBS/IZQKBQBcJ3c= -cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= -cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= -cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= -cloud.google.com/go/gaming v1.8.0/go.mod h1:xAqjS8b7jAVW0KFYeRUxngo9My3f33kFmua++Pi+ggM= -cloud.google.com/go/gaming v1.9.0/go.mod h1:Fc7kEmCObylSWLO334NcO+O9QMDyz+TKC4v1D7X+Bc0= -cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= -cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= -cloud.google.com/go/gkebackup v0.4.0/go.mod h1:byAyBGUwYGEEww7xsbnUTBHIYcOPy/PgUWUtOeRm9Vg= -cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= -cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= -cloud.google.com/go/gkeconnect v0.7.0/go.mod h1:SNfmVqPkaEi3bF/B3CNZOAYPYdg7sU+obZ+QTky2Myw= -cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= -cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= -cloud.google.com/go/gkehub v0.11.0/go.mod h1:JOWHlmN+GHyIbuWQPl47/C2RFhnFKH38jH9Ascu3n0E= -cloud.google.com/go/gkehub v0.12.0/go.mod h1:djiIwwzTTBrF5NaXCGv3mf7klpEMcST17VBTVVDcuaw= -cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= -cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= -cloud.google.com/go/gkemulticloud v0.5.0/go.mod h1:W0JDkiyi3Tqh0TJr//y19wyb1yf8llHVto2Htf2Ja3Y= -cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= -cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= -cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= -cloud.google.com/go/gsuiteaddons v1.5.0/go.mod h1:TFCClYLd64Eaa12sFVmUyG62tk4mdIsI7pAnSXRkcFo= -cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= -cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= -cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= -cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= -cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE= -cloud.google.com/go/iam v0.11.0/go.mod h1:9PiLDanza5D+oWFZiH1uG+RnRCfEGKoyl6yo4cgWZGY= -cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= -cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= -cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= -cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= -cloud.google.com/go/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= -cloud.google.com/go/iap v1.7.0/go.mod h1:beqQx56T9O1G1yNPph+spKpNibDlYIiIixiqsQXxLIo= -cloud.google.com/go/iap v1.7.1/go.mod h1:WapEwPc7ZxGt2jFGB/C/bm+hP0Y6NXzOYGjpPnmMS74= -cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= -cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= -cloud.google.com/go/ids v1.3.0/go.mod h1:JBdTYwANikFKaDP6LtW5JAi4gubs57SVNQjemdt6xV4= -cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= -cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= -cloud.google.com/go/iot v1.5.0/go.mod h1:mpz5259PDl3XJthEmh9+ap0affn/MqNSP4My77Qql9o= -cloud.google.com/go/iot v1.6.0/go.mod h1:IqdAsmE2cTYYNO1Fvjfzo9po179rAtJeVGUvkLN3rLE= -cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= -cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= -cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= -cloud.google.com/go/kms v1.8.0/go.mod h1:4xFEhYFqvW+4VMELtZyxomGSYtSQKzM178ylFW4jMAg= -cloud.google.com/go/kms v1.9.0/go.mod h1:qb1tPTgfF9RQP8e1wq4cLFErVuTJv7UsSC915J8dh3w= -cloud.google.com/go/kms v1.10.0/go.mod h1:ng3KTUtQQU9bPX3+QGLsflZIHlkbn8amFAMY63m8d24= -cloud.google.com/go/kms v1.10.1/go.mod h1:rIWk/TryCkR59GMC3YtHtXeLzd634lBbKenvyySAyYI= -cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= -cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= -cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= -cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= -cloud.google.com/go/language v1.9.0/go.mod h1:Ns15WooPM5Ad/5no/0n81yUetis74g3zrbeJBE+ptUY= -cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= -cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/lifesciences v0.8.0/go.mod h1:lFxiEOMqII6XggGbOnKiyZ7IBwoIqA84ClvoezaA/bo= -cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= -cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= -cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= -cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= -cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= -cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= -cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= -cloud.google.com/go/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= -cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= -cloud.google.com/go/maps v0.6.0/go.mod h1:o6DAMMfb+aINHz/p/jbcY+mYeXBoZoxTfdSQ8VAJaCw= -cloud.google.com/go/maps v0.7.0/go.mod h1:3GnvVl3cqeSvgMcpRlQidXsPYuDGQ8naBis7MVzpXsY= -cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= -cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= -cloud.google.com/go/mediatranslation v0.7.0/go.mod h1:LCnB/gZr90ONOIQLgSXagp8XUW1ODs2UmUMvcgMfI2I= -cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= -cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= -cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= -cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY= -cloud.google.com/go/memcache v1.9.0/go.mod h1:8oEyzXCu+zo9RzlEaEjHl4KkgjlNDaXbCQeQWlzNFJM= -cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= -cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= -cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= -cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= -cloud.google.com/go/metastore v1.10.0/go.mod h1:fPEnH3g4JJAk+gMRnrAnoqyv2lpUCqJPWOodSaf45Eo= -cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= -cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= -cloud.google.com/go/monitoring v1.12.0/go.mod h1:yx8Jj2fZNEkL/GYZyTLS4ZtZEZN8WtDEiEqG4kLK50w= -cloud.google.com/go/monitoring v1.13.0/go.mod h1:k2yMBAB1H9JT/QETjNkgdCGD9bPF712XiLTVr+cBrpw= -cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= -cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= -cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= -cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5MpTBnNm39iAVpC3TmsExt8= -cloud.google.com/go/networkconnectivity v1.10.0/go.mod h1:UP4O4sWXJG13AqrTdQCD9TnLGEbtNRqjuaaA7bNjF5E= -cloud.google.com/go/networkconnectivity v1.11.0/go.mod h1:iWmDD4QF16VCDLXUqvyspJjIEtBR/4zq5hwnY2X3scM= -cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= -cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= -cloud.google.com/go/networkmanagement v1.6.0/go.mod h1:5pKPqyXjB/sgtvB5xqOemumoQNB7y95Q7S+4rjSOPYY= -cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= -cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= -cloud.google.com/go/networksecurity v0.7.0/go.mod h1:mAnzoxx/8TBSyXEeESMy9OOYwo1v+gZ5eMRnsT5bC8k= -cloud.google.com/go/networksecurity v0.8.0/go.mod h1:B78DkqsxFG5zRSVuwYFRZ9Xz8IcQ5iECsNrPn74hKHU= -cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= -cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= -cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= -cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vuYs+kBJ/gu0= -cloud.google.com/go/notebooks v1.7.0/go.mod h1:PVlaDGfJgj1fl1S3dUwhFMXFgfYGhYQt2164xOMONmE= -cloud.google.com/go/notebooks v1.8.0/go.mod h1:Lq6dYKOYOWUCTvw5t2q1gp1lAp0zxAxRycayS0iJcqQ= -cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= -cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= -cloud.google.com/go/optimization v1.3.1/go.mod h1:IvUSefKiwd1a5p0RgHDbWCIbDFgKuEdB+fPPuP0IDLI= -cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= -cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= -cloud.google.com/go/orchestration v1.6.0/go.mod h1:M62Bevp7pkxStDfFfTuCOaXgaaqRAga1yKyoMtEoWPQ= -cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= -cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= -cloud.google.com/go/orgpolicy v1.10.0/go.mod h1:w1fo8b7rRqlXlIJbVhOMPrwVljyuW5mqssvBtU18ONc= -cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= -cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= -cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= -cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh+l4WK6GnWw= -cloud.google.com/go/osconfig v1.11.0/go.mod h1:aDICxrur2ogRd9zY5ytBLV89KEgT2MKB2L/n6x1ooPw= -cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= -cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= -cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= -cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo= -cloud.google.com/go/oslogin v1.9.0/go.mod h1:HNavntnH8nzrn8JCTT5fj18FuJLFJc4NaZJtBnQtKFs= -cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= -cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= -cloud.google.com/go/phishingprotection v0.7.0/go.mod h1:8qJI4QKHoda/sb/7/YmMQ2omRLSLYSu9bU0EKCNI+Lk= -cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= -cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= -cloud.google.com/go/policytroubleshooter v1.5.0/go.mod h1:Rz1WfV+1oIpPdN2VvvuboLVRsB1Hclg3CKQ53j9l8vw= -cloud.google.com/go/policytroubleshooter v1.6.0/go.mod h1:zYqaPTsmfvpjm5ULxAyD/lINQxJ0DDsnWOP/GZ7xzBc= -cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= -cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= -cloud.google.com/go/privatecatalog v0.7.0/go.mod h1:2s5ssIFO69F5csTXcwBP7NPFTZvps26xGzvQ2PQaBYg= -cloud.google.com/go/privatecatalog v0.8.0/go.mod h1:nQ6pfaegeDAq/Q5lrfCQzQLhubPiZhSaNhIgfJlnIXs= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/pubsub v1.26.0/go.mod h1:QgBH3U/jdJy/ftjPhTkyXNj543Tin1pRYcdcPRnFIRI= -cloud.google.com/go/pubsub v1.27.1/go.mod h1:hQN39ymbV9geqBnfQq6Xf63yNhUAhv9CZhzp5O6qsW0= -cloud.google.com/go/pubsub v1.28.0/go.mod h1:vuXFpwaVoIPQMGXqRyUQigu/AX1S3IWugR9xznmcXX8= -cloud.google.com/go/pubsub v1.30.0/go.mod h1:qWi1OPS0B+b5L+Sg6Gmc9zD1Y+HaM0MdUr7LsupY1P4= -cloud.google.com/go/pubsublite v1.5.0/go.mod h1:xapqNQ1CuLfGi23Yda/9l4bBCKz/wC3KIJ5gKcxveZg= -cloud.google.com/go/pubsublite v1.6.0/go.mod h1:1eFCS0U11xlOuMFV/0iBqw3zP12kddMeCbj/F3FSj9k= -cloud.google.com/go/pubsublite v1.7.0/go.mod h1:8hVMwRXfDfvGm3fahVbtDbiLePT3gpoiJYJY+vxWxVM= -cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= -cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= -cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= -cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= -cloud.google.com/go/recaptchaenterprise/v2 v2.4.0/go.mod h1:Am3LHfOuBstrLrNCBrlI5sbwx9LBg3te2N6hGvHn2mE= -cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U= -cloud.google.com/go/recaptchaenterprise/v2 v2.6.0/go.mod h1:RPauz9jeLtB3JVzg6nCbe12qNoaa8pXc4d/YukAmcnA= -cloud.google.com/go/recaptchaenterprise/v2 v2.7.0/go.mod h1:19wVj/fs5RtYtynAPJdDTb69oW0vNHYDBTbB4NvMD9c= -cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= -cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= -cloud.google.com/go/recommendationengine v0.7.0/go.mod h1:1reUcE3GIu6MeBz/h5xZJqNLuuVjNg1lmWMPyjatzac= -cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= -cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= -cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= -cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= -cloud.google.com/go/recommender v1.9.0/go.mod h1:PnSsnZY7q+VL1uax2JWkt/UegHssxjUVVCrX52CuEmQ= -cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= -cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= -cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= -cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM= -cloud.google.com/go/redis v1.11.0/go.mod h1:/X6eicana+BWcUda5PpwZC48o37SiFVTFSs0fWAJ7uQ= -cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= -cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= -cloud.google.com/go/resourcemanager v1.5.0/go.mod h1:eQoXNAiAvCf5PXxWxXjhKQoTMaUSNrEfg+6qdf/wots= -cloud.google.com/go/resourcemanager v1.6.0/go.mod h1:YcpXGRs8fDzcUl1Xw8uOVmI8JEadvhRIkoXXUNVYcVo= -cloud.google.com/go/resourcemanager v1.7.0/go.mod h1:HlD3m6+bwhzj9XCouqmeiGuni95NTrExfhoSrkC/3EI= -cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= -cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= -cloud.google.com/go/resourcesettings v1.5.0/go.mod h1:+xJF7QSG6undsQDfsCJyqWXyBwUoJLhetkRMDRnIoXA= -cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= -cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= -cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= -cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y= -cloud.google.com/go/retail v1.12.0/go.mod h1:UMkelN/0Z8XvKymXFbD4EhFJlYKRx1FGhQkVPU5kF14= -cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= -cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= -cloud.google.com/go/run v0.8.0/go.mod h1:VniEnuBwqjigv0A7ONfQUaEItaiCRVujlMqerPPiktM= -cloud.google.com/go/run v0.9.0/go.mod h1:Wwu+/vvg8Y+JUApMwEDfVfhetv30hCG4ZwDR/IXl2Qg= -cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= -cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= -cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= -cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44= -cloud.google.com/go/scheduler v1.8.0/go.mod h1:TCET+Y5Gp1YgHT8py4nlg2Sew8nUHMqcpousDgXJVQc= -cloud.google.com/go/scheduler v1.9.0/go.mod h1:yexg5t+KSmqu+njTIh3b7oYPheFtBWGcbVUYF1GGMIc= -cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= -cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= -cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= -cloud.google.com/go/secretmanager v1.10.0/go.mod h1:MfnrdvKMPNra9aZtQFvBcvRU54hbPD8/HayQdlUgJpU= -cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= -cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= -cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= -cloud.google.com/go/security v1.9.0/go.mod h1:6Ta1bO8LXI89nZnmnsZGp9lVoVWXqsVbIq/t9dzI+2Q= -cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH8T5GUSb9IA= -cloud.google.com/go/security v1.12.0/go.mod h1:rV6EhrpbNHrrxqlvW0BWAIawFWq3X90SduMJdFwtLB8= -cloud.google.com/go/security v1.13.0/go.mod h1:Q1Nvxl1PAgmeW0y3HTt54JYIvUdtcpYKVfIB8AOMZ+0= -cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= -cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= -cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= -cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZIZF7SAR0wWECrjdk= -cloud.google.com/go/securitycenter v1.18.1/go.mod h1:0/25gAzCM/9OL9vVx4ChPeM/+DlfGQJDwBy/UC8AKK0= -cloud.google.com/go/securitycenter v1.19.0/go.mod h1:LVLmSg8ZkkyaNy4u7HCIshAngSQ8EcIRREP3xBnyfag= -cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= -cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= -cloud.google.com/go/servicecontrol v1.10.0/go.mod h1:pQvyvSRh7YzUF2efw7H87V92mxU8FnFDawMClGCNuAA= -cloud.google.com/go/servicecontrol v1.11.0/go.mod h1:kFmTzYzTUIuZs0ycVqRHNaNhgR+UMUpw9n02l/pY+mc= -cloud.google.com/go/servicecontrol v1.11.1/go.mod h1:aSnNNlwEFBY+PWGQ2DoM0JJ/QUXqV5/ZD9DOLB7SnUk= -cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= -cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= -cloud.google.com/go/servicedirectory v1.6.0/go.mod h1:pUlbnWsLH9c13yGkxCmfumWEPjsRs1RlmJ4pqiNjVL4= -cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UVXjkuw7q5XcG10wx1U= -cloud.google.com/go/servicedirectory v1.8.0/go.mod h1:srXodfhY1GFIPvltunswqXpVxFPpZjf8nkKQT7XcXaY= -cloud.google.com/go/servicedirectory v1.9.0/go.mod h1:29je5JjiygNYlmsGz8k6o+OZ8vd4f//bQLtvzkPPT/s= -cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= -cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= -cloud.google.com/go/servicemanagement v1.6.0/go.mod h1:aWns7EeeCOtGEX4OvZUWCCJONRZeFKiptqKf1D0l/Jc= -cloud.google.com/go/servicemanagement v1.8.0/go.mod h1:MSS2TDlIEQD/fzsSGfCdJItQveu9NXnUniTrq/L8LK4= -cloud.google.com/go/serviceusage v1.3.0/go.mod h1:Hya1cozXM4SeSKTAgGXgj97GlqUvF5JaoXacR1JTP/E= -cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU= -cloud.google.com/go/serviceusage v1.5.0/go.mod h1:w8U1JvqUqwJNPEOTQjrMHkw3IaIFLoLsPLvsE3xueec= -cloud.google.com/go/serviceusage v1.6.0/go.mod h1:R5wwQcbOWsyuOfbP9tGdAnCAc6B9DRwPG1xtWMDeuPA= -cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IWHEN5X4= -cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= -cloud.google.com/go/shell v1.6.0/go.mod h1:oHO8QACS90luWgxP3N9iZVuEiSF84zNyLytb+qE2f9A= -cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= -cloud.google.com/go/spanner v1.44.0/go.mod h1:G8XIgYdOK+Fbcpbs7p2fiprDw4CaZX63whnSMLVBxjk= -cloud.google.com/go/spanner v1.45.0/go.mod h1:FIws5LowYz8YAE1J8fOS7DJup8ff7xJeetWEo5REA2M= -cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= -cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= -cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= -cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSyoooSpco= -cloud.google.com/go/speech v1.14.1/go.mod h1:gEosVRPJ9waG7zqqnsHpYTOoAS4KouMRLDFMekpJ0J0= -cloud.google.com/go/speech v1.15.0/go.mod h1:y6oH7GhqCaZANH7+Oe0BhgIogsNInLlz542tg3VqeYI= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= -cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= -cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= -cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= -cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= -cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= -cloud.google.com/go/storagetransfer v1.7.0/go.mod h1:8Giuj1QNb1kfLAiWM1bN6dHzfdlDAVC9rv9abHot2W4= -cloud.google.com/go/storagetransfer v1.8.0/go.mod h1:JpegsHHU1eXg7lMHkvf+KE5XDJ7EQu0GwNJbbVGanEw= -cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= -cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= -cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= -cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA= -cloud.google.com/go/talent v1.5.0/go.mod h1:G+ODMj9bsasAEJkQSzO2uHQWXHHXUomArjWQQYkqK6c= -cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= -cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= -cloud.google.com/go/texttospeech v1.6.0/go.mod h1:YmwmFT8pj1aBblQOI3TfKmwibnsfvhIBzPXcW4EBovc= -cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= -cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= -cloud.google.com/go/tpu v1.5.0/go.mod h1:8zVo1rYDFuW2l4yZVY0R0fb/v44xLh3llq7RuV61fPM= -cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= -cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= -cloud.google.com/go/trace v1.8.0/go.mod h1:zH7vcsbAhklH8hWFig58HvxcxyQbaIqMarMg9hn5ECA= -cloud.google.com/go/trace v1.9.0/go.mod h1:lOQqpE5IaWY0Ixg7/r2SjixMuc6lfTFeO4QGM4dQWOk= -cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= -cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= -cloud.google.com/go/translate v1.5.0/go.mod h1:29YDSYveqqpA1CQFD7NQuP49xymq17RXNaUDdc0mNu0= -cloud.google.com/go/translate v1.6.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= -cloud.google.com/go/translate v1.7.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= -cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= -cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= -cloud.google.com/go/video v1.12.0/go.mod h1:MLQew95eTuaNDEGriQdcYn0dTwf9oWiA4uYebxM5kdg= -cloud.google.com/go/video v1.13.0/go.mod h1:ulzkYlYgCp15N2AokzKjy7MQ9ejuynOJdf1tR5lGthk= -cloud.google.com/go/video v1.14.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= -cloud.google.com/go/video v1.15.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= -cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= -cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= -cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= -cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= -cloud.google.com/go/videointelligence v1.10.0/go.mod h1:LHZngX1liVtUhZvi2uNS0VQuOzNi2TkY1OakiuoUOjU= -cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= -cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= -cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= -cloud.google.com/go/vision/v2 v2.4.0/go.mod h1:VtI579ll9RpVTrdKdkMzckdnwMyX2JILb+MhPqRbPsY= -cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= -cloud.google.com/go/vision/v2 v2.6.0/go.mod h1:158Hes0MvOS9Z/bDMSFpjwsUrZ5fPrdwuyyvKSGAGMY= -cloud.google.com/go/vision/v2 v2.7.0/go.mod h1:H89VysHy21avemp6xcf9b9JvZHVehWbET0uT/bcuY/0= -cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= -cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= -cloud.google.com/go/vmmigration v1.5.0/go.mod h1:E4YQ8q7/4W9gobHjQg4JJSgXXSgY21nA5r8swQV+Xxc= -cloud.google.com/go/vmmigration v1.6.0/go.mod h1:bopQ/g4z+8qXzichC7GW1w2MjbErL54rk3/C843CjfY= -cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= -cloud.google.com/go/vmwareengine v0.2.2/go.mod h1:sKdctNJxb3KLZkE/6Oui94iw/xs9PRNC2wnNLXsHvH8= -cloud.google.com/go/vmwareengine v0.3.0/go.mod h1:wvoyMvNWdIzxMYSpH/R7y2h5h3WFkx6d+1TIsP39WGY= -cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= -cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= -cloud.google.com/go/vpcaccess v1.6.0/go.mod h1:wX2ILaNhe7TlVa4vC5xce1bCnqE3AeH27RV31lnmZes= -cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= -cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= -cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= -cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A= -cloud.google.com/go/webrisk v1.8.0/go.mod h1:oJPDuamzHXgUc+b8SiHRcVInZQuybnvEW72PqTc7sSg= -cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= -cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= -cloud.google.com/go/websecurityscanner v1.5.0/go.mod h1:Y6xdCPy81yi0SQnDY1xdNTNpfY1oAgXUlcfN3B3eSng= -cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= -cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= -cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= -cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= -git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= @@ -608,70 +12,39 @@ github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbt github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 h1:mFRzDkZVAjdal+s7s0MwaRv9igoPqLRdzOLzw/8Xvq8= github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/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/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= -github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= -github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= -github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= -github.com/alecthomas/kingpin/v2 v2.4.0/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alexbrainman/sspi v0.0.0-20231016080023-1a75b4708caa h1:LHTHcTQiSGT7VVbI0o4wBRNQIgn917usHWOd6VAffYI= github.com/alexbrainman/sspi v0.0.0-20231016080023-1a75b4708caa/go.mod h1:cEWa1LVoE5KvSD9ONXsZrj0z6KqySlCCNKHlLzbqAt4= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= -github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= -github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= -github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI= -github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= +github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= +github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= @@ -687,9 +60,8 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -699,7 +71,6 @@ github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= @@ -707,23 +78,10 @@ github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+m github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful/v3 v3.12.0 h1:y2DdzBAURM29NFF94q6RaY4vjIH1rtwDapwQtU84iWk= -github.com/emicklei/go-restful/v3 v3.12.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= +github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= -github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= -github.com/envoyproxy/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCwHLhwx1WguiVDV7pTG/tI= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= -github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= -github.com/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lShz4oaXpDTX2bLe7ls= github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -732,35 +90,25 @@ github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-asn1-ber/asn1-ber v1.5.6 h1:CYsqysemXfEaQbyrLJmdsCRuufHoLa3P/gGWGl5TDrM= github.com/go-asn1-ber/asn1-ber v1.5.6/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= -github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= -github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= -github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= -github.com/go-fonts/liberation v0.2.0/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= -github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmnUIzUY= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= -github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-ldap/ldap/v3 v3.4.8 h1:loKJyspcRezt2Q3ZRMq2p/0v8iOurlmeXDPw6fikSvQ= github.com/go-ldap/ldap/v3 v3.4.8/go.mod h1:qS3Sjlu76eHfHGpUdWkAXQTw4beih+cHsco2jXlIXrk= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= @@ -814,85 +162,39 @@ github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= -github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= -github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= -github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/cel-go v0.17.8 h1:j9m730pMZt1Fc4oKhCLUHfjj6527LuhYcYw0Rl8gqto= -github.com/google/cel-go v0.17.8/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= -github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/cel-go v0.20.1 h1:nDx9r8S3L4pE61eDdt8igGj8rf5kjYR3ILxWIpWNi84= +github.com/google/cel-go v0.20.1/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -901,60 +203,16 @@ github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.0/go.mod h1:OJpEgntRZo8ugHpF9hkoLJbS5dSI20XZeXJ9JVywLlM= -github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= -github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= -github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= -github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= -github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= -github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= -github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= -github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= -github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= -github.com/googleapis/gax-go/v2 v2.10.0/go.mod h1:4UOEnMCrxsSqQ940WnTiD6qJ63le2ev3xfyagutxiPw= -github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= @@ -971,8 +229,6 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= @@ -982,9 +238,6 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= @@ -1008,30 +261,22 @@ github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9q github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= -github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -1039,9 +284,8 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= -github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= -github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -1053,15 +297,10 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0 github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= -github.com/miekg/dns v1.1.59 h1:C9EXc/UToRwKLhK5wKU/I4QVsBUc8kE6MkHBkeypWZs= -github.com/miekg/dns v1.1.59/go.mod h1:nZpewl5p6IvctfgrckopVx2OlSEHPRO/U4SYkRklrEk= -github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= -github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.1.62 h1:cN8OuEF1/x5Rq6Np+h1epln8OiyPWV+lROx9LxcGgIQ= +github.com/miekg/dns v1.1.62/go.mod h1:mvDlcItzm+br7MToIKqkglaGhlFMHJ9DTNNWONWXbNQ= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -1076,15 +315,15 @@ github.com/munnerz/crd-schema-fuzz v1.0.0/go.mod h1:4z/rcm37JxUkSsExFcLL6ZIT1SgD github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +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/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= github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo/v2 v2.17.2 h1:7eMhcy3GimbsA3hEnVKdw/PQM9XN9krpKVXsZdph0/g= -github.com/onsi/ginkgo/v2 v2.17.2/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc= +github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= +github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= @@ -1094,70 +333,55 @@ github.com/pavlo-v-chernykh/keystore-go/v4 v4.5.0/go.mod h1:lAVhWwbNaveeJmxrxuST github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= -github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= -github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= -github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= -github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= +github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.46.0 h1:doXzt5ybi1HBKpsZOL0sSkaNHJJqkyfEWZGGqqScV0Y= -github.com/prometheus/common v0.46.0/go.mod h1:Tp0qkxpb9Jsg54QMe+EAmqXkSV7Evdy1BTn+g2pa/hQ= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= -github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= -github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= -github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= github.com/segmentio/asm v1.1.3 h1:WM03sfUOENvvKexOLp+pCqgb/WDjsi7EK8gIsICtzhc= github.com/segmentio/asm v1.1.3/go.mod h1:Ld3L4ZXGNcSLRg4JBsZ3//1+f/TjYl0Mzen/DQy1EJg= github.com/segmentio/encoding v0.4.0 h1:MEBYvRqiUB2nfR2criEXWqwdY6HJOUrCn5hboVOVmy8= github.com/segmentio/encoding v0.4.0/go.mod h1:/d03Cd8PoaDeceuhUUUQWjU0KhWjrmYrWPgtJHYZSnI= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -1175,13 +399,9 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= @@ -1191,70 +411,55 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1 github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= -github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= -github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= +go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.etcd.io/etcd/api/v3 v3.5.13 h1:8WXU2/NBge6AUF1K1gOexB6e07NgsN1hXK0rSTtgSp4= -go.etcd.io/etcd/api/v3 v3.5.13/go.mod h1:gBqlqkcMMZMVTMm4NDZloEVJzxQOQIls8splbqBDa0c= -go.etcd.io/etcd/client/pkg/v3 v3.5.13 h1:RVZSAnWWWiI5IrYAXjQorajncORbS0zI48LQlE2kQWg= -go.etcd.io/etcd/client/pkg/v3 v3.5.13/go.mod h1:XxHT4u1qU12E2+po+UVPrEeL94Um6zL58ppuJWXSAB8= -go.etcd.io/etcd/client/v2 v2.305.10 h1:MrmRktzv/XF8CvtQt+P6wLUlURaNpSDJHFZhe//2QE4= -go.etcd.io/etcd/client/v2 v2.305.10/go.mod h1:m3CKZi69HzilhVqtPDcjhSGp+kA1OmbNn0qamH80xjA= -go.etcd.io/etcd/client/v3 v3.5.13 h1:o0fHTNJLeO0MyVbc7I3fsCf6nrOqn5d+diSarKnB2js= -go.etcd.io/etcd/client/v3 v3.5.13/go.mod h1:cqiAeY8b5DEEcpxvgWKsbLIWNM/8Wy2xJSDMtioMcoI= -go.etcd.io/etcd/pkg/v3 v3.5.10 h1:WPR8K0e9kWl1gAhB5A7gEa5ZBTNkT9NdNWrR8Qpo1CM= -go.etcd.io/etcd/pkg/v3 v3.5.10/go.mod h1:TKTuCKKcF1zxmfKWDkfz5qqYaE3JncKKZPFf8c1nFUs= -go.etcd.io/etcd/raft/v3 v3.5.10 h1:cgNAYe7xrsrn/5kXMSaH8kM/Ky8mAdMqGOxyYwpP0LA= -go.etcd.io/etcd/raft/v3 v3.5.10/go.mod h1:odD6kr8XQXTy9oQnyMPBOr0TVe+gT0neQhElQ6jbGRc= -go.etcd.io/etcd/server/v3 v3.5.10 h1:4NOGyOwD5sUZ22PiWYKmfxqoeh72z6EhYjNosKGLmZg= -go.etcd.io/etcd/server/v3 v3.5.10/go.mod h1:gBplPHfs6YI0L+RpGkTQO7buDbHv5HJGG/Bst0/zIPo= +go.etcd.io/etcd/api/v3 v3.5.14 h1:vHObSCxyB9zlF60w7qzAdTcGaglbJOpSj1Xj9+WGxq0= +go.etcd.io/etcd/api/v3 v3.5.14/go.mod h1:BmtWcRlQvwa1h3G2jvKYwIQy4PkHlDej5t7uLMUdJUU= +go.etcd.io/etcd/client/pkg/v3 v3.5.14 h1:SaNH6Y+rVEdxfpA2Jr5wkEvN6Zykme5+YnbCkxvuWxQ= +go.etcd.io/etcd/client/pkg/v3 v3.5.14/go.mod h1:8uMgAokyG1czCtIdsq+AGyYQMvpIKnSvPjFMunkgeZI= +go.etcd.io/etcd/client/v2 v2.305.13 h1:RWfV1SX5jTU0lbCvpVQe3iPQeAHETWdOTb6pxhd77C8= +go.etcd.io/etcd/client/v2 v2.305.13/go.mod h1:iQnL7fepbiomdXMb3om1rHq96htNNGv2sJkEcZGDRRg= +go.etcd.io/etcd/client/v3 v3.5.14 h1:CWfRs4FDaDoSz81giL7zPpZH2Z35tbOrAJkkjMqOupg= +go.etcd.io/etcd/client/v3 v3.5.14/go.mod h1:k3XfdV/VIHy/97rqWjoUzrj9tk7GgJGH9J8L4dNXmAk= +go.etcd.io/etcd/pkg/v3 v3.5.13 h1:st9bDWNsKkBNpP4PR1MvM/9NqUPfvYZx/YXegsYEH8M= +go.etcd.io/etcd/pkg/v3 v3.5.13/go.mod h1:N+4PLrp7agI/Viy+dUYpX7iRtSPvKq+w8Y14d1vX+m0= +go.etcd.io/etcd/raft/v3 v3.5.13 h1:7r/NKAOups1YnKcfro2RvGGo2PTuizF/xh26Z2CTAzA= +go.etcd.io/etcd/raft/v3 v3.5.13/go.mod h1:uUFibGLn2Ksm2URMxN1fICGhk8Wu96EfDQyuLhAcAmw= +go.etcd.io/etcd/server/v3 v3.5.13 h1:V6KG+yMfMSqWt+lGnhFpP5z5dRUj1BDRJ5k1fQ9DFok= +go.etcd.io/etcd/server/v3 v3.5.13/go.mod h1:K/8nbsGupHqmr5MkgaZpLlH1QdX1pcNQLAkODy44XcQ= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 h1:A3SayB3rNyt+1S6qpI9mHPkeHTZbD7XILEqWnYZb2l0= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0/go.mod h1:27iA5uvhuRNmalO+iEUdVn5ZMj2qy10Mm+XRIpRmyuU= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 h1:Xs2Ncz0gNihqu9iosIZ5SkBbWo5T8JhhLJFMQL1qmLI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0/go.mod h1:vy+2G/6NvVMpwGX/NyLqcC41fxepnuKHk16E6IZUcJc= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 h1:Waw9Wfpo/IXzOI8bCB7DIk+0JZcqqsyn1JFnAc+iam8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0/go.mod h1:wnJIG4fOqyynOnnQF/eQb4/16VlX2EJAHhHgqIqWfAo= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= -go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 h1:r6I7RJCN86bpD/FQwedZ0vSixDpwuWREjW9oRMsmqDc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0/go.mod h1:B9yO6b04uB80CzjedvewuqDhxJxi11s7/GtiGa8bAjI= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= +go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= +go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= +go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= +go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= +go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= +go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= +go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= +go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= @@ -1264,748 +469,186 @@ go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN8 go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/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-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= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= -golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= -golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20200618115811-c13761719519/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20210216034530-4410531fe030/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= +golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= -golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= -golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= -golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= -golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= -golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= -golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= -golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo= -golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-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-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= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-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-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= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= +golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= -gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= -gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= -gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY= -gonum.org/v1/plot v0.10.1/go.mod h1:VZW5OlhkL1mysU9vaqNHnsy86inf6Ot+jB3r+BczCEo= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= -google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= -google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= -google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= -google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= -google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= -google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08= -google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= -google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= -google.golang.org/api v0.106.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= -google.golang.org/api v0.107.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= -google.golang.org/api v0.108.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= -google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI= -google.golang.org/api v0.111.0/go.mod h1:qtFHvU9mhgTJegR31csQ+rwxyUTHOKFqCKWp1J0fdw0= -google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= -google.golang.org/api v0.118.0/go.mod h1:76TtD3vkgmZ66zZzp72bUUklpmQmKlhh6sYtIjYK+5E= -google.golang.org/api v0.122.0/go.mod h1:gcitW0lvnyWjSp9nKxAbdHKIZ6vF4aajGueeslZOyms= -google.golang.org/api v0.124.0/go.mod h1:xu2HQurE5gi/3t1aFCvhPD781p0a3p11sdunTJ2BlP4= -google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= -google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= -google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= -google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= -google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= -google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221117204609-8f9c96812029/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221201204527-e3fa12d562f3/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614GARnxrLsqKREzmNYJACSWWpAWdNMwnD7c2BE= -google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230112194545-e10362b5ecf9/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230113154510-dbe35b8444a5/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230123190316-2c411cf9d197/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230125152338-dcaf20b6aeaa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230127162408-596548ed4efa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44/go.mod h1:8B0gmkoRebU8ukX6HP+4wrVQUY1+6PkQ44BSyIlflHA= -google.golang.org/genproto v0.0.0-20230222225845-10f96fb3dbec/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= -google.golang.org/genproto v0.0.0-20230223222841-637eb2293923/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= -google.golang.org/genproto v0.0.0-20230303212802-e74f57abe488/go.mod h1:TvhZT5f700eVlTNwND1xoEZQeWTB2RY/65kplwl/bFA= -google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= -google.golang.org/genproto v0.0.0-20230320184635-7606e756e683/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= -google.golang.org/genproto v0.0.0-20230323212658-478b75c54725/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230330154414-c0448cd141ea/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230403163135-c38d8f061ccd/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= -google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= -google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda h1:wu/KJm9KJwpfHWhkkZGohVC6KRrc1oJNr4jwtQMOQXw= -google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda/go.mod h1:g2LLCvCeCSir/JJSWosk19BR4NVxGqHUC6rxIRsd7Aw= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291 h1:4HZJ3Xv1cmrJ+0aFo304Zn79ur1HMxptAE7aCPNLSqc= -google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234015-3fc162c6f38a/go.mod h1:xURIpW9ES5+/GZhnV6beoEtxQrnkRGIfP5VQG2tCBLc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 h1:AgADTJarZTBqgjiUzRgfaBchgYB3/WFTC80GPwsMcRI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY= +google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed h1:3RgNmBoI9MZhsj3QxC+AP/qQhNwpCLOvYDYYsFrhFt0= +google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= -google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= -google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= -google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= -google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= -google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo= +google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= @@ -2018,7 +661,6 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWD gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -2029,91 +671,48 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= k8s.io/api v0.18.0/go.mod h1:q2HRQkfDzHMBZL9l/y9rH63PkQl4vae0xRT+8prbrK8= -k8s.io/api v0.30.1 h1:kCm/6mADMdbAxmIh0LBjS54nQBE+U4KmbCfIkF5CpJY= -k8s.io/api v0.30.1/go.mod h1:ddbN2C0+0DIiPntan/bye3SW3PdwLa11/0yqwvuRrJM= +k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU= +k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI= k8s.io/apiextensions-apiserver v0.18.0/go.mod h1:18Cwn1Xws4xnWQNC00FLq1E350b9lUF+aOdIWDOZxgo= -k8s.io/apiextensions-apiserver v0.30.1 h1:4fAJZ9985BmpJG6PkoxVRpXv9vmPUOVzl614xarePws= -k8s.io/apiextensions-apiserver v0.30.1/go.mod h1:R4GuSrlhgq43oRY9sF2IToFh7PVlF1JjfWdoG3pixk4= +k8s.io/apiextensions-apiserver v0.31.1 h1:L+hwULvXx+nvTYX/MKM3kKMZyei+UiSXQWciX/N6E40= +k8s.io/apiextensions-apiserver v0.31.1/go.mod h1:tWMPR3sgW+jsl2xm9v7lAyRF1rYEK71i9G5dRtkknoQ= k8s.io/apimachinery v0.18.0/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= -k8s.io/apimachinery v0.30.1 h1:ZQStsEfo4n65yAdlGTfP/uSHMQSoYzU/oeEbkmF7P2U= -k8s.io/apimachinery v0.30.1/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= +k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= +k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/apiserver v0.18.0/go.mod h1:3S2O6FeBBd6XTo0njUrLxiqk8GNy6wWOftjhJcXYnjw= -k8s.io/apiserver v0.30.1 h1:BEWEe8bzS12nMtDKXzCF5Q5ovp6LjjYkSp8qOPk8LZ8= -k8s.io/apiserver v0.30.1/go.mod h1:i87ZnQ+/PGAmSbD/iEKM68bm1D5reX8fO4Ito4B01mo= +k8s.io/apiserver v0.31.1 h1:Sars5ejQDCRBY5f7R3QFHdqN3s61nhkpaX8/k1iEw1c= +k8s.io/apiserver v0.31.1/go.mod h1:lzDhpeToamVZJmmFlaLwdYZwd7zB+WYRYIboqA1kGxM= k8s.io/client-go v0.18.0/go.mod h1:uQSYDYs4WhVZ9i6AIoEZuwUggLVEF64HOD37boKAtF8= -k8s.io/client-go v0.30.1 h1:uC/Ir6A3R46wdkgCV3vbLyNOYyCJ8oZnjtJGKfytl/Q= -k8s.io/client-go v0.30.1/go.mod h1:wrAqLNs2trwiCH/wxxmT/x3hKVH9PuV0GGW0oDoHVqc= +k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= +k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= k8s.io/code-generator v0.18.0/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= k8s.io/component-base v0.18.0/go.mod h1:u3BCg0z1uskkzrnAKFzulmYaEpZF7XC9Pf/uFyb1v2c= -k8s.io/component-base v0.30.1 h1:bvAtlPh1UrdaZL20D9+sWxsJljMi0QZ3Lmw+kmZAaxQ= -k8s.io/component-base v0.30.1/go.mod h1:e/X9kDiOebwlI41AvBHuWdqFriSRrX50CdwA9TFaHLI= +k8s.io/component-base v0.31.1 h1:UpOepcrX3rQ3ab5NB6g5iP0tvsgJWzxTyAo20sgYSy8= +k8s.io/component-base v0.31.1/go.mod h1:WGeaw7t/kTsqpVTaCoVEtillbqAhF2/JgvO0LDOMa0w= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= -k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-aggregator v0.30.1 h1:ymR2BsxDacTKwzKTuNhGZttuk009c+oZbSeD+IPX5q4= -k8s.io/kube-aggregator v0.30.1/go.mod h1:SFbqWsM6ea8dHd3mPLsZFzJHbjBOS5ykIgJh4znZ5iQ= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-aggregator v0.31.1 h1:vrYBTTs3xMrpiEsmBjsLETZE9uuX67oQ8B3i1BFfMPw= +k8s.io/kube-aggregator v0.31.1/go.mod h1:+aW4NX50uneozN+BtoCxI4g7ND922p8Wy3tWKFDiWVk= k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f h1:0LQagt0gDpKqvIkAMPaRGcXawNMouPECM1+F9BVxEaM= -k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f/go.mod h1:S9tOR0FxgyusSNR+MboCuiDpVWkAifZvaYI1Q2ubgro= -k8s.io/kubectl v0.30.0 h1:xbPvzagbJ6RNYVMVuiHArC1grrV5vSmmIcSZuCdzRyk= -k8s.io/kubectl v0.30.0/go.mod h1:zgolRw2MQXLPwmic2l/+iHs239L49fhSeICuMhQQXTI= +k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 h1:1dWzkmJrrprYvjGwh9kEUxmcUV/CtNU8QM7h1FLWQOo= +k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38/go.mod h1:coRQXBK9NxO98XUv3ZD6AK3xzHCxV6+b7lrquKwaKzA= +k8s.io/kubectl v0.31.0 h1:kANwAAPVY02r4U4jARP/C+Q1sssCcN/1p9Nk+7BQKVg= +k8s.io/kubectl v0.31.0/go.mod h1:pB47hhFypGsaHAPjlwrNbvhXgmuAr01ZBvAIIUaI8d4= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak= -k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= -lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= -modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= -modernc.org/cc/v3 v3.36.2/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= -modernc.org/cc/v3 v3.36.3/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= -modernc.org/ccgo/v3 v3.0.0-20220428102840-41399a37e894/go.mod h1:eI31LL8EwEBKPpNpA4bU1/i+sKOwOrQy8D87zWUcRZc= -modernc.org/ccgo/v3 v3.0.0-20220430103911-bc99d88307be/go.mod h1:bwdAnOoaIt8Ax9YdWGjxWsdkPcZyRPHqrOvJxaKAKGw= -modernc.org/ccgo/v3 v3.16.4/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= -modernc.org/ccgo/v3 v3.16.6/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= -modernc.org/ccgo/v3 v3.16.8/go.mod h1:zNjwkizS+fIFDrDjIAgBSCLkWbJuHF+ar3QRn+Z9aws= -modernc.org/ccgo/v3 v3.16.9/go.mod h1:zNMzC9A9xeNUepy6KuZBbugn3c0Mc9TeiJO4lgvkJDo= -modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= -modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= -modernc.org/libc v0.0.0-20220428101251-2d5f3daf273b/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= -modernc.org/libc v1.16.0/go.mod h1:N4LD6DBE9cf+Dzf9buBlzVJndKr/iJHG97vGLHYnb5A= -modernc.org/libc v1.16.1/go.mod h1:JjJE0eu4yeK7tab2n4S1w8tlWd9MxXLRzheaRnAKymU= -modernc.org/libc v1.16.17/go.mod h1:hYIV5VZczAmGZAnG15Vdngn5HSF5cSkbvfz2B7GRuVU= -modernc.org/libc v1.16.19/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= -modernc.org/libc v1.17.0/go.mod h1:XsgLldpP4aWlPlsjqKRdHPqCxCjISdHfM/yeWC5GyW0= -modernc.org/libc v1.17.1/go.mod h1:FZ23b+8LjxZs7XtFMbSzL/EhPxNbfZbErxEHc7cbD9s= -modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/memory v1.1.1/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= -modernc.org/memory v1.2.0/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= -modernc.org/memory v1.2.1/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= -modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/sqlite v1.18.1/go.mod h1:6ho+Gow7oX5V+OiOQ6Tr4xeqbx13UZ6t+Fw9IRUG4d4= -modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= -modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= -modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw= -modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= -modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 h1:MDF6h2H/h4tbzmtIKTuctcwZmY0tY9mD9fNT47QO6HI= +k8s.io/utils v0.0.0-20240921022957-49e7df575cb6/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 h1:2770sDpzrjjsAtVhSeUFseziht227YAWYHLGNM8QPwY= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= -sigs.k8s.io/controller-runtime v0.18.2 h1:RqVW6Kpeaji67CY5nPEfRz6ZfFMk0lWQlNrLqlNpx+Q= -sigs.k8s.io/controller-runtime v0.18.2/go.mod h1:tuAt1+wbVsXIT8lPtk5RURxqAnq7xkpv2Mhttslg7Hw= +sigs.k8s.io/controller-runtime v0.19.0 h1:nWVM7aq+Il2ABxwiCizrVDSlmDcshi9llbaFbC0ji/Q= +sigs.k8s.io/controller-runtime v0.19.0/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= sigs.k8s.io/gateway-api v1.1.0 h1:DsLDXCi6jR+Xz8/xd0Z1PYl2Pn0TyaFMOPPZIj4inDM= sigs.k8s.io/gateway-api v1.1.0/go.mod h1:ZH4lHrL2sDi0FHZ9jjneb8kKnGzFWyrTya35sWUTrRs= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= @@ -2126,5 +725,5 @@ sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= -software.sslmate.com/src/go-pkcs12 v0.4.0 h1:H2g08FrTvSFKUj+D309j1DPfk5APnIdAQAB8aEykJ5k= -software.sslmate.com/src/go-pkcs12 v0.4.0/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI= +software.sslmate.com/src/go-pkcs12 v0.5.0 h1:EC6R394xgENTpZ4RltKydeDUjtlM5drOYIG9c6TVj2M= +software.sslmate.com/src/go-pkcs12 v0.5.0/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI= diff --git a/test/integration/rfc2136_dns01/provider_test.go b/test/integration/rfc2136_dns01/provider_test.go index 896f323397c..4b30ba4e992 100644 --- a/test/integration/rfc2136_dns01/provider_test.go +++ b/test/integration/rfc2136_dns01/provider_test.go @@ -33,6 +33,7 @@ import ( func TestRunSuiteWithTSIG(t *testing.T) { ctx := logf.NewContext(context.TODO(), logtesting.NewTestLogger(t), t.Name()) server := &testserver.BasicServer{ + T: t, Zones: []string{rfc2136TestZone}, EnableTSIG: true, TSIGZone: rfc2136TestZone, @@ -76,6 +77,7 @@ func TestRunSuiteWithTSIG(t *testing.T) { func TestRunSuiteNoTSIG(t *testing.T) { ctx := logf.NewContext(context.TODO(), logtesting.NewTestLogger(t), t.Name()) server := &testserver.BasicServer{ + T: t, Zones: []string{rfc2136TestZone}, } if err := server.Run(ctx); err != nil { diff --git a/test/integration/rfc2136_dns01/rfc2136_test.go b/test/integration/rfc2136_dns01/rfc2136_test.go index 019a1e682a8..4f27a909ea2 100644 --- a/test/integration/rfc2136_dns01/rfc2136_test.go +++ b/test/integration/rfc2136_dns01/rfc2136_test.go @@ -54,6 +54,7 @@ const defaultPort = "53" func TestRFC2136CanaryLocalTestServer(t *testing.T) { ctx := logf.NewContext(context.TODO(), logtesting.NewTestLogger(t), t.Name()) server := &testserver.BasicServer{ + T: t, Zones: []string{rfc2136TestZone}, Handler: dns.HandlerFunc((&testHandlers{t: t}).serverHandlerHello), } @@ -80,13 +81,18 @@ func TestRFC2136CanaryLocalTestServer(t *testing.T) { func TestRFC2136ServerSuccess(t *testing.T) { ctx := logf.NewContext(context.TODO(), logtesting.NewTestLogger(t), t.Name()) server := &testserver.BasicServer{ + T: t, Zones: []string{rfc2136TestZone}, Handler: dns.HandlerFunc((&testHandlers{t: t}).serverHandlerReturnSuccess), } if err := server.Run(ctx); err != nil { t.Fatalf("failed to start test server: %v", err) } - defer server.Shutdown() + defer func() { + if err := server.Shutdown(); err != nil { + t.Fatalf("failed to shutdown test server: %v", err) + } + }() provider, err := rfc2136.NewDNSProviderCredentials(server.ListenAddr(), "", "", "") if err != nil { @@ -100,13 +106,18 @@ func TestRFC2136ServerSuccess(t *testing.T) { func TestRFC2136ServerError(t *testing.T) { ctx := logf.NewContext(context.TODO(), logtesting.NewTestLogger(t), t.Name()) server := &testserver.BasicServer{ + T: t, Zones: []string{rfc2136TestZone}, Handler: dns.HandlerFunc((&testHandlers{t: t}).serverHandlerReturnErr), } if err := server.Run(ctx); err != nil { t.Fatalf("failed to start test server: %v", err) } - defer server.Shutdown() + defer func() { + if err := server.Shutdown(); err != nil { + t.Fatalf("failed to shutdown test server: %v", err) + } + }() provider, err := rfc2136.NewDNSProviderCredentials(server.ListenAddr(), "", "", "") if err != nil { @@ -122,6 +133,7 @@ func TestRFC2136ServerError(t *testing.T) { func TestRFC2136TsigClient(t *testing.T) { ctx := logf.NewContext(context.TODO(), logtesting.NewTestLogger(t), t.Name()) server := &testserver.BasicServer{ + T: t, Zones: []string{rfc2136TestZone}, Handler: dns.HandlerFunc((&testHandlers{t: t}).serverHandlerReturnSuccess), EnableTSIG: true, @@ -132,7 +144,11 @@ func TestRFC2136TsigClient(t *testing.T) { if err := server.Run(ctx); err != nil { t.Fatalf("failed to start test server: %v", err) } - defer server.Shutdown() + defer func() { + if err := server.Shutdown(); err != nil { + t.Fatalf("failed to shutdown test server: %v", err) + } + }() provider, err := rfc2136.NewDNSProviderCredentials(server.ListenAddr(), "", rfc2136TestTsigKeyName, rfc2136TestTsigSecret) if err != nil { @@ -306,12 +322,17 @@ func TestRFC2136InvalidTSIGAlgorithm(t *testing.T) { func TestRFC2136ValidUpdatePacket(t *testing.T) { ctx := logf.NewContext(context.TODO(), logtesting.NewTestLogger(t), t.Name()) server := &testserver.BasicServer{ + T: t, Zones: []string{rfc2136TestZone}, } if err := server.Run(ctx); err != nil { t.Fatalf("failed to start test server: %v", err) } - defer server.Shutdown() + defer func() { + if err := server.Shutdown(); err != nil { + t.Errorf("failed to gracefully shut down test server: %v", err) + } + }() txtRR, _ := dns.NewRR(fmt.Sprintf("%s %d IN TXT %s", rfc2136TestFqdn, rfc2136TestTTL, rfc2136TestValue)) rrs := []dns.RR{txtRR} diff --git a/test/integration/validation/certificaterequest_test.go b/test/integration/validation/certificaterequest_test.go index f0124e66dfd..728262c614b 100644 --- a/test/integration/validation/certificaterequest_test.go +++ b/test/integration/validation/certificaterequest_test.go @@ -18,7 +18,6 @@ package validation import ( "context" - "encoding/pem" "strings" "testing" "time" @@ -33,7 +32,7 @@ import ( "github.com/cert-manager/cert-manager/pkg/api" cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" - "github.com/cert-manager/cert-manager/pkg/util/pki" + "github.com/cert-manager/cert-manager/test/unit/gen" ) var certGVK = schema.GroupVersionKind{ @@ -200,22 +199,9 @@ func TestValidationCertificateRequests(t *testing.T) { } func mustGenerateCSR(t *testing.T, cert *cmapi.Certificate) []byte { - request, err := pki.GenerateCSR(cert) + csr, _, err := gen.CSRForCertificate(cert) if err != nil { t.Fatal(err) } - - sk, err := pki.GenerateRSAPrivateKey(2048) - if err != nil { - t.Fatal(err) - } - csrBytes, err := pki.EncodeCSR(request, sk) - if err != nil { - t.Fatal(err) - } - csr := pem.EncodeToMemory(&pem.Block{ - Type: "CERTIFICATE REQUEST", Bytes: csrBytes, - }) - return csr } diff --git a/test/integration/validation/files/issuers.valid.yaml b/test/integration/validation/files/issuers.valid.yaml new file mode 100644 index 00000000000..08073503ad1 --- /dev/null +++ b/test/integration/validation/files/issuers.valid.yaml @@ -0,0 +1,20 @@ +# The AWS Route53 solver uses AWS SDK for Go V2, which can get +# credentials and region information from environment variables. So +# configuration is not **required**. +# This integration test demonstrates that the OpenAPI validation +# **and** webhook validation permit such an empty Route53 stanza. +# YAML and unstructured are used, instead of cert-manager API types to +# avoid confusion around zero values for strings such as region. +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + name: test + namespace: default +spec: + acme: + server: https://acme.example.com + privateKeySecretRef: + name: testing-acme-private-key + solvers: + - dns01: + route53: {} diff --git a/test/integration/validation/issuer_test.go b/test/integration/validation/issuer_test.go new file mode 100644 index 00000000000..f8f7436d9f3 --- /dev/null +++ b/test/integration/validation/issuer_test.go @@ -0,0 +1,80 @@ +/* +Copyright 2022 The cert-manager 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 validation + +import ( + "context" + "fmt" + "io" + "os" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/yaml" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/cert-manager/cert-manager/integration-tests/framework" + "github.com/cert-manager/cert-manager/pkg/api" +) + +var issuerGVK = schema.GroupVersionKind{ + Group: "cert-manager.io", + Version: "v1", + Kind: "Issuer", +} + +// Regression tests to check Issuer configurations which are expected to pass +// the OpenAPI and webhook validation but which have been accidentally forbidden +// in the past by inconsistent use of validation annotations in the Go types or +// by incorrect logic in the validating webhook functions. +func TestValidationIssuer(t *testing.T) { + yamlFile := "files/issuers.valid.yaml" + yamlBytes, err := os.Open(yamlFile) + require.NoError(t, err) + + ctx, cancel := context.WithTimeout(context.Background(), time.Second*40) + defer cancel() + + config, stop := framework.RunControlPlane(t, ctx) + defer stop() + + framework.WaitForOpenAPIResourcesToBeLoaded(t, ctx, config, issuerGVK) + + cl, err := client.New(config, client.Options{Scheme: api.Scheme}) + require.NoError(t, err) + + dec := yaml.NewYAMLOrJSONDecoder(yamlBytes, 4096) + documentIndex := 0 + for { + obj := &unstructured.Unstructured{} + err := dec.Decode(obj) + if err == io.EOF { + break + } + require.NoError(t, err) + name := fmt.Sprintf("%s:%d:%s/%s", yamlFile, documentIndex, obj.GetNamespace(), obj.GetName()) + t.Run(name, func(t *testing.T) { + err = cl.Create(ctx, obj) + assert.NoError(t, err) + }) + documentIndex++ + } +} diff --git a/test/integration/webhook/dynamic_source_test.go b/test/integration/webhook/dynamic_source_test.go index 5788b803061..7ef66fcb408 100644 --- a/test/integration/webhook/dynamic_source_test.go +++ b/test/integration/webhook/dynamic_source_test.go @@ -236,7 +236,6 @@ func TestDynamicSource_leaderelection(t *testing.T) { group, gctx := errgroup.WithContext(gctx) for i := 0; i < nrManagers; i++ { - i := i group.Go(func() error { mgr, err := manager.New(env.Config, manager.Options{ Metrics: server.Options{BindAddress: "0"}, diff --git a/test/unit/gen/certificate.go b/test/unit/gen/certificate.go index 0cc87f303d3..ca9662ccb1a 100644 --- a/test/unit/gen/certificate.go +++ b/test/unit/gen/certificate.go @@ -72,6 +72,12 @@ func SetCertificateIPs(ips ...string) CertificateModifier { } } +func SetCertificateOtherNames(otherNames ...v1.OtherName) CertificateModifier { + return func(crt *v1.Certificate) { + crt.Spec.OtherNames = otherNames + } +} + func SetCertificateEmails(emails ...string) CertificateModifier { return func(crt *v1.Certificate) { crt.Spec.EmailAddresses = emails diff --git a/test/unit/gen/csr.go b/test/unit/gen/csr.go index 0e6ff086866..a135c11ce8e 100644 --- a/test/unit/gen/csr.go +++ b/test/unit/gen/csr.go @@ -28,11 +28,57 @@ import ( "net" "net/url" + v1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" "github.com/cert-manager/cert-manager/pkg/util/pki" ) type CSRModifier func(*x509.CertificateRequest) error +var defaultGenerateCSROptions = []pki.GenerateCSROption{ + pki.WithEncodeBasicConstraintsInRequest(true), + pki.WithNameConstraints(true), + pki.WithOtherNames(true), + pki.WithUseLiteralSubject(true), +} + +func CSRForCertificate(crt *v1.Certificate, mods ...CSRModifier) (csr []byte, sk crypto.Signer, err error) { + cr, err := pki.GenerateCSR(crt, defaultGenerateCSROptions...) + if err != nil { + return nil, nil, err + } + + modifiers := []CSRModifier{} + modifiers = append(modifiers, func(c *x509.CertificateRequest) error { + *c = *cr + return nil + }) + modifiers = append(modifiers, mods...) + + return CSR(cr.PublicKeyAlgorithm, modifiers...) +} + +func CSRWithSignerForCertificate(crt *v1.Certificate, sk crypto.Signer, mods ...CSRModifier) (csr []byte, err error) { + cr, err := pki.GenerateCSR(crt, defaultGenerateCSROptions...) + if err != nil { + return nil, err + } + + modifiers := []CSRModifier{} + modifiers = append(modifiers, func(c *x509.CertificateRequest) error { + if c.PublicKeyAlgorithm != cr.PublicKeyAlgorithm { + return fmt.Errorf("public key algorithm mismatch: %s != %s", c.PublicKeyAlgorithm, cr.PublicKeyAlgorithm) + } + if c.SignatureAlgorithm != cr.SignatureAlgorithm { + return fmt.Errorf("signature algorithm mismatch: %s != %s", c.SignatureAlgorithm, cr.SignatureAlgorithm) + } + *c = *cr + return nil + }) + modifiers = append(modifiers, mods...) + + return CSRWithSigner(sk, modifiers...) +} + func CSR(keyAlgorithm x509.PublicKeyAlgorithm, mods ...CSRModifier) (csr []byte, sk crypto.Signer, err error) { switch keyAlgorithm { case x509.RSA: diff --git a/test/unit/gen/issuer.go b/test/unit/gen/issuer.go index 3d7ccc2268e..8b1ffa95403 100644 --- a/test/unit/gen/issuer.go +++ b/test/unit/gen/issuer.go @@ -268,6 +268,7 @@ func SetIssuerVault(v v1.VaultIssuer) IssuerModifier { iss.GetSpec().Vault = &v } } + func SetIssuerVaultURL(url string) IssuerModifier { return func(iss v1.GenericIssuer) { spec := iss.GetSpec() @@ -376,6 +377,19 @@ func SetIssuerVaultAppRoleAuth(keyName, approleName, roleId, path string) Issuer } } +func SetIssuerVaultClientCertificateAuth(path, secretName string) IssuerModifier { + return func(iss v1.GenericIssuer) { + spec := iss.GetSpec() + if spec.Vault == nil { + spec.Vault = &v1.VaultIssuer{} + } + spec.Vault.Auth.ClientCertificate = &v1.VaultClientCertificateAuth{ + Path: path, + SecretName: secretName, + } + } +} + func SetIssuerVaultKubernetesAuthSecret(secretKey, secretName, vaultRole, vaultPath string) IssuerModifier { return func(iss v1.GenericIssuer) { spec := iss.GetSpec() diff --git a/test/webhook/testwebhook.go b/test/webhook/testwebhook.go index 45d092181fe..b266af0ab73 100644 --- a/test/webhook/testwebhook.go +++ b/test/webhook/testwebhook.go @@ -67,7 +67,9 @@ func StartWebhookServer(t *testing.T, ctx context.Context, args []string, argume webhookFlags.AddFlags(fs) options.AddConfigFlags(fs, webhookConfig) // Parse the arguments passed in into the WebhookOptions struct - fs.Parse(args) + if err := fs.Parse(args); err != nil { + t.Fatalf("Failed parsing arguments: %v", err) + } var caPEM []byte tempDir, err := os.MkdirTemp("", "webhook-tls-")