Skip to content

Commit

Permalink
Merge pull request #17 from redpanda-data/rk/fix-PR-buildkite-execution
Browse files Browse the repository at this point in the history
Fix PR buildkite execution
  • Loading branch information
RafalKorepta authored Nov 20, 2023
2 parents 989b9bc + 3133680 commit b770bbd
Show file tree
Hide file tree
Showing 4 changed files with 205 additions and 202 deletions.
5 changes: 0 additions & 5 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ steps:

- key: k8s-operator
label: K8s Operator
if: |
build.env("K8S_NIGHTLY") == "1" ||
build.branch == "main" ||
(build.pull_request.labels includes "k8s/tests") ||
build.tag != null
timeout: 180
notify:
- github_commit_status:
Expand Down
52 changes: 52 additions & 0 deletions src/go/k8s/api/redpanda/v1alpha1/redpanda_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,55 @@ func (in *Redpanda) OwnerShipRefObj() metav1.OwnerReference {
UID: in.UID,
}
}

// GetMigrationConsoleName returns Console custom resource namespace which will be taken out from
// old reconciler, so that underlying resources could be migrated.
func (in *Redpanda) GetMigrationConsoleName() string {
if in.Spec.Migration == nil {
return ""
}
name := in.Spec.Migration.ConsoleRef.Name
if name == "" {
name = in.Name
}
return name
}

// GetMigrationConsoleNamespace returns Console custom resource name which will be taken out from
// old reconciler, so that underlying resources could be migrated.
func (in *Redpanda) GetMigrationConsoleNamespace() string {
if in.Spec.Migration == nil {
return ""
}
namespace := in.Spec.Migration.ConsoleRef.Namespace
if namespace == "" {
namespace = in.Namespace
}
return namespace
}

// GetMigrationClusterName returns Cluster custom resource namespace which will be taken out from
// old reconciler, so that underlying resources could be migrated.
func (in *Redpanda) GetMigrationClusterName() string {
if in.Spec.Migration == nil {
return ""
}
name := in.Spec.Migration.ClusterRef.Name
if name == "" {
name = in.Name
}
return name
}

// GetMigrationClusterNamespace returns Cluster custom resource name which will be taken out from
// old reconciler, so that underlying resources could be migrated.
func (in *Redpanda) GetMigrationClusterNamespace() string {
if in.Spec.Migration == nil {
return ""
}
namespace := in.Spec.Migration.ClusterRef.Namespace
if namespace == "" {
namespace = in.Namespace
}
return namespace
}
Loading

0 comments on commit b770bbd

Please sign in to comment.