8000 Openapi CRD by eguzki · Pull Request #496 · 3scale/3scale-operator · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Openapi CRD #496

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

Merged
merged 32 commits into from
Oct 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9e07b82
openapis.capabilities.3scale.net API and controller scaffolding
eguzki Oct 9, 2020
ffda249
openapi controller implementation
eguzki Oct 9, 2020
e12c369
openapi controller: openapi from configmap
eguzki Oct 18, 2020
88b75d8
backend_types.go: little fix
eguzki Oct 21, 2020
e090898
little fix in openapi CRD
eguzki Oct 21, 2020
9cf0b4f
little fix in base_reconciler
eguzki Oct 21, 2020
9b17a18
openapi controller: backend reconciler
eguzki Oct 21, 2020
73b78a4
openapi controller: product reconciler
eguzki Oct 21, 2020
75821bd
openapi controller: openapi from URL
eguzki Oct 21, 2020
7b97d7c
template update: no relevant change, only newlines
eguzki Oct 21, 2020
cec57ab
openapi controller: custom private base URL
eguzki Oct 22, 2020
d0c64a0
openapi controller: prefix matching option
eguzki Oct 22, 2020
97cafe7
openapi controller: private api security
eguzki Oct 23, 2020
5c6f834
update 3scale-operator-master.v0.0.0.clusterserviceversion.yaml
eguzki Oct 23, 2020
6001a60
openapi controller: status shows managed resource references
eguzki Oct 23, 2020
f66d5da
openapi CRD doc
eguzki Oct 24, 2020
9929ea4
openapi CRD: remove unused property
eguzki Oct 24, 2020
45bb6c7
openapi controller: implement ready condition type of status conditions
eguzki Oct 24, 2020
d95be0c
openapi CRD tests
eguzki Oct 27, 2020
64b04c1
replaced Openapi CRD by OpenAPI CRD
eguzki Oct 28, 2020
2280672
refactored some reconciler types
eguzki Oct 28, 2020
2f98b7a
OpenAPI CRD Spec options fields as pointers
eguzki Oct 29, 2020
e42a2b3
little typo in doc
eguzki Oct 29, 2020
be1974f
OpenAPI CRD: replaced ConfigMapRef by SecretRef
eguzki Oct 29, 2020
b3b9304
openapi CRD doc: accepted spec formats
eguzki Oct 29, 2020
829f3ab
openapi CRD doc: supported openapi version
eguzki Oct 29, 2020
d6c292a
OpenAPI CR examples with different name
eguzki Oct 29, 2020
274a1b1
openapi_controller: added comment for clarification
eguzki Oct 29, 2020
327a977
operator-application-capabilities.md: little typo
eguzki Oct 29, 2020
36325e4
OpenAPI CRD: change object name validation to DNS Subdomain names
eguzki Oct 29, 2020
7f14c48
OpenAPI doc: constraing in the OpenAPI title length
eguzki Oct 30, 2020
46b1b81
OpenAPI controller: secret with openapi ref must contain only 1 field…
eguzki Oct 30, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
205 changes: 205 additions & 0 deletions deploy/crds/capabilities.3scale.net_openapis_crd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: openapis.capabilities.3scale.net
spec:
group: capabilities.3scale.net
names:
kind: OpenAPI
listKind: OpenAPIList
plural: openapis
singular: openapi
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
description: OpenAPI is the Schema for the openapis 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:
description: OpenAPISpec defines the desired state of OpenAPI
properties:
openapiRef:
description: OpenAPIRef Reference to the OpenAPI Specification
properties:
secretRef:
description: SecretRef refers to the secret object that contains
the OpenAPI Document
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.'
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/'
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'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
url:
description: URL Remote URL from where to fetch the OpenAPI Document
pattern: ^https?:\/\/.*$
type: string
type: object
oneOf:
- properties:
secretRef:
type: object
required: ["secretRef"]
- properties:
url:
type: string
required: ["url"]
prefixMatching:
description: PrefixMatching Use prefix matching instead of strict matching
on mapping rules derived from openapi operations
type: boolean
privateAPIHostHeader:
description: PrivateAPIHostHeader Custom host header sent by the API
gateway to the private API
type: string
privateAPISecretToken:
description: PrivateAPISecretToken Custom secret token sent by the API
gateway to the private API
type: string
privateBaseURL:
description: PrivateBaseURL Custom private base URL
type: string
productSystemName:
description: ProductSystemName 3scale product system name
type: string
productionPublicBaseURL:
description: ProductionPublicBaseURL Custom public production URL
pattern: ^https?:\/\/.*$
type: string
providerAccountRef:
description: ProviderAccountRef references account provider credentials
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
type: object
stagingPublicBaseURL:
description: StagingPublicBaseURL Custom public staging URL
pattern: ^https?:\/\/.*$
type: string
required:
- openapiRef
type: object
status:
description: OpenAPIStatus defines the observed state of OpenAPI
properties:
backendResourceNames:
description: BackendResourceNames contains a list of references to the
managed 3scale backends
items:
description: LocalObjectReference contains enough information to let
you locate the referenced object inside the same namespace.
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
type: object
type: array
conditions:
description: Current state of the openapi resource. Conditions represent
the latest available observations of an object's state
items:
description: "Condition represents an observation of an object's state.
Conditions are an extension mechanism intended to be used when the
details of an observation are not a priori known or would not apply
to all instances of a given Kind. \n Conditions should be added
to explicitly convey properties that users and components care about
rather than requiring those properties to be inferred from other
observations. Once defined, the meaning of a Condition can not be
changed arbitrarily - it becomes part of the API, and has the same
backwards- and forwards-compatibility concerns of any other part
of the API."
properties:
lastTransitionTime:
format: date-time
type: string
message:
type: string
reason:
description: ConditionReason is intended to be a one-word, CamelCase
representation of the category of cause of the current status.
It is intended to be used in concise output, such as one-line
kubectl get output, and in summarizing occurrences of causes.
type: string
status:
type: string
type:
description: "ConditionType is the type of the condition and is
typically a CamelCased word or short phrase. \n Condition types
should indicate state in the \"abnormal-true\" polarity. For
example, if the condition indicates when a policy is invalid,
the \"is valid\" case is probably the norm, so the condition
should be called \"Invalid\"."
type: string
required:
- status
- type
type: object
type: array
observedGeneration:
description: ObservedGeneration reflects the generation of the most
recently observed Backend Spec.
format: int64
type: integer
productResourceName:
description: ProductResourceName references the managed 3scale product
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
type: object
providerAccountHost:
description: ProviderAccountHost contains the 3scale account's provider
URL
type: string
type: object
type: object
version: v1beta1
versions:
- name: v1beta1
served: true
storage: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: capabilities.3scale.net/v1beta1
kind: OpenAPI
metadata:
name: openapi-from-secret
spec:
openapiRef:
secretRef:
name: openapi-secret-name
F438
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: capabilities.3scale.net/v1beta1
kind: OpenAPI
metadata:
name: openapi-from-url
spec:
openapiRef:
url: "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml"
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,32 @@ metadata:
"systemName": "backend1"
}
},
{
"apiVersion": "capabilities.3scale.net/v1beta1",
"kind": "OpenAPI",
"metadata": {
"name": "openapi-from-secret"
},
"spec": {
"openapiRef": {
"secretRef": {
"name": "openapi-secret-name"
}
}
}
},
{
"apiVersion": "capabilities.3scale.net/v1beta1",
"kind": "OpenAPI",
"metadata": {
"name": "openapi-from-url"
},
"spec": {
"openapiRef": {
"url": "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml"
}
}
},
{
"apiVersion": "capabilities.3scale.net/v1beta1",
"kind": "Product",
Expand Down Expand Up @@ -321,10 +347,10 @@ metadata:
containerImage: quay.io/3scale/3scale-operator:master
createdAt: "2019-05-30T22:40:00Z"
description: 3scale Operator to provision 3scale and publish/manage API
operators.openshift.io/infrastructure-features: '["Disconnected"]'
repository: https://github.com/3scale/3scale-operator
support: Red Hat
tectonic-visibility: ocs
operators.openshift.io/infrastructure-features: '["Disconnected"]'
name: 3scale-operator-master.v0.0.0
namespace: placeholder
spec:
Expand Down Expand Up @@ -402,6 +428,10 @@ spec:
kind: Backend
name: backends.capabilities.3scale.net
version: v1beta1
- description: OpenAPI is the Schema for the openapis API
kind: OpenAPI
name: openapis.capabilities.3scale.net
version: v1beta1
- description: Product is the Schema for the products API
displayName: 3scale Product
kind: Product
Expand Down Expand Up @@ -449,17 +479,17 @@ spec:
install:
spec:
clusterPermissions:
- rules:
- apiGroups:
- console.openshift.io
resources:
- consolelinks
verbs:
- create
- delete
- get
- update
serviceAccountName: 3scale-operator
- rules:
- apiGroups:
- console.openshift.io
resources:
- consolelinks
verbs:
- create
- delete
- get
- update
serviceAccountName: 3scale-operator
deployments:
- name: 3scale-operator
spec:
Expand Down
Binary file modified doc/capabilities-diagram.dia
Binary file not shown.
Binary file modified doc/capabilities-diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
0