Skip to content

Commit dd7e990

Browse files
authored
Helm chart updates to take advantage of k8s-shredder 0.3.0; year update to CR line (#339)
1 parent 7786db8 commit dd7e990

File tree

13 files changed

+158
-71
lines changed

13 files changed

+158
-71
lines changed

charts/k8s-shredder/Chart.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: k8s-shredder
33

4-
description: K8s-shredder introduces the concept of parked nodes which aims to address some critical aspects on a Kubernetes cluster while rotating the worker nodes during a cluster upgrade.
4+
description: a novel way of dealing with kubernetes nodes blocked from draining
55

66
type: application
77

@@ -11,6 +11,9 @@ maintainers:
1111
- name: adriananeci
1212
1313
url: https://adobe.com
14+
- name: sfotony
15+
16+
url: https://adobe.com
1417

15-
version: 0.1.2
16-
appVersion: v0.2.2
18+
version: 0.2.0
19+
appVersion: v0.3.0

charts/k8s-shredder/README.md

Lines changed: 63 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# k8s-shredder
22

3-
![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: v0.2.0](https://img.shields.io/badge/AppVersion-v0.2.0-informational?style=flat-square)
3+
![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.3.0](https://img.shields.io/badge/AppVersion-v0.3.0-informational?style=flat-square)
44

5-
K8s-shredder introduces the concept of parked nodes which aims to address some critical aspects on a Kubernetes cluster while rotating the worker nodes during a cluster upgrade.
5+
a novel way of dealing with kubernetes nodes blocked from draining
66

77
**Homepage:** <https://github.com/adobe/k8s-shredder>
88

@@ -11,55 +11,71 @@ K8s-shredder introduces the concept of parked nodes which aims to address some c
1111
| Name | Email | Url |
1212
| ---- | ------ | --- |
1313
| adriananeci | <[email protected]> | <https://adobe.com> |
14+
| sfotony | <[email protected]> | <https://adobe.com> |
1415

1516
## Values
1617

1718
| Key | Type | Default | Description |
1819
|-----|------|---------|-------------|
19-
| additionalContainers | list | `[]` | |
20-
| affinity | object | `{}` | |
21-
| deploymentStrategy | object | `{}` | |
22-
| dryRun | bool | `false` | |
23-
| environmentVars | list | `[]` | |
24-
| fullnameOverride | string | `""` | |
25-
| image.pullPolicy | string | `"IfNotPresent"` | |
26-
| image.registry | string | `"ghcr.io/adobe/k8s-shredder"` | |
27-
| imagePullSecrets | list | `[]` | |
28-
| initContainers | list | `[]` | |
29-
| nameOverride | string | `""` | |
30-
| nodeSelector | object | `{}` | |
31-
| podAnnotations | object | `{}` | |
32-
| podLabels | object | `{}` | |
33-
| podMonitor.enabled | bool | `false` | |
34-
| podMonitor.honorLabels | bool | `true` | |
35-
| podMonitor.interval | string | `"60s"` | |
36-
| podMonitor.labels | object | `{}` | |
37-
| podMonitor.relabelings | list | `[]` | |
38-
| podMonitor.scrapeTimeout | string | `"10s"` | |
39-
| podSecurityContext | object | `{}` | |
40-
| priorityClassName | string | `"system-cluster-critical"` | |
41-
| rbac.create | bool | `true` | |
42-
| replicaCount | int | `1` | |
43-
| resources.limits.cpu | string | `"1"` | |
44-
| resources.limits.memory | string | `"1Gi"` | |
45-
| resources.requests.cpu | string | `"250m"` | |
46-
| resources.requests.memory | string | `"250Mi"` | |
47-
| securityContext | object | `{}` | |
48-
| serviceAccount.annotations | object | `{}` | |
49-
| serviceAccount.create | bool | `true` | |
50-
| serviceAccount.name | string | `"k8s-shredder"` | |
51-
| shredder.AllowEvictionLabel | string | `"shredder.ethos.adobe.net/allow-eviction"` | |
52-
| shredder.EvictionLoopInterval | string | `"1h"` | |
53-
| shredder.ExpiresOnLabel | string | `"shredder.ethos.adobe.net/parked-node-expires-on"` | |
54-
| shredder.NamespacePrefixSkipInitialEviction | string | `"ns-ethos-"` | |
55-
| shredder.ParkedNodeTTL | string | `"168h"` | |
56-
| shredder.RestartedAtAnnotation | string | `"shredder.ethos.adobe.net/restartedAt"` | |
57-
| shredder.RollingRestartThreshold | float | `0.1` | |
58-
| shredder.ToBeDeletedTaint | string | `"ToBeDeletedByClusterAutoscaler"` | |
59-
| shredder.UpgradeStatusLabel | string | `"shredder.ethos.adobe.net/upgrade-status"` | |
60-
| tolerations | list | `[]` | |
61-
| topologySpreadConstraints | list | `[]` | |
62-
| volumes | list | `[]` | |
20+
| additionalContainers | list | `[]` | Additional containers to run alongside k8s-shredder in the same pod |
21+
| affinity | object | `{}` | Affinity rules for advanced pod scheduling (node affinity, pod affinity/anti-affinity) |
22+
| deploymentStrategy | object | `{}` | Deployment strategy for rolling updates (e.g., RollingUpdate, Recreate) |
23+
| dryRun | bool | `false` | Enable dry-run mode - when true, k8s-shredder will log actions but not execute them |
24+
| environmentVars | list | `[]` | Additional environment variables to set in the container |
25+
| fullnameOverride | string | `""` | Override the full name used for resources |
26+
| image | object | `{"pullPolicy":"IfNotPresent","registry":"ghcr.io/adobe/k8s-shredder"}` | Container image configuration |
27+
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy - IfNotPresent, Always, or Never |
28+
| image.registry | string | `"ghcr.io/adobe/k8s-shredder"` | Container registry where the k8s-shredder image is hosted |
29+
| imagePullSecrets | list | `[]` | Secrets for pulling images from private registries |
30+
| initContainers | list | `[]` | Init containers to run before the main k8s-shredder container starts |
31+
| logFormat | string | `"text"` | Log output format: text (human-readable) or json (structured logging) |
32+
| logLevel | string | `"debug"` | Available log levels: panic, fatal, error, warn, warning, info, debug, trace |
33+
| nameOverride | string | `""` | Override the name of the chart |
34+
| nodeSelector | object | `{}` | Node selector to constrain pod scheduling to specific nodes |
35+
| podAnnotations | object | `{}` | Annotations to add to k8s-shredder pod(s) |
36+
| podLabels | object | `{}` | Additional labels to add to k8s-shredder pod(s) |
37+
| podMonitor | object | `{"enabled":false,"honorLabels":true,"interval":"60s","labels":{},"relabelings":[],"scrapeTimeout":"10s"}` | Prometheus monitoring configuration |
38+
| podMonitor.enabled | bool | `false` | Enable creation of a PodMonitor resource for Prometheus scraping |
39+
| podMonitor.honorLabels | bool | `true` | Whether to honor labels from the target |
40+
| podMonitor.interval | string | `"60s"` | How often Prometheus should scrape metrics |
41+
| podMonitor.labels | object | `{}` | Labels to apply to the PodMonitor resource |
42+
| podMonitor.relabelings | list | `[]` | Metric relabeling configuration |
43+
| podMonitor.scrapeTimeout | string | `"10s"` | Timeout for each scrape attempt |
44+
| podSecurityContext | object | `{}` | Security context applied to the entire pod |
45+
| priorityClassName | string | `"system-cluster-critical"` | Priority class for pod scheduling - system-cluster-critical ensures high priority |
46+
| rbac | object | `{"create":true}` | RBAC (Role-Based Access Control) configuration |
47+
| rbac.create | bool | `true` | Create RBAC resources (ClusterRole, ClusterRoleBinding) |
48+
| replicaCount | int | `1` | Number of k8s-shredder pods to run |
49+
| resources | object | `{"limits":{"cpu":"1","memory":"1Gi"},"requests":{"cpu":"250m","memory":"250Mi"}}` | Resource requests and limits for the k8s-shredder container |
50+
| resources.limits.cpu | string | `"1"` | Maximum CPU cores the container can use |
51+
| resources.limits.memory | string | `"1Gi"` | Maximum memory the container can use |
52+
| resources.requests.cpu | string | `"250m"` | CPU cores requested for the container (guaranteed allocation) |
53+
| resources.requests.memory | string | `"250Mi"` | Memory requested for the container (guaranteed allocation) |
54+
| securityContext | object | `{}` | Security context applied to the k8s-shredder container |
55+
| serviceAccount | object | `{"annotations":{},"create":true,"name":"k8s-shredder"}` | Kubernetes service account configuration |
56+
| serviceAccount.annotations | object | `{}` | Additional annotations for the service account (useful for IAM roles, etc.) |
57+
| serviceAccount.create | bool | `true` | Create a service account for k8s-shredder |
58+
| serviceAccount.name | string | `"k8s-shredder"` | Name of the service account |
59+
| shredder | object | `{"AllowEvictionLabel":"shredder.ethos.adobe.net/allow-eviction","ArgoRolloutsAPIVersion":"v1alpha1","EnableKarpenterDriftDetection":false,"EnableNodeLabelDetection":false,"EvictionLoopInterval":"1h","ExpiresOnLabel":"shredder.ethos.adobe.net/parked-node-expires-on","NamespacePrefixSkipInitialEviction":"ns-ethos-","NodeLabelsToDetect":[],"ParkedByLabel":"shredder.ethos.adobe.net/parked-by","ParkedByValue":"k8s-shredder","ParkedNodeTTL":"168h","ParkedNodeTaint":"shredder.ethos.adobe.net/upgrade-status=parked:NoSchedule","RestartedAtAnnotation":"shredder.ethos.adobe.net/restartedAt","RollingRestartThreshold":0.1,"ToBeDeletedTaint":"ToBeDeletedByClusterAutoscaler","UpgradeStatusLabel":"shredder.ethos.adobe.net/upgrade-status"}` | Core k8s-shredder configuration |
60+
| shredder.AllowEvictionLabel | string | `"shredder.ethos.adobe.net/allow-eviction"` | Label to explicitly allow eviction on specific resources |
61+
| shredder.ArgoRolloutsAPIVersion | string | `"v1alpha1"` | API version for Argo Rollouts integration |
62+
| shredder.EnableKarpenterDriftDetection | bool | `false` | Enable Karpenter drift detection for node lifecycle management |
63+
| shredder.EnableNodeLabelDetection | bool | `false` | Enable detection of nodes based on specific labels |
64+
| shredder.EvictionLoopInterval | string | `"1h"` | How often to run the main eviction loop |
65+
| shredder.ExpiresOnLabel | string | `"shredder.ethos.adobe.net/parked-node-expires-on"` | Label used to track when a parked node expires |
66+
| shredder.NamespacePrefixSkipInitialEviction | string | `"ns-ethos-"` | Namespace prefix to skip during initial eviction (useful for system namespaces) |
67+
| shredder.NodeLabelsToDetect | list | `[]` | List of node labels to monitor for triggering shredder actions |
68+
| shredder.ParkedByLabel | string | `"shredder.ethos.adobe.net/parked-by"` | Label to track which component parked a node |
69+
| shredder.ParkedByValue | string | `"k8s-shredder"` | Value set in the ParkedByLabel to identify k8s-shredder as the parking agent |
70+
| shredder.ParkedNodeTTL | string | `"168h"` | How long parked nodes should remain before being eligible for deletion (7 days default) |
71+
| shredder.ParkedNodeTaint | string | `"shredder.ethos.adobe.net/upgrade-status=parked:NoSchedule"` | Taint applied to parked nodes to prevent new pod scheduling |
72+
| shredder.RestartedAtAnnotation | string | `"shredder.ethos.adobe.net/restartedAt"` | Annotation to track when a workload was last restarted |
73+
| shredder.RollingRestartThreshold | float | `0.1` | Maximum percentage of nodes that can be restarted simultaneously during rolling restarts |
74+
| shredder.ToBeDeletedTaint | string | `"ToBeDeletedByClusterAutoscaler"` | Taint indicating nodes scheduled for deletion by cluster autoscaler |
75+
| shredder.UpgradeStatusLabel | string | `"shredder.ethos.adobe.net/upgrade-status"` | Label used to track node upgrade status |
76+
| tolerations | list | `[]` | Tolerations to allow scheduling on nodes with specific taints |
77+
| topologySpreadConstraints | list | `[]` | Helps ensure high availability by spreading pods across zones/nodes |
78+
| volumes | list | `[]` | Additional volumes to mount in the pod |
6379

6480
----------------------------------------------
65-
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
81+
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)

charts/k8s-shredder/values.yaml

Lines changed: 75 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,157 @@
1+
# -- Container image configuration
12
image:
3+
# -- Container registry where the k8s-shredder image is hosted
24
registry: ghcr.io/adobe/k8s-shredder
5+
# -- Image pull policy - IfNotPresent, Always, or Never
36
pullPolicy: IfNotPresent
47

8+
# -- Number of k8s-shredder pods to run
59
replicaCount: 1
10+
# -- Deployment strategy for rolling updates (e.g., RollingUpdate, Recreate)
611
deploymentStrategy: {}
712

13+
# -- Secrets for pulling images from private registries
814
imagePullSecrets: []
15+
# -- Override the name of the chart
916
nameOverride: ""
17+
# -- Override the full name used for resources
1018
fullnameOverride: ""
1119

20+
# -- Additional environment variables to set in the container
1221
environmentVars: []
1322

23+
# -- Enable dry-run mode - when true, k8s-shredder will log actions but not execute them
1424
dryRun: false
1525

26+
# -- Logging configuration
27+
# -- Available log levels: panic, fatal, error, warn, warning, info, debug, trace
28+
logLevel: "debug"
29+
# -- Log output format: text (human-readable) or json (structured logging)
30+
logFormat: "text"
31+
32+
# -- Core k8s-shredder configuration
1633
shredder:
34+
# -- How often to run the main eviction loop
1735
EvictionLoopInterval: "1h"
18-
ParkedNodeTTL: "168h" # 7 days
36+
# -- How long parked nodes should remain before being eligible for deletion (7 days default)
37+
ParkedNodeTTL: "168h"
38+
# -- Maximum percentage of nodes that can be restarted simultaneously during rolling restarts
1939
RollingRestartThreshold: 0.1
40+
# -- Label used to track node upgrade status
2041
UpgradeStatusLabel: "shredder.ethos.adobe.net/upgrade-status"
42+
# -- Label used to track when a parked node expires
2143
ExpiresOnLabel: "shredder.ethos.adobe.net/parked-node-expires-on"
44+
# -- Namespace prefix to skip during initial eviction (useful for system namespaces)
2245
NamespacePrefixSkipInitialEviction: "ns-ethos-"
46+
# -- Annotation to track when a workload was last restarted
2347
RestartedAtAnnotation: "shredder.ethos.adobe.net/restartedAt"
48+
# -- Label to explicitly allow eviction on specific resources
2449
AllowEvictionLabel: "shredder.ethos.adobe.net/allow-eviction"
50+
# -- Taint indicating nodes scheduled for deletion by cluster autoscaler
2551
ToBeDeletedTaint: "ToBeDeletedByClusterAutoscaler"
26-
52+
# -- API version for Argo Rollouts integration
53+
ArgoRolloutsAPIVersion: "v1alpha1"
54+
# -- Enable Karpenter drift detection for node lifecycle management
55+
EnableKarpenterDriftDetection: false
56+
# -- Label to track which component parked a node
57+
ParkedByLabel: "shredder.ethos.adobe.net/parked-by"
58+
# -- Value set in the ParkedByLabel to identify k8s-shredder as the parking agent
59+
ParkedByValue: "k8s-shredder"
60+
# -- Taint applied to parked nodes to prevent new pod scheduling
61+
ParkedNodeTaint: "shredder.ethos.adobe.net/upgrade-status=parked:NoSchedule"
62+
# -- Enable detection of nodes based on specific labels
63+
EnableNodeLabelDetection: false
64+
# -- List of node labels to monitor for triggering shredder actions
65+
NodeLabelsToDetect: []
66+
67+
# -- RBAC (Role-Based Access Control) configuration
2768
rbac:
69+
# -- Create RBAC resources (ClusterRole, ClusterRoleBinding)
2870
create: true
2971

72+
# -- Kubernetes service account configuration
3073
serviceAccount:
74+
# -- Create a service account for k8s-shredder
3175
create: true
76+
# -- Name of the service account
3277
name: k8s-shredder
78+
# -- Additional annotations for the service account (useful for IAM roles, etc.)
3379
annotations: {}
3480

35-
# Annotations for k8s-shredder pod(s).
81+
# -- Annotations to add to k8s-shredder pod(s)
3682
podAnnotations: {}
3783

38-
# Additional labels for the k8s-shredder pod(s).
84+
# -- Additional labels to add to k8s-shredder pod(s)
3985
podLabels: {}
4086

87+
# -- Security context applied to the entire pod
4188
podSecurityContext: {}
4289

90+
# -- Security context applied to the k8s-shredder container
4391
securityContext: {}
4492

45-
# Init containers to add into the deployment template spec
93+
# -- Init containers to run before the main k8s-shredder container starts
4694
initContainers: []
4795

48-
# Additional containers to add into the deployment template spec
96+
# -- Additional containers to run alongside k8s-shredder in the same pod
4997
additionalContainers: []
5098

99+
# -- Resource requests and limits for the k8s-shredder container
51100
resources:
52101
limits:
102+
# -- Maximum CPU cores the container can use
53103
cpu: "1"
104+
# -- Maximum memory the container can use
54105
memory: 1Gi
55106
requests:
107+
# -- CPU cores requested for the container (guaranteed allocation)
56108
cpu: 250m
109+
# -- Memory requested for the container (guaranteed allocation)
57110
memory: 250Mi
58111

112+
# -- Additional volumes to mount in the pod
59113
volumes: []
114+
# Example volume configuration:
60115
# - name: ca
61116
# secret:
62117
# secretName: k8s-shredder-ca
63118
# items:
64119
# - key: ca.pem
65120
# path: ca.pem
66121

122+
# -- Node selector to constrain pod scheduling to specific nodes
67123
nodeSelector: {}
68124

125+
# -- Tolerations to allow scheduling on nodes with specific taints
69126
tolerations: []
70127

128+
# -- Affinity rules for advanced pod scheduling (node affinity, pod affinity/anti-affinity)
71129
affinity: {}
72130

131+
# -- Prometheus monitoring configuration
73132
podMonitor:
133+
# -- Enable creation of a PodMonitor resource for Prometheus scraping
74134
enabled: false
135+
# -- Labels to apply to the PodMonitor resource
75136
labels: {}
76137
# app: k8s-shredder
77138
# subsystem: k8s-a
139+
# -- How often Prometheus should scrape metrics
78140
interval: 60s
141+
# -- Timeout for each scrape attempt
79142
scrapeTimeout: 10s
143+
# -- Whether to honor labels from the target
80144
honorLabels: true
145+
# -- Metric relabeling configuration
81146
relabelings: []
82147

83-
# A priority class can be optionally attached to the pod spec if one is needed
148+
# -- Priority class for pod scheduling - system-cluster-critical ensures high priority
84149
priorityClassName: system-cluster-critical
85150

86-
## Topology spread constraints rely on node labels to identify the topology domain(s) that each Node is in.
87-
## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
151+
# -- Topology spread constraints to control pod distribution across failure domains
152+
# -- Helps ensure high availability by spreading pods across zones/nodes
88153
topologySpreadConstraints: []
154+
# Example configuration:
89155
# - maxSkew: 1
90156
# topologyKey: topology.kubernetes.io/zone
91157
# whenUnsatisfiable: DoNotSchedule

cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2022 Adobe. All rights reserved.
2+
Copyright 2025 Adobe. All rights reserved.
33
This file is licensed to you under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License. You may obtain a copy
55
of the License at http://www.apache.org/licenses/LICENSE-2.0

internal/testing/e2e_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2022 Adobe. All rights reserved.
2+
Copyright 2025 Adobe. All rights reserved.
33
This file is licensed to you under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License. You may obtain a copy
55
of the License at http://www.apache.org/licenses/LICENSE-2.0

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2022 Adobe. All rights reserved.
2+
Copyright 2025 Adobe. All rights reserved.
33
This file is licensed to you under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License. You may obtain a copy
55
of the License at http://www.apache.org/licenses/LICENSE-2.0

pkg/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2022 Adobe. All rights reserved.
2+
Copyright 2025 Adobe. All rights reserved.
33
This file is licensed to you under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License. You may obtain a copy
55
of the License at http://www.apache.org/licenses/LICENSE-2.0

pkg/handler/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2022 Adobe. All rights reserved.
2+
Copyright 2025 Adobe. All rights reserved.
33
This file is licensed to you under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License. You may obtain a copy
55
of the License at http://www.apache.org/licenses/LICENSE-2.0

pkg/metrics/metrics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2022 Adobe. All rights reserved.
2+
Copyright 2025 Adobe. All rights reserved.
33
This file is licensed to you under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License. You may obtain a copy
55
of the License at http://www.apache.org/licenses/LICENSE-2.0

pkg/metrics/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2022 Adobe. All rights reserved.
2+
Copyright 2025 Adobe. All rights reserved.
33
This file is licensed to you under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License. You may obtain a copy
55
of the License at http://www.apache.org/licenses/LICENSE-2.0

0 commit comments

Comments
 (0)