Skip to content

Commit

Permalink
add helmdocs (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkarlsen authored Aug 21, 2021
1 parent 48e207a commit fc430c4
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .helmdocsignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# ignore for now
dependency-track
opsgenie-marid
mcrouter
github-actions-runner-operator
15 changes: 15 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
repos:
- repo: https://github.com/norwoodj/helm-docs
rev: v1.6.0
hooks:
- id: helm-docs
args:
# Make the tool search for charts only under the `example-charts` directory
- --chart-search-root=charts

# The `./` makes it relative to the chart-search-root set above
#- --template-files=./_templates.gotmpl

# Repeating the flag adds this to the list, now [./_templates.gotmpl, README.md.gotmpl]
# A base filename makes it relative to each chart directory found
- --template-files=README.md.gotmpl
2 changes: 1 addition & 1 deletion charts/ecr-proxy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.5
version: 0.2.6

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
52 changes: 39 additions & 13 deletions charts/ecr-proxy/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,46 @@
# ECR-proxy
# ecr-proxy

Creates a anonymous proxy towards an ECR registry,
so that you can pull images w/o having to deal with the short-lived ECR tokens.
![Version: 0.2.6](https://img.shields.io/badge/Version-0.2.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.4.0](https://img.shields.io/badge/AppVersion-1.4.0-informational?style=flat-square)

## Installing
A Helm chart for Kubernetes

`helm repo add evryfs-oss https://evryfs.github.io/helm-charts/`
`helm install evryfs-oss/ecr-proxy --namespace yourNamespace --name ecr-proxy`
**Homepage:** <https://github.com/Lotto24/aws-ecr-http-proxy/>

## Configuration
## Maintainers

See `values.yaml` for configuration options. The most noticeable ones are the secrets.
Either point to an existing secret in `secret.existingSecret` or
enable secret configuration through `secret.create` and set the values in `secret.awsAccessKeyId` and `secret.awsSecretAccessKey`.
Use the `env`section to set the rest of the variables.
| Name | Email | Url |
| ---- | ------ | --- |
| davidkarlsen | [email protected] | |

## Source Code

## Weaknesses / TODOs
Could have a PVC for cache but I did not bother.
* <https://github.com/evryfs/helm-charts/tree/master/charts/ecr-proxy>
* <https://github.com/Lotto24/aws-ecr-http-proxy/>
* <https://hub.docker.com/r/esailors/aws-ecr-http-proxy/>

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| autoscaling | object | `{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}` | enable HPA |
| env | list | `[]` | |
| fullnameOverride | string | `""` | |
| image | object | `{"pullPolicy":"IfNotPresent","repository":"esailors/aws-ecr-http-proxy","tag":"1.4.0"}` | image configuration |
| imagePullSecrets | list | `[]` | |
| ingress | object | `{"annotations":{},"enabled":false,"hosts":[{"host":"chart-example.local","paths":[]}],"tls":[]}` | ingress configuration |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | annotations to place on pod |
| podLabels | object | `{}` | |
| podSecurityContext | object | `{}` | security context for the pod |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| secret | object | `{"annotations":{},"create":false,"existingSecret":""}` | configure secret. AWS tokens go here |
| securityContext | string | `nil` | securityContext for the container |
| service | object | `{"port":80,"type":"ClusterIP"}` | Kubernetes service |
| serviceAccount | object | `{"annotations":{},"create":true,"name":""}` | configure service account |
| tolerations | list | `[]` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0)
9 changes: 9 additions & 0 deletions charts/ecr-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

replicaCount: 1

# -- image configuration
image:
repository: esailors/aws-ecr-http-proxy
pullPolicy: IfNotPresent
Expand All @@ -14,6 +15,7 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

# -- configure service account
serviceAccount:
# Specifies whether a service account should be created
create: true
Expand All @@ -23,11 +25,14 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template
name: ""

# -- annotations to place on pod
podAnnotations: {}

# -- security context for the pod
podSecurityContext: {}
# fsGroup: 2000

# -- securityContext for the container
securityContext:
# capabilities:
# drop:
Expand All @@ -36,10 +41,12 @@ securityContext:
# runAsNonRoot: true
# runAsUser: 1000

# -- Kubernetes service
service:
type: ClusterIP
port: 80

# -- ingress configuration
ingress:
enabled: false
annotations: {}
Expand Down Expand Up @@ -81,13 +88,15 @@ resources: {}
# cpu: 100m
# memory: 128Mi

# -- configure secret. AWS tokens go here
secret:
create: false
annotations: {}
existingSecret: ""
# awsAccessKeyId: "someKeyId"
# awsSecretAccessKey: "someAccessKey"

# -- enable HPA
autoscaling:
enabled: false
minReplicas: 1
Expand Down
10 changes: 10 additions & 0 deletions git-hook/helm-docs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

set -e

if ! command -v helm-docs > /dev/null 2>&1; then
echo "Please install helm-docs to run the pre-commit hook! https://github.com/norwoodj/helm-docs#installation"
exit 1
fi

helm-docs "${@}"

0 comments on commit fc430c4

Please sign in to comment.