Skip to content

Commit

Permalink
Merge pull request #5 from foomo/contentserver-v0.11.x
Browse files Browse the repository at this point in the history
Contentserver v0.0.3-rc
  • Loading branch information
franklinkim authored Mar 25, 2024
2 parents c37adbc + 024df56 commit 55c51d2
Show file tree
Hide file tree
Showing 8 changed files with 183 additions and 91 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: '/'
schedule:
interval: weekly
15 changes: 5 additions & 10 deletions .github/workflows/release.yml → .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
name: Release Charts
name: Release Tag

on:
push:
branches:
- main
branches: [ main ]

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

Expand All @@ -19,12 +17,9 @@ jobs:
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- uses: azure/setup-helm@v3.5
with:
version: v3.12.0
- uses: azure/setup-helm@v4

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.5.0
- uses: helm/chart-releaser-action@v1
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_SKIP_EXISTING: "true"
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/lint-test.yaml → .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
name: Lint and Test Charts
name: PR check

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

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

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

- uses: azure/setup-helm@v3.5
with:
version: v3.12.0
- uses: azure/setup-helm@v4

- name: Run Helm plugin install
run: |
Expand Down
4 changes: 2 additions & 2 deletions charts/contentserver/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ annotations:
- name: Image Source
url: https://github.com/foomo/contentserver
version: 0.0.2
appVersion: 1.10.2
version: 0.0.3-rc.1
appVersion: 1.11.0-rc.10
26 changes: 16 additions & 10 deletions charts/contentserver/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# contentserver

