From 2477616753f6e30fec00f2f9e0607df47e3fdbce Mon Sep 17 00:00:00 2001 From: Marc Campbell Date: Fri, 26 Jul 2019 22:05:05 +0000 Subject: [PATCH] Add samples --- .../preflight/check-kubernetes-version.yaml | 18 -------- examples/preflight/sample-preflight.yaml | 41 +++++++++++++++++++ .../troubleshoot/sample-troubleshoot.yaml | 0 3 files changed, 41 insertions(+), 18 deletions(-) delete mode 100644 examples/preflight/check-kubernetes-version.yaml create mode 100644 examples/preflight/sample-preflight.yaml create mode 100644 examples/troubleshoot/sample-troubleshoot.yaml diff --git a/examples/preflight/check-kubernetes-version.yaml b/examples/preflight/check-kubernetes-version.yaml deleted file mode 100644 index 296a96a1..00000000 --- a/examples/preflight/check-kubernetes-version.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: troubleshoot.replicated.com/v1beta1 -kind: Preflight -metadata: - name: check-kubernetes-version -spec: - analyzers: - - clusterVersion: - outcomes: - - fail: - when: "< 1.14.0" - message: The application requires at Kubernetes 1.14.0 or later, and recommends 1.15.0. - uri: https://www.kubernetes.io - - warn: - when: "< 1.15.0" - message: Your cluster meets the minimum version of Kubernetes, but we recommend you update to 1.15.0 or later. - uri: https://kubernetes.io - - pass: - message: Your cluster meets the recommended and required versions of Kubernetes. diff --git a/examples/preflight/sample-preflight.yaml b/examples/preflight/sample-preflight.yaml new file mode 100644 index 00000000..60855b22 --- /dev/null +++ b/examples/preflight/sample-preflight.yaml @@ -0,0 +1,41 @@ +apiVersion: troubleshoot.replicated.com/v1beta1 +kind: Preflight +metadata: + name: check-kubernetes-version +spec: + analyzers: + - clusterVersion: + outcomes: + - fail: + when: "< 1.14.0" + message: The application requires at Kubernetes 1.14.0 or later, and recommends 1.15.0. + uri: https://www.kubernetes.io + - warn: + when: "< 1.15.0" + message: Your cluster meets the minimum version of Kubernetes, but we recommend you update to 1.15.0 or later. + uri: https://kubernetes.io + - pass: + message: Your cluster meets the recommended and required versions of Kubernetes. + - customResourceDefinitionName: + customResourceDefinitionName: rook + outcomes: + - fail: + message: Rook is required for the application. Rook was not found in the cluster. + - pass: + message: Found a supported version of Rook installed and running in the cluster. + - imagePullSecret: + checkName: Registry credneitlas for Quay.io + registryName: quay.io + outcomes: + - fail: + message: Cannot pull from quay.io + - pass: + message: Found credentials to pull from quay.io + - storageClass: + checkName: Required storage classes + storageClassName: "expected-storage-class-name" + outcomes: + - fail: + message: The required storage class was not found in the cluster. + - pass: + message: The required storage class was found in the cluster. diff --git a/examples/troubleshoot/sample-troubleshoot.yaml b/examples/troubleshoot/sample-troubleshoot.yaml new file mode 100644 index 00000000..e69de29b