Skip to content

Commit 3c15eaa

Browse files
committed
Update resource model
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent 06daf42 commit 3c15eaa

8 files changed

Lines changed: 167 additions & 29 deletions

File tree

charts/ace/values.openapiv3_schema.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22912,6 +22912,19 @@ properties:
2291222912
- account
2291322913
- key
2291422914
type: object
22915+
cloudflareStorage:
22916+
properties:
22917+
accessKeyID:
22918+
type: string
22919+
accountID:
22920+
type: string
22921+
secretAccessKey:
22922+
type: string
22923+
required:
22924+
- accessKeyID
22925+
- accountID
22926+
- secretAccessKey
22927+
type: object
2291522928
digitalocean:
2291622929
properties:
2291722930
token:
@@ -22955,6 +22968,16 @@ properties:
2295522968
- sshKeyName
2295622969
- token
2295722970
type: object
22971+
hetznerStorage:
22972+
properties:
22973+
accessKeyID:
22974+
type: string
22975+
secretAccessKey:
22976+
type: string
22977+
required:
22978+
- accessKeyID
22979+
- secretAccessKey
22980+
type: object
2295822981
linode:
2295922982
properties:
2296022983
token:
@@ -23027,9 +23050,12 @@ properties:
2302723050
- Aws
2302823051
- Azure
2302923052
- AzureStorage
23053+
- CloudflareStorage
2303023054
- DigitalOcean
2303123055
- GoogleCloud
2303223056
- GoogleOAuth
23057+
- Hetzner
23058+
- HetznerStorage
2303323059
- Linode
2303423060
- Packet
2303523061
- Rancher

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ go 1.22.1
55
toolchain go1.22.4
66

