-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9f952ce
Showing
147 changed files
with
6,815 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Installing Robusta as a user | ||
If you want to use Robusta, see our [installation guide](https://robusta.dev/docs/getting-started/installing.html). | ||
|
||
# Installing Robusta runner in cluster as a developer | ||
If you want to develop features for Robusta itself you'll need to install Robusta from source: | ||
|
||
1. `git clone` the source code. | ||
2. Install skaffold and kustomize. | ||
3. Run `skaffold run --tail` | ||
|
||
If you want to use the Slack integration, get a slack token from https://robusta.dev/integrations/slack/?id=xyz | ||
and add it to `deployment/dev/set_slack_api_key.yaml` before running skaffold. | ||
|
||
# Running Robusta runner locally as a developer | ||
If you want to run the robusta runner on your own computer (e.g. with telepresence): | ||
|
||
1. `git clone` the source code | ||
2. `cd src` | ||
3. `poetry install` | ||
4. `poetry run python3 -m robusta.runner.main` | ||
|
||
# Running Robusta cli locally as a developer | ||
This is only necessary if you are developing features for the cli itself. | ||
If you just want to develop robusta-runner and install it from your local version, | ||
use the skaffold instructions above. | ||
|
||
### Using poetry | ||
|
||
1. `git clone` the source code | ||
2. `cd src` | ||
3. `poetry install` | ||
4. `poetry run robusta` | ||
|
||
### Alternative method using pip | ||
This method installs robusta into your global python environment | ||
|
||
1. `git clone` the source code | ||
2. `cd src` | ||
3. `pip3 install .` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace: "" | ||
handler: | ||
cloudevent: | ||
url: "http://robusta-runner:80/api/handle" | ||
resource: | ||
deployment: true | ||
replicationcontroller: true | ||
replicaset: true | ||
daemonset: true | ||
services: true | ||
pod: true | ||
job: true | ||
node: true | ||
hpa: true | ||
clusterrole: true | ||
serviceaccount: true | ||
persistentvolume: true | ||
namespace: true | ||
configmap: false # disabled because it is a little spammy by default | ||
secret: false # disabled for security reasons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<source> | ||
@type http | ||
port 9880 | ||
bind 0.0.0.0 | ||
<parse> | ||
@type json | ||
time_key nil | ||
</parse> | ||
</source> | ||
|
||
<match **> | ||
@type stdout | ||
</match> | ||
|
||
<system> | ||
log_level trace | ||
</system> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: robusta | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- configmaps | ||
- daemonsets | ||
- deployments | ||
- events | ||
- namespaces | ||
- nodes | ||
- persistentvolumes | ||
- pods | ||
- replicasets | ||
- replicationcontrollers | ||
#- secrets | ||
- services | ||
- serviceaccounts | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
|
||
- apiGroups: | ||
- "autoscaling" | ||
resources: | ||
- horizontalpodautoscalers | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
|
||
- apiGroups: | ||
- "rbac.authorization.k8s.io" | ||
resources: | ||
- clusterroles | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
|
||
- apiGroups: | ||
- apps | ||
resources: | ||
- daemonsets | ||
- deployments | ||
- deployments/scale | ||
- replicasets | ||
- replicasets/scale | ||
- statefulsets | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
|
||
- apiGroups: | ||
- extensions | ||
resources: | ||
- daemonsets | ||
- deployments | ||
- deployments/scale | ||
- ingresses | ||
- replicasets | ||
- replicasets/scale | ||
- replicationcontrollers/scale | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
|
||
- apiGroups: | ||
- batch | ||
resources: | ||
- cronjobs | ||
- jobs | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: robusta | ||
namespace: robusta | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: robusta | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: robusta | ||
subjects: | ||
- kind: ServiceAccount | ||
name: robusta | ||
namespace: robusta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: robusta-forwarder | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: robusta-forwarder | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: robusta-forwarder | ||
spec: | ||
serviceAccountName: robusta | ||
containers: | ||
- name: fluentd | ||
# if you need to customize this image (e.g. to add plugins) see https://github.com/fluent/fluentd-docker-image/blob/master/Dockerfile.sample | ||
# if you want to monitor node-level stuff (e.g. pod logs) then we should use the fluentd daemonset: https://github.com/fluent/fluentd-kubernetes-daemonset | ||
image: fluent/fluentd:v1.12.1-1.0 | ||
imagePullPolicy: Always | ||
volumeMounts: | ||
- mountPath: /fluentd/etc | ||
name: robusta-fluentd-config | ||
- name: kubewatch | ||
# this is a custom version of kubewatch built from https://github.com/aantn/kubewatch | ||
image: us-central1-docker.pkg.dev/arabica-300319/devel/kubewatch:v1.8 | ||
imagePullPolicy: Always | ||
env: | ||
- name: KW_CONFIG | ||
value: /config | ||
volumeMounts: | ||
- name: robusta-kubewatch-config | ||
mountPath: /config | ||
volumes: | ||
- name: robusta-fluentd-config | ||
configMap: | ||
name: robusta-fluentd-config | ||
- name: robusta-kubewatch-config | ||
configMap: | ||
name: robusta-kubewatch-config | ||
|
||
# if using the official image then we need this - see https://github.com/bitnami/bitnami-docker-kubewatch/blob/82c54aeb2a764d7b74ad20d8d74493235ef30fc6/0/debian-10/Dockerfile | ||
#COPY kubewatch.yaml /opt/bitnami/kubewatch/.kubewatch.yaml | ||
# for our image | ||
#COPY kubewatch.yaml /root/.kubewatch.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- namespace.yaml | ||
- runner-service-account.yaml | ||
- forwarder-service-account.yaml | ||
- runner.yaml | ||
- forwarder.yaml | ||
|
||
configMapGenerator: | ||
- name: robusta-fluentd-config | ||
files: | ||
- config/fluent.conf | ||
- name: robusta-kubewatch-config | ||
files: | ||
- config/.kubewatch.yaml | ||
|
||
generatorOptions: | ||
disableNameSuffixHash: true | ||
|
||
namespace: robusta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: robusta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: robusta-runner | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- configmaps | ||
- daemonsets | ||
- deployments | ||
- events | ||
- namespaces | ||
- nodes | ||
- persistentvolumes | ||
- persistentvolumeclaims | ||
- pods | ||
- pods/status | ||
- pods/exec | ||
- pods/log | ||
- replicasets | ||
- replicationcontrollers | ||
#- secrets | ||
- services | ||
- serviceaccounts | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- delete | ||
- create | ||
- patch | ||
- update | ||
|
||
- apiGroups: | ||
- "rbac.authorization.k8s.io" | ||
resources: | ||
- clusterroles | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- patch | ||
- delete | ||
- create | ||
|
||
- apiGroups: | ||
- "autoscaling" | ||
resources: | ||
- horizontalpodautoscalers | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- create | ||
- patch | ||
- update | ||
|
||
- apiGroups: | ||
- apps | ||
resources: | ||
- daemonsets | ||
- deployments | ||
- deployments/scale | ||
- replicasets | ||
- replicasets/scale | ||
- statefulsets | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- delete | ||
- create | ||
- patch | ||
- update | ||
|
||
- apiGroups: | ||
- extensions | ||
resources: | ||
- daemonsets | ||
- deployments | ||
- deployments/scale | ||
- ingresses | ||
- replicasets | ||
- replicasets/scale | ||
- replicationcontrollers/scale | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- delete | ||
- patch | ||
- create | ||
|
||
- apiGroups: | ||
- batch | ||
resources: | ||
- cronjobs | ||
- jobs | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- patch | ||
- delete | ||
- create | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: robusta-runner | ||
namespace: robusta | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: robusta-runner | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: robusta-runner | ||
subjects: | ||
- kind: ServiceAccount | ||
name: robusta-runner | ||
namespace: robusta |
Oops, something went wrong.