Skip to content

Commit

Permalink
Drop alpha settings from code and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis committed Nov 28, 2023
1 parent 051861d commit 7e6c16f
Show file tree
Hide file tree
Showing 45 changed files with 333 additions and 1,190 deletions.
1 change: 0 additions & 1 deletion charts/karpenter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ spec:
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
checksum/settings: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
2 changes: 2 additions & 0 deletions charts/karpenter/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ rules:
resources: ["configmaps", "namespaces", "secrets"]
verbs: ["get", "list", "watch"]
# Write
{{- if .Values.webhook.enabled }}
- apiGroups: [""]
resources: ["secrets"]
verbs: ["update"]
resourceNames: ["{{ include "karpenter.fullname" . }}-cert"]
{{- end }}
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["update", "patch", "delete"]
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ require (
sigs.k8s.io/karpenter v0.32.2-0.20231128022149-cd7c3057c6ad
)

replace sigs.k8s.io/karpenter => github.com/jonathan-innis/karpenter-core v0.0.0-20231128041504-222b6be04111

require (
contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d // indirect
contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ 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-20231128041504-222b6be04111 h1:4IF8HQHgmN1YYaHRmy5bBdNRXLPDb9jt+nyFout6VSc=
github.com/jonathan-innis/karpenter-core v0.0.0-20231128041504-222b6be04111/go.mod h1:6FTggQw2OXqtUm2h2lTMlw/ej3TMvCmauOSYPQz/nWo=
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=
Expand Down Expand Up @@ -761,8 +763,6 @@ 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.20231128022149-cd7c3057c6ad h1:HBfGLlcoZ3Z+NxVAtIDOo6HSrmLyjHYNsQz16/LkAko=
sigs.k8s.io/karpenter v0.32.2-0.20231128022149-cd7c3057c6ad/go.mod h1:6FTggQw2OXqtUm2h2lTMlw/ej3TMvCmauOSYPQz/nWo=
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
3 changes: 0 additions & 3 deletions hack/docs/instancetypes_gen_docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/fake"
"sigs.k8s.io/controller-runtime/pkg/manager"

"github.com/aws/karpenter/pkg/apis/settings"
awscloudprovider "github.com/aws/karpenter/pkg/cloudprovider"
"github.com/aws/karpenter/pkg/operator"
"github.com/aws/karpenter/pkg/operator/options"
Expand Down Expand Up @@ -93,8 +92,6 @@ func main() {
ClusterEndpoint: lo.ToPtr("https://docs-gen.aws"),
IsolatedVPC: lo.ToPtr(true), // disable pricing lookup
}))
// TODO @joinnis: Remove this when dropping alpha support
ctx = settings.ToContext(ctx, test.Settings())

ctx, op := operator.NewOperator(ctx, &coreoperator.Operator{
Manager: &FakeManager{},
Expand Down
3 changes: 0 additions & 3 deletions pkg/apis/apis.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ import (
v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
"k8s.io/apimachinery/pkg/runtime"

"github.com/aws/karpenter/pkg/apis/settings"
"github.com/aws/karpenter/pkg/apis/v1beta1"

"github.com/samber/lo"

"sigs.k8s.io/karpenter/pkg/apis"
coresettings "sigs.k8s.io/karpenter/pkg/apis/settings"
"sigs.k8s.io/karpenter/pkg/utils/functional"
)

Expand All @@ -38,7 +36,6 @@ var (
)
// AddToScheme may be used to add all resources defined in the project to a Scheme
AddToScheme = Builder.AddToScheme
Settings = []coresettings.Injectable{&settings.Settings{}}
)

//go:generate controller-gen crd object:headerFile="../../hack/boilerplate.go.txt" paths="./..." output:crd:artifacts:config=crds
Expand Down
139 changes: 0 additions & 139 deletions pkg/apis/settings/settings.go

This file was deleted.

80 changes: 0 additions & 80 deletions pkg/apis/settings/settings_validation.go

This file was deleted.

Loading

0 comments on commit 7e6c16f

Please sign in to comment.