Skip to content

Instantly share code, notes, and snippets.

View rssnyder's full-sized avatar
🥨
limitless servers in a serverless world

Riley Snyder rssnyder

🥨
limitless servers in a serverless world
View GitHub Profile
@rssnyder
rssnyder / harness_groups.tf
Last active September 14, 2026 19:40
harness project groups from SCIM
locals {
groups_files_path = "${local.source_directory}/groups"
group_files = fileset("${local.groups_files_path}/", "*.yaml")
all_groups = flatten([
for group_file in local.group_files : [
merge(
yamldecode(file("${local.groups_files_path}/${group_file}")),
@rssnyder
rssnyder / sonarcube_cleanup.py
Last active September 14, 2026 15:29
clean up sonarcube entities in idp
#!/usr/bin/env python3
"""List/delete Harness IDP catalog entities that have a given
metadata.integration_properties.<INTEGRATION> key (e.g. SonarQube).
Usage:
python3 idp_integration_cleanup.py SonarQube --list
python3 idp_integration_cleanup.py SonarQube --delete # asks for confirmation
python3 idp_integration_cleanup.py SonarQube --delete --yes # no prompt
python3 idp_integration_cleanup.py SonarQube --step # confirm each entity individually
python3 idp_integration_cleanup.py SonarQube --list --ignore HarnessCD,PagerDuty

harness delegate installation

a harness delegate must be installed to enable containerized pipeline execution, access to internal resources, and deployments.

this requires a kubernetes cluster with outbound access to your harness account url: app.harness.io, app<cluster id>.harness.io, or <company name>.harness.io.

delegate name

name the delegate something that relates to where it is deployed, cluster name is a good one.

@rssnyder
rssnyder / fix_traffic_shift.py
Created July 16, 2026 22:05
reset a listener rule and target groups
#!/usr/bin/env python3
"""
Set a listener rule to send 100% of traffic to one target group and
0% to another target group.
Fill in the three values below and run: python3 set_traffic_weight.py
"""
import boto3
@rssnyder
rssnyder / argocdsa.yaml
Created June 24, 2026 15:04
argocd spoke service account
apiVersion: v1
kind: ServiceAccount
metadata:
name: argocd-manager
namespace: kube-system
---
apiVersion: v1
kind: Secret
metadata:
name: argocd-manager-token
@rssnyder
rssnyder / gist:a61c30a4dc6e7d2dd045151440f0f0a8
Last active June 16, 2026 16:15
show_context_data workflow
apiVersion: harness.io/v1
kind: Workflow
name: collecting data from api
identifier: collecting_data_from_api
type: test
owner: snyder
projectIdentifier: rssnyder
orgIdentifier: default
metadata: {}
spec:
<+artifacts.primary.image>:<+artifacts.primary.tag>
@rssnyder
rssnyder / hsf.md
Created May 13, 2026 17:22
hsf seller

Harness Solutions Factory (HSF) — How It Works for Platform Admins

Harness Solutions Factory (HSF) is an automation framework that lets platform engineering teams define, publish, and govern reusable Harness resource bundles — and deliver them to developers through self-service, without requiring any Terraform or platform knowledge on the consumer side.


1. You Define the Templates

Platform admins author Terraform-backed templates that codify opinionated, repeatable configurations — things like a project pre-wired with environments, RBAC roles, user group bindings, pipelines, and connectors. These live in two places:

@rssnyder
rssnyder / Dockerfile
Created April 29, 2026 15:49
custom harness iacm tofu image
ARG TOFU=1.11.6
FROM ghcr.io/opentofu/opentofu:$TOFU-minimal AS tofu
FROM plugins/harness_terraform
COPY --from=tofu /usr/local/bin/tofu /usr/local/bin/tofu
@rssnyder
rssnyder / 3party.md
Created March 30, 2026 20:46
upload 3party data into harness ccm via api
  1. Here is a python implementation of the below process

  2. Call GET signed url. This is needed for any upload.

curl 'https://app.harness.io/gateway/ccm/api/externaldata/signedurl?providerId=<provider id>&accountIdentifier=<account id>&invoicePeriod=20250401-20250501&objectName=<csv file>.csv' \
  -H 'x-api-key: <api key>' \
  -H 'content-type: application/json'