Skip to content

Commit

Permalink
switch to v1alpha1 (#51)
Browse files Browse the repository at this point in the history
* switch to v1alpha1

Signed-off-by: Matthew Fisher <matt.fisher@fermyon.com>

* update spin-operator and other dependencies

Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>

---------

Signed-off-by: Matthew Fisher <matt.fisher@fermyon.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Co-authored-by: Rajat Jindal <rajatjindal83@gmail.com>
  • Loading branch information
bacongobbler and rajatjindal committed Mar 8, 2024
1 parent 342ad63 commit 4fd7a1d
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 52 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Use the secret when scaffolding the SpinApp
```sh
$) spin kube scaffold --from bacongobbler/hello-rust:latest --image-pull-secret registry-credentials

apiVersion: core.spinoperator.dev/v1
apiVersion: core.spinoperator.dev/v1alpha1
kind: SpinApp
metadata:
name: hello-rust
Expand Down
20 changes: 10 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ require (
github.com/pelletier/go-toml/v2 v2.1.1
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/spinkube/spin-operator v0.0.0-20240202155520-0b092c8f1da2
github.com/stretchr/testify v1.8.4
k8s.io/api v0.29.1
k8s.io/apimachinery v0.29.1
github.com/spinkube/spin-operator v0.0.0-20240307184318-f7068bc8c1b2
github.com/stretchr/testify v1.9.0
k8s.io/api v0.29.2
k8s.io/apimachinery v0.29.2
k8s.io/cli-runtime v0.29.1
k8s.io/client-go v0.29.1
k8s.io/client-go v0.29.2
k8s.io/kubectl v0.29.1
sigs.k8s.io/controller-runtime v0.17.0
sigs.k8s.io/controller-runtime v0.17.2
)

require (
Expand Down Expand Up @@ -70,11 +70,11 @@ require (
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
go.starlark.net v0.0.0-20231121155337-90ade8b19d09 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/oauth2 v0.16.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/oauth2 v0.17.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.16.0 // indirect
golang.org/x/sys v0.17.0 // indirect
golang.org/x/term v0.17.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
Expand Down
42 changes: 22 additions & 20 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -137,19 +137,21 @@ github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spinkube/spin-operator v0.0.0-20240202155520-0b092c8f1da2 h1:hsmrFFmJjvIv20wj80HCR46ZxM+j/tAhxRCboTzzpsE=
github.com/spinkube/spin-operator v0.0.0-20240202155520-0b092c8f1da2/go.mod h1:g/WVbgqSjaQOK82Sx0JQ4/vhZ78tr2mThOgG4qO7rDc=
github.com/spinkube/spin-operator v0.0.0-20240307184318-f7068bc8c1b2 h1:XVHwdmjtd97l9G4cziRMMUOzYpgvETDP54TPrZXeqlY=
github.com/spinkube/spin-operator v0.0.0-20240307184318-f7068bc8c1b2/go.mod h1:N5ddjURPNccdnGl/Pqy5GtWFMGAKy6fYjDOP0xgB7cQ=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ=
github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down Expand Up @@ -178,10 +180,10 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ=
golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o=
golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ=
golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand All @@ -198,12 +200,12 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE=
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
Expand Down Expand Up @@ -242,16 +244,16 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
k8s.io/api v0.29.1 h1:DAjwWX/9YT7NQD4INu49ROJuZAAAP/Ijki48GUPzxqw=
k8s.io/api v0.29.1/go.mod h1:7Kl10vBRUXhnQQI8YR/R327zXC8eJ7887/+Ybta+RoQ=
k8s.io/api v0.29.2 h1:hBC7B9+MU+ptchxEqTNW2DkUosJpp1P+Wn6YncZ474A=
k8s.io/api v0.29.2/go.mod h1:sdIaaKuU7P44aoyyLlikSLayT6Vb7bvJNCX105xZXY0=
k8s.io/apiextensions-apiserver v0.29.0 h1:0VuspFG7Hj+SxyF/Z/2T0uFbI5gb5LRgEyUVE3Q4lV0=
k8s.io/apiextensions-apiserver v0.29.0/go.mod h1:TKmpy3bTS0mr9pylH0nOt/QzQRrW7/h7yLdRForMZwc=
k8s.io/apimachinery v0.29.1 h1:KY4/E6km/wLBguvCZv8cKTeOwwOBqFNjwJIdMkMbbRc=
k8s.io/apimachinery v0.29.1/go.mod h1:6HVkd1FwxIagpYrHSwJlQqZI3G9LfYWRPAkUvLnXTKU=
k8s.io/apimachinery v0.29.2 h1:EWGpfJ856oj11C52NRCHuU7rFDwxev48z+6DSlGNsV8=
k8s.io/apimachinery v0.29.2/go.mod h1:6HVkd1FwxIagpYrHSwJlQqZI3G9LfYWRPAkUvLnXTKU=
k8s.io/cli-runtime v0.29.1 h1:By3WVOlEWYfyxhGko0f/IuAOLQcbBSMzwSaDren2JUs=
k8s.io/cli-runtime v0.29.1/go.mod h1:vjEY9slFp8j8UoMhV5AlO8uulX9xk6ogfIesHobyBDU=
k8s.io/client-go v0.29.1 h1:19B/+2NGEwnFLzt0uB5kNJnfTsbV8w6TgQRz9l7ti7A=
k8s.io/client-go v0.29.1/go.mod h1:TDG/psL9hdet0TI9mGyHJSgRkW3H9JZk2dNEUS7bRks=
k8s.io/client-go v0.29.2 h1:FEg85el1TeZp+/vYJM7hkDlSTFZ+c5nnK44DJ4FyoRg=
k8s.io/client-go v0.29.2/go.mod h1:knlvFZE58VpqbQpJNbCbctTVXcd35mMyAAwBdpt4jrA=
k8s.io/component-base v0.29.1 h1:MUimqJPCRnnHsskTTjKD+IC1EHBbRCVyi37IoFBrkYw=
k8s.io/component-base v0.29.1/go.mod h1:fP9GFjxYrLERq1GcWWZAE3bqbNcDKDytn2srWuHTtKc=
k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw=
Expand All @@ -262,8 +264,8 @@ k8s.io/kubectl v0.29.1 h1:rWnW3hi/rEUvvg7jp4iYB68qW5un/urKbv7fu3Vj0/s=
k8s.io/kubectl v0.29.1/go.mod h1:SZzvLqtuOJYSvZzPZR9weSuP0wDQ+N37CENJf0FhDF4=
k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ=
k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/controller-runtime v0.17.0 h1:fjJQf8Ukya+VjogLO6/bNX9HE6Y2xpsO5+fyS26ur/s=
sigs.k8s.io/controller-runtime v0.17.0/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s=
sigs.k8s.io/controller-runtime v0.17.2 h1:FwHwD1CTUemg0pW2otk7/U5/i5m2ymzvOXdbeGOUvw0=
sigs.k8s.io/controller-runtime v0.17.2/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s=
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/kustomize/api v0.16.0 h1:/zAR4FOQDCkgSDmVzV2uiFbuy9bhu3jEzthrHCuvm1g=
Expand Down
8 changes: 4 additions & 4 deletions pkg/cmd/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"

"github.com/spf13/cobra"
spinv1 "github.com/spinkube/spin-operator/api/v1"
spinv1alpha1 "github.com/spinkube/spin-operator/api/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/cli-runtime/pkg/printers"
)
Expand All @@ -27,16 +27,16 @@ var deployCmd = &cobra.Command{
referenceParts := strings.Split(reference, "/")
name := referenceParts[len(referenceParts)-1]

spinapp := spinv1.SpinApp{
spinapp := spinv1alpha1.SpinApp{
ObjectMeta: metav1.ObjectMeta{
Name: name,
Namespace: namespace,
},
TypeMeta: metav1.TypeMeta{
APIVersion: "core.spinoperator.dev/v1",
APIVersion: "core.spinoperator.dev/v1alpha1",
Kind: "SpinApp",
},
Spec: spinv1.SpinAppSpec{
Spec: spinv1alpha1.SpinAppSpec{
Replicas: replicas,
Image: artifact,
Executor: "containerd-shim-spin",
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"os"

spinv1 "github.com/spinkube/spin-operator/api/v1"
spinv1alpha1 "github.com/spinkube/spin-operator/api/v1alpha1"
"k8s.io/apimachinery/pkg/runtime"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/cli-runtime/pkg/genericclioptions"
Expand All @@ -22,7 +22,7 @@ func NewCommandFactory() (cmdutil.Factory, genericclioptions.IOStreams) {
func getRuntimeClient() (client.Client, error) {
var scheme = runtime.NewScheme()
utilruntime.Must(clientgoscheme.AddToScheme(scheme))
utilruntime.Must(spinv1.AddToScheme(scheme))
utilruntime.Must(spinv1alpha1.AddToScheme(scheme))

config, err := configFlags.ToRESTConfig()
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"io"

"github.com/gosuri/uitable"
spinv1 "github.com/spinkube/spin-operator/api/v1"
spinv1alpha1 "github.com/spinkube/spin-operator/api/v1alpha1"
)

func printApps(w io.Writer, apps ...spinv1.SpinApp) {
func printApps(w io.Writer, apps ...spinv1alpha1.SpinApp) {
table := uitable.New()
table.MaxColWidth = 50
table.AddRow("NAMESPACE", "NAME", "EXECUTOR", "READY")
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/scaffold.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ type appConfig struct {
TargetMemoryUtilizationPercentage int32
}

var manifestStr = `apiVersion: core.spinoperator.dev/v1
var manifestStr = `apiVersion: core.spinoperator.dev/v1alpha1
kind: SpinApp
metadata:
name: {{ .Name }}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/testdata/multiple_image_secrets.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: core.spinoperator.dev/v1
apiVersion: core.spinoperator.dev/v1alpha1
kind: SpinApp
metadata:
name: example-app
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/testdata/one_image_secret.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: core.spinoperator.dev/v1
apiVersion: core.spinoperator.dev/v1alpha1
kind: SpinApp
metadata:
name: example-app
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/testdata/scaffold_image.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: core.spinoperator.dev/v1
apiVersion: core.spinoperator.dev/v1alpha1
kind: SpinApp
metadata:
name: example-app
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/testdata/scaffold_runtime_config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: core.spinoperator.dev/v1
apiVersion: core.spinoperator.dev/v1alpha1
kind: SpinApp
metadata:
name: example-app
Expand Down
16 changes: 8 additions & 8 deletions pkg/kube/spin.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"os"

spinv1 "github.com/spinkube/spin-operator/api/v1"
spinv1alpha1 "github.com/spinkube/spin-operator/api/v1alpha1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/cli-runtime/pkg/genericclioptions"
Expand All @@ -32,19 +32,19 @@ func New(kubeclient client.Client, configFlags *genericclioptions.ConfigFlags) *

// ListSpinApps returns all resources of type SpinApp in the given namespace. If namespace is the empty string, it
// returns all SpinApp resources across all namespaces.
func (i *Impl) ListSpinApps(ctx context.Context, namespace string) (spinv1.SpinAppList, error) {
var spinAppList spinv1.SpinAppList
func (i *Impl) ListSpinApps(ctx context.Context, namespace string) (spinv1alpha1.SpinAppList, error) {
var spinAppList spinv1alpha1.SpinAppList
err := i.kubeclient.List(ctx, &spinAppList, &client.ListOptions{
Namespace: namespace,
})
if err != nil {
return spinv1.SpinAppList{}, err
return spinv1alpha1.SpinAppList{}, err
}

return spinAppList, nil
}

func (i *Impl) ApplySpinApp(ctx context.Context, app *spinv1.SpinApp) error {
func (i *Impl) ApplySpinApp(ctx context.Context, app *spinv1alpha1.SpinApp) error {
patchMethod := client.Apply
patchOptions := &client.PatchOptions{
Force: ptr(true),
Expand All @@ -54,11 +54,11 @@ func (i *Impl) ApplySpinApp(ctx context.Context, app *spinv1.SpinApp) error {
return i.kubeclient.Patch(ctx, app, patchMethod, patchOptions)
}

func (i *Impl) GetSpinApp(ctx context.Context, name client.ObjectKey) (spinv1.SpinApp, error) {
var app spinv1.SpinApp
func (i *Impl) GetSpinApp(ctx context.Context, name client.ObjectKey) (spinv1alpha1.SpinApp, error) {
var app spinv1alpha1.SpinApp
err := i.kubeclient.Get(ctx, name, &app)
if err != nil {
return spinv1.SpinApp{}, err
return spinv1alpha1.SpinApp{}, err
}

return app, nil
Expand Down

0 comments on commit 4fd7a1d

Please sign in to comment.