Skip to content

Commit

Permalink
Release: agent-docker 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vmotso committed May 12, 2023
1 parent c4c1859 commit 4134779
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 54 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/release-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- master
paths:
- "charts/scalr-agent/Chart.yaml"
- "charts/agent-docker/Chart.yaml"

permissions: {}
jobs:
Expand All @@ -28,7 +28,7 @@ jobs:
id: chart_version
run: |
set -euo pipefail
chart_version="$(grep -Po "(?<=^version: ).+" charts/scalr-agent/Chart.yaml)"
chart_version="$(grep -Po "(?<=^version: ).+" charts/agent-docker/Chart.yaml)"
echo "version=${chart_version}" >> $GITHUB_OUTPUT
- name: Get changelog entry
Expand All @@ -41,7 +41,7 @@ jobs:
- name: Create release notes
run: |
set -euo pipefail
cat <<"EOF" > charts/scalr-agent/RELEASE.md
cat <<"EOF" > charts/agent-docker/RELEASE.md
${{ steps.changelog_reader.outputs.changes }}
EOF
Expand All @@ -60,7 +60,7 @@ jobs:
uses: helm/chart-releaser-action@v1.5.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_RELEASE_NAME_TEMPLATE: "scalr-agent-{{ .Version }}"
CR_RELEASE_NAME_TEMPLATE: "agent-docker-{{ .Version }}"
CR_RELEASE_NOTES_FILE: RELEASE.md
CR_SKIP_EXISTING: true
CR_MAKE_RELEASE_LATEST: false
Expand All @@ -71,7 +71,7 @@ jobs:
wget -O helm-docs.deb https://github.com/norwoodj/helm-docs/releases/download/v1.11.0/helm-docs_1.11.0_Linux_x86_64.deb
sudo apt install ./helm-docs.deb
helm-docs
mv charts/scalr-agent/README.md REPO.md
mv charts/agent-docker/README.md REPO.md
git checkout gh-pages && git pull
diff -q REPO.md README.md && echo "No changes" && exit 0
mv REPO.md README.md && git add README.md
Expand Down
17 changes: 1 addition & 16 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# scalr-agent Helm Chart Changelog
# agent-docker Helm Chart Changelog

All notable changes to this project will be documented in this file.

Expand All @@ -9,21 +9,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [UNRELEASED]

## [v0.3.1]

### Updated
- README
- Maintainer email

### Added
- Chart Maintainers

## [v0.2.0]

### Changed
- Update appVersion 0.1.30->0.1.32


## [v0.1.0]

### Added
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@

## Installing the Chart

Add the `scalr-agent` repo to [Helm](https://helm.sh/).
Add the `scalr-agent-helm` repo to [Helm](https://helm.sh/).

```shell
helm repo add scalr-agent https://scalr.github.io/agent-helm/
helm repo add scalr-agent-helm https://scalr.github.io/agent-helm/
```

After that you can install the chart.

```shell
helm upgrade --install scalr-agent scalr-agent/scalr-agent \
helm upgrade --install scalr-agent-docker scalr-agent-helm/agent-docker \
--set agent.url=... \
--set agent.token=...
```

## Releasing

Bump the version in [Chart.yaml](./charts/scalr-agent/Chart.yaml), commit and push.
Bump the version in [Chart.yaml](./charts/agent-docker/Chart.yaml), commit and push.

> **Warning**
> do not create a tag yourself!
GitHub Action release workflow will then using [Helm chart releaser](https://github.com/helm/chart-releaser-action)

* create a tag `scalr-agent-<version>`
* create a tag `agent-docker-<version>`
* create a [release](https://github.com/Scalr/agent-helm/releases) associated with the new tag
* commit an updated index.yaml with the new release
* redeploy the GitHub pages to serve the new index.yaml
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v2
name: scalr-agent
name: agent-docker
description: Scalr agent for a self-hosted pool
type: application
version: 0.3.1
appVersion: "0.1.32"
version: 0.1.0
appVersion: "0.1.33"
home: https://github.com/Scalr/agent-helm/
maintainers:
- name: scalr
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "scalr-agent.name" -}}
{{- define "agent-docker.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

Expand All @@ -10,7 +10,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "scalr-agent.fullname" -}}
{{- define "agent-docker.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand All @@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "scalr-agent.chart" -}}
{{- define "agent-docker.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "scalr-agent.labels" -}}
helm.sh/chart: {{ include "scalr-agent.chart" . }}
{{ include "scalr-agent.selectorLabels" . }}
{{- define "agent-docker.labels" -}}
helm.sh/chart: {{ include "agent-docker.chart" . }}
{{ include "agent-docker.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -45,17 +45,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "scalr-agent.selectorLabels" -}}
app.kubernetes.io/name: {{ include "scalr-agent.name" . }}
{{- define "agent-docker.selectorLabels" -}}
app.kubernetes.io/name: {{ include "agent-docker.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "scalr-agent.serviceAccountName" -}}
{{- define "agent-docker.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "scalr-agent.fullname" .) .Values.serviceAccount.name }}
{{- default (include "agent-docker.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "scalr-agent.fullname" . }}
name: {{ include "agent-docker.fullname" . }}
labels:
{{- include "scalr-agent.labels" . | nindent 4 }}
{{- include "agent-docker.labels" . | nindent 4 }}
spec:
strategy:
rollingUpdate:
Expand All @@ -12,21 +12,21 @@ spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "scalr-agent.selectorLabels" . | nindent 6 }}
{{- include "agent-docker.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "scalr-agent.selectorLabels" . | nindent 8 }}
{{- include "agent-docker.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "scalr-agent.serviceAccountName" . }}
serviceAccountName: {{ include "agent-docker.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
hostNetwork: true
Expand All @@ -43,7 +43,7 @@ spec:
- name: dockersocket
mountPath: /var/run/
- name: data
mountPath: /var/lib/scalr-agent
mountPath: /var/lib/agent-docker
env:
- name: DOCKER_HOST
value: unix:///var/run/docker.sock
Expand All @@ -60,18 +60,18 @@ spec:
- name: SCALR_URL
value: {{ required ".Values.agent.url must be provided!" .Values.agent.url }}
- name: SCALR_WORK_DIR
value: /var/lib/scalr-agent
value: /var/lib/agent-docker
- name: SCALR_TOKEN
valueFrom:
secretKeyRef:
name: {{ include "scalr-agent.name" . }}
name: {{ include "agent-docker.name" . }}
key: token
optional: false
livenessProbe:
exec:
command:
- cat
- /var/lib/scalr-agent/.agent.state
- /var/lib/agent-docker/.agent.state
initialDelaySeconds: 10
periodSeconds: 15
failureThreshold: 1
Expand All @@ -82,7 +82,7 @@ spec:
- name: dockersocket
mountPath: /var/run/
- name: data
mountPath: /var/lib/scalr-agent
mountPath: /var/lib/agent-docker
volumes:
- name: dockersocket
emptyDir: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ data:
token: {{ required ".Values.agent.token must be provided!" .Values.agent.token | b64enc }}
kind: Secret
metadata:
name: {{ include "scalr-agent.name" . }}
name: {{ include "agent-docker.name" . }}
labels:
{{- include "scalr-agent.labels" . | nindent 4 }}
{{- include "agent-docker.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "scalr-agent.serviceAccountName" . }}
name: {{ include "agent-docker.serviceAccountName" . }}
labels:
{{- include "scalr-agent.labels" . | nindent 4 }}
{{- include "agent-docker.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Default values for scalr-agent.
# Default values for agent-docker.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

Expand Down

0 comments on commit 4134779

Please sign in to comment.