![Version: 0.0.2](https://img.shields.io/badge/Version-0.0.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.10.2](https://img.shields.io/badge/AppVersion-1.10.2-informational?style=flat-square)
![Version: 0.0.3-rc.1](https://img.shields.io/badge/Version-0.0.3--rc.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.11.0-rc.10](https://img.shields.io/badge/AppVersion-1.11.0--rc.10-informational?style=flat-square)

Helm chart for the foomo Content Server.

Expand All @@ -15,6 +15,11 @@ Helm chart for the foomo Content Server.

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| config.address | string | `":8080"` | - Address to bind to host:port |
| config.basePath | string | `"/contentserver"` | Path to export the webserver on |
| config.repository.poll | bool | `false` | - If true, the address arg will be used to periodically poll the content url e.g. http://contentserverexport:8080/poll-revision |
| config.repository.pollInterval | string | `"60s"` | - Update poll interval |
| config.repository.url | string | `"http://contentserverexport:8080"` | Repository server url |
| contentserver.affinity | object | `{}` | Affinity settings for pods. |
| contentserver.autoscaling.behavior.enabled | bool | `false` | Enable autoscaling behaviours |
| contentserver.autoscaling.behavior.scaleDown | object | `{}` | Scale down policies, must conform to HPAScalingRules |
Expand All @@ -35,15 +40,15 @@ Helm chart for the foomo Content Server.
| contentserver.hostAliases | list | `[]` | Host aliases to add |
| contentserver.image.pullPolicy | string | `"IfNotPresent"` | The image pull policy |
| contentserver.image.repository | string | `"foomo/contentserver"` | The image repository |
| contentserver.image.tag | string | `"1.10.2"` | The image tag |
| contentserver.image.tag | string | `"1.11.0-rc.10"` | The image tag |
| contentserver.imagePullSecrets | list | `[]` | Image pull secrets |
| contentserver.livenessProbe | object | `{"tcpSocket":{"port":8080}}` | Liveness probe settings for pods. |
| contentserver.livenessProbe | object | `{"httpGet":{"path":"/healthz/liveness","port":9400}}` | Liveness probe settings for pods. |
| contentserver.maxUnavailable | string | `nil` | Pod Disruption Budget maxUnavailable |
| contentserver.nodeSelector | object | `{}` | Tolerations settings for pods. |
| contentserver.podAnnotations | object | `{}` | Annotations for pods |
| contentserver.podLabels | object | `{}` | Labels for pods |
| contentserver.podSecurityContext | object | `{}` | The SecurityContext for pods |
| contentserver.readinessProbe | object | `{"tcpSocket":{"port":8080}}` | Readiness probe settings for pods. |
| contentserver.readinessProbe | object | `{"httpGet":{"path":"/healthz/readiness","port":9400}}` | Readiness probe settings for pods. |
| contentserver.replicaCount | int | `1` | Number of replicas |
| contentserver.resources | object | `{}` | Resource request & limits. |
| contentserver.roll | bool | `false` | Always roll your deployment |
Expand All @@ -52,7 +57,8 @@ Helm chart for the foomo Content Server.
| contentserver.service.labels | object | `{}` | Labels for service |
| contentserver.service.port | int | `8080` | Port of the service |
| contentserver.service.type | string | `"ClusterIP"` | Type of the service |
| contentserver.startupProbe | object | `{"tcpSocket":{"port":8080}}` | Startup probe settings for pods. |
| contentserver.startupProbe | object | `{"httpGet":{"path":"/healthz/startup","port":9400}}` | Startup probe settings for pods. |
| contentserver.terminationGracePeriodSeconds | int | `30` | - Termination grace period in seconds |
| contentserver.tolerations | list | `[]` | Tolerations settings for pods. |
| fullnameOverride | string | `""` | Overrides the chart's computed fullname |
| ingress.annotations | object | `{}` | |
Expand All @@ -76,6 +82,11 @@ Helm chart for the foomo Content Server.
| networkPolicy.metrics.cidrs | list | `[]` | Specifies specific network CIDRs which are allowed to access the metrics port. In case you use namespaceSelector, you also have to specify your kubelet networks here. The metrics ports are also used for probes. |
| networkPolicy.metrics.namespaceSelector | object | `{}` | Specifies the namespaces which are allowed to access the metrics port |
| networkPolicy.metrics.podSelector | object | `{}` | Specifies the Pods which are allowed to access the metrics port. As this is cross-namespace communication, you also need the namespaceSelector. |
| otel.enabled | bool | `false` | - Otel enabled |
| otel.otlp.enabled | bool | `true` | - OTLP export enabled |
| otel.otlp.endpoint | string | `""` | - OTLP exporter endpoint |
| otel.otlp.insecure | bool | `true` | - OTLP insecure exporter |
| otel.ratio | int | `1` | - Trace collect ratio |
| persistence.accessModes | list | `["ReadWriteOnce"]` | Access modes for the PVC |
| persistence.annotations | object | `{}` | Annotations for the PVC |
| persistence.enabled | bool | `false` | Enable persistent storage |
Expand All @@ -84,12 +95,7 @@ Helm chart for the foomo Content Server.
| persistence.size | string | `"1Gi"` | Storage size |
| persistence.storageClass | string | `""` | - Storage class to be used |
| rbac.enabled | bool | `false` | Create PodSecurityPolicy. |
| repository.poll | bool | `false` | - If true, the address arg will be used to periodically poll the content url e.g. http://contentserverexport:8080/poll-revision |
| repository.timeout | string | `"2m"` | - Timeout duration for the contentserver |
| repository.url | string | `""` | Repository server url e.g. http://contentserverexport:8080 |
| revisionHistoryLimit | int | `10` | Number of revisions to retain to allow rollback |
| server.address | string | `":8080"` | - Address to bind web server host:port, when empty no webserver will be spawned |
| server.path | string | `"/contentserver"` | Path to export the webserver on - useful when behind a proxy e.g. /contentserver |
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.automount | bool | `true` | Automatically mount a ServiceAccount's API credentials? |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
Expand Down
52 changes: 41 additions & 11 deletions charts/contentserver/templates/contentserver/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ spec:
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
terminationGracePeriodSeconds: {{ .Values.contentserver.terminationGracePeriodSeconds }}
containers:
- name: contentserver
{{- with .Values.contentserver.image }}
Expand All @@ -52,25 +53,54 @@ spec:
- name: http
containerPort: {{ .Values.contentserver.service.port }}
protocol: TCP
- name: healthz
containerPort: 9400
protocol: TCP
{{- if .Values.serviceMonitor.enabled }}
- name: prometheus
containerPort: 9200
protocol: TCP
{{- end }}
args:
- -var-dir
- http
- {{ .Values.config.repository.url }}
- --address
- {{ .Values.config.address }}
- --base-path
- {{ .Values.config.basePath }}
- --graceful-period
- {{ .Values.contentserver.terminationGracePeriodSeconds }}s
- --graceful-timeout
- {{ div .Values.contentserver.terminationGracePeriodSeconds 2 }}s
- --history-dir
- {{ .Values.persistence.path }}
{{- if .Values.server.address }}
- -webserver-address
- {{ .Values.server.address }}
- -webserver-path
- {{ .Values.server.path }}
{{- if .Values.config.repository.poll }}
- --poll
- --poll-interval
- {{ .Values.config.repository.pollInterval }}
{{- end }}
{{- if .Values.repository.poll }}
- -poll
- --service-healthz-enabled
{{- if .Values.serviceMonitor.enabled }}
- --service-prometheus-enabled
{{- end }}
- -repository-timeout-duration
- {{ .Values.repository.timeout }}
{{- with .Values.contentserver.extraArgs }}
{{- toYaml . | nindent 12 }}
{{- end }}
- {{ .Values.repository.url }}
env:
{{- if .Values.otel.enabled }}
- name: OTEL_ENABLED
value: {{ .Values.otel.enabled }}
- name: OTEL_SERVICE_NAME
value: "{{ .Release.Name }}"
- name: OTEL_TRACE_RATIO
value: "{{ .Values.otel.ratio }}"
{{- if .Values.otel.otlp.enabled }}
- name: OTEL_EXPORTER_OTLP_INSECURE
value: {{ .Values.otel.otlp.insecure }}
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: "{{ .Values.otel.otlp.endpoint }}"
{{- end }}
{{- end }}
{{- with .Values.contentserver.extraEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
Expand Down
93 changes: 65 additions & 28 deletions charts/contentserver/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"config": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"basePath": {
"type": "string"
},
"repository": {
"type": "object",
"properties": {
"poll": {
"type": "boolean"
},
"pollInterval": {
"type": "string"
},
"url": {
"type": "string"
}
}
}
}
},
"contentserver": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -89,9 +114,12 @@
"livenessProbe": {
"type": "object",
"properties": {
"tcpSocket": {
"httpGet": {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"port": {
"type": "integer"
}
Expand All @@ -117,9 +145,12 @@
"readinessProbe": {
"type": "object",
"properties": {
"tcpSocket": {
"httpGet": {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"port": {
"type": "integer"
}
Expand Down Expand Up @@ -159,16 +190,22 @@
"startupProbe": {
"type": "object",
"properties": {
"tcpSocket": {
"httpGet": {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"port": {
"type": "integer"
}
}
}
}
},
"terminationGracePeriodSeconds": {
"type": "integer"
},
"tolerations": {
"type": "array"
}
Expand Down Expand Up @@ -281,6 +318,31 @@
}
}
},
"otel": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"otlp": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"endpoint": {
"type": "string"
},
"insecure": {
"type": "boolean"
}
}
},
"ratio": {
"type": "integer"
}
}
},
"persistence": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -318,34 +380,9 @@
}
}
},
"repository": {
"type": "object",
"properties": {
"poll": {
"type": "boolean"
},
"timeout": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"revisionHistoryLimit": {
"type": "integer"
},
"server": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"path": {
"type": "string"
}
}
},
"serviceAccount": {
"type": "object",
"properties": {
Expand Down
Loading

0 comments on commit 55c51d2

Please sign in to comment.