77
require (
8-
go.bytebuilders.dev/catalog v0.0.9-0.20241101041605-ab39ff338b5b
9-
go.bytebuilders.dev/resource-model v0.1.0
8+
go.bytebuilders.dev/catalog v0.0.9-0.20241101051142-7ce8d8418689
9+
go.bytebuilders.dev/resource-model v0.1.1-0.20241023004602-2c43ef3bb37b
1010
go.bytebuilders.dev/ui-wizards v0.8.0
1111
go.openviz.dev/installer v0.0.0-20240731074805-a62b13eaedb0
1212
gomodules.xyz/go-sh v0.1.0

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,10 @@ github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=
196196
github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
197197
go.appscode.dev/alerts v0.2.1-0.20240604101218-3069fbd7c6b8 h1:7FP18GEp6Jm0OUt5lsS9HjVitmiU9zZ5wVQwgU+Y23g=
198198
go.appscode.dev/alerts v0.2.1-0.20240604101218-3069fbd7c6b8/go.mod h1:5+qwuxF78YiFg/CEGfgfXREj7KEJYLgQeFhke4+lQ8k=
199-
go.bytebuilders.dev/catalog v0.0.9-0.20241101041605-ab39ff338b5b h1:4vrCMpW1wvNnq7VW8ngC31blVVtF3PoKPl35AlhidYw=
200-
go.bytebuilders.dev/catalog v0.0.9-0.20241101041605-ab39ff338b5b/go.mod h1:/3VYfJPJg3mA++N2at3tmXX5c1vZWsoH2qgEkieTSr8=
201-
go.bytebuilders.dev/resource-model v0.1.0 h1:ES4ygNqmKt+dyAi/tFM0oHcqiHqqnZbafxHWPohVcQc=
202-
go.bytebuilders.dev/resource-model v0.1.0/go.mod h1:/uMIfxqPIrDmiYWA28OW3xzogijxpwkicR4kK7jam9g=
199+
go.bytebuilders.dev/catalog v0.0.9-0.20241101051142-7ce8d8418689 h1:pqBzDlXCngyDuKdb0y4N3k8kmWzAS6rrKpQj6imlE7M=
200+
go.bytebuilders.dev/catalog v0.0.9-0.20241101051142-7ce8d8418689/go.mod h1:/3VYfJPJg3mA++N2at3tmXX5c1vZWsoH2qgEkieTSr8=
201+
go.bytebuilders.dev/resource-model v0.1.1-0.20241023004602-2c43ef3bb37b h1:loq3wv7NQY9givjW8djFMqe/1d+8j2wE4k5hueDIWC0=
202+
go.bytebuilders.dev/resource-model v0.1.1-0.20241023004602-2c43ef3bb37b/go.mod h1:/uMIfxqPIrDmiYWA28OW3xzogijxpwkicR4kK7jam9g=
203203
go.bytebuilders.dev/ui-wizards v0.8.0 h1:7hute2GVoidjP6wcI78kyUV/x2Lhpw4VodFCZpFE6Lc=
204204
go.bytebuilders.dev/ui-wizards v0.8.0/go.mod h1:tuKPXHNlnHLJiiV5bfPabnjQshiqIqkJ1qw6k9ctgak=
205205
go.openviz.dev/installer v0.0.0-20240731074805-a62b13eaedb0 h1:zA5/psft6xJPNZZfDh7VpOlEEzqVOWoLQlXRFyOeyjc=

schema/ace-options/values.openapiv3_schema.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,19 @@ properties:
10261026
- account
10271027
- key
10281028
type: object
1029+
cloudflareStorage:
1030+
properties:
1031+
accessKeyID:
1032+
type: string
1033+
accountID:
1034+
type: string
1035+
secretAccessKey:
1036+
type: string
1037+
required:
1038+
- accessKeyID
1039+
- accountID
1040+
- secretAccessKey
1041+
type: object
10291042
digitalocean:
10301043
properties:
10311044
token:
@@ -1069,6 +1082,16 @@ properties:
10691082
- sshKeyName
10701083
- token
10711084
type: object
1085+
hetznerStorage:
1086+
properties:
1087+
accessKeyID:
1088+
type: string
1089+
secretAccessKey:
1090+
type: string
1091+
required:
1092+
- accessKeyID
1093+
- secretAccessKey
1094+
type: object
10721095
linode:
10731096
properties:
10741097
token:
@@ -1141,9 +1164,12 @@ properties:
11411164
- Aws
11421165
- Azure
11431166
- AzureStorage
1167+
- CloudflareStorage
11441168
- DigitalOcean
11451169
- GoogleCloud
11461170
- GoogleOAuth
1171+
- Hetzner
1172+
- HetznerStorage
11471173
- Linode
11481174
- Packet
11491175
- Rancher

vendor/go.bytebuilders.dev/resource-model/apis/cloud/v1alpha1/credential_types.go

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,25 @@ const (
2626
ResourceCredentials = "credentials"
2727
)
2828

29-
// +kubebuilder:validation:Enum=Aws;Azure;AzureStorage;DigitalOcean;GoogleCloud;GoogleOAuth;Linode;Packet;Rancher;Scaleway;Vultr;Swift;Hetzner
29+
// +kubebuilder:validation:Enum=Aws;Azure;AzureStorage;CloudflareStorage;DigitalOcean;GoogleCloud;GoogleOAuth;Hetzner;HetznerStorage;Linode;Packet;Rancher;Scaleway;Vultr;Swift;Hetzner
3030
type CredentialType string
3131

3232
const (
33-
CredentialTypeAWS CredentialType = "Aws"
34-
CredentialTypeAzure CredentialType = "Azure"
35-
CredentialTypeAzureStorage CredentialType = "AzureStorage"
36-
CredentialTypeDigitalOcean CredentialType = "DigitalOcean"
37-
CredentialTypeGoogleCloud CredentialType = "GoogleCloud"
38-
CredentialTypeGoogleOAuth CredentialType = "GoogleOAuth"
39-
CredentialTypeLinode CredentialType = "Linode"
40-
CredentialTypePacket CredentialType = "Packet"
41-
CredentialTypeRancher CredentialType = "Rancher"
42-
CredentialTypeScaleway CredentialType = "Scaleway"
43-
CredentialTypeVultr CredentialType = "Vultr"
44-
CredentialTypeSwift CredentialType = "Swift"
45-
CredentialTypeHetzner CredentialType = "Hetzner"
33+
CredentialTypeAWS CredentialType = "Aws"
34+
CredentialTypeAzure CredentialType = "Azure"
35+
CredentialTypeAzureStorage CredentialType = "AzureStorage"
36+
CredentialTypeCloudflareStorage CredentialType = "CloudflareStorage"
37+
CredentialTypeDigitalOcean CredentialType = "DigitalOcean"
38+
CredentialTypeGoogleCloud CredentialType = "GoogleCloud"
39+
CredentialTypeGoogleOAuth CredentialType = "GoogleOAuth"
40+
CredentialTypeHetzner CredentialType = "Hetzner"
41+
CredentialTypeHetznerStorage CredentialType = "HetznerStorage"
42+
CredentialTypeLinode CredentialType = "Linode"
43+
CredentialTypePacket CredentialType = "Packet"
44+
CredentialTypeRancher CredentialType = "Rancher"
45+
CredentialTypeScaleway CredentialType = "Scaleway"
46+
CredentialTypeVultr CredentialType = "Vultr"
47+
CredentialTypeSwift CredentialType = "Swift"
4648
)
4749

4850
// +genclient
@@ -72,12 +74,18 @@ type CredentialSpec struct {
7274
//+optional
7375
AzureStorage *AzureStorageCredential `json:"azureStorage,omitempty"`
7476
//+optional
77+
CloudflareStorage *CloudflareStorageCredential `json:"cloudflareStorage,omitempty"`
78+
//+optional
7579
DigitalOcean *DigitalOceanCredential `json:"digitalocean,omitempty"`
7680
//+optional
7781
GoogleCloud *GoogleCloudCredential `json:"googleCloud,omitempty"`
7882
//+optional
7983
GoogleOAuth *GoogleOAuthCredential `json:"googleOAuth,omitempty"`
8084
//+optional
85+
Hetzner *HetznerCredential `json:"hetzner,omitempty"`
86+
//+optional
87+
HetznerStorage *HetznerStorageCredential `json:"hetznerStorage,omitempty"`
88+
//+optional
8189
Linode *LinodeCredential `json:"linode,omitempty"`
8290
//+optional
8391
Packet *PacketCredential `json:"packet,omitempty"`
@@ -89,8 +97,6 @@ type CredentialSpec struct {
8997
Swift *SwiftCredential `json:"swift,omitempty"`
9098
//+optional
9199
Vultr *VultrCredential `json:"vultr,omitempty"`
92-
//+optional
93-
Hetzner *HetznerCredential `json:"hetzner,omitempty"`
94100
}
95101

96102
type GoogleOAuthCredential struct {
@@ -163,11 +169,23 @@ type SwiftCredential struct {
163169
TenantId string `json:"tenantID,omitempty"`
164170
TenantDomain string `json:"tenantDomain,omitempty"`
165171
}
172+
166173
type HetznerCredential struct {
167174
SSHKeyName string `json:"sshKeyName"`
168175
Token string `json:"token"`
169176
}
170177

178+
type HetznerStorageCredential struct {
179+
AccessKeyID string `json:"accessKeyID"`
180+
SecretAccessKey string `json:"secretAccessKey"`
181+
}
182+
183+
type CloudflareStorageCredential struct {
184+
AccountID string `json:"accountID"`
185+
AccessKeyID string `json:"accessKeyID"`
186+
SecretAccessKey string `json:"secretAccessKey"`
187+
}
188+
171189
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
172190
// +kubebuilder:object:root=true
173191
type CredentialList struct {

vendor/go.bytebuilders.dev/resource-model/apis/cloud/v1alpha1/zz_generated.deepcopy.go

Lines changed: 47 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/go.bytebuilders.dev/resource-model/crds/cloud.appscode.com_credentials.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,19 @@ spec:
7474
- account
7575
- key
7676
type: object
77+
cloudflareStorage:
78+
properties:
79+
accessKeyID:
80+
type: string
81+
accountID:
82+
type: string
83+
secretAccessKey:
84+
type: string
85+
required:
86+
- accessKeyID
87+
- accountID
88+
- secretAccessKey
89+
type: object
7790
digitalocean:
7891
properties:
7992
token:
@@ -117,6 +130,16 @@ spec:
117130
- sshKeyName
118131
- token
119132
type: object
133+
hetznerStorage:
134+
properties:
135+
accessKeyID:
136+
type: string
137+
secretAccessKey:
138+
type: string
139+
required:
140+
- accessKeyID
141+
- secretAccessKey
142+
type: object
120143
linode:
121144
properties:
122145
token:
@@ -189,9 +212,12 @@ spec:
189212
- Aws
190213
- Azure
191214
- AzureStorage
215+
- CloudflareStorage
192216
- DigitalOcean
193217
- GoogleCloud
194218
- GoogleOAuth
219+
- Hetzner
220+
- HetznerStorage
195221
- Linode
196222
- Packet
197223
- Rancher

vendor/modules.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,10 @@ github.com/zeebo/xxh3
267267
## explicit; go 1.22.0
268268
go.appscode.dev/alerts/apis/alerts
269269
go.appscode.dev/alerts/apis/alerts/v1alpha1
270-
# go.bytebuilders.dev/catalog v0.0.9-0.20241101041605-ab39ff338b5b
270+
# go.bytebuilders.dev/catalog v0.0.9-0.20241101051142-7ce8d8418689
271271
## explicit; go 1.22.1
272272
go.bytebuilders.dev/catalog/api/gateway/v1alpha1
273-
# go.bytebuilders.dev/resource-model v0.1.0
273+
# go.bytebuilders.dev/resource-model v0.1.1-0.20241023004602-2c43ef3bb37b
274274
## explicit; go 1.22.1
275275
go.bytebuilders.dev/resource-model/apis/cloud
276276
go.bytebuilders.dev/resource-model/apis/cloud/v1alpha1

0 commit comments

Comments
 (0)