bump version in issue template and merge with main branch
This commit is contained in:
commit
ba743fc868
|
|
@ -9,7 +9,7 @@ assignees: ''
|
||||||
|
|
||||||
Please, answer some short questions which should help us to understand your problem / question better?
|
Please, answer some short questions which should help us to understand your problem / question better?
|
||||||
|
|
||||||
- **Which image of the operator are you using?** e.g. ghcr.io/zalando/postgres-operator:v1.13.0
|
- **Which image of the operator are you using?** e.g. ghcr.io/zalando/postgres-operator:v1.15.1
|
||||||
- **Where do you run it - cloud or metal? Kubernetes or OpenShift?** [AWS K8s | GCP ... | Bare Metal K8s]
|
- **Where do you run it - cloud or metal? Kubernetes or OpenShift?** [AWS K8s | GCP ... | Bare Metal K8s]
|
||||||
- **Are you running Postgres Operator in production?** [yes | no]
|
- **Are you running Postgres Operator in production?** [yes | no]
|
||||||
- **Type of issue?** [Bug report, question, feature request, etc.]
|
- **Type of issue?** [Bug report, question, feature request, etc.]
|
||||||
|
|
|
||||||
135
delivery.yaml
135
delivery.yaml
|
|
@ -7,81 +7,86 @@ build_env: &BUILD_ENV
|
||||||
MULTI_ARCH_REGISTRY: container-registry-test.zalando.net/acid
|
MULTI_ARCH_REGISTRY: container-registry-test.zalando.net/acid
|
||||||
|
|
||||||
pipeline:
|
pipeline:
|
||||||
- id: build-postgres-operator
|
- id: build-postgres-operator
|
||||||
env:
|
env:
|
||||||
<<: *BUILD_ENV
|
<<: *BUILD_ENV
|
||||||
type: script
|
type: script
|
||||||
vm_config:
|
vm_config:
|
||||||
type: linux
|
type: linux
|
||||||
size: large
|
size: large
|
||||||
image: cdp-runtime/go
|
image: cdp-runtime/go
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- /go/pkg/mod # pkg cache for Go modules
|
- /go/pkg/mod # pkg cache for Go modules
|
||||||
- ~/.cache/go-build # Go build cache
|
- ~/.cache/go-build # Go build cache
|
||||||
commands:
|
commands:
|
||||||
- desc: Run unit tests
|
- desc: Run unit tests
|
||||||
cmd: |
|
cmd: |
|
||||||
make deps mocks test
|
make deps mocks test
|
||||||
|
|
||||||
- desc: Build Docker image
|
- desc: Build Docker image
|
||||||
cmd: |
|
cmd: |
|
||||||
if [ -z ${CDP_SOURCE_BRANCH} ]; then
|
if [ -z ${CDP_SOURCE_BRANCH} ]; then
|
||||||
IMAGE=${MULTI_ARCH_REGISTRY}/postgres-operator
|
IMAGE=${MULTI_ARCH_REGISTRY}/postgres-operator
|
||||||
else
|
else
|
||||||
IMAGE=${MULTI_ARCH_REGISTRY}/postgres-operator-test
|
IMAGE=${MULTI_ARCH_REGISTRY}/postgres-operator-test
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker buildx create --config /etc/cdp-buildkitd.toml --driver-opt network=host --bootstrap --use
|
docker buildx create --config /etc/cdp-buildkitd.toml --driver-opt network=host --bootstrap --use
|
||||||
docker buildx build --platform "linux/amd64,linux/arm64" \
|
docker buildx build --platform "linux/amd64,linux/arm64" \
|
||||||
--build-arg BASE_IMAGE="${ALPINE_BASE_IMAGE}" \
|
--build-arg BASE_IMAGE="${ALPINE_BASE_IMAGE}" \
|
||||||
-t "${IMAGE}:${CDP_BUILD_VERSION}" \
|
-t "${IMAGE}:${CDP_BUILD_VERSION}" \
|
||||||
-f docker/Dockerfile \
|
-f docker/Dockerfile \
|
||||||
--push .
|
--push .
|
||||||
|
|
||||||
if [ -z ${CDP_SOURCE_BRANCH} ]; then
|
if [ -z ${CDP_SOURCE_BRANCH} ]; then
|
||||||
cdp-promote-image ${IMAGE}:${CDP_BUILD_VERSION}
|
cdp-promote-image ${IMAGE}:${CDP_BUILD_VERSION}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- id: build-operator-ui
|
- id: build-operator-ui
|
||||||
env:
|
env:
|
||||||
<<: *BUILD_ENV
|
<<: *BUILD_ENV
|
||||||
type: script
|
type: script
|
||||||
vm_config:
|
vm_config:
|
||||||
type: linux
|
type: linux
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
- desc: 'Prepare environment'
|
- desc: 'Prepare environment'
|
||||||
cmd: |
|
cmd: |
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y build-essential
|
apt-get install -y build-essential
|
||||||
|
|
||||||
- desc: 'Compile JavaScript app'
|
- desc: 'Compile JavaScript app'
|
||||||
cmd: |
|
cmd: |
|
||||||
cd ui
|
cd ui
|
||||||
make appjs
|
make appjs
|
||||||
|
|
||||||
- desc: 'Build and push Docker image'
|
- desc: 'Build and push Docker image'
|
||||||
cmd: |
|
cmd: |
|
||||||
cd ui
|
cd ui
|
||||||
if [ -z ${CDP_SOURCE_BRANCH} ]; then
|
if [ -z ${CDP_SOURCE_BRANCH} ]; then
|
||||||
IMAGE=${MULTI_ARCH_REGISTRY}/postgres-operator-ui
|
IMAGE=${MULTI_ARCH_REGISTRY}/postgres-operator-ui
|
||||||
else
|
else
|
||||||
IMAGE=${MULTI_ARCH_REGISTRY}/postgres-operator-ui-test
|
IMAGE=${MULTI_ARCH_REGISTRY}/postgres-operator-ui-test
|
||||||
fi
|
fi
|
||||||
|
|
||||||
IMAGE_TAG=$(make docker-push IMAGE=${IMAGE} BASE_IMAGE=${PYTHON_BASE_IMAGE})
|
make appjs
|
||||||
|
docker buildx create --config /etc/cdp-buildkitd.toml --driver-opt network=host --bootstrap --use
|
||||||
|
docker buildx build --platform linux/amd64,linux/arm64 \
|
||||||
|
--build-arg BASE_IMAGE="${PYTHON_BASE_IMAGE}" \
|
||||||
|
-t ${IMAGE}:${CDP_BUILD_VERSION} \
|
||||||
|
--push .
|
||||||
|
|
||||||
if [ -z ${CDP_SOURCE_BRANCH} ]; then
|
if [ -z ${CDP_SOURCE_BRANCH} ]; then
|
||||||
cdp-promote-image ${IMAGE_TAG}
|
cdp-promote-image ${IMAGE}:${CDP_BUILD_VERSION}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- id: build-logical-backup
|
- id: build-logical-backup
|
||||||
env:
|
env:
|
||||||
<<: *BUILD_ENV
|
<<: *BUILD_ENV
|
||||||
type: script
|
type: script
|
||||||
vm_config:
|
vm_config:
|
||||||
type: linux
|
type: linux
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
- desc: Build image
|
- desc: Build image
|
||||||
|
|
|
||||||
|
|
@ -1767,9 +1767,13 @@ func (c *Cluster) GetStatus() *ClusterStatus {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Cluster) GetSwitchoverSchedule() string {
|
func (c *Cluster) GetSwitchoverSchedule() string {
|
||||||
|
now := time.Now().UTC()
|
||||||
|
return c.getSwitchoverScheduleAtTime(now)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Cluster) getSwitchoverScheduleAtTime(now time.Time) string {
|
||||||
var possibleSwitchover, schedule time.Time
|
var possibleSwitchover, schedule time.Time
|
||||||
|
|
||||||
now := time.Now().UTC()
|
|
||||||
for _, window := range c.Spec.MaintenanceWindows {
|
for _, window := range c.Spec.MaintenanceWindows {
|
||||||
// in the best case it is possible today
|
// in the best case it is possible today
|
||||||
possibleSwitchover = time.Date(now.Year(), now.Month(), now.Day(), window.StartTime.Hour(), window.StartTime.Minute(), 0, 0, time.UTC)
|
possibleSwitchover = time.Date(now.Year(), now.Month(), now.Day(), window.StartTime.Hour(), window.StartTime.Minute(), 0, 0, time.UTC)
|
||||||
|
|
|
||||||
|
|
@ -2116,7 +2116,7 @@ func TestCompareVolumeMounts(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGetSwitchoverSchedule(t *testing.T) {
|
func TestGetSwitchoverSchedule(t *testing.T) {
|
||||||
now := time.Now()
|
now, _ := time.Parse(time.RFC3339, "2025-11-11T12:35:00Z")
|
||||||
|
|
||||||
futureTimeStart := now.Add(1 * time.Hour)
|
futureTimeStart := now.Add(1 * time.Hour)
|
||||||
futureWindowTimeStart := futureTimeStart.Format("15:04")
|
futureWindowTimeStart := futureTimeStart.Format("15:04")
|
||||||
|
|
@ -2195,7 +2195,7 @@ func TestGetSwitchoverSchedule(t *testing.T) {
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
cluster.Spec.MaintenanceWindows = tt.windows
|
cluster.Spec.MaintenanceWindows = tt.windows
|
||||||
schedule := cluster.GetSwitchoverSchedule()
|
schedule := cluster.getSwitchoverScheduleAtTime(now)
|
||||||
if schedule != tt.expected {
|
if schedule != tt.expected {
|
||||||
t.Errorf("Expected GetSwitchoverSchedule to return %s, returned: %s", tt.expected, schedule)
|
t.Errorf("Expected GetSwitchoverSchedule to return %s, returned: %s", tt.expected, schedule)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
13
ui/Makefile
13
ui/Makefile
|
|
@ -33,18 +33,5 @@ docker: appjs
|
||||||
echo "git describe $(shell git describe --tags --always --dirty)"
|
echo "git describe $(shell git describe --tags --always --dirty)"
|
||||||
docker build --rm -t "$(IMAGE):$(TAG)$(CDP_TAG)" -f Dockerfile --build-arg BASE_IMAGE="${BASE_IMAGE}" .
|
docker build --rm -t "$(IMAGE):$(TAG)$(CDP_TAG)" -f Dockerfile --build-arg BASE_IMAGE="${BASE_IMAGE}" .
|
||||||
|
|
||||||
docker-push: appjs
|
|
||||||
echo "Tag ${TAG}"
|
|
||||||
echo "Version ${VERSION}"
|
|
||||||
echo "CDP tag ${CDP_TAG}"
|
|
||||||
echo "git describe $(shell git describe --tags --always --dirty)"
|
|
||||||
docker buildx create --config /etc/cdp-buildkitd.toml --driver-opt network=host --bootstrap --use
|
|
||||||
docker buildx build --platform linux/amd64,linux/arm64 \
|
|
||||||
--build-arg BASE_IMAGE="${BASE_IMAGE}" \
|
|
||||||
-f Dockerfile \
|
|
||||||
-t "$(IMAGE):$(TAG)$(CDP_TAG)" \
|
|
||||||
--push .
|
|
||||||
echo "$(IMAGE):$(TAG)$(CDP_TAG)"
|
|
||||||
|
|
||||||
mock:
|
mock:
|
||||||
docker run -it -p 8081:8081 "$(IMAGE):$(TAG)" --mock
|
docker run -it -p 8081:8081 "$(IMAGE):$(TAG)" --mock
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue