Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename meshTls to meshTLS in ExternalWorkload CRD #12098

Merged
merged 9 commits into from Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/update-codegen.sh
Expand Up @@ -13,7 +13,7 @@ CODEGEN_PKG=${GOPATH}/pkg/mod/k8s.io/code-generator@${GEN_VER}
rm -rf "${SCRIPT_ROOT}/controller/gen/client/clientset/*"
rm -rf "${SCRIPT_ROOT}/controller/gen/client/listeners/*"
rm -rf "${SCRIPT_ROOT}/controller/gen/client/informers/*"
crds=(serviceprofile:v1alpha2 server:v1beta1 serverauthorization:v1beta1 link:v1alpha1 policy:v1alpha1 policy:v1beta3 externalworkload:v1alpha1)
crds=(serviceprofile:v1alpha2 server:v1beta1 serverauthorization:v1beta1 link:v1alpha1 policy:v1alpha1 policy:v1beta3 externalworkload:v1beta1)
for crd in "${crds[@]}"
do
crd_path=$(tr : / <<< "$crd")
Expand Down
150 changes: 145 additions & 5 deletions charts/linkerd-crds/templates/workload/external-workload.yaml
Expand Up @@ -20,14 +20,147 @@ spec:
shortNames: []
scope: Namespaced
versions:
- additionalPrinterColumns:
- name: v1alpha1
served: true
storage: false
schema:
openAPIV3Schema:
description: >-
An ExternalWorkload describes a single workload (i.e. a deployable unit) external
to the cluster that should be enrolled in the mesh.
type: object
required: [spec]
properties:
apiVerson:
type: string
kind:
type: string
metadata:
type: object
spec:
properties:
meshTls:
description: meshTls describes TLS settings associated with an
external workload.
properties:
identity:
type: string
description: identity of the workload. Corresponds to the
identity used in the workload's certificate. It is used
by peers to perform verification in the mTLS handshake.
minLength: 1
maxLength: 253
serverName:
type: string
description: serverName is the name of the workload in DNS
format. It is used by the workload to terminate TLS using
SNI.
minLength: 1
maxLength: 253
type: object
required:
- identity
- serverName
ports:
type: array
description: ports describes a list of ports exposed by the
workload
items:
properties:
name:
type: string
description: name must be an IANA_SVC_NAME and unique
within the ports set. Each named port can be referred
to by services.
port:
format: int32
maximum: 65535
minimum: 1
type: integer
protocol:
description: protocol exposed by the port. Must be UDP or
TCP. Defaults to TCP.
type: string
default: "TCP"
type: object
required:
- port
workloadIPs:
type: array
description: workloadIPs contains a list of IP addresses that
can be used to send traffic to the workload.
items:
type: object
properties:
ip:
type: string
# TODO: relax this in the future when ipv6 is supported
# an external workload (like a pod) should only
# support 2 interfaces
maxItems: 1
type: object
required:
- meshTls
status:
type: object
properties:
conditions:
type: array
items:
type: object
properties:
lastProbeTime:
description: lastProbeTime is the last time the
healthcheck endpoint was probed.
format: date-time
type: string
lastTransitionTime:
description: lastTransitionTime is the last time the
condition transitioned from one status to another.
format: date-time
type: string
status:
description: status of the condition (one of True, False, Unknown)
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of the condition in CamelCase or in
foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
reason:
description: reason contains a programmatic identifier
indicating the reason for the condition's last
transition. Producers of specific condition types may
define expected values and meanings for this field, and
whether the values are considered a guaranteed API. The
value should be a CamelCase string. This field may not
be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
message:
description: message is a human readable message
indicating details about the transition. This may be an
empty string.
maxLength: 32768
type: string
required:
- status
- type
additionalPrinterColumns:
- jsonPath: .spec.meshTls.identity
name: Identity
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1
- name: v1beta1
served: true
storage: true
schema:
Expand All @@ -46,8 +179,8 @@ spec:
type: object
spec:
properties:
meshTls:
description: meshTls describes TLS settings associated with an
meshTLS:
description: meshTLS describes TLS settings associated with an
external workload.
properties:
identity:
Expand Down Expand Up @@ -107,7 +240,7 @@ spec:
maxItems: 1
type: object
required:
- meshTls
- meshTLS
status:
type: object
properties:
Expand Down Expand Up @@ -160,3 +293,10 @@ spec:
required:
- status
- type
additionalPrinterColumns:
- jsonPath: .spec.meshTLS.identity
name: Identity
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
150 changes: 145 additions & 5 deletions cli/cmd/testdata/install_crds.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.