Skip to content

Commit

Permalink
Update ProviderConfig version
Browse files Browse the repository at this point in the history
Signed-off-by: Zheng Xi Zhou <[email protected]>
  • Loading branch information
zzxwill committed Jun 25, 2021
1 parent c4887d6 commit 0ecf797
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 60 deletions.
2 changes: 1 addition & 1 deletion apis/sls/v1alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ var (

func init() {
SchemeBuilder.Register(&Project{}, &ProjectList{})
SchemeBuilder.Register(&LogStore{}, &StoreList{})
SchemeBuilder.Register(&LogStore{}, &LogStoreList{})
}
4 changes: 2 additions & 2 deletions apis/sls/v1alpha1/logstore_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ type LogStore struct {

// +kubebuilder:object:root=true

// StoreList contains a list of LogStore
type StoreList struct {
// LogStoreList contains a list of LogStore
type LogStoreList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []LogStore `json:"items"`
Expand Down
64 changes: 32 additions & 32 deletions apis/sls/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions apis/sls/v1alpha1/zz_generated.managedlist.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/v1beta1/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ limitations under the License.
// Package v1beta1 contains the core resources of the Alibaba Cloud.
// +kubebuilder:object:generate=true
// +groupName=alibaba.crossplane.io
// +versionName=v1alpha1
// +versionName=v1beta1
package v1beta1
2 changes: 1 addition & 1 deletion apis/v1beta1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
// Package type metadata.
const (
Group = "alibaba.crossplane.io"
Version = "v1alpha1"
Version = "v1beta1"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion examples/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: crossplane-system

---
apiVersion: alibaba.crossplane.io/v1alpha1
apiVersion: alibaba.crossplane.io/v1beta1
kind: ProviderConfig
metadata:
name: default
Expand Down
2 changes: 1 addition & 1 deletion package/crds/alibaba.crossplane.io_providerconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
name: SECRET-NAME
priority: 1
type: string
name: v1alpha1
name: v1beta1
schema:
openAPIV3Schema:
description: A ProviderConfig configures an Alibaba Cloud 'provider', i.e. a connection to a particular cloud account.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
- jsonPath: .resourceRef.name
name: RESOURCE-NAME
type: string
name: v1alpha1
name: v1beta1
schema:
openAPIV3Schema:
description: A ProviderConfigUsage indicates that a resource is using a ProviderConfig.
Expand Down
2 changes: 1 addition & 1 deletion pkg/clients/rds/rds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ func TestCreateAccount(t *testing.T) {

for name, tc := range cases {
t.Run(name, func(t *testing.T) {
err := c.DeleteDBInstance(tc.args.id)
err := c.CreateAccount(tc.args.id, tc.args.username, tc.args.password)
if err != nil {
e, ok := err.(*errors.ServerError)
if ok {
Expand Down
11 changes: 1 addition & 10 deletions pkg/util/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,13 @@ import (
aliv1beta1 "github.com/crossplane/provider-alibaba/apis/v1beta1"
)

const (
// AccessKeyID is Alibaba Cloud Access key ID
AccessKeyID = "accessKeyId"
// AccessKeySecret is Alibaba Cloud Access Secret Key
AccessKeySecret = "accessKeySecret"
// SecurityToken is Alibaba Cloud STS token
SecurityToken = "securityToken"
)

const (
// ErrGetProviderConfig is the error of getting provider config
ErrGetProviderConfig = "failed to get ProviderConfig"
// ErrGetCredentials is the error of getting credentials
ErrGetCredentials = "cannot get credentials"
errFailedToExtractCredentials = "failed to extract Alibaba credentials"
errAccessKeyNotComplete = "AccessKeyID or AccessKeySecret not existed"
errAccessKeyNotComplete = "AccessKeyID or AccessKeySecret not existed"
)

// AlibabaCredentials represents ak/sk, stsToken(maybe) information
Expand Down

0 comments on commit 0ecf797

Please sign in to comment.