Skip to content

Commit

Permalink
Provider Abstraction (#18)
Browse files Browse the repository at this point in the history
Remove all the unneeded crap before abstracting the provider interface.
There is a whole heap of openstack specific stuff that shouldn't be
surfaced and delegated to the provider.  Adds in caching and moves a
bunch of stuff into core for sharing and caring.
  • Loading branch information
spjmurray authored Mar 8, 2024
1 parent b4be16b commit 3cebc00
Show file tree
Hide file tree
Showing 46 changed files with 996 additions and 4,311 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ spec:
scope: Cluster
versions:
- additionalPrinterColumns:
- jsonPath: .spec.kind
name: kind
type: string
- jsonPath: .spec.version
name: version
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ spec:
scope: Cluster
versions:
- additionalPrinterColumns:
- jsonPath: .spec.kind
name: kind
type: string
- jsonPath: .spec.version
name: version
type: string
Expand Down
22 changes: 7 additions & 15 deletions charts/unikorn/crds/unikorn-cloud.org_kubernetesclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -287,20 +287,13 @@ spec:
description: ServerGroupID sets the server group of the control
plane in order to maintain anti-affinity rules.
type: string
version:
description: Version is the Kubernetes version to install. For
performance reasons this should match what is already pre-installed
on the provided image.
pattern: ^v(?:[0-9]+\.){2}(?:[0-9]+)$
type: string
volumeFailureDomain:
description: VolumeFailureDomain allows the volume failure domain
to be set on a per machine deployment basis.
type: string
required:
- flavor
- image
- version
type: object
features:
description: Features defines add-on features that can be enabled
Expand Down Expand Up @@ -404,14 +397,19 @@ spec:
- cloud
- cloudConfig
- externalNetworkId
- failureDomain
type: object
pause:
description: Pause, if true, will inhibit reconciliation.
type: boolean
region:
description: Region to provision the cluster in.
type: string
version:
description: Version is the Kubernetes version to install. For performance
reasons this should match what is already pre-installed on the provided
image.
pattern: ^v(?:[0-9]+\.){2}(?:[0-9]+)$
type: string
workloadPools:
description: WorkloadPools defines the workload cluster topology.
properties:
Expand Down Expand Up @@ -545,12 +543,6 @@ spec:
description: ServerGroupID sets the server group of the
control plane in order to maintain anti-affinity rules.
type: string
version:
description: Version is the Kubernetes version to install. For
performance reasons this should match what is already
pre-installed on the provided image.
pattern: ^v(?:[0-9]+\.){2}(?:[0-9]+)$
type: string
volumeFailureDomain:
description: VolumeFailureDomain allows the volume failure
domain to be set on a per machine deployment basis.
Expand All @@ -559,7 +551,6 @@ spec:
- flavor
- image
- name
- version
type: object
type: array
type: object
Expand All @@ -569,6 +560,7 @@ spec:
- network
- openstack
- region
- version
- workloadPools
type: object
status:
Expand Down
2 changes: 1 addition & 1 deletion charts/unikorn/templates/region.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ spec:
{{ printf "gpuDescriptors:" | nindent 6 }}
{{- range $descriptor := $descriptors }}
{{ printf "- property: %s" $descriptor.property | nindent 6 }}
{{ printf "expresison: %s" $descriptor.property | nindent 8 }}
{{ printf " expression: %s" $descriptor.expression | nindent 6 }}
{{- end }}
{{- end }}
{{- end }}
Expand Down
15 changes: 6 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,21 @@ module github.com/unikorn-cloud/unikorn
go 1.21.1

require (
github.com/coreos/go-oidc/v3 v3.9.0
github.com/deepmap/oapi-codegen v1.16.2
github.com/getkin/kin-openapi v0.123.0
github.com/go-chi/chi/v5 v5.0.11
github.com/go-logr/logr v1.4.1
github.com/google/uuid v1.6.0
github.com/gophercloud/gophercloud v1.9.0
github.com/gophercloud/utils v0.0.0-20231010081019-80377eca5d56
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/prometheus/client_golang v1.18.0
github.com/spdx/tools-golang v0.5.3
github.com/spf13/pflag v1.0.5
github.com/unikorn-cloud/core v0.1.4
github.com/unikorn-cloud/identity v0.1.3
go.opentelemetry.io/otel v1.22.0
github.com/unikorn-cloud/core v0.1.8
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0
go.opentelemetry.io/otel/sdk v1.22.0
go.opentelemetry.io/otel/trace v1.22.0
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a
go.opentelemetry.io/otel/trace v1.24.0
gopkg.in/ini.v1 v1.67.0
k8s.io/api v0.29.1
k8s.io/apimachinery v0.29.1
Expand Down Expand Up @@ -49,6 +45,7 @@ require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
github.com/chenzhuoyu/iasm v0.9.1 // indirect
github.com/coreos/go-oidc/v3 v3.9.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.11.2 // indirect
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
Expand Down Expand Up @@ -107,7 +104,6 @@ require (
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/microcosm-cc/bluemonday v1.0.26 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/moby/term v0.5.0 // indirect
Expand Down Expand Up @@ -138,13 +134,14 @@ require (
github.com/xlab/treeprint v1.2.0 // indirect
github.com/yosssi/ace v0.0.5 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 // indirect
go.opentelemetry.io/otel/metric v1.22.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.1.0 // indirect
go.starlark.net v0.0.0-20240123142251-f86470692795 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/arch v0.7.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/oauth2 v0.16.0 // indirect
golang.org/x/sync v0.6.0 // indirect
Expand Down
Loading

0 comments on commit 3cebc00

Please sign in to comment.