Skip to content

Commit 49adbe4

Browse files
authored
Merge pull request #12 from j-fuentes/installation-guide
In-cluster installation guide
2 parents b21f0a0 + fec4acf commit 49adbe4

22 files changed

+268
-133
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@
33
/builds
44
/bundles
55
/output
6-
credentials.json
6+
credentials.json
7+
.terraform
8+
terraform.tfstate
9+
terraform.tfstate.backup

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ Preflight is a tool to automatically perform Kubernetes cluster configuration ch
99
- [Background](#background)
1010
- [Preflight Packages](#preflight-packages)
1111
- [Install Preflight](#install-preflight)
12-
- [Use Preflight locally](#use-preflight-locally)
13-
- [Get periodic reports by running Preflight as a CronJob](#get-periodic-reports-by-running-preflight-as-a-cronjob)
12+
- [Use Preflight locally](#use-preflight-locally)
13+
- [Get periodic reports by running Preflight as a CronJob](#get-periodic-reports-by-running-preflight-as-a-cronjob)
1414

1515
<!-- markdown-toc end -->
1616

@@ -53,10 +53,9 @@ preflight package lint <path to package>
5353

5454
## Install Preflight
5555

56-
You can compile Preflight by running `make build`. It will create the binary in `builds/preflight`.
57-
56+
### Use Preflight locally
5857

59-
## Use Preflight locally
58+
You can compile Preflight by running `make build`. It will create the binary in `builds/preflight`.
6059

6160
Create your `preflight.yaml` configuration file (you can take inspiration from the ones in `./examples`).
6261

@@ -78,6 +77,6 @@ If you want to visualice the report in your browser, you can access [preflight.j
7877

7978
You can give it a try without even running the tool, since we provide some report examples ([gke.json](./examples/reports/gke.json), [pods.json](./examples/reports/pods.json)) ready to be loaded in [preflight.jetstack.io](https://preflight.jetstack.io/).
8079

81-
## Get periodic reports by running Preflight as a CronJob
80+
### Get periodic reports by running Preflight as a CronJob
8281

83-
See [Run Preflight In-Cluster](./docs/preflight-in-cluster.md).
82+
See [Installation Manual: Preflight In-Cluster](./docs/installation_manual_in_cluster.md).
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ spec:
4545
apiVersion: v1
4646
kind: ServiceAccount
4747
metadata:
48-
namespace: preflight
49-
name: preflight
48+
name: preflight-scanner
5049
---
5150
apiVersion: rbac.authorization.k8s.io/v1
5251
kind: ClusterRole
@@ -66,11 +65,9 @@ apiVersion: rbac.authorization.k8s.io/v1
6665
kind: ClusterRoleBinding
6766
metadata:
6867
name: preflight-list-pods-global
69-
namespace: preflight
7068
subjects:
7169
- kind: ServiceAccount
72-
name: preflight
73-
namespace: preflight
70+
name: preflight-scanner
7471
roleRef:
7572
kind: ClusterRole
7673
name: list-pods-global

deployment/kubernetes/base/02-cronjob.yaml renamed to deployment/kubernetes/base/01-cronjob.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ spec:
1818
spec:
1919
template:
2020
spec:
21-
serviceAccountName: preflight
21+
serviceAccountName: preflight-scanner
2222
restartPolicy: Never
2323
containers:
2424
- name: preflight
25-
image: jetstack/preflight:latest
25+
image: quay.io/jetstack/preflight
2626
imagePullPolicy: Always
2727
resources:
2828
requests:
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
resources:
2-
- 00-namespace.yaml
3-
- 01-rbac.yaml
4-
- 02-cronjob.yaml
2+
- 00-rbac.yaml
3+
- 01-cronjob.yaml

deployment/kubernetes/overlays/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

deployment/kubernetes/overlays/sample/kustomization.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

deployment/kubernetes/overlays/sample/preflight.yaml

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/secrets/*
2+
!/secrets/.keep
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRoleBinding
3+
metadata:
4+
name: preflight-list-pods-global
5+
namespace: preflight-scanner
6+
subjects:
7+
- kind: ServiceAccount
8+
name: preflight-scanner
9+
namespace: preflight-scanner

0 commit comments

Comments
 (0)