From 9c26600e0aa601b901204e3eb5a6061ae04e22d2 Mon Sep 17 00:00:00 2001
From: Frederic Branczyk <fbranczyk@gmail.com>
Date: Mon, 2 Jul 2018 16:17:39 +0200
Subject: [PATCH] *: Fix CRD generation

---
 ...0alertmanagerCustomResourceDefinition.yaml | 49 +++++++++++------
 ...r-0prometheusCustomResourceDefinition.yaml | 54 ++++++++++++-------
 ...rometheusruleCustomResourceDefinition.yaml |  9 ----
 ...ervicemonitorCustomResourceDefinition.yaml | 14 ++---
 4 files changed, 72 insertions(+), 54 deletions(-)

diff --git a/manifests/0prometheus-operator-0alertmanagerCustomResourceDefinition.yaml b/manifests/0prometheus-operator-0alertmanagerCustomResourceDefinition.yaml
index 993cffc0..464ab8a0 100644
--- a/manifests/0prometheus-operator-0alertmanagerCustomResourceDefinition.yaml
+++ b/manifests/0prometheus-operator-0alertmanagerCustomResourceDefinition.yaml
@@ -11,7 +11,6 @@ spec:
   scope: Namespaced
   validation:
     openAPIV3Schema:
-      description: Alertmanager describes an Alertmanager cluster.
       properties:
         apiVersion:
           description: 'APIVersion defines the versioned schema of this representation
@@ -815,7 +814,10 @@ spec:
                               path:
                                 description: Path to access on the HTTP server.
                                 type: string
-                              port: {}
+                              port:
+                                anyOf:
+                                - type: string
+                                - type: integer
                               scheme:
                                 description: Scheme to use for connecting to the host.
                                   Defaults to HTTP.
@@ -830,7 +832,10 @@ spec:
                                 description: 'Optional: Host name to connect to, defaults
                                   to the pod IP.'
                                 type: string
-                              port: {}
+                              port:
+                                anyOf:
+                                - type: string
+                                - type: integer
                             required:
                             - port
                       preStop:
@@ -882,7 +887,10 @@ spec:
                               path:
                                 description: Path to access on the HTTP server.
                                 type: string
-                              port: {}
+                              port:
+                                anyOf:
+                                - type: string
+                                - type: integer
                               scheme:
                                 description: Scheme to use for connecting to the host.
                                   Defaults to HTTP.
@@ -897,7 +905,10 @@ spec:
                                 description: 'Optional: Host name to connect to, defaults
                                   to the pod IP.'
                                 type: string
-                              port: {}
+                              port:
+                                anyOf:
+                                - type: string
+                                - type: integer
                             required:
                             - port
                   livenessProbe:
@@ -955,7 +966,10 @@ spec:
                           path:
                             description: Path to access on the HTTP server.
                             type: string
-                          port: {}
+                          port:
+                            anyOf:
+                            - type: string
+                            - type: integer
                           scheme:
                             description: Scheme to use for connecting to the host.
                               Defaults to HTTP.
@@ -986,7 +1000,10 @@ spec:
                             description: 'Optional: Host name to connect to, defaults
                               to the pod IP.'
                             type: string
-                          port: {}
+                          port:
+                            anyOf:
+                            - type: string
+                            - type: integer
                         required:
                         - port
                       timeoutSeconds:
@@ -1095,7 +1112,10 @@ spec:
                           path:
                             description: Path to access on the HTTP server.
                             type: string
-                          port: {}
+                          port:
+                            anyOf:
+                            - type: string
+                            - type: integer
                           scheme:
                             description: Scheme to use for connecting to the host.
                               Defaults to HTTP.
@@ -1126,7 +1146,10 @@ spec:
                             description: 'Optional: Host name to connect to, defaults
                               to the pod IP.'
                             type: string
-                          port: {}
+                          port:
+                            anyOf:
+                            - type: string
+                            - type: integer
                         required:
                         - port
                       timeoutSeconds:
@@ -2379,12 +2402,4 @@ spec:
           - updatedReplicas
           - availableReplicas
           - unavailableReplicas
-      required:
-      - spec
   version: v1
-status:
-  acceptedNames:
-    kind: ""
-    plural: ""
-  conditions: null
-  storedVersions: null
diff --git a/manifests/0prometheus-operator-0prometheusCustomResourceDefinition.yaml b/manifests/0prometheus-operator-0prometheusCustomResourceDefinition.yaml
index 8e2f8074..e2382fc3 100644
--- a/manifests/0prometheus-operator-0prometheusCustomResourceDefinition.yaml
+++ b/manifests/0prometheus-operator-0prometheusCustomResourceDefinition.yaml
@@ -11,7 +11,6 @@ spec:
   scope: Namespaced
   validation:
     openAPIV3Schema:
-      description: Prometheus defines a Prometheus deployment.
       properties:
         apiVersion:
           description: 'APIVersion defines the versioned schema of this representation
@@ -640,7 +639,10 @@ spec:
                       pathPrefix:
                         description: Prefix for the HTTP path alerts are pushed to.
                         type: string
-                      port: {}
+                      port:
+                        anyOf:
+                        - type: string
+                        - type: integer
                       scheme:
                         description: Scheme to use when firing alerts.
                         type: string
