Skip to content

Commit e42b7c3

Browse files
authored
Merge pull request #29 from replicatedhq/samples
Add samples
2 parents e9f286d + bd95ade commit e42b7c3

File tree

3 files changed

+114
-18
lines changed

3 files changed

+114
-18
lines changed

examples/preflight/check-kubernetes-version.yaml

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
apiVersion: troubleshoot.replicated.com/v1beta1
2+
kind: Preflight
3+
metadata:
4+
name: check-kubernetes-version
5+
spec:
6+
analyzers:
7+
- clusterVersion:
8+
outcomes:
9+
- fail:
10+
when: "< 1.14.0"
11+
message: The application requires at Kubernetes 1.14.0 or later, and recommends 1.15.0.
12+
uri: https://www.kubernetes.io
13+
- warn:
14+
when: "< 1.15.0"
15+
message: Your cluster meets the minimum version of Kubernetes, but we recommend you update to 1.15.0 or later.
16+
uri: https://kubernetes.io
17+
- pass:
18+
message: Your cluster meets the recommended and required versions of Kubernetes.
19+
- customResourceDefinitionName:
20+
customResourceDefinitionName: rook
21+
outcomes:
22+
- fail:
23+
message: Rook is required for the application. Rook was not found in the cluster.
24+
- pass:
25+
message: Found a supported version of Rook installed and running in the cluster.
26+
- imagePullSecret:
27+
checkName: Registry credneitlas for Quay.io
28+
registryName: quay.io
29+
outcomes:
30+
- fail:
31+
message: Cannot pull from quay.io
32+
- pass:
33+
message: Found credentials to pull from quay.io
34+
- storageClass:
35+
checkName: Required storage classes
36+
storageClassName: "expected-storage-class-name"
37+
outcomes:
38+
- fail:
39+
message: The required storage class was not found in the cluster.
40+
- pass:
41+
message: The required storage class was found in the cluster.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
apiVersion: troubleshoot.replicated.com/v1beta1
2+
kind: Collector
3+
metadata:
4+
name: collector-sample
5+
spec:
6+
- clusterInfo: {}
7+
- clusterResources: {}
8+
- secret:
9+
name: illmannered-cricket-mysql
10+
namespace: default
11+
key: mysql-password
12+
- logs:
13+
selector:
14+
- name=nginx-ingress-microk8s
15+
namespace: default
16+
limits:
17+
maxAge: 30d
18+
maxLines: 10000
19+
- run:
20+
collectorName: ping-google
21+
namespace: default
22+
image: flungo/netutils
23+
command: ["ping"]
24+
args: ["www.google.com"]
25+
timeout: 5s
26+
- exec:
27+
collectorName: mysql-vars
28+
selector:
29+
- app=mysql
30+
namespace: default
31+
command: ["mysql"]
32+
args: ["-ureplicated", "-ppassword", "-e", "show processlist"]
33+
timeout: 60m
34+
- exec:
35+
collectorName: hosts
36+
selector:
37+
- app=graphql-api
38+
namespace: default
39+
command: ["cat"]
40+
args: ["/etc/hosts"]
41+
timeout: 60m
42+
- exec:
43+
collectorName: broken
44+
selector:
45+
- app=graphql-api
46+
namespace: default
47+
command: ["cat"]
48+
args: ["/etc/hostdasddsda"]
49+
timeout: 60m
50+
- http:
51+
collectorName: test-get
52+
get:
53+
url: https://api.staging.replicated.com/market/v1/echo/ip
54+
insecureSkipVerify: false
55+
headers: {}
56+
- http:
57+
collectorName: test-post
58+
post:
59+
url: http://httpbin.org/headers
60+
insecureSkipVerify: false
61+
headers:
62+
X-Custom-Header: "post-request"
63+
- http:
64+
collectorName: test-put
65+
put:
66+
url: http://httpbin.org/anything
67+
insecureSkipVerify: false
68+
headers:
69+
X-Custom-Header: "put-request"
70+
- http:
71+
collectorName: test-broken
72+
put:
73+
url: ""

0 commit comments

Comments
 (0)