Skip to content

Commit

Permalink
generated admiral CRDs compatible with k8 1.22 (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
shriramsharma authored Oct 5, 2022
1 parent 54ffcb1 commit 90542ca
Show file tree
Hide file tree
Showing 5 changed files with 344 additions and 22 deletions.
45 changes: 42 additions & 3 deletions admiral/crd/dependency.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,50 @@
apiVersion: apiextensions.k8s.io/v1beta1
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: dependencies.admiral.io
spec:
group: admiral.io
version: v1alpha1
names:
kind: Dependency
plural: dependencies
scope: Namespaced
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: generic cdr object to wrap the dependency api
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:
properties:
destinations:
description: 'REQUIRED: A list of workloads that source workload depends
on.'
items:
type: string
type: array
identityLabel:
description: 'REQUIRED: the label on the workload for selecting source
and destination'
type: string
source:
description: 'REQUIRED: identifier for the source workload'
type: string
type: object
required:
- metadata
- spec
type: object
served: true
storage: true
93 changes: 90 additions & 3 deletions admiral/crd/globalTraffic.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,98 @@
apiVersion: apiextensions.k8s.io/v1beta1
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: globaltrafficpolicies.admiral.io
spec:
group: admiral.io
version: v1alpha1
names:
kind: GlobalTrafficPolicy
plural: globaltrafficpolicies
scope: Namespaced
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: generic cdr object to wrap the GlobalTrafficPolicy api
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:
properties:
policy:
description: 'REQUIRED: A list host name .'
items:
description: TrafficPolicy describes routing for a hostname.
properties:
dns:
description: 'REQUIRED: dns that can be used by client. This
name will have the traffic type applied to it'
type: string
dnsPrefix:
description: 'REQUIRED: dnsPrefix that will be prefixed for
the service names being generated with this traffic policy
Ex: dnsPrefix = west => generated service name = west.stage.servicename.global'
type: string
lbType:
description: 'REQUIRED: type of global load distrubtion'
format: int32
type: integer
outlier_detection:
description: 'OPTIONAL: to configure the outlierDetection in
DestinationRule'
properties:
base_ejection_time:
description: 'REQUIRED: Minimum duration of time in seconds,
the endpoint will be ejected'
format: int64
type: integer
consecutive_gateway_errors:
description: 'REQUIRED: No. of consecutive failures in specified
interval after which the endpoint will be ejected'
format: int32
type: integer
interval:
description: 'REQUIRED: Time interval between ejection sweep
analysis'
format: int64
type: integer
type: object
target:
description: weigth of primary and secondary must each 100
items:
properties:
region:
description: region for the traffic
type: string
weight:
description: weight for traffic this region should get.
format: int32
type: integer
type: object
type: array
type: object
type: array
selector:
additionalProperties:
type: string
description: 'REQUIRED: One or more labels that indicate a specific
set of pods/VMs on which this global routing policy should be applied.
The scope of label search is restricted to namespace mark for mesh
enablement this will scan all cluster and namespace'
type: object
type: object
required:
- metadata
- spec
type: object
served: true
storage: true
42 changes: 40 additions & 2 deletions admiral/crd/routingPolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,49 @@ metadata:
name: routingpolicies.admiral.io
spec:
group: admiral.io
version: v1alpha1
names:
kind: RoutingPolicy
listKind: RoutingPolicyList
plural: routingpolicies
shortNames:
- rp
- rps
scope: Namespaced
singular: routingpolicy
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: generic cdr object to wrap the GlobalTrafficPolicy api
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:
properties:
config:
additionalProperties:
type: string
type: object
hosts:
items:
type: string
type: array
plugin:
type: string
type: object
required:
- metadata
- spec
type: object
served: true
storage: true
91 changes: 82 additions & 9 deletions install/admiral/base/crds.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,109 @@

---

apiVersion: apiextensions.k8s.io/v1beta1
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: dependencies.admiral.io
spec:
group: admiral.io
version: v1alpha1
names:
kind: Dependency
plural: dependencies
singular: dependency
shortNames:
- dep
- deps
scope: Namespaced

versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: generic cdr object to wrap the dependency api
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:
properties:
destinations:
description: 'REQUIRED: A list of workloads that source workload depends
on.'
items:
type: string
type: array
identityLabel:
description: 'REQUIRED: the label on the workload for selecting source
and destination'
type: string
source:
description: 'REQUIRED: identifier for the source workload'
type: string
type: object
required:
- metadata
- spec
type: object
served: true
storage: true
---

apiVersion: apiextensions.k8s.io/v1beta1
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: routingpolicies.admiral.io
spec:
group: admiral.io
version: v1alpha1
names:
kind: RoutingPolicy
listKind: RoutingPolicyList
plural: routingpolicies
shortNames:
- rp
- rps
singular: routingpolicy
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: generic cdr object to wrap the GlobalTrafficPolicy api
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:
properties:
config:
additionalProperties:
type: string
type: object
hosts:
items:
type: string
type: array
plugin:
type: string
type: object
required:
- metadata
- spec
type: object
served: true
storage: true


Loading

0 comments on commit 90542ca

Please sign in to comment.