This repository includes Helm
charts to deploy the sysdig-team custom resource
for the BCGov Openshift Sysdig Team Operator
and Terraform
scripts to provision Sysdig
alerts and dashboards in the following Sysdig workspaces.
- c6af30-team
- eb75ad-team
Terraform
automates the infrastructure/configuration management using a declarative configuration language, and provides benefits such as peer review
, version control
,security as code
, policy enforcement
, and reduced provisioning time
.
Please see Using Terraform for container security as code with Sysdig Secure.
The Helm chart defines the Sysdig Team Members
in c6af30
and eb75ad
projects in the Gold cluster. Helm runs in the following GitHub event on Github Actions CI/CD pipelines:
merge into main branch
: it runsHelm upgrade
to release a new version of the chart and apply the changes made.- see Helm GitHub Actions
- you can either use the same sysdig helm chart or create your own leveraging the sysdig helm chart definition
The Terraform script defines the alerts
and dashboard
configuration of the Sysdig Workspaces
in c6af30
and eb75ad
projects in the Gold cluster. Terraform runs in the following two GitHub events on Github Actions CI/CD pipelines:
pull request on main branch
: it runsTerraform Plan
to creates an execution plan, which lets you preview the changes in the PR.merge into main branch
: it runsTerraform Apply
to apply the changes; the Terraform state is stored in a AWS S3 bucketxgr00q-prod-sysdig
.- see Terraform GitHub Actions
In order to run the Terraform scripts locally, it requires:
-
AWS Credentials
- Log into
Cloud Pathfinder AWS LZ2 Portal
. - Choose
xgr00q-prod
andClick for Credentials
. - Copy the AWS credentials and pastes into the local workspace.
- Log into
-
TF variable file
terraform.tfvars
with sysdig tokens.
Note: the Sysdig api tokens must be those of the sysdig team, not a sysdig user's personal credentials. These are stored with other team secrets. Using the wrong credentials will cause unpredictable behaviour when terraform attempts to generate dashboards and alerts.
cd terraform
cat >"terraform.tfvars" <<EOF
gold_c6af30_team_sysdig_monitor_api_token=<sysdig_token1>
gold_eb75ad_team_sysdig_monitor_api_token=<sysdig_token2>
EOF
terraform init
terraform apply