Skip to content

Commit

Permalink
Merge pull request #1 from foomo/sesamy
Browse files Browse the repository at this point in the history
feat: add sesamy charts
  • Loading branch information
franklinkim authored Feb 12, 2024
2 parents 0d3bac6 + f0b3bb5 commit c215a34
Show file tree
Hide file tree
Showing 66 changed files with 3,970 additions and 154 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/charts.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Lint and Test Charts

on:
pull_request:
branches: ['main']
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: azure/[email protected]
with:
version: v3.12.0

- name: Run Helm plugin install
run: |
helm plugin install https://github.com/KnechtionsCoding/helm-schema-gen.git
- name: Run Helm lint
run: |
make lint
- name: Run Helm docs
run: |
make docs
if ! git diff --exit-code; then
echo "Documentation not up to date. Please run `make docs` and commit changes!" >&2
exit 1
fi
- name: Run Helm schema
run: |
make schema
if ! git diff --exit-code; then
echo "Documentation not up to date. Please run `make schema` and commit changes!" >&2
exit 1
fi
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release Charts

on:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- uses: azure/[email protected]
with:
version: v3.12.0

- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_SKIP_EXISTING: "true"
with:
charts_dir: charts
config: cr.yaml
125 changes: 6 additions & 119 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,119 +1,6 @@
.idea

# Created by https://www.toptal.com/developers/gitignore/api/intellij+all,visualstudiocode,helm
# Edit at https://www.toptal.com/developers/gitignore?templates=intellij+all,visualstudiocode,helm

### Helm ###
# Chart dependencies
**/charts/*.tgz

### Intellij+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Intellij+all Patch ###
# Ignore everything but code style settings and run configurations
# that are supposed to be shared within teams.

.idea/*

!.idea/codeStyles
!.idea/runConfigurations

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

# Support for Project snippet scope

# End of https://www.toptal.com/developers/gitignore/api/intellij+all,visualstudiocode,helm
.*
*.tgz
!.github/
!.gitignore
!**/.gitkeep
!**/.helmignore
71 changes: 68 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,68 @@
.phony: helm.index
helm.index:
cd charts && helm repo index .ma
-include .makerc
.DEFAULT_GOAL:=help

# --- Targets -----------------------------------------------------------------

.PHONY: check
## Lint, Schema & docs
check: lint schema docs
@echo "done"

.PHONY: lint
## Lint Helm charts
## https://github.com/helm/chart-testing
lint:
@for dir in ./charts/* ; do \
helm lint $${dir} ;\
done

.PHONY: docs
## Generate README
## https://github.com/norwoodj/helm-docs
docs:
@docker run --rm --volume "$$(pwd):/helm-docs" jnorwood/helm-docs:v1.12.0 --template-files ./README.md.gotmpl

.PHONY: schema
## Generate values JSON schema
## https://github.com/knechtionscoding/helm-schema-gen
schema: PWD=$(pwd)
schema:
@for dir in ./charts/* ; do \
helm schema-gen $${dir}/values.yaml > $${dir}/values.schema.json ;\
done


## === Utils ===

.PHONY: help
## Show help text
help:
@awk '{ \
if ($$0 ~ /^.PHONY: [a-zA-Z\-\_0-9]+$$/) { \
helpCommand = substr($$0, index($$0, ":") + 2); \
if (helpMessage) { \
printf "\033[36m%-23s\033[0m %s\n", \
helpCommand, helpMessage; \
helpMessage = ""; \
} \
} else if ($$0 ~ /^[a-zA-Z\-\_0-9.]+:/) { \
helpCommand = substr($$0, 0, index($$0, ":")); \
if (helpMessage) { \
printf "\033[36m%-23s\033[0m %s\n", \
helpCommand, helpMessage"\n"; \
helpMessage = ""; \
} \
} else if ($$0 ~ /^##/) { \
if (helpMessage) { \
helpMessage = helpMessage"\n "substr($$0, 3); \
} else { \
helpMessage = substr($$0, 3); \
} \
} else { \
if (helpMessage) { \
print "\n "helpMessage"\n" \
} \
helpMessage = ""; \
} \
}' \
$(MAKEFILE_LIST)
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
# Helm
# Foomo Helm Charts

[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/foomo)](https://artifacthub.io/packages/search?repo=foomo)

## Usage

[Helm](https://helm.sh) must be installed to use the charts.
Please refer to Helm's [documentation](https://helm.sh/docs/) to get started.

Once Helm is set up properly, add the repo as follows:

```console
helm repo add foomo https://foomo.github.io/helm-charts
```

You can then run `helm search repo foomo` to see the charts.

<!-- Keep full URL links to repo files because this README syncs from main to gh-pages. -->
Chart documentation is available in [foomo directory](https://github.com/foomo/helm-charts/blob/main/charts/foomo/README.md).
1 change: 1 addition & 0 deletions charts/csp-reporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apiVersion: v2
name: csp-reporter
description: Content Security Policy Reporter
icon: https://avatars.githubusercontent.com/u/889755?s=200&v=4

# A chart can be either an 'application' or a 'library' chart.
#
Expand Down
44 changes: 44 additions & 0 deletions charts/csp-reporter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# csp-reporter

![Version: 2.1.0](https://img.shields.io/badge/Version-2.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.3.0](https://img.shields.io/badge/AppVersion-1.3.0-informational?style=flat-square)

Content Security Policy Reporter

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| autoscaling.enabled | bool | `false` | |
| autoscaling.maxReplicas | int | `100` | |
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"foomo/csp-reporter"` | |
| image.tag | string | `"1.3.0"` | |
| imagePullSecrets | list | `[]` | |
| ingress.annotations | object | `{}` | |
| ingress.className | string | `""` | |
| ingress.enabled | bool | `false` | |
| ingress.hosts[0].host | string | `"chart-example.local"` | |
| ingress.hosts[0].paths[0].path | string | `"/"` | |
| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
| ingress.tls | list | `[]` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podLabels | object | `{}` | |
| podSecurityContext | object | `{}` | |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| securityContext | object | `{}` | |
| service.port | int | `80` | |
| service.type | string | `"ClusterIP"` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.create | bool | `false` | |
| serviceAccount.name | string | `""` | |
| tolerations | list | `[]` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0)
9 changes: 9 additions & 0 deletions charts/csp-reporter/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{ template "chart.header" . }}

{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}

{{ template "chart.description" . }}

{{ template "chart.sourcesSection" . }}

{{ template "chart.requirementsSection" . }}
Loading

0 comments on commit c215a34

Please sign in to comment.