Skip to content

Commit

Permalink
Update deps
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Dec 25, 2022
1 parent 960488b commit 9ba9c83
Show file tree
Hide file tree
Showing 17 changed files with 4,003 additions and 63 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ require (
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280
k8s.io/utils v0.0.0-20221012122500-cfd413dd9e85
kmodules.xyz/client-go v0.25.14
kmodules.xyz/go-containerregistry v0.0.2
kubedb.dev/apimachinery v0.29.2-0.20221208220920-b95282830fee
kmodules.xyz/go-containerregistry v0.0.3
kubedb.dev/apimachinery v0.30.0-rc.1
sigs.k8s.io/controller-runtime v0.13.1
sigs.k8s.io/structured-merge-diff/v4 v4.2.3
)
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2654,16 +2654,16 @@ kmodules.xyz/client-go v0.25.14 h1:8znhvnL73etOVeTGNcSQjqOAt5bK9vxin9dZPQUNtA4=
kmodules.xyz/client-go v0.25.14/go.mod h1:PG0s5FqmCvIKXudUhaJELBVbKbX6ESoefVR1cibkl+0=
kmodules.xyz/custom-resources v0.25.1 h1:0qHPTxbT/q0afl2GCOnwPFaoxKziRIPXgVu77YwrCa4=
kmodules.xyz/custom-resources v0.25.1/go.mod h1:ULwzvLmOqZJcPSXKI7iLclYL5eYRlKx8Nbex28Ht19E=
kmodules.xyz/go-containerregistry v0.0.2 h1:dD3e2zqJ5yeBena0P404oofyrwO0Wal7Wh/cjmxZTQk=
kmodules.xyz/go-containerregistry v0.0.2/go.mod h1:UIW9gnoDGbMfLDdPf8enLXyGeWIq6PQHozgkNCzg2nc=
kmodules.xyz/go-containerregistry v0.0.3 h1:0MzOIRxsbNYFaPZpkzbmmwclBQhYlSg17uli6Do0LkA=
kmodules.xyz/go-containerregistry v0.0.3/go.mod h1:UIW9gnoDGbMfLDdPf8enLXyGeWIq6PQHozgkNCzg2nc=
kmodules.xyz/offshoot-api v0.25.0 h1:Svq9da/+sg5afOjpgo9vx2J/Lu90Mo0aFxkdQmgKnGI=
kmodules.xyz/offshoot-api v0.25.0/go.mod h1:ysEBn7LJuT3+s8ynAQA/OG0BSsJugXa6KGtDLMRjlKo=
kmodules.xyz/resource-metadata v0.15.0 h1:6aXWkHWYQH4RGYiT2gpV0Qva/9HFJUTtw7k5xaNGavM=
kmodules.xyz/resource-metadata v0.15.0/go.mod h1:Sx3Vrh+p1kJk5J9zhvl7IneUjAVynmqA1/Lkf/GdiU0=
kmodules.xyz/resource-metrics v0.25.0 h1:wj3npVZZQr+Yysg/XdGn4LdT5kQizWeO0zq7QlSVx50=
kmodules.xyz/resource-metrics v0.25.0/go.mod h1:4a49npnu73c9LGDWHWQsPWoXWXU9rpCcknoH1+HHesI=
kubedb.dev/apimachinery v0.29.2-0.20221208220920-b95282830fee h1:6OpHu/ftTlk4yYFMbiTqbE6YvUZwqkXjGV5g22tyOWU=
kubedb.dev/apimachinery v0.29.2-0.20221208220920-b95282830fee/go.mod h1:J8wLPRorw+sCyN7c9zhYG1S4P2+Lkb2rKYJSJTa6IXE=
kubedb.dev/apimachinery v0.30.0-rc.1 h1:grV9luht00H0mpYQEnsfrXBPC0j8M9IykBnz4lRmrFc=
kubedb.dev/apimachinery v0.30.0-rc.1/go.mod h1:S6OFRiK8WWDwIRo/P4c2N8iWWo7+JpRMKamBctMw7Pc=
modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
Expand Down
2 changes: 1 addition & 1 deletion vendor/kmodules.xyz/go-containerregistry/name/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type Image struct {
func ParseReference(s string, opts ...name.Option) (*Image, error) {
ref, err := name.ParseReference(s, opts...)
if err != nil {
panic(err)
return nil, err
}

var img Image
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
Copyright AppsCode Inc. and Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1

import (
"fmt"

"kubedb.dev/apimachinery/apis"
"kubedb.dev/apimachinery/apis/catalog"
"kubedb.dev/apimachinery/crds"

"kmodules.xyz/client-go/apiextensions"
)

func (_ KafkaVersion) CustomResourceDefinition() *apiextensions.CustomResourceDefinition {
return crds.MustCustomResourceDefinition(SchemeGroupVersion.WithResource(ResourcePluralKafkaVersion))
}

var _ apis.ResourceInfo = &KafkaVersion{}

func (r KafkaVersion) ResourceFQN() string {
return fmt.Sprintf("%s.%s", ResourcePluralKafkaVersion, catalog.GroupName)
}

func (r KafkaVersion) ResourceShortCode() string {
return ResourceCodeKafkaVersion
}

func (r KafkaVersion) ResourceKind() string {
return ResourceKindKafkaVersion
}

func (r KafkaVersion) ResourceSingular() string {
return ResourceSingularKafkaVersion
}

func (r KafkaVersion) ResourcePlural() string {
return ResourcePluralKafkaVersion
}

func (r KafkaVersion) ValidateSpecs() error {
if r.Spec.Version == "" ||
r.Spec.DB.Image == "" {
return fmt.Errorf(`atleast one of the following specs is not set for kafkaVersion "%v":
spec.version,
spec.db.image`, r.Name)
}
return nil
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*
Copyright AppsCode Inc. and Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
appcat "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1"
)

const (
ResourceCodeKafkaVersion = "kfversion"
ResourceKindKafkaVersion = "KafkaVersion"
ResourceSingularKafkaVersion = "kafkaversion"
ResourcePluralKafkaVersion = "kafkaversions"
)

// KafkaVersion defines a Kafka database version.

// +genclient
// +genclient:nonNamespaced
// +genclient:skipVerbs=updateStatus
// +k8s:openapi-gen=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// +kubebuilder:object:root=true
// +kubebuilder:resource:path=kafkaversions,singular=kafkaversion,scope=Cluster,shortName=kfversion,categories={datastore,kubedb,appscode}
// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version"
// +kubebuilder:printcolumn:name="DB_IMAGE",type="string",JSONPath=".spec.db.image"
// +kubebuilder:printcolumn:name="Deprecated",type="boolean",JSONPath=".spec.deprecated"
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
type KafkaVersion struct {
metav1.TypeMeta `json:",inline,omitempty"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec KafkaVersionSpec `json:"spec,omitempty"`
}

// KafkaVersionSpec is the spec for kafka version
type KafkaVersionSpec struct {
// Version
Version string `json:"version"`
// Database Image
DB KafkaVersionDatabase `json:"db"`
// Deprecated versions usable but regarded as obsolete and best avoided, typically due to having been superseded.
// +optional
Deprecated bool `json:"deprecated,omitempty"`
// PSP names
// +optional
PodSecurityPolicies KafkaVersionPodSecurityPolicy `json:"podSecurityPolicies"`
// Stash defines backup and restore task definitions.
// +optional
Stash appcat.StashAddonSpec `json:"stash,omitempty"`
// upgrade constraints
UpgradeConstraints UpgradeConstraints `json:"upgradeConstraints,omitempty"`
}

// KafkaVersionDatabase is the Kafka Database image
type KafkaVersionDatabase struct {
Image string `json:"image"`
}

// KafkaVersionPodSecurityPolicy is the Kafka pod security policies
type KafkaVersionPodSecurityPolicy struct {
DatabasePolicyName string `json:"databasePolicyName"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// KafkaVersionList is a list of KafkaVersions
type KafkaVersionList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
// Items is a list of RedisVersion CRD objects
Items []KafkaVersion `json:"items,omitempty"`
}
Loading

0 comments on commit 9ba9c83

Please sign in to comment.