Skip to content

Commit

Permalink
add annotations to pod and deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
slamdev committed Aug 16, 2020
1 parent 667e2dc commit 3817b7b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/nginx/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: |-
Chart supports environment variables inside of the nginx.conf file.
type: application
version: 0.0.8
version: 0.0.9
appVersion: 1.17.9
home: https://github.com/slamdev/helm-charts/tree/master/charts/nginx
icon: https://www.nginx.com/wp-content/uploads/2019/10/favicon-48x48.ico
Expand Down
18 changes: 12 additions & 6 deletions charts/nginx/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
nginx
=====
# nginx

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

Helm chart to deploy [nginx](https://www.nginx.com).

Chart supports environment variables inside of the nginx.conf file.

Current chart version is `0.0.8`

Source code can be found [here](https://github.com/slamdev/helm-charts/tree/master/charts/nginx)
**Homepage:** <https://github.com/slamdev/helm-charts/tree/master/charts/nginx>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| slamdev | [email protected] | |

## Chart Values
## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | affinity for scheduler pod assignment |
| deploymentAnnotations | object | `{}` | annotations to add to the deployment |
| dnsmasq.enabled | bool | `false` | enable simple dns server for nginx |
| env | list | `[]` | additional environment variables for the deployment |
| fullnameOverride | string | `""` | full name of the chart. |
Expand All @@ -31,6 +36,7 @@ Source code can be found [here](https://github.com/slamdev/helm-charts/tree/mast
| nameOverride | string | `""` | override name of the chart |
| nginxConf | string | `"# nginx version: ENV_NGINX_VERSION_ENV\nuser nginx;\nworker_processes auto;\nerror_log /var/log/nginx/error.log warn;\npid /var/run/nginx.pid;\nevents {\n worker_connections 1024;\n}\nhttp {\n include /etc/nginx/mime.types;\n default_type application/octet-stream;\n log_format main '$remote_addr - $remote_user [$time_local] \"$request\" '\n '$status $body_bytes_sent \"$http_referer\" '\n '\"$http_user_agent\" \"$http_x_forwarded_for\" '\n '$request_time $upstream_response_time $pipe';\n access_log /var/log/nginx/access.log main;\n sendfile on;\n keepalive_timeout 65;\n server {\n listen 80;\n server_name localhost;\n location / {\n default_type text/plain;\n access_log off;\n error_log off;\n return 200 'ok';\n }\n }\n}"` | nginx config to provision inside of the container |
| nodeSelector | object | `{}` | node for scheduler pod assignment |
| podAnnotations | object | `{}` | annotations to add to the pod |
| podSecurityContext | object | `{}` | specifies security settings for a pod |
| readinessProbe.httpGet.path | string | `"/"` | path for readiness probe |
| readinessProbe.httpGet.port | string | `"http"` | port for readiness probe |
Expand Down
3 changes: 3 additions & 0 deletions charts/nginx/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Deployment
metadata:
name: {{ include "nginx.fullname" . }}
namespace: {{ .Release.Namespace }}
annotations:
{{- toYaml .Values.deploymentAnnotations | nindent 4 }}
labels:
{{- include "nginx.labels" . | nindent 4 }}
spec:
Expand All @@ -16,6 +18,7 @@ spec:
{{- include "nginx.selectorLabels" . | nindent 8 }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- toYaml .Values.podAnnotations | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
5 changes: 5 additions & 0 deletions charts/nginx/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ securityContext: {}
# runAsNonRoot: true
# runAsUser: 1000

# deploymentAnnotations -- annotations to add to the deployment
deploymentAnnotations: {}
# podAnnotations -- annotations to add to the pod
podAnnotations: {}

service:
# service.type -- service type
type: ClusterIP
Expand Down

0 comments on commit 3817b7b

Please sign in to comment.