Skip to content

Commit

Permalink
Removes the v1alpha1 apis directory
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis committed Dec 5, 2023
1 parent fbdb621 commit df67b52
Show file tree
Hide file tree
Showing 48 changed files with 64 additions and 3,705 deletions.
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
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

0 comments on commit df67b52

Please sign in to comment.