Skip to content

Commit

Permalink
update chronicle-agent examples, add ci for workbench and connect wit…
Browse files Browse the repository at this point in the history
…h agent
  • Loading branch information
AlexMapley committed Dec 7, 2023
1 parent 489c66e commit a2f1bcd
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 12 deletions.
16 changes: 10 additions & 6 deletions charts/posit-chronicle/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@ Here is an example of Helm values to run the agent sidecar in Workbench:

```yaml
pod:
# We will need to create a new volume to share audit logs between
# the rstudio (workbench) and chronicle-agent containers
volumes:
- name: logs
emptyDir: {}
volumeMounts:
- name: logs
mountPath: "/var/lib/rstudio-server/audit"
sidecar:
- name: chronicle-agent
image: posit-chronicle:2023.11.3
image: ghcr.io/rstudio/chronicle-agent:2023.10.4
volumeMounts:
- name: CHRONICLE_PRODUCT_CLUSTER_ID
value: "posit-cluster-1"
- name: logs
mountPath: "/var/lib/rstudio-server/audit"
env:
Expand All @@ -39,10 +45,8 @@ API key from a Kubernetes Secret is used to unlock more detailed metrics:
pod:
sidecar:
- name: chronicle-agent
image: posit-chronicle:2023.11.3
image: ghcr.io/rstudio/chronicle-agent:2023.10.4
env:
- name: CHRONICLE_PRODUCT_CLUSTER_ID
value: "posit-cluster-1"
- name: CHRONICLE_SERVER_ADDRESS
value: "http://chronicle-server.default.svc.cluster.local"
- name: CONNECT_API_KEY
Expand Down
1 change: 1 addition & 0 deletions charts/rstudio-connect/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ lint:
helm lint --strict --set service.name=example --set service.version=0.0.1 -f ./ci/complex-values.yaml .
helm lint --strict --set service.name=example --set service.version=0.0.1 -f ./ci/simple-values.yaml .
helm lint --strict --set service.name=example --set service.version=0.0.1 -f ./ci/empty-values.yaml .
helm lint --strict --set service.name=example --set service.version=0.0.1 -f ./ci/chronicle-agent.yaml .

template:
helm template .
Expand Down
12 changes: 12 additions & 0 deletions charts/rstudio-connect/ci/chronicle-agent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
pod:
sidecar:
- name: chronicle-agent
image: ghcr.io/rstudio/chronicle-agent:2023.10.4
env:
- name: CHRONICLE_SERVER_ADDRESS
value: "http://chronicle-server.default.svc.cluster.local"
- name: CONNECT_API_KEY
valueFrom:
secretKeyRef:
name: connect
key: apikey
12 changes: 12 additions & 0 deletions charts/rstudio-connect/ci/complex-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ pod:
matchLabels:
app.kubernetes.io/part-of: rstudio-team
topologyKey: kubernetes.io/hostname
# This will spin up the chronicle-agent sidecar container
sidecar:
- name: chronicle-agent
image: ghcr.io/rstudio/chronicle-agent:2023.10.4
env:
- name: CHRONICLE_SERVER_ADDRESS
value: "http://chronicle-server.default.svc.cluster.local"
- name: CONNECT_API_KEY
valueFrom:
secretKeyRef:
name: connect
key: apikey

ingress:
enabled: true
Expand Down
1 change: 1 addition & 0 deletions charts/rstudio-workbench/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ lint:
helm lint --strict --set service.name=example --set service.version=0.0.1 -f ./ci/simple-values.yaml .
helm lint --strict --set service.name=example --set service.version=0.0.1 -f ./ci/empty-values.yaml .
helm lint --strict --set service.name=example --set service.version=0.0.1 -f ./ci/overrides-values.yaml .
helm lint --strict --set service.name=example --set service.version=0.0.1 -f ./ci/chronicle-agent.yaml .

template:
helm template -f ci/simple-values.yaml .
Expand Down
19 changes: 13 additions & 6 deletions charts/rstudio-workbench/ci/complex-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,31 @@ sealedSecret:
is-a-sealed-secret: yes

revisionHistoryLimit: 3

pod:
env:
- name: TEST_ENV_WORKS
value: "true"
volumeMounts:
- name: key
mountPath: /tmp/somepath
- name: logs
mountPath: "/var/lib/rstudio-server/audit"
volumes:
- name: key
- name: logs
emptyDir: {}
labels:
app.kubernetes.io/part-of: rstudio-team
annotations:
testannotation2: three
# This will spin up the chronicle-agent sidecar container
sidecar:
- name: test
image: "busybox"
imagePullPolicy: "IfNotPresent"
- name: chronicle-agent
image: ghcr.io/rstudio/chronicle-agent:2023.10.4
volumeMounts:
- name: logs
mountPath: "/var/lib/rstudio-server/audit"
env:
- name: CHRONICLE_SERVER_ADDRESS
value: "http://chronicle-server.default.svc.cluster.local"

ingress:
enabled: true
Expand Down

0 comments on commit a2f1bcd

Please sign in to comment.