Skip to content

Commit f36330b

Browse files
authored
Merge pull request #47 from robusta-dev/helm-chart
Helm chart
2 parents 767ec31 + b6d53e3 commit f36330b

52 files changed

Lines changed: 664 additions & 495 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yaml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,7 @@ jobs:
5252
fixed-${{ github.sha }}
5353
fixed-
5454
- name: Build with skaffold
55-
run: ./skaffold build -p prod --file-output=container-ids.json
56-
57-
# we disable the run-id so that if we do two identical builds then they will output the same YAML
58-
# otherwise skaffold creates a different yaml because the run id changes
59-
- name: Render yaml file
60-
run: ./skaffold render -p prod --offline=true -l skaffold.dev/run-id=LEAVE_UNCHANGED > robusta.yaml
61-
62-
# upload robusta.yaml to gist
63-
- name: Deploy gist
64-
uses: arikalon1/actions-deploy-gist@v1
65-
with:
66-
token: ${{ secrets.GIST_TOKEN }}
67-
gist_id: 6b809d508dfc3d8d92afc92c7bbbe88e
68-
gist_file_name: robusta-${{ env.RELEASE_VER }}.yaml
69-
file_path: ./robusta.yaml
55+
run: ./skaffold build --file-output=container-ids.json
7056

7157
- name: Create robusta examples
7258
run: |-

.github/workflows/test_robusta.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ jobs:
1717
source $HOME/.poetry/env
1818
cd src/
1919
poetry install
20+
- name: Install Helm
21+
run: |
22+
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
23+
helm repo add robusta https://robusta-charts.storage.googleapis.com
2024
- name: Test Robusta
2125
env:
2226
PYTEST_SLACK_TOKEN: ${{ secrets.PYTEST_SLACK_TOKEN }}

src/Dockerfile renamed to Dockerfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,25 @@ RUN apt-get update \
99
# disabled because of an issue with the libreadline7 dependency
1010
#RUN wget https://launchpad.net/~ionel-mc/+archive/ubuntu/socat/+build/15532886/+files/socat_1.7.3.2-2ubuntu2ionelmc2~ppa1_amd64.deb
1111
#RUN dpkg -i socat_1.7.3.2-2ubuntu2ionelmc2~ppa1_amd64.deb
12-
13-
ENV CUSTOM_PLAYBOOKS_ROOT=/etc/robusta/config
1412
ENV ENV_TYPE=DEV
1513

1614
# we install the project requirements and install the app in separate stages to optimize docker layer caching
1715
RUN mkdir /app
1816
RUN pip3 install --upgrade pip
1917
RUN pip3 install poetry==1.1.6
2018
RUN poetry config virtualenvs.create false
21-
COPY pyproject.toml /app
22-
COPY poetry.lock /app
19+
COPY src/pyproject.toml /app
20+
COPY src/poetry.lock /app
2321
WORKDIR /app
2422
RUN bash -c "pip3 install --requirement <(poetry export --dev --format requirements.txt --without-hashes)"
2523

26-
COPY . /app
24+
ADD src/ /app
2725

2826
RUN pip3 install --use-feature=in-tree-build .
2927

28+
COPY playbooks/ /etc/robusta/playbooks/defaults
29+
RUN pip3 install -r /etc/robusta/playbooks/defaults/requirements.txt
30+
# remove the requirements so that we don't reinstall them at runtime
31+
RUN rm /etc/robusta/playbooks/defaults/requirements.txt
3032
# -u disables stdout buffering https://stackoverflow.com/questions/107705/disable-output-buffering
3133
CMD [ "python3", "-u", "-m", "robusta.runner.main"]

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ If you want to develop features for Robusta itself you'll need to install Robust
1010

1111
If you want to use the Slack integration:
1212
1. Get a slack token from https://robusta.dev/integrations/slack/?id=xyz
13-
2. Add it to `deployment/dev/set_slack_api_key.yaml` before running skaffold
14-
3. Optional: reduce the chance you'll accidentally commit your Slack key to git by running `git update-index --skip-worktree deployment/dev/set_slack_api_key.yaml` (see [here](https://stackoverflow.com/a/40272289/495995) for details)
13+
2. Create your private `active_playbooks.yaml` file.
14+
You can use `robusta gen-config --base-config-file helm/robusta/active_playbooks.yaml` to do that.
15+
3. Add the generated file content to `helm/robusta/active_playbooks.yaml` before running skaffold
16+
4. Optional: reduce the chance you'll accidentally commit your Slack key to git by running `git update-index --skip-worktree helm/robusta/active_playbooks.yaml` (see [here](https://stackoverflow.com/a/40272289/495995) for details)
1517

1618
# Running Robusta runner locally as a developer
1719
If you want to run the Robusta runner on your own computer (e.g. with telepresence):

deployment/base/kustomization.yaml

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

deployment/base/namespace.yaml

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

deployment/base/runner.yaml

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +0,0 @@
1-
apiVersion: apps/v1
2-
kind: Deployment
3-
metadata:
4-
name: robusta-runner
5-
labels:
6-
app: robusta-runner
7-
spec:
8-
replicas: 1
9-
selector:
10-
matchLabels:
11-
app: robusta-runner
12-
template:
13-
metadata:
14-
labels:
15-
app: robusta-runner
16-
spec:
17-
serviceAccountName: robusta-runner
18-
containers:
19-
- name: runner
20-
image: us-central1-docker.pkg.dev/genuine-flight-317411/devel/robusta-runner
21-
imagePullPolicy: Always
22-
securityContext:
23-
privileged: false
24-
env:
25-
- name: CUSTOM_PLAYBOOKS_ROOT
26-
value: /etc/robusta/config
27-
- name: ENABLE_MANHOLE
28-
value: "true"
29-
- name: ENABLE_COLORED_LOGS
30-
value: "true"
31-
- name: LOG_LEVEL
32-
value: INFO
33-
- name: INSTALLATION_NAMESPACE
34-
valueFrom:
35-
fieldRef:
36-
fieldPath: metadata.namespace
37-
volumeMounts:
38-
- name: playbooks-config
39-
mountPath: /etc/robusta/config
40-
lifecycle:
41-
preStop:
42-
exec:
43-
command: ["bash", "-c", "kill -SIGINT 1"]
44-
- name: grafana-renderer
45-
image: us-central1-docker.pkg.dev/genuine-flight-317411/devel/grafana-renderer:4
46-
imagePullPolicy: Always
47-
securityContext:
48-
privileged: false
49-
lifecycle:
50-
preStop:
51-
exec:
52-
command: ["bash", "-c", "kill -SIGINT 1"]
53-
resources:
54-
limits:
55-
memory: "512Mi"
56-
volumes:
57-
- name: playbooks-config
58-
configMap:
59-
name: robusta-config
60-
optional: true
61-
---
62-
apiVersion: v1
63-
kind: Service
64-
metadata:
65-
name: robusta-runner
66-
spec:
67-
selector:
68-
app: robusta-runner
69-
ports:
70-
- name: http
71-
protocol: TCP
72-
port: 80
73-
targetPort: 5000

deployment/dev/kustomization.yaml

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

deployment/dev/set_slack_api_key.yaml

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

0 commit comments

Comments
 (0)