@@ -898,7 +900,10 @@ spec:
                               path:
                                 description: Path to access on the HTTP server.
                                 type: string
-                              port: {}
+                              port:
+                                anyOf:
+                                - type: string
+                                - type: integer
                               scheme:
                                 description: Scheme to use for connecting to the host.
                                   Defaults to HTTP.
@@ -913,7 +918,10 @@ spec:
                                 description: 'Optional: Host name to connect to, defaults
                                   to the pod IP.'
                                 type: string
-                              port: {}
+                              port:
+                                anyOf:
+                                - type: string
+                                - type: integer
                             required:
                             - port
                       preStop:
@@ -965,7 +973,10 @@ spec:
                               path:
                                 description: Path to access on the HTTP server.
                                 type: string
-                              port: {}
+                              port:
+                                anyOf:
+                                - type: string
+                                - type: integer
                               scheme:
                                 description: Scheme to use for connecting to the host.
                                   Defaults to HTTP.
@@ -980,7 +991,10 @@ spec:
                                 description: 'Optional: Host name to connect to, defaults
                                   to the pod IP.'
                                 type: string
-                              port: {}
+                              port:
+                                anyOf:
+                                - type: string
+                                - type: integer
                             required:
                             - port
                   livenessProbe:
@@ -1038,7 +1052,10 @@ spec:
                           path:
                             description: Path to access on the HTTP server.
                             type: string
-                          port: {}
+                          port:
+                            anyOf:
+                            - type: string
+                            - type: integer
                           scheme:
                             description: Scheme to use for connecting to the host.
                               Defaults to HTTP.
@@ -1069,7 +1086,10 @@ spec:
                             description: 'Optional: Host name to connect to, defaults
                               to the pod IP.'
                             type: string
-                          port: {}
+                          port:
+                            anyOf:
+                            - type: string
+                            - type: integer
                         required:
                         - port
                       timeoutSeconds:
@@ -1178,7 +1198,10 @@ spec:
                           path:
                             description: Path to access on the HTTP server.
                             type: string
-                          port: {}
+                          port:
+                            anyOf:
+                            - type: string
+                            - type: integer
                           scheme:
                             description: Scheme to use for connecting to the host.
                               Defaults to HTTP.
@@ -1209,7 +1232,10 @@ spec:
                             description: 'Optional: Host name to connect to, defaults
                               to the pod IP.'
                             type: string
-                          port: {}
+                          port:
+                            anyOf:
+                            - type: string
+                            - type: integer
                         required:
                         - port
                       timeoutSeconds:
@@ -2961,12 +2987,4 @@ spec:
           - updatedReplicas
           - availableReplicas
           - unavailableReplicas
-      required:
-      - spec
   version: v1
-status:
-  acceptedNames:
-    kind: ""
-    plural: ""
-  conditions: null
-  storedVersions: null
diff --git a/manifests/0prometheus-operator-0prometheusruleCustomResourceDefinition.yaml b/manifests/0prometheus-operator-0prometheusruleCustomResourceDefinition.yaml
index b70cad30..0a9873c9 100644
--- a/manifests/0prometheus-operator-0prometheusruleCustomResourceDefinition.yaml
+++ b/manifests/0prometheus-operator-0prometheusruleCustomResourceDefinition.yaml
@@ -11,7 +11,6 @@ spec:
   scope: Namespaced
   validation:
     openAPIV3Schema:
-      description: PrometheusRule defines alerting rules for a Prometheus instance
       properties:
         apiVersion:
           description: 'APIVersion defines the versioned schema of this representation
@@ -337,12 +336,4 @@ spec:
                 - name
                 - rules
               type: array
-      required:
-      - spec
   version: v1
-status:
-  acceptedNames:
-    kind: ""
-    plural: ""
-  conditions: null
-  storedVersions: null
diff --git a/manifests/0prometheus-operator-0servicemonitorCustomResourceDefinition.yaml b/manifests/0prometheus-operator-0servicemonitorCustomResourceDefinition.yaml
index 018a612d..f3068cf8 100644
--- a/manifests/0prometheus-operator-0servicemonitorCustomResourceDefinition.yaml
+++ b/manifests/0prometheus-operator-0servicemonitorCustomResourceDefinition.yaml
@@ -11,7 +11,6 @@ spec:
   scope: Namespaced
   validation:
     openAPIV3Schema:
-      description: ServiceMonitor defines monitoring for a set of services.
       properties:
         apiVersion:
           description: 'APIVersion defines the versioned schema of this representation
@@ -143,7 +142,10 @@ spec:
                   scrapeTimeout:
                     description: Timeout after which the scrape is ended
                     type: string
-                  targetPort: {}
+                  targetPort:
+                    anyOf:
+                    - type: string
+                    - type: integer
                   tlsConfig:
                     description: TLSConfig specifies TLS configuration parameters.
                     properties:
@@ -230,12 +232,4 @@ spec:
           required:
           - endpoints
           - selector
-      required:
-      - spec
   version: v1
-status:
-  acceptedNames:
-    kind: ""
-    plural: ""
-  conditions: null
-  storedVersions: null
-- 
GitLab