Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/khaki-donkeys-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"kubernetes-agent": patch
---

Fix pre-release versioning
5 changes: 0 additions & 5 deletions .changeset/ninety-seahorses-roll.md

This file was deleted.

7 changes: 7 additions & 0 deletions charts/kubernetes-agent/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,16 @@

To enable scaling of the script pods across nodes, a `persistence.storageClassName` should be set to the name of a storage class that provides `ReadWriteMany` access modes, and the `persistence.accessModes` should be set to `["ReadWriteMany"]`.

## 2.36.0

### Minor Changes

- d07fbf4: Add stuck pending script pod monitoring background process. If a script pod has been in the pending state for more than the defined number of minutes (default: 60 minutes), the script pod is terminated.

### Patch Changes

- 8fa4ed7: chore: update Kubernetes Monitor subchart to 0.25.0
- f897c59: Upgrade kubernetes-agent-tentacle to 9.1.3703. This adds extra retry logic when performing filesystem operations.

## 2.35.0

Expand Down
4 changes: 2 additions & 2 deletions charts/kubernetes-agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ dependencies:
condition: kubernetesMonitor.enabled
alias: kubernetesMonitor
type: application
version: "2.35.0"
version: "2.36.0"
# This version number should be the same as the agent.image.tag value as this is the primary application version
appVersion: "9.1.3672"
appVersion: "9.1.3703"
5 changes: 3 additions & 2 deletions charts/kubernetes-agent/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Kubernetes agent

