From cf3b11fffbd6460bb4ad5f857b9209b57b7247ae Mon Sep 17 00:00:00 2001 From: dprotaso Date: Thu, 22 Feb 2024 16:45:59 -0500 Subject: [PATCH 1/2] bump golang --- .github/workflows/knative-downstream.yaml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/knative-downstream.yaml b/.github/workflows/knative-downstream.yaml index 97ca690cc..6ef499203 100644 --- a/.github/workflows/knative-downstream.yaml +++ b/.github/workflows/knative-downstream.yaml @@ -35,17 +35,10 @@ jobs: - knative-extensions/net-certmanager steps: - - name: Set up Go 1.21.x - uses: actions/setup-go@v3 - with: - go-version: 1.21.x - - - name: Install Dependencies - run: | - go install github.com/google/go-licenses@latest + - uses: knative/actions/setup-go@main - name: Checkout upstream at ${{ github.base_ref }} - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 path: upstream @@ -66,7 +59,7 @@ jobs: git pull --no-rebase --no-commit upstream ${{ github.base_ref }} - name: Checkout downstream at ${{ github.base_ref }} - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.base_ref }} repository: ${{ matrix.repo }} From f92d0e99dd9bf82c371fb5718af6d78adfd0be64 Mon Sep 17 00:00:00 2001 From: dprotaso Date: Thu, 22 Feb 2024 17:04:03 -0500 Subject: [PATCH 2/2] bump controller-tools to work with go1.22 --- config/certificate.yaml | 65 +++++++--- config/domain-claim.yaml | 21 +++- config/domain.yaml | 85 +++++++++++--- config/ingress.yaml | 215 ++++++++++++++++++++++++++++------ config/realm.yaml | 54 +++++++-- config/serverlessservice.yaml | 101 ++++++++++++---- hack/update-schemas.sh | 2 +- 7 files changed, 436 insertions(+), 107 deletions(-) diff --git a/config/certificate.yaml b/config/certificate.yaml index c3bf16f66..62a48f9d6 100644 --- a/config/certificate.yaml +++ b/config/certificate.yaml @@ -31,26 +31,42 @@ spec: status: {} schema: openAPIV3Schema: - description: Certificate is responsible for provisioning a SSL certificate for the given hosts. It is a Knative abstraction for various SSL certificate provisioning solutions (such as cert-manager or self-signed SSL certificate). + description: |- + Certificate is responsible for provisioning a SSL certificate for the + given hosts. It is a Knative abstraction for various SSL certificate + provisioning solutions (such as cert-manager or self-signed SSL certificate). 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' + 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' + 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 Certificate. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + description: |- + Spec is the desired state of the Certificate. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status type: object required: - dnsNames - secretName properties: dnsNames: - description: DNSNames is a list of DNS names the Certificate could support. The wildcard format of DNSNames (e.g. *.default.example.com) is supported. + description: |- + DNSNames is a list of DNS names the Certificate could support. + The wildcard format of DNSNames (e.g. *.default.example.com) is supported. type: array items: type: string @@ -61,11 +77,17 @@ spec: description: SecretName is the name of the secret resource to store the SSL certificate in. type: string status: - description: 'Status is the current state of the Certificate. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + description: |- + Status is the current state of the Certificate. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status type: object properties: 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. + 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 @@ -73,14 +95,19 @@ spec: 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' + 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). + 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. @@ -89,7 +116,9 @@ spec: 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. + 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. @@ -98,10 +127,14 @@ spec: description: Type of condition. type: string http01Challenges: - description: HTTP01Challenges is a list of HTTP01 challenges that need to be fulfilled in order to get the TLS certificate.. + description: |- + HTTP01Challenges is a list of HTTP01 challenges that need to be fulfilled + in order to get the TLS certificate.. type: array items: - description: HTTP01Challenge defines the status of a HTTP01 challenge that a certificate needs to fulfill. + description: |- + HTTP01Challenge defines the status of a HTTP01 challenge that a certificate needs + to fulfill. type: object properties: serviceName: @@ -120,11 +153,15 @@ spec: description: URL is the URL that the HTTP01 challenge is expected to serve on. type: string notAfter: - description: The expiration time of the TLS certificate stored in the secret named by this resource in spec.secretName. + description: |- + The expiration time of the TLS certificate stored in the secret named + by this resource in spec.secretName. type: string format: date-time observedGeneration: - description: ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. + description: |- + ObservedGeneration is the 'Generation' of the Service that + was last processed by the controller. type: integer format: int64 additionalPrinterColumns: diff --git a/config/domain-claim.yaml b/config/domain-claim.yaml index 33f39e57d..96e693bd6 100644 --- a/config/domain-claim.yaml +++ b/config/domain-claim.yaml @@ -35,21 +35,34 @@ spec: 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' + 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' + 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 ClusterDomainClaim. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + description: |- + Spec is the desired state of the ClusterDomainClaim. + More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status type: object required: - namespace properties: namespace: - description: Namespace is the namespace which is allowed to create a DomainMapping using this ClusterDomainClaim's name. + description: |- + Namespace is the namespace which is allowed to create a DomainMapping + using this ClusterDomainClaim's name. type: string names: kind: ClusterDomainClaim diff --git a/config/domain.yaml b/config/domain.yaml index eed5fcb15..eac4000b4 100644 --- a/config/domain.yaml +++ b/config/domain.yaml @@ -35,15 +35,26 @@ spec: 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' + 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' + 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 Domain. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + description: |- + Spec is the desired state of the Domain. + More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status type: object required: - ingressClass @@ -53,7 +64,12 @@ spec: description: Configs contains additional pieces of information to configure ingress proxies. type: array items: - description: IngressConfig allows KIngress implementations to add additional information needed for configuring the proxies associated with this Domain. For examples, in our Istio-based Ingress this will contains all references of Istio Gateways associated with this Domain. This could be a reference of a ConfigMap owned by the implementation as well. + description: |- + IngressConfig allows KIngress implementations to add additional information needed + for configuring the proxies associated with this Domain. + For examples, in our Istio-based Ingress this will contains all references of + Istio Gateways associated with this Domain. This could be a reference of a ConfigMap + owned by the implementation as well. type: object properties: name: @@ -66,36 +82,62 @@ spec: description: Type of the Kingress implementation resource type: string ingressClass: - description: IngressClass tells what Ingress class annotation to use for Routes associated with this Realm. + description: |- + IngressClass tells what Ingress class annotation to use for Routes associated + with this Realm. type: string loadBalancers: - description: LoadBalancers provide addresses (IP addresses, domains) of the load balancers associated with this Domain. This is used in automatic DNS provisioning like configuration of magic DNS or creating ExternalName services for cluster-local access. + description: |- + LoadBalancers provide addresses (IP addresses, domains) of the load balancers + associated with this Domain. This is used in automatic DNS provisioning like + configuration of magic DNS or creating ExternalName services for cluster-local + access. type: array items: - description: 'LoadBalancerIngressSpec represents the spec of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.' + description: |- + LoadBalancerIngressSpec represents the spec of a load-balancer ingress point: + traffic intended for the service should be sent to an ingress point. type: object properties: domain: - description: Domain is set for load-balancer ingress points that are DNS based (typically AWS load-balancers) + description: |- + Domain is set for load-balancer ingress points that are DNS based + (typically AWS load-balancers) type: string domainInternal: - description: "DomainInternal is set if there is a cluster-local DNS name to access the Ingress. \n NOTE: This differs from K8s Ingress, since we also desire to have a cluster-local DNS name to allow routing in case of not having a mesh." + description: |- + DomainInternal is set if there is a cluster-local DNS name to access the Ingress. + + + NOTE: This differs from K8s Ingress, since we also desire to have a cluster-local + DNS name to allow routing in case of not having a mesh. type: string ip: - description: IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers) + description: |- + IP is set for load-balancer ingress points that are IP based + (typically GCE or OpenStack load-balancers) type: string meshOnly: description: MeshOnly is set if the Ingress is only load-balanced through a Service mesh. type: boolean suffix: - description: Suffix specifies the domain suffix to be used. This field replaces the existing config-domain ConfigMap. Internal Domains can omit this, in which case we will default to the cluster suffix. + description: |- + Suffix specifies the domain suffix to be used. This field replaces the + existing config-domain ConfigMap. Internal Domains can omit this, in + which case we will default to the cluster suffix. type: string status: - description: 'Status is the current state of the Domain. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + description: |- + Status is the current state of the Domain. + More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status type: object properties: 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. + 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 @@ -103,14 +145,19 @@ spec: 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' + 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). + 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. @@ -119,7 +166,9 @@ spec: 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. + 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. @@ -128,7 +177,9 @@ spec: description: Type of condition. type: string observedGeneration: - description: ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. + description: |- + ObservedGeneration is the 'Generation' of the Service that + was last processed by the controller. type: integer format: int64 names: diff --git a/config/ingress.yaml b/config/ingress.yaml index aafed926f..582adbb51 100644 --- a/config/ingress.yaml +++ b/config/ingress.yaml @@ -31,61 +31,116 @@ spec: status: {} schema: openAPIV3Schema: - description: "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable URLs, load balance traffic, offer name based virtual hosting, etc. \n This is heavily based on K8s Ingress https://godoc.org/k8s.io/api/networking/v1beta1#Ingress which some highlighted modifications." + description: |- + Ingress is a collection of rules that allow inbound connections to reach the endpoints defined + by a backend. An Ingress can be configured to give services externally-reachable URLs, load + balance traffic, offer name based virtual hosting, etc. + + + This is heavily based on K8s Ingress https://godoc.org/k8s.io/api/networking/v1beta1#Ingress + which some highlighted modifications. 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' + 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' + 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 Ingress. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + description: |- + Spec is the desired state of the Ingress. + More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status type: object properties: httpOption: - description: 'HTTPOption is the option of HTTP. It has the following two values: `HTTPOptionEnabled`, `HTTPOptionRedirected`' + description: |- + HTTPOption is the option of HTTP. It has the following two values: + `HTTPOptionEnabled`, `HTTPOptionRedirected` type: string rules: description: A list of host rules used to configure the Ingress. type: array items: - description: IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue. + description: |- + IngressRule represents the rules mapping the paths under a specified host to + the related backend services. Incoming requests are first evaluated for a host + match, then routed to the backend associated with the matching IngressRuleValue. type: object properties: hosts: - description: 'Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the "host" part of the URI as defined in the RFC: 1. IPs are not allowed. Currently a rule value can only apply to the IP in the Spec of the parent . 2. The `:` delimiter is not respected because ports are not allowed. Currently the port of an Ingress is implicitly :80 for http and :443 for https. Both these may change in the future. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue. If multiple matching Hosts were provided, the first rule will take precedent.' + description: |- + Host is the fully qualified domain name of a network host, as defined + by RFC 3986. Note the following deviations from the "host" part of the + URI as defined in the RFC: + 1. IPs are not allowed. Currently a rule value can only apply to the + IP in the Spec of the parent . + 2. The `:` delimiter is not respected because ports are not allowed. + Currently the port of an Ingress is implicitly :80 for http and + :443 for https. + Both these may change in the future. + If the host is unspecified, the Ingress routes all traffic based on the + specified IngressRuleValue. + If multiple matching Hosts were provided, the first rule will take precedent. type: array items: type: string http: - description: HTTP represents a rule to apply against incoming requests. If the rule is satisfied, the request is routed to the specified backend. + description: |- + HTTP represents a rule to apply against incoming requests. If the + rule is satisfied, the request is routed to the specified backend. type: object required: - paths properties: paths: - description: "A collection of paths that map requests to backends. \n If they are multiple matching paths, the first match takes precedence." + description: |- + A collection of paths that map requests to backends. + + + If they are multiple matching paths, the first match takes precedence. type: array items: - description: HTTPIngressPath associates a path regex with a backend. Incoming URLs matching the path are forwarded to the backend. + description: |- + HTTPIngressPath associates a path regex with a backend. Incoming URLs matching + the path are forwarded to the backend. type: object required: - splits properties: appendHeaders: - description: "AppendHeaders allow specifying additional HTTP headers to add before forwarding a request to the destination service. \n NOTE: This differs from K8s Ingress which doesn't allow header appending." + description: |- + AppendHeaders allow specifying additional HTTP headers to add + before forwarding a request to the destination service. + + + NOTE: This differs from K8s Ingress which doesn't allow header appending. type: object additionalProperties: type: string headers: - description: Headers defines header matching rules which is a map from a header name to HeaderMatch which specify a matching condition. When a request matched with all the header matching rules, the request is routed by the corresponding ingress rule. If it is empty, the headers are not used for matching + description: |- + Headers defines header matching rules which is a map from a header name + to HeaderMatch which specify a matching condition. + When a request matched with all the header matching rules, + the request is routed by the corresponding ingress rule. + If it is empty, the headers are not used for matching type: object additionalProperties: - description: HeaderMatch represents a matching value of Headers in HTTPIngressPath. Currently, only the exact matching is supported. + description: |- + HeaderMatch represents a matching value of Headers in HTTPIngressPath. + Currently, only the exact matching is supported. type: object required: - exact @@ -93,13 +148,25 @@ spec: exact: type: string path: - description: Path represents a literal prefix to which this rule should apply. Currently it can contain characters disallowed from the conventional "path" part of a URL as defined by RFC 3986. Paths must begin with a '/'. If unspecified, the path defaults to a catch all sending traffic to the backend. + description: |- + Path represents a literal prefix to which this rule should apply. + Currently it can contain characters disallowed from the conventional + "path" part of a URL as defined by RFC 3986. Paths must begin with + a '/'. If unspecified, the path defaults to a catch all sending + traffic to the backend. type: string rewriteHost: - description: "RewriteHost rewrites the incoming request's host header. \n This field is currently experimental and not supported by all Ingress implementations." + description: |- + RewriteHost rewrites the incoming request's host header. + + + This field is currently experimental and not supported by all Ingress + implementations. type: string splits: - description: Splits defines the referenced service endpoints to which the traffic will be forwarded to. + description: |- + Splits defines the referenced service endpoints to which the traffic + will be forwarded to. type: array items: description: IngressBackendSplit describes all endpoints for a given service and port. @@ -110,18 +177,32 @@ spec: - servicePort properties: appendHeaders: - description: "AppendHeaders allow specifying additional HTTP headers to add before forwarding a request to the destination service. \n NOTE: This differs from K8s Ingress which doesn't allow header appending." + description: |- + AppendHeaders allow specifying additional HTTP headers to add + before forwarding a request to the destination service. + + + NOTE: This differs from K8s Ingress which doesn't allow header appending. type: object additionalProperties: type: string percent: - description: "Specifies the split percentage, a number between 0 and 100. If only one split is specified, we default to 100. \n NOTE: This differs from K8s Ingress to allow percentage split." + description: |- + Specifies the split percentage, a number between 0 and 100. If + only one split is specified, we default to 100. + + + NOTE: This differs from K8s Ingress to allow percentage split. type: integer serviceName: description: Specifies the name of the referenced service. type: string serviceNamespace: - description: "Specifies the namespace of the referenced service. \n NOTE: This differs from K8s Ingress to allow routing to different namespaces." + description: |- + Specifies the namespace of the referenced service. + + + NOTE: This differs from K8s Ingress to allow routing to different namespaces. type: string servicePort: description: Specifies the port of the referenced service. @@ -130,17 +211,28 @@ spec: - type: string x-kubernetes-int-or-string: true visibility: - description: Visibility signifies whether this rule should `ClusterLocal`. If it's not specified then it defaults to `ExternalIP`. + description: |- + Visibility signifies whether this rule should `ClusterLocal`. If it's not + specified then it defaults to `ExternalIP`. type: string tls: - description: 'TLS configuration. Currently Ingress only supports a single TLS port: 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.' + description: |- + TLS configuration. Currently Ingress only supports a single TLS + port: 443. If multiple members of this list specify different hosts, they + will be multiplexed on the same port according to the hostname specified + through the SNI TLS extension, if the ingress controller fulfilling the + ingress supports SNI. type: array items: description: IngressTLS describes the transport layer security associated with an Ingress. type: object properties: hosts: - description: Hosts is a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified. + description: |- + Hosts is a list of hosts included in the TLS certificate. The values in + this list must match the name/s used in the tlsSecret. Defaults to the + wildcard host setting for the loadbalancer controller fulfilling this + Ingress, if left unspecified. type: array items: type: string @@ -148,14 +240,24 @@ spec: description: SecretName is the name of the secret used to terminate SSL traffic. type: string secretNamespace: - description: SecretNamespace is the namespace of the secret used to terminate SSL traffic. If not set the namespace should be assumed to be the same as the Ingress. If set the secret should have the same namespace as the Ingress otherwise the behaviour is undefined and not supported. + description: |- + SecretNamespace is the namespace of the secret used to terminate SSL traffic. + If not set the namespace should be assumed to be the same as the Ingress. + If set the secret should have the same namespace as the Ingress otherwise + the behaviour is undefined and not supported. type: string status: - description: 'Status is the current state of the Ingress. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + description: |- + Status is the current state of the Ingress. + More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status type: object properties: 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. + 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 @@ -163,14 +265,19 @@ spec: 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' + 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). + 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. @@ -179,7 +286,9 @@ spec: 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. + 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. @@ -188,7 +297,9 @@ spec: description: Type of condition. type: string observedGeneration: - description: ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. + description: |- + ObservedGeneration is the 'Generation' of the Service that + was last processed by the controller. type: integer format: int64 privateLoadBalancer: @@ -196,20 +307,33 @@ spec: type: object properties: ingress: - description: Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. + description: |- + Ingress is a list containing ingress points for the load-balancer. + Traffic intended for the service should be sent to these ingress points. type: array items: - description: 'LoadBalancerIngressStatus represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.' + description: |- + LoadBalancerIngressStatus represents the status of a load-balancer ingress point: + traffic intended for the service should be sent to an ingress point. type: object properties: domain: - description: Domain is set for load-balancer ingress points that are DNS based (typically AWS load-balancers) + description: |- + Domain is set for load-balancer ingress points that are DNS based + (typically AWS load-balancers) type: string domainInternal: - description: "DomainInternal is set if there is a cluster-local DNS name to access the Ingress. \n NOTE: This differs from K8s Ingress, since we also desire to have a cluster-local DNS name to allow routing in case of not having a mesh." + description: |- + DomainInternal is set if there is a cluster-local DNS name to access the Ingress. + + + NOTE: This differs from K8s Ingress, since we also desire to have a cluster-local + DNS name to allow routing in case of not having a mesh. type: string ip: - description: IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers) + description: |- + IP is set for load-balancer ingress points that are IP based + (typically GCE or OpenStack load-balancers) type: string meshOnly: description: MeshOnly is set if the Ingress is only load-balanced through a Service mesh. @@ -219,20 +343,33 @@ spec: type: object properties: ingress: - description: Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. + description: |- + Ingress is a list containing ingress points for the load-balancer. + Traffic intended for the service should be sent to these ingress points. type: array items: - description: 'LoadBalancerIngressStatus represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.' + description: |- + LoadBalancerIngressStatus represents the status of a load-balancer ingress point: + traffic intended for the service should be sent to an ingress point. type: object properties: domain: - description: Domain is set for load-balancer ingress points that are DNS based (typically AWS load-balancers) + description: |- + Domain is set for load-balancer ingress points that are DNS based + (typically AWS load-balancers) type: string domainInternal: - description: "DomainInternal is set if there is a cluster-local DNS name to access the Ingress. \n NOTE: This differs from K8s Ingress, since we also desire to have a cluster-local DNS name to allow routing in case of not having a mesh." + description: |- + DomainInternal is set if there is a cluster-local DNS name to access the Ingress. + + + NOTE: This differs from K8s Ingress, since we also desire to have a cluster-local + DNS name to allow routing in case of not having a mesh. type: string ip: - description: IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers) + description: |- + IP is set for load-balancer ingress points that are IP based + (typically GCE or OpenStack load-balancers) type: string meshOnly: description: MeshOnly is set if the Ingress is only load-balanced through a Service mesh. diff --git a/config/realm.yaml b/config/realm.yaml index 71ba92f0f..cb76ca14c 100644 --- a/config/realm.yaml +++ b/config/realm.yaml @@ -35,29 +35,52 @@ spec: 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' + 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' + 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 Realm. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + description: |- + Spec is the desired state of the Realm. + More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status type: object properties: external: - description: External contains the name of the Domain resource corresponding with traffic originating from outside of the cluster. Could be omitted for a Realm without external access. + description: |- + External contains the name of the Domain resource corresponding with traffic + originating from outside of the cluster. Could be omitted for a Realm without + external access. type: string internal: - description: Internal contains the name of the Domain resource corresponding with traffic originating from inside of the cluster. Could be omitted for a Realm without internal access. + description: |- + Internal contains the name of the Domain resource corresponding with traffic + originating from inside of the cluster. Could be omitted for a Realm without + internal access. type: string status: - description: 'Status is the current state of the Realm. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + description: |- + Status is the current state of the Realm. + More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status type: object properties: 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. + 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 @@ -65,14 +88,19 @@ spec: 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' + 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). + 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. @@ -81,7 +109,9 @@ spec: 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. + 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. @@ -90,7 +120,9 @@ spec: description: Type of condition. type: string observedGeneration: - description: ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. + description: |- + ObservedGeneration is the 'Generation' of the Service that + was last processed by the controller. type: integer format: int64 additionalPrinterColumns: diff --git a/config/serverlessservice.yaml b/config/serverlessservice.yaml index 9e6d6e5bd..ab1422e5c 100644 --- a/config/serverlessservice.yaml +++ b/config/serverlessservice.yaml @@ -31,19 +31,34 @@ spec: status: {} schema: openAPIV3Schema: - description: 'ServerlessService is a proxy for the K8s service objects containing the endpoints for the revision, whether those are endpoints of the activator or revision pods. See: https://knative.page.link/naxz for details.' + description: |- + ServerlessService is a proxy for the K8s service objects containing the + endpoints for the revision, whether those are endpoints of the activator or + revision pods. + See: https://knative.page.link/naxz for details. 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' + 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' + 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 ServerlessService. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + description: |- + Spec is the desired state of the ServerlessService. + More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status type: object required: - objectRef @@ -53,44 +68,75 @@ spec: description: Mode describes the mode of operation of the ServerlessService. type: string numActivators: - description: NumActivators contains number of Activators that this revision should be assigned. O means — assign all. + description: |- + NumActivators contains number of Activators that this revision should be + assigned. + O means — assign all. type: integer format: int32 objectRef: - description: ObjectRef defines the resource that this ServerlessService is responsible for making "serverless". + description: |- + ObjectRef defines the resource that this ServerlessService + is responsible for making "serverless". type: object properties: apiVersion: description: API version of the referent. type: string fieldPath: - description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + TODO: this design is not final and this field is subject to change in the future. type: string kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + 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' + 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/' + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ type: string resourceVersion: - description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency type: string uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string x-kubernetes-map-type: atomic protocolType: - description: The application-layer protocol. Matches `RevisionProtocolType` set on the owning pa/revision. serving imports networking, so just use string. + description: |- + The application-layer protocol. Matches `RevisionProtocolType` set on the owning pa/revision. + serving imports networking, so just use string. type: string status: - description: 'Status is the current state of the ServerlessService. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + description: |- + Status is the current state of the ServerlessService. + More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status type: object properties: 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. + 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 @@ -98,14 +144,19 @@ spec: 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' + 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). + 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. @@ -114,7 +165,9 @@ spec: 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. + 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. @@ -123,14 +176,20 @@ spec: description: Type of condition. type: string observedGeneration: - description: ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. + description: |- + ObservedGeneration is the 'Generation' of the Service that + was last processed by the controller. type: integer format: int64 privateServiceName: - description: PrivateServiceName holds the name of a core K8s Service resource that load balances over the user service pods backing this Revision. + description: |- + PrivateServiceName holds the name of a core K8s Service resource that + load balances over the user service pods backing this Revision. type: string serviceName: - description: ServiceName holds the name of a core K8s Service resource that load balances over the pods backing this Revision (activator or revision). + description: |- + ServiceName holds the name of a core K8s Service resource that + load balances over the pods backing this Revision (activator or revision). type: string additionalPrinterColumns: - name: Mode diff --git a/hack/update-schemas.sh b/hack/update-schemas.sh index 32f922ead..8bb442f68 100755 --- a/hack/update-schemas.sh +++ b/hack/update-schemas.sh @@ -27,7 +27,7 @@ function restore { trap restore EXIT -go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.9.2 \ +go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0 \ schemapatch:manifests=config/,generateEmbeddedObjectMeta=false \ output:dir=config \ paths=./pkg/apis/...