From 5e8d404aee6a46b95be97601d54704bd9983a556 Mon Sep 17 00:00:00 2001 From: Martin Hrabovcin Date: Mon, 25 Nov 2024 21:48:49 +0100 Subject: [PATCH] fix(knative): add missing domainmappings v1alpha1 version (#1528) * fix(knative): add missing domainmappings v1alpha1 version * fix(knative): disable mutating webhooks * chore(knative): bump chart version to 1.15.5 --- staging/knative/Chart.yaml | 2 +- .../charts/serving/crds/serving-crds.yaml | 115 ++++++++++++++++++ .../serving/templates/pre-upgrade-hook.yaml | 14 ++- 3 files changed, 129 insertions(+), 2 deletions(-) diff --git a/staging/knative/Chart.yaml b/staging/knative/Chart.yaml index 5553f60f6..48f986ea8 100644 --- a/staging/knative/Chart.yaml +++ b/staging/knative/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: knative -version: 1.15.4 +version: 1.15.5 description: "Kubernetes-based platform to build, deploy, and manage modern serverless workloads" home: https://knative.dev/ maintainers: diff --git a/staging/knative/charts/serving/crds/serving-crds.yaml b/staging/knative/charts/serving/crds/serving-crds.yaml index 9d66be4e1..d5684d107 100644 --- a/staging/knative/charts/serving/crds/serving-crds.yaml +++ b/staging/knative/charts/serving/crds/serving-crds.yaml @@ -1787,6 +1787,121 @@ metadata: spec: group: serving.knative.dev versions: + - name: v1alpha1 + served: true + storage: false + subresources: + status: {} + schema: + openAPIV3Schema: + description: DomainMapping is a mapping from a custom hostname to an Addressable. + type: object + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: 'Spec is the desired state of the DomainMapping. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + type: object + required: + - ref + properties: + ref: + description: "Ref specifies the target of the Domain Mapping. \n The object identified by the Ref must be an Addressable with a URL of the form `{name}.{namespace}.{domain}` where `{domain}` is the cluster domain, and `{name}` and `{namespace}` are the name and namespace of a Kubernetes Service. \n This contract is satisfied by Knative types such as Knative Services and Knative Routes, and by Kubernetes Services." + type: object + required: + - kind + - name + properties: + apiVersion: + description: API version of the referent. + type: string + group: + description: 'Group of the API, without the version of the group. This can be used as an alternative to the APIVersion, and then resolved using ResolveGroup. Note: This API is EXPERIMENTAL and might break anytime. For more details: https://github.com/knative/eventing/issues/5086' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.' + type: string + tls: + description: TLS allows the DomainMapping to terminate TLS traffic with an existing secret. + type: object + required: + - secretName + properties: + secretName: + description: SecretName is the name of the existing secret used to terminate TLS traffic. + type: string + status: + description: 'Status is the current state of the DomainMapping. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + type: object + properties: + address: + description: Address holds the information needed for a DomainMapping to be the target of an event. + type: object + properties: + url: + type: string + annotations: + description: Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards. + type: object + additionalProperties: + type: string + conditions: + description: Conditions the latest available observations of a resource's current state. + type: array + items: + description: 'Condition defines a readiness condition for a Knative resource. See: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties' + type: object + required: + - status + - type + properties: + lastTransitionTime: + description: LastTransitionTime is the last time the condition transitioned from one status to another. We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic differences (all other things held constant). + type: string + message: + description: A human readable message indicating details about the transition. + type: string + reason: + description: The reason for the condition's last transition. + type: string + severity: + description: Severity with which to treat failures of this type of condition. When this is not specified, it defaults to Error. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition. + type: string + observedGeneration: + description: ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. + type: integer + format: int64 + url: + description: URL is the URL of this DomainMapping. + type: string + additionalPrinterColumns: + - name: URL + type: string + jsonPath: .status.url + - name: Ready + type: string + jsonPath: ".status.conditions[?(@.type=='Ready')].status" + - name: Reason + type: string + jsonPath: ".status.conditions[?(@.type=='Ready')].reason" - name: v1beta1 served: true storage: true diff --git a/staging/knative/charts/serving/templates/pre-upgrade-hook.yaml b/staging/knative/charts/serving/templates/pre-upgrade-hook.yaml index c3010531b..e01fe5743 100644 --- a/staging/knative/charts/serving/templates/pre-upgrade-hook.yaml +++ b/staging/knative/charts/serving/templates/pre-upgrade-hook.yaml @@ -18,7 +18,7 @@ metadata: "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded rules: - apiGroups: ["admissionregistration.k8s.io"] - resources: ["validatingwebhookconfigurations"] + resources: ["validatingwebhookconfigurations", "mutatingwebhookconfigurations"] verbs: ["get", "list", "delete"] --- apiVersion: rbac.authorization.k8s.io/v1 @@ -75,3 +75,15 @@ spec: - delete - ValidatingWebhookConfiguration - config.webhook.serving.knative.dev + - validation.webhook.serving.knative.dev + - validation.webhook.domainmapping.serving.knative.dev + - config.webhook.istio.networking.internal.knative.dev + - --ignore-not-found=true + - name: pre-upgrade-job-mutating + image: "{{.Values.global.image}}:{{.Values.global.tag}}" + command: + - kubectl + - delete + - MutatingWebhookConfiguration + - webhook.serving.knative.dev + - --ignore-not-found=true