Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Removes the v1alpha1 apis directory #5231

Merged
merged 1 commit into from
Dec 5, 2023
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
4 changes: 2 additions & 2 deletions charts/karpenter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ helm upgrade --install --namespace karpenter --create-namespace \
| additionalAnnotations | object | `{}` | Additional annotations to add into metadata. |
| additionalClusterRoleRules | list | `[]` | Specifies additional rules for the core ClusterRole. |
| additionalLabels | object | `{}` | Additional labels to add into metadata. |
| affinity | object | `{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"karpenter.sh/provisioner-name","operator":"DoesNotExist"},{"key":"karpenter.sh/nodepool","operator":"DoesNotExist"}]}]}},"podAntiAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":[{"topologyKey":"kubernetes.io/hostname"}]}}` | Affinity rules for scheduling the pod. If an explicit label selector is not provided for pod affinity or pod anti-affinity one will be created from the pod selector labels. |
| affinity | object | `{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"karpenter.sh/nodepool","operator":"DoesNotExist"}]}]}},"podAntiAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":[{"topologyKey":"kubernetes.io/hostname"}]}}` | Affinity rules for scheduling the pod. If an explicit label selector is not provided for pod affinity or pod anti-affinity one will be created from the pod selector labels. |
| controller.env | list | `[]` | Additional environment variables for the controller pod. |
| controller.envFrom | list | `[]` | |
| controller.extraVolumeMounts | list | `[]` | Additional volumeMounts for the controller pod. |
Expand Down Expand Up @@ -82,7 +82,7 @@ helm upgrade --install --namespace karpenter --create-namespace \
| settings.clusterEndpoint | string | `""` | Cluster endpoint. If not set, will be discovered during startup (EKS only) |
| settings.clusterName | string | `""` | Cluster name. |
| settings.featureGates | object | `{"drift":true}` | Feature Gate configuration values. Feature Gates will follow the same graduation process and requirements as feature gates in Kubernetes. More information here https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/#feature-gates-for-alpha-or-beta-features |
| settings.featureGates.drift | bool | `true` | drift is in BETA and is enabled by default. Setting drift to false disables the drift disruption method to watch for drift between currently deployed nodes and the desired state of nodes set in provisioners and node templates |
| settings.featureGates.drift | bool | `true` | drift is in BETA and is enabled by default. Setting drift to false disables the drift disruption method to watch for drift between currently deployed nodes and the desired state of nodes set in nodepools and nodeclasses |
| settings.interruptionQueue | string | `""` | interruptionQueue is disabled if not specified. Enabling interruption handling may require additional permissions on the controller service account. Additional permissions are outlined in the docs. |
| settings.isolatedVPC | bool | `false` | If true then assume we can't reach AWS services which don't have a VPC endpoint This also has the effect of disabling look-ups to the AWS pricing endpoint |
| settings.reservedENIs | string | `"0"` | Reserved ENIs are not included in the calculations for max-pods or kube-reserved This is most often used in the VPC CNI custom networking setup https://docs.aws.amazon.com/eks/latest/userguide/cni-custom-network.html |
Expand Down
11 changes: 0 additions & 11 deletions charts/karpenter/templates/webhooks-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,6 @@ webhooks:
failurePolicy: Fail
sideEffects: None
rules:
- apiGroups:
- karpenter.sh
apiVersions:
- v1alpha5
operations:
- CREATE
- UPDATE
resources:
- provisioners
- provisioners/status
scope: '*'
- apiGroups:
- karpenter.sh
apiVersions:
Expand Down
44 changes: 0 additions & 44 deletions charts/karpenter/templates/webhooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,6 @@ webhooks:
failurePolicy: Fail
sideEffects: None
rules:
- apiGroups:
- karpenter.k8s.aws
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- awsnodetemplates
- awsnodetemplates/status
scope: '*'
- apiGroups:
- karpenter.k8s.aws
apiVersions:
Expand All @@ -42,17 +31,6 @@ webhooks:
- ec2nodeclasses
- ec2nodeclasses/status
scope: '*'
- apiGroups:
- karpenter.sh
apiVersions:
- v1alpha5
operations:
- CREATE
- UPDATE
resources:
- provisioners
- provisioners/status
scope: '*'
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
Expand All @@ -75,17 +53,6 @@ webhooks:
failurePolicy: Fail
sideEffects: None
rules:
- apiGroups:
- karpenter.k8s.aws
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- awsnodetemplates
- awsnodetemplates/status
scope: '*'
- apiGroups:
- karpenter.k8s.aws
apiVersions:
Expand All @@ -97,15 +64,4 @@ webhooks:
- ec2nodeclasses
- ec2nodeclasses/status
scope: '*'
- apiGroups:
- karpenter.sh
apiVersions:
- v1alpha5
operations:
- CREATE
- UPDATE
resources:
- provisioners
- provisioners/status
scope: '*'
{{- end }}
4 changes: 1 addition & 3 deletions charts/karpenter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ affinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: karpenter.sh/provisioner-name
operator: DoesNotExist
- key: karpenter.sh/nodepool
operator: DoesNotExist
podAntiAffinity:
Expand Down Expand Up @@ -199,5 +197,5 @@ settings:
featureGates:
# -- drift is in BETA and is enabled by default.
# Setting drift to false disables the drift disruption method to watch for drift between currently deployed nodes
# and the desired state of nodes set in provisioners and node templates
# and the desired state of nodes set in nodepools and nodeclasses
drift: true
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ require (
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
knative.dev/pkg v0.0.0-20231010144348-ca8c009405dd
sigs.k8s.io/controller-runtime v0.16.3
sigs.k8s.io/karpenter v0.32.2-0.20231129204947-79dc3457680f
sigs.k8s.io/karpenter v0.32.2-0.20231205044115-1cf3df4ba3cc
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -761,8 +761,8 @@ sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigw
sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
sigs.k8s.io/karpenter v0.32.2-0.20231129204947-79dc3457680f h1:XFIp800IY0oJ0UQsp1zMbHih7dybqCqy+DzyVvxJKkY=
sigs.k8s.io/karpenter v0.32.2-0.20231129204947-79dc3457680f/go.mod h1:6FTggQw2OXqtUm2h2lTMlw/ej3TMvCmauOSYPQz/nWo=
sigs.k8s.io/karpenter v0.32.2-0.20231205044115-1cf3df4ba3cc h1:lkSGPb7CaayNByKoDJc3jxogAOuy1L0YM1N6G6PzwTQ=
sigs.k8s.io/karpenter v0.32.2-0.20231205044115-1cf3df4ba3cc/go.mod h1:7hPB7kdImFHAFp7pqPUqgBDOrh8GEcRnHT5uIlsXMKA=
sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk=
sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08=
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
Expand Down
22 changes: 6 additions & 16 deletions hack/docs/instancetypes_gen_docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ limitations under the License.
package main

import (
"bytes"
"context"
"encoding/json"
"flag"
"fmt"
"log"
Expand All @@ -34,17 +32,17 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/karpenter/pkg/apis/v1beta1"

coreoperator "sigs.k8s.io/karpenter/pkg/operator"
coreoptions "sigs.k8s.io/karpenter/pkg/operator/options"
coretest "sigs.k8s.io/karpenter/pkg/test"

awscloudprovider "github.com/aws/karpenter/pkg/cloudprovider"
"github.com/aws/karpenter/pkg/operator"
"github.com/aws/karpenter/pkg/operator/options"
"github.com/aws/karpenter/pkg/test"
"sigs.k8s.io/karpenter/pkg/apis/v1alpha5"
coreoperator "sigs.k8s.io/karpenter/pkg/operator"
coreoptions "sigs.k8s.io/karpenter/pkg/operator/options"
coretest "sigs.k8s.io/karpenter/pkg/test"

"github.com/aws/karpenter/pkg/apis/v1alpha1"
"sigs.k8s.io/karpenter/pkg/cloudprovider"
"sigs.k8s.io/karpenter/pkg/utils/resources"
)
Expand Down Expand Up @@ -100,14 +98,6 @@ func main() {
cp := awscloudprovider.New(op.InstanceTypesProvider, op.InstanceProvider,
op.EventRecorder, op.GetClient(), op.AMIProvider, op.SecurityGroupProvider, op.SubnetProvider)

provider := v1alpha1.AWS{SubnetSelector: map[string]string{
"*": "*",
}}
var buf bytes.Buffer
enc := json.NewEncoder(&buf)
if err := enc.Encode(provider); err != nil {
log.Fatalf("encoding provider, %s", err)
}
instanceTypes, err := cp.GetInstanceTypes(ctx, nil)
if err != nil {
log.Fatalf("listing instance types, %s", err)
Expand Down Expand Up @@ -156,7 +146,7 @@ below are the resources available with some assumptions and after the instance o

// we don't want to show a few labels that will vary amongst regions
delete(labelNameMap, v1.LabelTopologyZone)
delete(labelNameMap, v1alpha5.LabelCapacityType)
delete(labelNameMap, v1beta1.CapacityTypeLabelKey)

labelNames := lo.Keys(labelNameMap)

Expand Down
2 changes: 1 addition & 1 deletion hack/docs/metrics_gen_docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func getMetricsFromPackages(packages ...*ast.Package) []metricInfo {

func bySubsystem(metrics []metricInfo) func(i int, j int) bool {
subSystemSortOrder := map[string]int{}
subSystemSortOrder["provisioner"] = 1
subSystemSortOrder["nodepool"] = 1
subSystemSortOrder["nodes"] = 2
subSystemSortOrder["pods"] = 3
subSystemSortOrder["cloudprovider"] = 4
Expand Down
119 changes: 0 additions & 119 deletions pkg/apis/v1alpha1/awsnodetemplate.go

This file was deleted.

23 changes: 0 additions & 23 deletions pkg/apis/v1alpha1/awsnodetemplate_defaults.go

This file was deleted.

Loading