--- /dev/null
+package controller\r
+\r
+import (\r
+ "context"\r
+ "fmt"\r
+)\r
+\r
+func GetCustomResourceDefinition() []*unstructured.Unstructured {\r
+\r
+ customResourceDefinition1 := &unstructured.Unstructured{\r
+ Object: map[string]interface{}{\r
+ "apiVersion": "apiextensions.k8s.io/v1beta1",\r
+ "kind": "CustomResourceDefinition",\r
+ "metadata": map[string]interface{}{\r
+ "labels": map[string]interface{}{\r
+ "app.kubernetes.io/instance": "release-name",\r
+ "app.kubernetes.io/managed-by": "Helm",\r
+ "app.kubernetes.io/name": "kong",\r
+ "app.kubernetes.io/version": "1.4",\r
+ "helm.sh/chart": "kong-0.36.6",\r
+ },\r
+ "name": "kongconsumers.configuration.konghq.com",\r
+ },\r
+ "spec": map[string]interface{}{\r
+ "group": "configuration.konghq.com",\r
+ "names": map[string]interface{}{\r
+ "kind": "KongConsumer",\r
+ "plural": "kongconsumers",\r
+ "shortNames": []interface{}{\r
+ "kc",\r
+ },\r
+ },\r
+ "scope": "Namespaced",\r
+ "validation": map[string]interface{}{\r
+ "openAPIV3Schema": map[string]interface{}{\r
+ "properties": map[string]interface{}{\r
+ "credentials": map[string]interface{}{\r
+ "items": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "type": "array",\r
+ },\r
+ "custom_id": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "username": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ },\r
+ },\r
+ },\r
+ "version": "v1",\r
+ "additionalPrinterColumns": []interface{}{\r
+ map[string]interface{}{\r
+ "JSONPath": ".username",\r
+ "description": "Username of a Kong Consumer",\r
+ "name": "Username",\r
+ "type": "string",\r
+ },\r
+ map[string]interface{}{\r
+ "type": "date",\r
+ "JSONPath": ".metadata.creationTimestamp",\r
+ "description": "Age",\r
+ "name": "Age",\r
+ },\r
+ },\r
+ },\r
+ },\r
+ }\r
+\r
+ customResourceDefinition2 := &unstructured.Unstructured{\r
+ Object: map[string]interface{}{\r
+ "apiVersion": "apiextensions.k8s.io/v1beta1",\r
+ "kind": "CustomResourceDefinition",\r
+ "metadata": map[string]interface{}{\r
+ "labels": map[string]interface{}{\r
+ "app.kubernetes.io/instance": "release-name",\r
+ "app.kubernetes.io/managed-by": "Helm",\r
+ "app.kubernetes.io/name": "kong",\r
+ "app.kubernetes.io/version": "1.4",\r
+ "helm.sh/chart": "kong-0.36.6",\r
+ },\r
+ "name": "kongcredentials.configuration.konghq.com",\r
+ },\r
+ "spec": map[string]interface{}{\r
+ "version": "v1",\r
+ "additionalPrinterColumns": []interface{}{\r
+ map[string]interface{}{\r
+ "JSONPath": ".type",\r
+ "description": "Type of credential",\r
+ "name": "Credential-type",\r
+ "type": "string",\r
+ },\r
+ map[string]interface{}{\r
+ "JSONPath": ".metadata.creationTimestamp",\r
+ "description": "Age",\r
+ "name": "Age",\r
+ "type": "date",\r
+ },\r
+ map[string]interface{}{\r
+ "type": "string",\r
+ "JSONPath": ".consumerRef",\r
+ "description": "Owner of the credential",\r
+ "name": "Consumer-Ref",\r
+ },\r
+ },\r
+ "group": "configuration.konghq.com",\r
+ "names": map[string]interface{}{\r
+ "kind": "KongCredential",\r
+ "plural": "kongcredentials",\r
+ },\r
+ "scope": "Namespaced",\r
+ "validation": map[string]interface{}{\r
+ "openAPIV3Schema": map[string]interface{}{\r
+ "properties": map[string]interface{}{\r
+ "consumerRef": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "type": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ },\r
+ "required": []interface{}{\r
+ "consumerRef",\r
+ "type",\r
+ },\r
+ },\r
+ },\r
+ },\r
+ },\r
+ }\r
+\r
+ customResourceDefinition3 := &unstructured.Unstructured{\r
+ Object: map[string]interface{}{\r
+ "spec": map[string]interface{}{\r
+ "names": map[string]interface{}{\r
+ "kind": "KongPlugin",\r
+ "plural": "kongplugins",\r
+ "shortNames": []interface{}{\r
+ "kp",\r
+ },\r
+ },\r
+ "scope": "Namespaced",\r
+ "validation": map[string]interface{}{\r
+ "openAPIV3Schema": map[string]interface{}{\r
+ "properties": map[string]interface{}{\r
+ "protocols": map[string]interface{}{\r
+ "items": map[string]interface{}{\r
+ "type": "string",\r
+ "enum": []interface{}{\r
+ "http",\r
+ "https",\r
+ "tcp",\r
+ "tls",\r
+ "grpc",\r
+ "grpcs",\r
+ },\r
+ },\r
+ "type": "array",\r
+ },\r
+ "run_on": map[string]interface{}{\r
+ "enum": []interface{}{\r
+ "first",\r
+ "second",\r
+ "all",\r
+ },\r
+ "type": "string",\r
+ },\r
+ "config": map[string]interface{}{\r
+ "type": "object",\r
+ },\r
+ "disabled": map[string]interface{}{\r
+ "type": "boolean",\r
+ },\r
+ "plugin": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ },\r
+ "required": []interface{}{\r
+ "plugin",\r
+ },\r
+ },\r
+ },\r
+ "version": "v1",\r
+ "additionalPrinterColumns": []interface{}{\r
+ map[string]interface{}{\r
+ "JSONPath": ".plugin",\r
+ "description": "Name of the plugin",\r
+ "name": "Plugin-Type",\r
+ "type": "string",\r
+ },\r
+ map[string]interface{}{\r
+ "description": "Age",\r
+ "name": "Age",\r
+ "type": "date",\r
+ "JSONPath": ".metadata.creationTimestamp",\r
+ },\r
+ map[string]interface{}{\r
+ "JSONPath": ".disabled",\r
+ "description": "Indicates if the plugin is disabled",\r
+ "name": "Disabled",\r
+ "priority": 1,\r
+ "type": "boolean",\r
+ },\r
+ map[string]interface{}{\r
+ "JSONPath": ".config",\r
+ "description": "Configuration of the plugin",\r
+ "name": "Config",\r
+ "priority": 1,\r
+ "type": "string",\r
+ },\r
+ },\r
+ "group": "configuration.konghq.com",\r
+ },\r
+ "apiVersion": "apiextensions.k8s.io/v1beta1",\r
+ "kind": "CustomResourceDefinition",\r
+ "metadata": map[string]interface{}{\r
+ "labels": map[string]interface{}{\r
+ "app.kubernetes.io/instance": "release-name",\r
+ "app.kubernetes.io/managed-by": "Helm",\r
+ "app.kubernetes.io/name": "kong",\r
+ "app.kubernetes.io/version": "1.4",\r
+ "helm.sh/chart": "kong-0.36.6",\r
+ },\r
+ "name": "kongplugins.configuration.konghq.com",\r
+ },\r
+ },\r
+ }\r
+\r
+ customResourceDefinition4 := &unstructured.Unstructured{\r
+ Object: map[string]interface{}{\r
+ "spec": map[string]interface{}{\r
+ "version": "v1",\r
+ "group": "configuration.konghq.com",\r
+ "names": map[string]interface{}{\r
+ "plural": "kongingresses",\r
+ "shortNames": []interface{}{\r
+ "ki",\r
+ },\r
+ "kind": "KongIngress",\r
+ },\r
+ "scope": "Namespaced",\r
+ "validation": map[string]interface{}{\r
+ "openAPIV3Schema": map[string]interface{}{\r
+ "properties": map[string]interface{}{\r
+ "upstream": map[string]interface{}{\r
+ "properties": map[string]interface{}{\r
+ "hash_fallback_header": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "hash_on": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "hash_on_cookie": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "hash_on_cookie_path": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "healthchecks": map[string]interface{}{\r
+ "type": "object",\r
+ "properties": map[string]interface{}{\r
+ "passive": map[string]interface{}{\r
+ "properties": map[string]interface{}{\r
+ "healthy": map[string]interface{}{\r
+ "properties": map[string]interface{}{\r
+ "http_statuses": map[string]interface{}{\r
+ "items": map[string]interface{}{\r
+ "type": "integer",\r
+ },\r
+ "type": "array",\r
+ },\r
+ "interval": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "successes": map[string]interface{}{\r
+ "type": "integer",\r
+ "minimum": 0,\r
+ },\r
+ },\r
+ "type": "object",\r
+ },\r
+ "unhealthy": map[string]interface{}{\r
+ "type": "object",\r
+ "properties": map[string]interface{}{\r
+ "timeout": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "http_failures": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "http_statuses": map[string]interface{}{\r
+ "items": map[string]interface{}{\r
+ "type": "integer",\r
+ },\r
+ "type": "array",\r
+ },\r
+ "interval": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "tcp_failures": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ },\r
+ },\r
+ },\r
+ "type": "object",\r
+ },\r
+ "active": map[string]interface{}{\r
+ "properties": map[string]interface{}{\r
+ "concurrency": map[string]interface{}{\r
+ "minimum": 1,\r
+ "type": "integer",\r
+ },\r
+ "healthy": map[string]interface{}{\r
+ "properties": map[string]interface{}{\r
+ "http_statuses": map[string]interface{}{\r
+ "items": map[string]interface{}{\r
+ "type": "integer",\r
+ },\r
+ "type": "array",\r
+ },\r
+ "interval": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "successes": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ },\r
+ "type": "object",\r
+ },\r
+ "http_path": map[string]interface{}{\r
+ "pattern": "^/.*$",\r
+ "type": "string",\r
+ },\r
+ "timeout": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "unhealthy": map[string]interface{}{\r
+ "type": "object",\r
+ "properties": map[string]interface{}{\r
+ "timeout": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "http_failures": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "http_statuses": map[string]interface{}{\r
+ "items": map[string]interface{}{\r
+ "type": "integer",\r
+ },\r
+ "type": "array",\r
+ },\r
+ "interval": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "tcp_failures": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ },\r
+ },\r
+ },\r
+ "type": "object",\r
+ },\r
+ },\r
+ },\r
+ "slots": map[string]interface{}{\r
+ "minimum": 10,\r
+ "type": "integer",\r
+ },\r
+ "algorithm": map[string]interface{}{\r
+ "enum": []interface{}{\r
+ "round-robin",\r
+ "consistent-hashing",\r
+ "least-connections",\r
+ },\r
+ "type": "string",\r
+ },\r
+ "hash_fallback": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "hash_on_header": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "host_header": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ },\r
+ "type": "object",\r
+ },\r
+ "proxy": map[string]interface{}{\r
+ "properties": map[string]interface{}{\r
+ "connect_timeout": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "path": map[string]interface{}{\r
+ "pattern": "^/.*$",\r
+ "type": "string",\r
+ },\r
+ "protocol": map[string]interface{}{\r
+ "enum": []interface{}{\r
+ "http",\r
+ "https",\r
+ "grpc",\r
+ "grpcs",\r
+ },\r
+ "type": "string",\r
+ },\r
+ "read_timeout": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "retries": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "write_timeout": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ },\r
+ "type": "object",\r
+ },\r
+ "route": map[string]interface{}{\r
+ "properties": map[string]interface{}{\r
+ "protocols": map[string]interface{}{\r
+ "items": map[string]interface{}{\r
+ "type": "string",\r
+ "enum": []interface{}{\r
+ "http",\r
+ "https",\r
+ "grpc",\r
+ "grpcs",\r
+ },\r
+ },\r
+ "type": "array",\r
+ },\r
+ "regex_priority": map[string]interface{}{\r
+ "type": "integer",\r
+ },\r
+ "strip_path": map[string]interface{}{\r
+ "type": "boolean",\r
+ },\r
+ "headers": map[string]interface{}{\r
+ "additionalProperties": map[string]interface{}{\r
+ "items": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "type": "array",\r
+ },\r
+ "type": "object",\r
+ },\r
+ "https_redirect_status_code": map[string]interface{}{\r
+ "type": "integer",\r
+ },\r
+ "methods": map[string]interface{}{\r
+ "items": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "type": "array",\r
+ },\r
+ "preserve_host": map[string]interface{}{\r
+ "type": "boolean",\r
+ },\r
+ },\r
+ },\r
+ },\r
+ },\r
+ },\r
+ },\r
+ "apiVersion": "apiextensions.k8s.io/v1beta1",\r
+ "kind": "CustomResourceDefinition",\r
+ "metadata": map[string]interface{}{\r
+ "labels": map[string]interface{}{\r
+ "helm.sh/chart": "kong-0.36.6",\r
+ "app.kubernetes.io/instance": "release-name",\r
+ "app.kubernetes.io/managed-by": "Helm",\r
+ "app.kubernetes.io/name": "kong",\r
+ "app.kubernetes.io/version": "1.4",\r
+ },\r
+ "name": "kongingresses.configuration.konghq.com",\r
+ },\r
+ },\r
+ }\r
+\r
+ customResourceDefinition5 := &unstructured.Unstructured{\r
+ Object: map[string]interface{}{\r
+ "apiVersion": "apiextensions.k8s.io/v1beta1",\r
+ "kind": "CustomResourceDefinition",\r
+ "metadata": map[string]interface{}{\r
+ "labels": map[string]interface{}{\r
+ "app.kubernetes.io/instance": "release-name",\r
+ "app.kubernetes.io/managed-by": "Helm",\r
+ "app.kubernetes.io/name": "kong",\r
+ "app.kubernetes.io/version": "1.4",\r
+ "helm.sh/chart": "kong-0.36.6",\r
+ },\r
+ "name": "kongconsumers.configuration.konghq.com",\r
+ },\r
+ "spec": map[string]interface{}{\r
+ "group": "configuration.konghq.com",\r
+ "names": map[string]interface{}{\r
+ "kind": "KongConsumer",\r
+ "plural": "kongconsumers",\r
+ "shortNames": []interface{}{\r
+ "kc",\r
+ },\r
+ },\r
+ "scope": "Namespaced",\r
+ "validation": map[string]interface{}{\r
+ "openAPIV3Schema": map[string]interface{}{\r
+ "properties": map[string]interface{}{\r
+ "credentials": map[string]interface{}{\r
+ "type": "array",\r
+ "items": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ },\r
+ "custom_id": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "username": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ },\r
+ },\r
+ },\r
+ "version": "v1",\r
+ "additionalPrinterColumns": []interface{}{\r
+ map[string]interface{}{\r
+ "JSONPath": ".username",\r
+ "description": "Username of a Kong Consumer",\r
+ "name": "Username",\r
+ "type": "string",\r
+ },\r
+ map[string]interface{}{\r
+ "JSONPath": ".metadata.creationTimestamp",\r
+ "description": "Age",\r
+ "name": "Age",\r
+ "type": "date",\r
+ },\r
+ },\r
+ },\r
+ },\r
+ }\r
+\r
+ customResourceDefinition6 := &unstructured.Unstructured{\r
+ Object: map[string]interface{}{\r
+ "apiVersion": "apiextensions.k8s.io/v1beta1",\r
+ "kind": "CustomResourceDefinition",\r
+ "metadata": map[string]interface{}{\r
+ "labels": map[string]interface{}{\r
+ "app.kubernetes.io/managed-by": "Helm",\r
+ "app.kubernetes.io/name": "kong",\r
+ "app.kubernetes.io/version": "1.4",\r
+ "helm.sh/chart": "kong-0.36.6",\r
+ "app.kubernetes.io/instance": "release-name",\r
+ },\r
+ "name": "kongcredentials.configuration.konghq.com",\r
+ },\r
+ "spec": map[string]interface{}{\r
+ "additionalPrinterColumns": []interface{}{\r
+ map[string]interface{}{\r
+ "JSONPath": ".type",\r
+ "description": "Type of credential",\r
+ "name": "Credential-type",\r
+ "type": "string",\r
+ },\r
+ map[string]interface{}{\r
+ "description": "Age",\r
+ "name": "Age",\r
+ "type": "date",\r
+ "JSONPath": ".metadata.creationTimestamp",\r
+ },\r
+ map[string]interface{}{\r
+ "JSONPath": ".consumerRef",\r
+ "description": "Owner of the credential",\r
+ "name": "Consumer-Ref",\r
+ "type": "string",\r
+ },\r
+ },\r
+ "group": "configuration.konghq.com",\r
+ "names": map[string]interface{}{\r
+ "kind": "KongCredential",\r
+ "plural": "kongcredentials",\r
+ },\r
+ "scope": "Namespaced",\r
+ "validation": map[string]interface{}{\r
+ "openAPIV3Schema": map[string]interface{}{\r
+ "properties": map[string]interface{}{\r
+ "consumerRef": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "type": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ },\r
+ "required": []interface{}{\r
+ "consumerRef",\r
+ "type",\r
+ },\r
+ },\r
+ },\r
+ "version": "v1",\r
+ },\r
+ },\r
+ }\r
+\r
+ customResourceDefinition7 := &unstructured.Unstructured{\r
+ Object: map[string]interface{}{\r
+ "apiVersion": "apiextensions.k8s.io/v1beta1",\r
+ "kind": "CustomResourceDefinition",\r
+ "metadata": map[string]interface{}{\r
+ "labels": map[string]interface{}{\r
+ "app.kubernetes.io/instance": "release-name",\r
+ "app.kubernetes.io/managed-by": "Helm",\r
+ "app.kubernetes.io/name": "kong",\r
+ "app.kubernetes.io/version": "1.4",\r
+ "helm.sh/chart": "kong-0.36.6",\r
+ },\r
+ "name": "kongplugins.configuration.konghq.com",\r
+ },\r
+ "spec": map[string]interface{}{\r
+ "names": map[string]interface{}{\r
+ "kind": "KongPlugin",\r
+ "plural": "kongplugins",\r
+ "shortNames": []interface{}{\r
+ "kp",\r
+ },\r
+ },\r
+ "scope": "Namespaced",\r
+ "validation": map[string]interface{}{\r
+ "openAPIV3Schema": map[string]interface{}{\r
+ "properties": map[string]interface{}{\r
+ "config": map[string]interface{}{\r
+ "type": "object",\r
+ },\r
+ "disabled": map[string]interface{}{\r
+ "type": "boolean",\r
+ },\r
+ "plugin": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "protocols": map[string]interface{}{\r
+ "items": map[string]interface{}{\r
+ "enum": []interface{}{\r
+ "http",\r
+ "https",\r
+ "tcp",\r
+ "tls",\r
+ "grpc",\r
+ "grpcs",\r
+ },\r
+ "type": "string",\r
+ },\r
+ "type": "array",\r
+ },\r
+ "run_on": map[string]interface{}{\r
+ "type": "string",\r
+ "enum": []interface{}{\r
+ "first",\r
+ "second",\r
+ "all",\r
+ },\r
+ },\r
+ },\r
+ "required": []interface{}{\r
+ "plugin",\r
+ },\r
+ },\r
+ },\r
+ "version": "v1",\r
+ "additionalPrinterColumns": []interface{}{\r
+ map[string]interface{}{\r
+ "description": "Name of the plugin",\r
+ "name": "Plugin-Type",\r
+ "type": "string",\r
+ "JSONPath": ".plugin",\r
+ },\r
+ map[string]interface{}{\r
+ "description": "Age",\r
+ "name": "Age",\r
+ "type": "date",\r
+ "JSONPath": ".metadata.creationTimestamp",\r
+ },\r
+ map[string]interface{}{\r
+ "priority": 1,\r
+ "type": "boolean",\r
+ "JSONPath": ".disabled",\r
+ "description": "Indicates if the plugin is disabled",\r
+ "name": "Disabled",\r
+ },\r
+ map[string]interface{}{\r
+ "JSONPath": ".config",\r
+ "description": "Configuration of the plugin",\r
+ "name": "Config",\r
+ "priority": 1,\r
+ "type": "string",\r
+ },\r
+ },\r
+ "group": "configuration.konghq.com",\r
+ },\r
+ },\r
+ }\r
+\r
+ customResourceDefinition8 := &unstructured.Unstructured{\r
+ Object: map[string]interface{}{\r
+ "apiVersion": "apiextensions.k8s.io/v1beta1",\r
+ "kind": "CustomResourceDefinition",\r
+ "metadata": map[string]interface{}{\r
+ "labels": map[string]interface{}{\r
+ "helm.sh/chart": "kong-0.36.6",\r
+ "app.kubernetes.io/instance": "release-name",\r
+ "app.kubernetes.io/managed-by": "Helm",\r
+ "app.kubernetes.io/name": "kong",\r
+ "app.kubernetes.io/version": "1.4",\r
+ },\r
+ "name": "kongingresses.configuration.konghq.com",\r
+ },\r
+ "spec": map[string]interface{}{\r
+ "group": "configuration.konghq.com",\r
+ "names": map[string]interface{}{\r
+ "plural": "kongingresses",\r
+ "shortNames": []interface{}{\r
+ "ki",\r
+ },\r
+ "kind": "KongIngress",\r
+ },\r
+ "scope": "Namespaced",\r
+ "validation": map[string]interface{}{\r
+ "openAPIV3Schema": map[string]interface{}{\r
+ "properties": map[string]interface{}{\r
+ "proxy": map[string]interface{}{\r
+ "properties": map[string]interface{}{\r
+ "path": map[string]interface{}{\r
+ "pattern": "^/.*$",\r
+ "type": "string",\r
+ },\r
+ "protocol": map[string]interface{}{\r
+ "type": "string",\r
+ "enum": []interface{}{\r
+ "http",\r
+ "https",\r
+ "grpc",\r
+ "grpcs",\r
+ },\r
+ },\r
+ "read_timeout": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "retries": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "write_timeout": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "connect_timeout": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ },\r
+ "type": "object",\r
+ },\r
+ "route": map[string]interface{}{\r
+ "properties": map[string]interface{}{\r
+ "https_redirect_status_code": map[string]interface{}{\r
+ "type": "integer",\r
+ },\r
+ "methods": map[string]interface{}{\r
+ "items": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "type": "array",\r
+ },\r
+ "preserve_host": map[string]interface{}{\r
+ "type": "boolean",\r
+ },\r
+ "protocols": map[string]interface{}{\r
+ "items": map[string]interface{}{\r
+ "type": "string",\r
+ "enum": []interface{}{\r
+ "http",\r
+ "https",\r
+ "grpc",\r
+ "grpcs",\r
+ },\r
+ },\r
+ "type": "array",\r
+ },\r
+ "regex_priority": map[string]interface{}{\r
+ "type": "integer",\r
+ },\r
+ "strip_path": map[string]interface{}{\r
+ "type": "boolean",\r
+ },\r
+ "headers": map[string]interface{}{\r
+ "additionalProperties": map[string]interface{}{\r
+ "items": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "type": "array",\r
+ },\r
+ "type": "object",\r
+ },\r
+ },\r
+ },\r
+ "upstream": map[string]interface{}{\r
+ "properties": map[string]interface{}{\r
+ "algorithm": map[string]interface{}{\r
+ "enum": []interface{}{\r
+ "round-robin",\r
+ "consistent-hashing",\r
+ "least-connections",\r
+ },\r
+ "type": "string",\r
+ },\r
+ "hash_fallback_header": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "hash_on_cookie": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "hash_on_cookie_path": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "host_header": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "hash_fallback": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "hash_on": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "hash_on_header": map[string]interface{}{\r
+ "type": "string",\r
+ },\r
+ "healthchecks": map[string]interface{}{\r
+ "type": "object",\r
+ "properties": map[string]interface{}{\r
+ "active": map[string]interface{}{\r
+ "properties": map[string]interface{}{\r
+ "timeout": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "unhealthy": map[string]interface{}{\r
+ "properties": map[string]interface{}{\r
+ "http_failures": map[string]interface{}{\r
+ "type": "integer",\r
+ "minimum": 0,\r
+ },\r
+ "http_statuses": map[string]interface{}{\r
+ "items": map[string]interface{}{\r
+ "type": "integer",\r
+ },\r
+ "type": "array",\r
+ },\r
+ "interval": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "tcp_failures": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "timeout": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ },\r
+ "type": "object",\r
+ },\r
+ "concurrency": map[string]interface{}{\r
+ "minimum": 1,\r
+ "type": "integer",\r
+ },\r
+ "healthy": map[string]interface{}{\r
+ "properties": map[string]interface{}{\r
+ "http_statuses": map[string]interface{}{\r
+ "items": map[string]interface{}{\r
+ "type": "integer",\r
+ },\r
+ "type": "array",\r
+ },\r
+ "interval": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "successes": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ },\r
+ "type": "object",\r
+ },\r
+ "http_path": map[string]interface{}{\r
+ "pattern": "^/.*$",\r
+ "type": "string",\r
+ },\r
+ },\r
+ "type": "object",\r
+ },\r
+ "passive": map[string]interface{}{\r
+ "properties": map[string]interface{}{\r
+ "healthy": map[string]interface{}{\r
+ "type": "object",\r
+ "properties": map[string]interface{}{\r
+ "http_statuses": map[string]interface{}{\r
+ "items": map[string]interface{}{\r
+ "type": "integer",\r
+ },\r
+ "type": "array",\r
+ },\r
+ "interval": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "successes": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ },\r
+ },\r
+ "unhealthy": map[string]interface{}{\r
+ "type": "object",\r
+ "properties": map[string]interface{}{\r
+ "http_statuses": map[string]interface{}{\r
+ "type": "array",\r
+ "items": map[string]interface{}{\r
+ "type": "integer",\r
+ },\r
+ },\r
+ "interval": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "tcp_failures": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "timeout": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ "http_failures": map[string]interface{}{\r
+ "minimum": 0,\r
+ "type": "integer",\r
+ },\r
+ },\r
+ },\r
+ },\r
+ "type": "object",\r
+ },\r
+ },\r
+ },\r
+ "slots": map[string]interface{}{\r
+ "minimum": 10,\r
+ "type": "integer",\r
+ },\r
+ },\r
+ "type": "object",\r
+ },\r
+ },\r
+ },\r
+ },\r
+ "version": "v1",\r
+ },\r
+ },\r
+ }\r
+\r
+ return []*unstructured.Unstructured{customResourceDefinition1, customResourceDefinition2, customResourceDefinition3, customResourceDefinition4, customResourceDefinition5, customResourceDefinition6, customResourceDefinition7, customResourceDefinition8}\r
+}
\ No newline at end of file