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

feat: add apisix crds #53

Merged
merged 1 commit into from
Feb 23, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions crds/ApisixClusterConfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: apisixclusterconfigs.apisix.apache.org
spec:
group: apisix.apache.org
scope: Cluster
names:
plural: apisixclusterconfigs
singular: apisixclusterconfig
kind: ApisixClusterConfig
shortNames:
- acc
preserveUnknownFields: false
versions:
- name: v2
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
ingressClassName:
type: string
admin:
type: object
required:
- baseURL
properties:
baseURL:
type: string
pattern: "https?://[^:]+:(\\d+)"
adminKey:
type: string
monitoring:
type: object
properties:
prometheus:
type: object
properties:
enable:
type: boolean
prefer_name:
type: boolean
skywalking:
type: object
properties:
enable:
type: boolean
sampleRatio:
type: number
minimum: 0.00001
maximum: 1
status:
type: object
properties:
observedGeneration:
type: integer
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
lastTransitionTime:
type: string
reason:
type: string
message:
type: string
required:
- type
- status
- lastTransitionTime
252 changes: 252 additions & 0 deletions crds/ApisixConsumer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: apisixconsumers.apisix.apache.org
spec:
group: apisix.apache.org
scope: Namespaced
names:
plural: apisixconsumers
singular: apisixconsumer
kind: ApisixConsumer
shortNames:
- ac
preserveUnknownFields: false
versions:
- name: v2
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
required:
- authParameter
properties:
ingressClassName:
type: string
authParameter:
type: object
oneOf:
- required: ["basicAuth"]
- required: ["keyAuth"]
- required: ["wolfRBAC"]
- required: ["jwtAuth"]
- required: ["hmacAuth"]
- required: ["ldapAuth"]
properties:
basicAuth:
type: object
oneOf:
- required: ["value"]
- required: ["secretRef"]
properties:
value:
type: object
properties:
username:
type: string
minLength: 1
password:
type: string
minLength: 1
required:
- username
- password
secretRef:
type: object
properties:
name:
type: string
minLength: 1
required:
- name
keyAuth:
type: object
oneOf:
- required: ["value"]
- required: ["secretRef"]
properties:
value:
type: object
properties:
key:
type: string
minLength: 1
required:
- key
secretRef:
type: object
properties:
name:
type: string
minLength: 1
required:
- name
jwtAuth:
type: object
oneOf:
- required: ["value"]
- required: ["secretRef"]
properties:
value:
type: object
properties:
key:
type: string
minLength: 1
secret:
type: string
public_key:
type: string
algorithm:
type: string
default: HS256
exp:
type: integer
default: 86400
base64_secret:
type: boolean
default: false
lifetime_grace_period:
type: integer
default: 0
required:
- key
secretRef:
type: object
properties:
name:
type: string
minLength: 1
required:
- name
wolfRBAC:
type: object
oneOf:
- required: ["value"]
- required: ["secretRef"]
properties:
value:
type: object
properties:
server:
type: string
appid:
type: string
header_prefix:
type: string
secretRef:
type: object
properties:
name:
type: string
minLength: 1
required:
- name
hmacAuth:
type: object
oneOf:
- required: ["value"]
- required: ["secretRef"]
properties:
value:
type: object
properties:
access_key:
type: string
secret_key:
type: string
algorithm:
type: string
clock_skew:
type: integer
signed_headers:
type: array
items:
type: string
keep_headers:
type: boolean
encode_uri_params:
type: boolean
validate_request_body:
type: boolean
max_req_body:
type: integer
required:
- access_key
- secret_key
secretRef:
type: object
properties:
name:
type: string
minLength: 1
required:
- name
ldapAuth:
type: object
oneOf:
- required: ["value"]
- required: ["secretRef"]
properties:
value:
type: object
properties:
user_dn:
type: string
required:
- user_dn
secretRef:
type: object
properties:
name:
type: string
minLength: 1
required:
- name
status:
type: object
properties:
observedGeneration:
type: integer
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
lastTransitionTime:
type: string
reason:
type: string
message:
type: string
required:
- type
- status
- lastTransitionTime
Loading
Loading