![Version: 2.35.0](https://img.shields.io/badge/Version-2.35.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 9.1.3672](https://img.shields.io/badge/AppVersion-9.1.3672-informational?style=flat-square) ![Octopus Deploy Version: 2024.2.6580+](https://img.shields.io/badge/Octopus_Deploy-2024.2.6580%2B-2F93E0?style=flat-square&logo=octopusdeploy&logoColor=%232F93E0&logoSize=auto)
![Version: 2.36.0](https://img.shields.io/badge/Version-2.36.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 9.1.3703](https://img.shields.io/badge/AppVersion-9.1.3703-informational?style=flat-square) ![Octopus Deploy Version: 2024.2.6580+](https://img.shields.io/badge/Octopus_Deploy-2024.2.6580%2B-2F93E0?style=flat-square&logo=octopusdeploy&logoColor=%232F93E0&logoSize=auto)

The Kubernetes agent is the recommended way to deploy to Kubernetes clusters using [Octopus Deploy](https://octopus.com).

Expand Down Expand Up @@ -57,7 +57,7 @@ The Kubernetes monitor is optionally installed alongside the Kubernetes agent, [
| agent.containers.watchdog.spec | object | `{}` | Additional container spec to apply to the watchdog container - does not override any other configuration |
| agent.debug.disableAutoPodCleanup | bool | `false` | Disables automatic pod cleanup |
| agent.enableMetricsCapture | bool | `true` | True if events should be scraped and added to the metrics config map |
| agent.image | object | `{"pullPolicy":"IfNotPresent","repository":"octopusdeploy/kubernetes-agent-tentacle","tag":"9.1.3672","tagSuffix":""}` | The repository, pullPolicy, tag & tagSuffix to use for the agent image |
| agent.image | object | `{"pullPolicy":"IfNotPresent","repository":"octopusdeploy/kubernetes-agent-tentacle","tag":"9.1.3703","tagSuffix":""}` | The repository, pullPolicy, tag & tagSuffix to use for the agent image |
| agent.logLevel | string | `"Info"` | The log level of the agent. Logs are written to the pod logs as well as to file |
| agent.machinePolicyName | string | `""` | The machine policy to register the agent with |
| agent.metadata | object | `{"annotations":{},"labels":{}}` | Additional metadata to add to the agent pod & container |
Expand Down Expand Up @@ -168,6 +168,7 @@ The Kubernetes monitor is optionally installed alongside the Kubernetes agent, [
| scriptPods.disruptionBudgetEnabled | bool | `true` | If true, the script pods will be created with a disruption budget to prevent them from being evicted |
| scriptPods.logging.disablePodEventsInTaskLog | bool | `false` | Disables script pod events being written to Octopus Server task log |
| scriptPods.metadata | object | `{"annotations":{},"labels":{}}` | Additional metadata to add to script pods |
| scriptPods.pendingPodsTimeoutMinutes | int | `60` | The number of minutes a script pod remains pending before it is deleted @default 60 |
| scriptPods.podTemplate.enabled | bool | `false` | overrides any other script pod customisation options and requires the `ScriptPodTemplate` CRD to be installed in the cluster |
| scriptPods.podTemplate.podMetadata | object | `{"annotations":{},"labels":{}}` | Pod metadata for the `ScriptPodTemplate` |
| scriptPods.podTemplate.podSpec | object | `{}` | Pod spec for the `ScriptPodTemplate` |
Expand Down
2 changes: 2 additions & 0 deletions charts/kubernetes-agent/templates/tentacle-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ spec:
value: {{ .Values.agent.pollingConnectionCount | quote }}
- name: "OCTOPUS__K8STENTACLE__ENABLEMETRICSCAPTURE"
value: {{ .Values.agent.enableMetricsCapture | quote }}
- name: "OCTOPUS__K8STENTACLE__PENDINGPODSSTUCKAFTERMINUTES"
value: {{ .Values.scriptPods.pendingPodsTimeoutMinutes | quote }}
{{- if .Values.imagePullSecrets }}
- name: "OCTOPUS__K8STENTACLE__PODIMAGEPULLSECRETNAMES"
value: {{ include "kubernetes-agent.imagePullSecretsCsv" . | quote }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ should match snapshot:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: octopus-agent
app.kubernetes.io/version: 9.1.3672
helm.sh/chart: kubernetes-agent-2.35.0
app.kubernetes.io/version: 9.1.3703
helm.sh/chart: kubernetes-agent-2.36.0
name: octopus-agent-auto-upgrader
namespace: NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ should match snapshot:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: octopus-agent
app.kubernetes.io/version: 9.1.3672
helm.sh/chart: kubernetes-agent-2.35.0
app.kubernetes.io/version: 9.1.3703
helm.sh/chart: kubernetes-agent-2.36.0
name: octopus-agent-scripts
namespace: NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Should render all options when crdDisabled is true:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: octopus-agent
app.kubernetes.io/version: 9.1.3672
helm.sh/chart: kubernetes-agent-2.35.0
app.kubernetes.io/version: 9.1.3703
helm.sh/chart: kubernetes-agent-2.36.0
name: octopus-agent-pod-template
namespace: NAMESPACE
spec:
Expand Down Expand Up @@ -49,8 +49,8 @@ should match snapshot:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: octopus-agent
app.kubernetes.io/version: 9.1.3672
helm.sh/chart: kubernetes-agent-2.35.0
app.kubernetes.io/version: 9.1.3703
helm.sh/chart: kubernetes-agent-2.36.0
name: octopus-agent
namespace: NAMESPACE
spec:
Expand Down Expand Up @@ -80,8 +80,8 @@ should never have the containers key in the podSpec when crdDisabled is true:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: octopus-agent
app.kubernetes.io/version: 9.1.3672
helm.sh/chart: kubernetes-agent-2.35.0
app.kubernetes.io/version: 9.1.3703
helm.sh/chart: kubernetes-agent-2.36.0
name: octopus-agent-pod-template
namespace: NAMESPACE
spec:
Expand Down Expand Up @@ -115,8 +115,8 @@ should partially render successfully:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: octopus-agent
app.kubernetes.io/version: 9.1.3672
helm.sh/chart: kubernetes-agent-2.35.0
app.kubernetes.io/version: 9.1.3703
helm.sh/chart: kubernetes-agent-2.36.0
name: octopus-agent
namespace: NAMESPACE
spec:
Expand All @@ -140,8 +140,8 @@ should render a deployment when crdDisabled is true:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: octopus-agent
app.kubernetes.io/version: 9.1.3672
helm.sh/chart: kubernetes-agent-2.35.0
app.kubernetes.io/version: 9.1.3703
helm.sh/chart: kubernetes-agent-2.36.0
name: octopus-agent-pod-template
namespace: NAMESPACE
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ should match snapshot:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: octopus-agent
app.kubernetes.io/version: 9.1.3672
helm.sh/chart: kubernetes-agent-2.35.0
app.kubernetes.io/version: 9.1.3703
helm.sh/chart: kubernetes-agent-2.36.0
name: octopus-agent-tentacle
namespace: NAMESPACE
spec:
Expand All @@ -25,8 +25,8 @@ should match snapshot:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: octopus-agent
app.kubernetes.io/version: 9.1.3672
helm.sh/chart: kubernetes-agent-2.35.0
app.kubernetes.io/version: 9.1.3703
helm.sh/chart: kubernetes-agent-2.36.0
spec:
affinity:
nodeAffinity:
Expand Down Expand Up @@ -81,7 +81,7 @@ should match snapshot:
- name: OCTOPUS__K8STENTACLE__HELMRELEASENAME
value: RELEASE-NAME
- name: OCTOPUS__K8STENTACLE__HELMCHARTVERSION
value: 2.35.0
value: 2.36.0
- name: OCTOPUS__K8STENTACLE__DISABLEAUTOPODCLEANUP
value: "false"
- name: OCTOPUS__K8STENTACLE__DISABLEPODEVENTSINTASKLOG
Expand All @@ -100,13 +100,15 @@ should match snapshot:
value: "5"
- name: OCTOPUS__K8STENTACLE__ENABLEMETRICSCAPTURE
value: "true"
- name: OCTOPUS__K8STENTACLE__PENDINGPODSSTUCKAFTERMINUTES
value: "60"
- name: OCTOPUS__K8STENTACLE__PODRESOURCEJSON
value: '{"requests":{"cpu":"25m","memory":"100Mi"}}'
- name: OCTOPUS__K8STENTACLE__PODAFFINITYJSON
value: '{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"kubernetes.io/os","operator":"In","values":["linux"]},{"key":"kubernetes.io/arch","operator":"In","values":["arm64","amd64"]}]}]}}}'
- name: OCTOPUS__K8STENTACLE__PERSISTENTVOLUMESIZE
value: 10Gi
image: octopusdeploy/kubernetes-agent-tentacle:9.1.3672
image: octopusdeploy/kubernetes-agent-tentacle:9.1.3703
imagePullPolicy: IfNotPresent
name: octopus-agent-tentacle
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ should match snapshot when storageClassName is not set and nfs is disabled (defa
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: octopus-agent
app.kubernetes.io/version: 9.1.3672
helm.sh/chart: kubernetes-agent-2.35.0
app.kubernetes.io/version: 9.1.3703
helm.sh/chart: kubernetes-agent-2.36.0
name: octopus-agent-release-name-pvc
spec:
accessModes:
Expand All @@ -25,8 +25,8 @@ should match snapshot when storageClassName is set and nfs is disabled:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: octopus-agent
app.kubernetes.io/version: 9.1.3672
helm.sh/chart: kubernetes-agent-2.35.0
app.kubernetes.io/version: 9.1.3703
helm.sh/chart: kubernetes-agent-2.36.0
name: octopus-agent-release-name-pvc
spec:
accessModes:
Expand All @@ -44,8 +44,8 @@ should match snapshot when storageClassName is set to "-" and nfs is disabled:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: octopus-agent
app.kubernetes.io/version: 9.1.3672
helm.sh/chart: kubernetes-agent-2.35.0
app.kubernetes.io/version: 9.1.3703
helm.sh/chart: kubernetes-agent-2.36.0
name: octopus-agent-release-name-pvc
spec:
accessModes:
Expand All @@ -64,8 +64,8 @@ should match snapshot when volumeName is set and nfs is disabled:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: octopus-agent
app.kubernetes.io/version: 9.1.3672
helm.sh/chart: kubernetes-agent-2.35.0
app.kubernetes.io/version: 9.1.3703
helm.sh/chart: kubernetes-agent-2.36.0
name: octopus-agent-release-name-pvc
spec:
accessModes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ should match snapshot:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: octopus-agent
app.kubernetes.io/version: 9.1.3672
helm.sh/chart: kubernetes-agent-2.35.0
app.kubernetes.io/version: 9.1.3703
helm.sh/chart: kubernetes-agent-2.36.0
name: octopus-agent-tentacle
namespace: NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ tests:
asserts:
- equal:
path: spec.template.spec.containers[0].image
value: "octopusdeploy/kubernetes-agent-tentacle:9.1.3672-bullseye-slim"
value: "octopusdeploy/kubernetes-agent-tentacle:9.1.3703-bullseye-slim"

- it: "sets custom spec properly"
set:
Expand Down
7 changes: 6 additions & 1 deletion charts/kubernetes-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ agent:
image:
repository: octopusdeploy/kubernetes-agent-tentacle
pullPolicy: IfNotPresent
tag: "9.1.3672"
tag: "9.1.3703"
tagSuffix: ""

# -- Credentials used during agent-upgrade tasks. To be populated if encountering rate-limiting failures.
Expand Down Expand Up @@ -348,6 +348,11 @@ scriptPods:
# @section -- Script pod values
watchdogContainerSpec: {}

# -- The number of minutes a script pod remains pending before it is deleted
# @default 60
# @section -- Script pod values
pendingPodsTimeoutMinutes: 60

# @section -- Persistence
persistence:
# -- Sets the requested PVC access modes for both the agent pod and script pods.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
<PackageReference Include="Octopus.Client" Version="17.15.2394" />
<PackageReference Include="Octopus.Tentacle.Client" Version="9.1.3672" />
<PackageReference Include="Octopus.Tentacle.Client" Version="9.1.3703" />
<PackageReference Include="Serilog" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.XUnit" Version="3.0.5" />
<PackageReference Include="xunit" Version="2.5.3"/>
Expand Down