From 5d2400283f68e76277768b774d230f95b46336aa Mon Sep 17 00:00:00 2001 From: Jonathan Innis Date: Tue, 17 Oct 2023 12:43:13 -0700 Subject: [PATCH] Add symbolic links for the new CRDs --- .../karpenter.k8s.aws_ec2nodeclasses.yaml | 1 + .../templates/karpenter.sh_nodeclaims.yaml | 1 + .../templates/karpenter.sh_nodepools.yaml | 1 + .../karpenter.k8s.aws_ec2nodeclasses.yaml | 1 + .../crds/karpenter.sh_nodeclaims.yaml | 1 + .../crds/karpenter.sh_nodepools.yaml | 1 + charts/karpenter/templates/webhooks.yaml | 47 +++++-------------- go.mod | 4 +- go.sum | 4 +- hack/docgen.sh | 2 +- .../content/en/preview/reference/metrics.md | 6 +-- .../en/preview/upgrading/compatibility.md | 10 ++-- 12 files changed, 30 insertions(+), 49 deletions(-) create mode 120000 charts/karpenter-crd/templates/karpenter.k8s.aws_ec2nodeclasses.yaml create mode 120000 charts/karpenter-crd/templates/karpenter.sh_nodeclaims.yaml create mode 120000 charts/karpenter-crd/templates/karpenter.sh_nodepools.yaml create mode 120000 charts/karpenter/crds/karpenter.k8s.aws_ec2nodeclasses.yaml create mode 120000 charts/karpenter/crds/karpenter.sh_nodeclaims.yaml create mode 120000 charts/karpenter/crds/karpenter.sh_nodepools.yaml diff --git a/charts/karpenter-crd/templates/karpenter.k8s.aws_ec2nodeclasses.yaml b/charts/karpenter-crd/templates/karpenter.k8s.aws_ec2nodeclasses.yaml new file mode 120000 index 000000000000..3bb741dfaf65 --- /dev/null +++ b/charts/karpenter-crd/templates/karpenter.k8s.aws_ec2nodeclasses.yaml @@ -0,0 +1 @@ +../../../pkg/apis/crds/karpenter.k8s.aws_ec2nodeclasses.yaml \ No newline at end of file diff --git a/charts/karpenter-crd/templates/karpenter.sh_nodeclaims.yaml b/charts/karpenter-crd/templates/karpenter.sh_nodeclaims.yaml new file mode 120000 index 000000000000..3f572b57547e --- /dev/null +++ b/charts/karpenter-crd/templates/karpenter.sh_nodeclaims.yaml @@ -0,0 +1 @@ +../../../pkg/apis/crds/karpenter.sh_nodeclaims.yaml \ No newline at end of file diff --git a/charts/karpenter-crd/templates/karpenter.sh_nodepools.yaml b/charts/karpenter-crd/templates/karpenter.sh_nodepools.yaml new file mode 120000 index 000000000000..36d2d1dd918a --- /dev/null +++ b/charts/karpenter-crd/templates/karpenter.sh_nodepools.yaml @@ -0,0 +1 @@ +../../../pkg/apis/crds/karpenter.sh_nodepools.yaml \ No newline at end of file diff --git a/charts/karpenter/crds/karpenter.k8s.aws_ec2nodeclasses.yaml b/charts/karpenter/crds/karpenter.k8s.aws_ec2nodeclasses.yaml new file mode 120000 index 000000000000..3bb741dfaf65 --- /dev/null +++ b/charts/karpenter/crds/karpenter.k8s.aws_ec2nodeclasses.yaml @@ -0,0 +1 @@ +../../../pkg/apis/crds/karpenter.k8s.aws_ec2nodeclasses.yaml \ No newline at end of file diff --git a/charts/karpenter/crds/karpenter.sh_nodeclaims.yaml b/charts/karpenter/crds/karpenter.sh_nodeclaims.yaml new file mode 120000 index 000000000000..3f572b57547e --- /dev/null +++ b/charts/karpenter/crds/karpenter.sh_nodeclaims.yaml @@ -0,0 +1 @@ +../../../pkg/apis/crds/karpenter.sh_nodeclaims.yaml \ No newline at end of file diff --git a/charts/karpenter/crds/karpenter.sh_nodepools.yaml b/charts/karpenter/crds/karpenter.sh_nodepools.yaml new file mode 120000 index 000000000000..36d2d1dd918a --- /dev/null +++ b/charts/karpenter/crds/karpenter.sh_nodepools.yaml @@ -0,0 +1 @@ +../../../pkg/apis/crds/karpenter.sh_nodepools.yaml \ No newline at end of file diff --git a/charts/karpenter/templates/webhooks.yaml b/charts/karpenter/templates/webhooks.yaml index 2c5c5d2356f1..e52fc722aab1 100644 --- a/charts/karpenter/templates/webhooks.yaml +++ b/charts/karpenter/templates/webhooks.yaml @@ -23,24 +23,24 @@ webhooks: - apiGroups: - karpenter.k8s.aws apiVersions: - - v1beta1 + - v1alpha1 operations: - CREATE - UPDATE resources: - - ec2nodeclasses - - ec2nodeclasses/status + - awsnodetemplates + - awsnodetemplates/status scope: '*' - apiGroups: - karpenter.k8s.aws apiVersions: - - v1alpha1 + - v1beta1 operations: - CREATE - UPDATE resources: - - awsnodetemplates - - awsnodetemplates/status + - ec2nodeclasses + - ec2nodeclasses/status scope: '*' - apiGroups: - karpenter.sh @@ -75,17 +75,6 @@ webhooks: failurePolicy: Fail sideEffects: None rules: - - apiGroups: - - karpenter.k8s.aws - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - nodeclasses - - nodeclasses/status - scope: '*' - apiGroups: - karpenter.k8s.aws apiVersions: @@ -98,37 +87,25 @@ webhooks: - awsnodetemplates/status scope: '*' - apiGroups: - - karpenter.sh - apiVersions: - - v1alpha5 - operations: - - CREATE - - UPDATE - resources: - - nodepools - - nodepools/status - scope: '*' - - apiGroups: - - karpenter.sh + - karpenter.k8s.aws apiVersions: - v1beta1 operations: - CREATE - UPDATE - - DELETE resources: - - nodeclaims - - nodeclaims/status + - ec2nodeclasses + - ec2nodeclasses/status scope: '*' - apiGroups: - karpenter.sh apiVersions: - - v1beta1 + - v1alpha5 operations: - CREATE - UPDATE resources: - - nodepools - - nodepools/status + - provisioners + - provisioners/status scope: '*' {{- end }} \ No newline at end of file diff --git a/go.mod b/go.mod index 992fa127449a..c2744d44020c 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/PuerkitoBio/goquery v1.8.1 github.com/avast/retry-go v3.0.0+incompatible github.com/aws/aws-sdk-go v1.45.25 - github.com/aws/karpenter-core v0.31.1-0.20231013203304-4239902b18b9 + github.com/aws/karpenter-core v0.31.1-0.20231018213242-4555b8dfcd10 github.com/aws/karpenter/tools/kompat v0.0.0-20231010173459-62c25a3ea85c github.com/imdario/mergo v0.3.16 github.com/mitchellh/hashstructure/v2 v2.0.2 @@ -30,8 +30,6 @@ require ( sigs.k8s.io/controller-runtime v0.16.2 ) -replace github.com/aws/karpenter-core => github.com/jonathan-innis/karpenter-core v0.0.0-20231017081815-4e8c54e9d993 - require ( contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d // indirect contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect diff --git a/go.sum b/go.sum index 0091a0e3cbc0..95de38856d16 100644 --- a/go.sum +++ b/go.sum @@ -57,6 +57,8 @@ github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHS github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= github.com/aws/aws-sdk-go v1.45.25 h1:c4fLlh5sLdK2DCRTY1z0hyuJZU4ygxX8m1FswL6/nF4= github.com/aws/aws-sdk-go v1.45.25/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/karpenter-core v0.31.1-0.20231018213242-4555b8dfcd10 h1:ZKoz01A7DXGVEi0V4tGMd0LbLHEesIzFzYlFQTMQXSE= +github.com/aws/karpenter-core v0.31.1-0.20231018213242-4555b8dfcd10/go.mod h1:rb3kp/3cj38tACF6udfpmIvKoQMwirSVoHNlrd66LyE= github.com/aws/karpenter/tools/kompat v0.0.0-20231010173459-62c25a3ea85c h1:oXWwIttmjYLbBKhLazG21aQvpJ3NOOr8IXhCJ/p6e/M= github.com/aws/karpenter/tools/kompat v0.0.0-20231010173459-62c25a3ea85c/go.mod h1:l/TIBsaCx/IrOr0Xvlj/cHLOf05QzuQKEZ1hx2XWmfU= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -223,8 +225,6 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jonathan-innis/karpenter-core v0.0.0-20231017081815-4e8c54e9d993 h1:EglPHmaL2cGCrf7UTji0Hqe+o3dSP5E4ZBA3YfXpdz4= -github.com/jonathan-innis/karpenter-core v0.0.0-20231017081815-4e8c54e9d993/go.mod h1:rb3kp/3cj38tACF6udfpmIvKoQMwirSVoHNlrd66LyE= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= diff --git a/hack/docgen.sh b/hack/docgen.sh index fe34554d9b96..58655b38b2c5 100755 --- a/hack/docgen.sh +++ b/hack/docgen.sh @@ -3,7 +3,7 @@ set -euo pipefail compatibilitymatrix() { go run hack/docs/version_compatibility.go hack/docs/compatibility-karpenter.yaml "$(git describe --exact-match --tags || echo "no tag")" - go run hack/docs/compatibilitymetrix_gen_docs.go website/content/en/preview/upgrade-guide.md hack/docs/compatibility-karpenter.yaml 6 + go run hack/docs/compatibilitymetrix_gen_docs.go website/content/en/preview/upgrading/compatibility.md hack/docs/compatibility-karpenter.yaml 6 } diff --git a/website/content/en/preview/reference/metrics.md b/website/content/en/preview/reference/metrics.md index c323fb2ca94f..374fba82b28c 100644 --- a/website/content/en/preview/reference/metrics.md +++ b/website/content/en/preview/reference/metrics.md @@ -53,19 +53,19 @@ The number of times that Karpenter failed to launch a replacement node for depro ## Disruption Metrics ### `karpenter_disruption_actions_performed_total` -Number of disruption methods performed. Labeled by disruption type. +Number of disruption actions performed. Labeled by disruption method. ### `karpenter_disruption_consolidation_timeouts_total` Number of times the Consolidation algorithm has reached a timeout. Labeled by consolidation type. ### `karpenter_disruption_eligible_nodes` -Number of nodes eligible for disruption by Karpenter. Labeled by disruption type. +Number of nodes eligible for disruption by Karpenter. Labeled by disruption method. ### `karpenter_disruption_evaluation_duration_seconds` Duration of the disruption evaluation process in seconds. ### `karpenter_disruption_replacement_nodeclaim_failures_total` -The number of times that Karpenter failed to launch a replacement node for disruption. Labeled by disruption type. +The number of times that Karpenter failed to launch a replacement node for disruption. Labeled by disruption method. ### `karpenter_disruption_replacement_nodeclaim_initialized_seconds` Amount of time required for a replacement nodeclaim to become initialized. diff --git a/website/content/en/preview/upgrading/compatibility.md b/website/content/en/preview/upgrading/compatibility.md index 85ce9379e94a..bfde9d049a22 100644 --- a/website/content/en/preview/upgrading/compatibility.md +++ b/website/content/en/preview/upgrading/compatibility.md @@ -13,13 +13,13 @@ Before you begin upgrading Karpenter, consider Karpenter compatibility issues re ## Compatibility Matrix -[comment]: <> (the content below is generated from hack/docs/compatibilitymetrix_gen_docs.go) +[comment]: <> (the content below is generated from hack/docs/compataiblitymetrix_gen_docs.go) -| KUBERNETES | 1.23 | 1.24 | 1.25 | 1.26 | 1.27 | 1.28 | -|------------|---------|---------|---------|---------|---------|---------| -| karpenter | 0.21.x+ | 0.21.x+ | 0.25.x+ | 0.28.x+ | 0.28.x+ | 0.28.x+ | +| KUBERNETES | 1.23 | 1.24 | 1.25 | 1.26 | 1.27 | 1.28 | +|------------|---------|---------|---------|---------|---------|--------| +| karpenter | 0.21.x+ | 0.21.x+ | 0.25.x+ | 0.28.x+ | 0.28.x+ | 0.31.x | -[comment]: <> (end docs generated content from hack/docs/compatibilitymetrix_gen_docs.go) +[comment]: <> (end docs generated content from hack/docs/compataiblitymetrix_gen_docs.go) {{% alert title="Note" color="warning" %}} Karpenter currently does not support the following [new `topologySpreadConstraints` keys](https://kubernetes.io/blog/2023/04/17/fine-grained-pod-topology-spread-features-beta/), promoted to beta in Kubernetes 1.27: