This is an automated email from the ASF dual-hosted git repository.

tokers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-ingress-controller.git


The following commit(s) were added to refs/heads/master by this push:
     new 4164486  feat: apisixtls schema (#383)
4164486 is described below

commit 416448679e5bfed0d53646f2c57d9dce4daef993
Author: Alex Zhang <zchao1...@gmail.com>
AuthorDate: Mon Apr 19 13:22:22 2021 +0800

    feat: apisixtls schema (#383)
---
 samples/deploy/crd/v1beta1/ApisixRoute.yaml |  4 +--
 samples/deploy/crd/v1beta1/ApisixTls.yaml   | 42 +++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/samples/deploy/crd/v1beta1/ApisixRoute.yaml 
b/samples/deploy/crd/v1beta1/ApisixRoute.yaml
index 5ab8ccd..2dbda5f 100644
--- a/samples/deploy/crd/v1beta1/ApisixRoute.yaml
+++ b/samples/deploy/crd/v1beta1/ApisixRoute.yaml
@@ -21,10 +21,10 @@ metadata:
   name: apisixroutes.apisix.apache.org
 spec:
   additionalPrinterColumns:
-    - JSONPath: .spec.http[].match.hosts[]
+    - JSONPath: .spec.http[].match.hosts
       name: Hosts
       type: string
-    - JSONPath: .spec.http[].match.paths[]
+    - JSONPath: .spec.http[].match.paths
       name: URIs
       type: string
     - JSONPath: .spec.http[].match.backends[].serviceName
diff --git a/samples/deploy/crd/v1beta1/ApisixTls.yaml 
b/samples/deploy/crd/v1beta1/ApisixTls.yaml
index 9a828dd..45dc774 100644
--- a/samples/deploy/crd/v1beta1/ApisixTls.yaml
+++ b/samples/deploy/crd/v1beta1/ApisixTls.yaml
@@ -20,6 +20,19 @@ kind: CustomResourceDefinition
 metadata:
   name: apisixtlses.apisix.apache.org
 spec:
+  additionalPrinterColumns:
+    - JSONPath: .spec.hosts
+      name: SNIs
+      type: string
+    - JSONPath: .spec.secret.name
+      name: Secret Name
+      type: string
+    - JSONPath: .spec.secret.namespace
+      name: Secret Namespace
+      type: string
+    - JSONPath: .metadata.creationTimestamp
+      name: Age
+      type: date
   group: apisix.apache.org
   versions:
     - name: v1
@@ -32,3 +45,32 @@ spec:
     kind: ApisixTls
     shortNames:
     - atls
+  preserveUnknownFields: false
+  validation:
+    openAPIV3Schema:
+      type: object
+      properties:
+        spec:
+          type: object
+          required:
+            - hosts
+            - secret
+          properties:
+            hosts:
+              type: array
+              minItems: 1
+              items:
+                type: string
+                pattern: "^\\*?[0-9a-zA-Z-.]+$"
+            secret:
+              type: object
+              required:
+                - name
+                - namespace
+              properties:
+                name:
+                  type: string
+                  minLength: 1
+                namespace:
+                  type: string
+                  minLength: 1

Reply via email to