Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct pod protection finalizer prefix #31

Merged
merged 1 commit into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions apis/apps/v1alpha1/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,15 @@ import (
"time"

dockerref "github.com/docker/distribution/reference"
"k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
utilpointer "k8s.io/utils/pointer"
v1 "k8s.io/api/core/v1"
utilpointer "k8s.io/utils/ptr"
)

const (
DefaultImageTag = "latest"
)

func SetDefaults_PodSpec(podSpec *corev1.PodSpec) {
func SetDefaults_PodSpec(podSpec *v1.PodSpec) {
SetDefaults_PodSpecConfig(podSpec)
for i := range podSpec.Volumes {
a := &podSpec.Volumes[i]
Expand Down
7 changes: 0 additions & 7 deletions apis/apps/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ limitations under the License.

package v1alpha1

const (
PodOperationProtectionFinalizerPrefix = "prot.lifecycle.kafed.kusionstack.io"

PodOpsLifecyclePreCheckStage = "pre-check"
PodOpsLifecyclePostCheckStage = "post-check"
)

// +kubebuilder:object:generate=false
type PodAvailableConditions struct {
ExpectedFinalizers []string `json:"expectedFinalizers,omitempty"` // indicate the expected finalizers of a pod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ limitations under the License.

package v1alpha1

// well known readiness gate
const (
ReadinessGatePodServiceReady = "pod.kusionstack.io/service-ready"
)

// well known finalizer
const (
PodOperationProtectionFinalizerPrefix = "prot.podopslifecycle.kusionstack.io"
)

// well known variables
const (
PodOpsLifecyclePreCheckStage = "pre-check"
PodOpsLifecyclePostCheckStage = "post-check"
)
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ require (
k8s.io/client-go v0.22.6
k8s.io/component-base v0.22.6
k8s.io/component-helpers v0.0.0-00010101000000-000000000000
k8s.io/klog/v2 v2.9.0
k8s.io/utils v0.0.0-20211116205334-6203023598ed
k8s.io/klog/v2 v2.80.1
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
sigs.k8s.io/controller-runtime v0.10.3
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -855,8 +855,8 @@ k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=
k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c h1:jvamsI1tn9V0S8jicyX82qaFC0H/NKxv2e5mbqsgR80=
k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw=
k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20211116205334-6203023598ed h1:ck1fRPWPJWsMd8ZRFsWc6mh/zHp5fZ/shhbrgPUxDAE=
k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
Expand Down
Loading