Skip to content

Commit

Permalink
chore(upgrade): upgrade go version to v1.19 and k8s libraries to v1.2…
Browse files Browse the repository at this point in the history
…5.x (#97)

Signed-off-by: Niladri Halder <[email protected]>

Signed-off-by: Niladri Halder <[email protected]>
  • Loading branch information
niladrih authored Sep 27, 2022
1 parent ecd9a8a commit 8977714
Show file tree
Hide file tree
Showing 2,314 changed files with 935 additions and 876,709 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.14
uses: actions/setup-go@v1
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.14.7
go-version: 1.19.1
id: go

- name: Check out code into the Go module directory
Expand Down
4 changes: 0 additions & 4 deletions .muse/config.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
ignoreRules = [ "G101",
"ST1005"
]

ignoreFiles = """
vendor/**
"""
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ GOBIN := $(or $(shell go env GOBIN 2>/dev/null), $(shell go env GOPATH 2>/dev/nu

# find or download controller-gen
controller-gen:
ifneq ($(shell controller-gen --version 2> /dev/null), Version: v0.4.0)
@(cd /tmp; GO111MODULE=on go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.0)
ifneq ($(shell controller-gen --version 2> /dev/null), Version: v0.10.0)
@(cd /tmp; GO111MODULE=on go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.10.0)
CONTROLLER_GEN=$(GOBIN)/controller-gen
else
CONTROLLER_GEN=$(shell which controller-gen)
Expand All @@ -30,7 +30,7 @@ generate: generate-crds

generate-crds: controller-gen
# Generate manifests e.g. CRD, RBAC etc.
$(CONTROLLER_GEN) crd:trivialVersions=true,preserveUnknownFields=false paths="./pkg/apis/cstor/..." output:crd:artifacts:config=config/crds/bases
$(CONTROLLER_GEN) crd:crdVersions=v1 paths="./pkg/apis/cstor/..." output:crd:artifacts:config=config/crds/bases
# merge all crds into a single file
rm $(ALL_CRDS)
cat config/crds/bases/*.yaml >> $(ALL_CRDS)
Expand Down Expand Up @@ -65,7 +65,7 @@ test:
.PHONY: license-check
license-check:
@echo "--> Checking license header..."
@licRes=$$(for file in $$(find . -type f -regex '.*\.sh\|.*\.go\|.*Docker.*\|.*\Makefile*' ! -path './vendor/*') ; do \
@licRes=$$(for file in $$(find . -type f -regex '.*\.sh\|.*\.go\|.*Docker.*\|.*\Makefile*') ; do \
awk 'NR<=5' $$file | grep -Eq "(Copyright|generated|GENERATED)" || echo $$file; \
done); \
if [ -n "$${licRes}" ]; then \
Expand Down
410 changes: 291 additions & 119 deletions config/crds/all-crds.yaml

Large diffs are not rendered by default.

9 changes: 1 addition & 8 deletions config/crds/bases/cstor.openebs.io_cstorbackups.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.0
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
name: cstorbackups.cstor.openebs.io
spec:
Expand Down Expand Up @@ -87,9 +86,3 @@ spec:
served: true
storage: true
subresources: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.0
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
name: cstorcompletedbackups.cstor.openebs.io
spec:
Expand Down Expand Up @@ -74,9 +73,3 @@ spec:
served: true
storage: true
subresources: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
31 changes: 12 additions & 19 deletions config/crds/bases/cstor.openebs.io_cstorpoolclusters.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.0
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
name: cstorpoolclusters.cstor.openebs.io
spec:
Expand Down Expand Up @@ -69,7 +68,7 @@ spec:
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Limits describes the maximum amount of compute resources
allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
requests:
additionalProperties:
Expand All @@ -81,7 +80,7 @@ spec:
description: 'Requests describes the minimum amount of compute
resources required. If Requests is omitted for a container,
it defaults to Limits if that is explicitly specified, otherwise
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
type: object
pools:
Expand Down Expand Up @@ -146,7 +145,7 @@ spec:
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Limits describes the maximum amount of
compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
requests:
additionalProperties:
Expand All @@ -159,7 +158,7 @@ spec:
of compute resources required. If Requests is omitted
for a container, it defaults to Limits if that is
explicitly specified, otherwise to an implementation-defined
value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
type: object
compression:
Expand Down Expand Up @@ -189,7 +188,7 @@ spec:
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Limits describes the maximum amount of
compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
requests:
additionalProperties:
Expand All @@ -202,17 +201,17 @@ spec:
of compute resources required. If Requests is omitted
for a container, it defaults to Limits if that is
explicitly specified, otherwise to an implementation-defined
value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
type: object
roThresholdLimit:
description: 'ROThresholdLimit is threshold(percentage base)
limit for pool read only mode. If ROThresholdLimit(%)
amount of pool storage is reached then pool will set to
readonly. NOTE: 1. If ROThresholdLimit is set to 100 then
entire pool storage will be used by default it will
be set to 85%. 2. ROThresholdLimit value will be 0 <=
ROThresholdLimit <= 100.'
entire pool storage will be used by default it will be
set to 85%. 2. ROThresholdLimit value will be 0 <= ROThresholdLimit
<= 100.'
nullable: true
type: integer
thickProvision:
Expand Down Expand Up @@ -326,7 +325,7 @@ spec:
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Limits describes the maximum amount of compute resources
allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
requests:
additionalProperties:
Expand All @@ -338,7 +337,7 @@ spec:
description: 'Requests describes the minimum amount of compute
resources required. If Requests is omitted for a container,
it defaults to Limits if that is explicitly specified, otherwise
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
type: object
tolerations:
Expand Down Expand Up @@ -485,9 +484,3 @@ spec:
served: true
storage: true
subresources: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
25 changes: 9 additions & 16 deletions config/crds/bases/cstor.openebs.io_cstorpoolinstances.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.0
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
name: cstorpoolinstances.cstor.openebs.io
spec:
Expand Down Expand Up @@ -141,7 +140,7 @@ spec:
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Limits describes the maximum amount of compute
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
requests:
additionalProperties:
Expand All @@ -153,7 +152,7 @@ spec:
description: 'Requests describes the minimum amount of compute
resources required. If Requests is omitted for a container,
it defaults to Limits if that is explicitly specified, otherwise
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
type: object
compression:
Expand Down Expand Up @@ -183,7 +182,7 @@ spec:
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Limits describes the maximum amount of compute
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
requests:
additionalProperties:
Expand All @@ -195,15 +194,15 @@ spec:
description: 'Requests describes the minimum amount of compute
resources required. If Requests is omitted for a container,
it defaults to Limits if that is explicitly specified, otherwise
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
type: object
roThresholdLimit:
description: 'ROThresholdLimit is threshold(percentage base) limit
for pool read only mode. If ROThresholdLimit(%) amount of pool
storage is reached then pool will set to readonly. NOTE: 1.
If ROThresholdLimit is set to 100 then entire pool storage
will be used by default it will be set to 85%. 2. ROThresholdLimit
If ROThresholdLimit is set to 100 then entire pool storage will
be used by default it will be set to 85%. 2. ROThresholdLimit
value will be 0 <= ROThresholdLimit <= 100.'
nullable: true
type: integer
Expand Down Expand Up @@ -388,8 +387,8 @@ spec:
format: int32
type: integer
phase:
description: ' The phase of a CStorPool is a simple, high-level summary
of the pool state on the node.'
description: The phase of a CStorPool is a simple, high-level summary
of the pool state on the node.
type: string
provisionedReplicas:
description: ProvisionedReplicas describes the total count of Volume
Expand Down Expand Up @@ -449,9 +448,3 @@ spec:
served: true
storage: true
subresources: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
9 changes: 1 addition & 8 deletions config/crds/bases/cstor.openebs.io_cstorrestores.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.0
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
name: cstorrestores.cstor.openebs.io
spec:
Expand Down Expand Up @@ -100,9 +99,3 @@ spec:
served: true
storage: true
subresources: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.0
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
name: cstorvolumeattachments.cstor.openebs.io
spec:
Expand Down Expand Up @@ -122,9 +121,3 @@ spec:
type: object
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
Loading

0 comments on commit 8977714

Please sign in to comment.