Skip to content
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
61 changes: 61 additions & 0 deletions .github/workflows/e2e-tests-kind.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: E2E Tests (kind)

on:
workflow_call:
inputs:
image:
required: true
type: string

env:
REGISTRY: quay.io

jobs:
e2e-tests-kind:
runs-on: ubuntu-latest
env:
SKIP_OLM_TESTS: "true"
ROXIE_RESOURCE_PROFILE: "tiny"
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: go.mod
cache: true

- name: Log in to Quay.io
uses: docker/login-action@v4.6.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}

- name: Extract roxie binary from image
run: |
docker create --name roxie-extract "${{ inputs.image }}"
docker cp roxie-extract:/usr/local/bin/roxie "$GITHUB_WORKSPACE/roxie"
docker rm roxie-extract

- name: Install roxie binary
run: |
cp "${GITHUB_WORKSPACE}/roxie" /usr/local/bin/roxie
chmod +x /usr/local/bin/roxie
roxie version

- name: Create kind cluster
uses: helm/kind-action@v1
with:
cluster_name: roxie-e2e

- name: Run e2e tests
env:
REGISTRY_USERNAME: ${{ secrets.QUAY_RHACS_ENG_RO_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.QUAY_RHACS_ENG_RO_PASSWORD }}
run: |
make run-test-e2e
1 change: 1 addition & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
KUBECONFIG: /github/home/artifacts/kubeconfig
INFRA_TOKEN: ${{ secrets.INFRA_CI_TOKEN }}
INFRACTL: bin/infractl -k -e localhost:8443
ROXIE_RESOURCE_PROFILE: "small"
steps:
- name: Checkout
uses: actions/checkout@v7
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/main-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ jobs:
image: ${{ needs.build-roxie-image.outputs.image }}
secrets: inherit

e2e-tests-kind:
needs: [ build-roxie-image ]
uses: ./.github/workflows/e2e-tests-kind.yml
with:
image: ${{ needs.build-roxie-image.outputs.image }}
secrets: inherit

delete-dev-cluster:
if: ${{ always() && needs.create-dev-cluster.result == 'success' }}
needs: [ create-dev-cluster, e2e-tests ]
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ jobs:
skip-olm-tests: 'false'
secrets: inherit

e2e-tests-kind:
if: github.event.pull_request.head.repo.full_name == github.repository
needs: [ build-roxie-image ]
uses: ./.github/workflows/e2e-tests-kind.yml
with:
image: ${{ needs.build-roxie-image.outputs.image }}
secrets: inherit

delete-gke-cluster:
if: ${{ always() && needs.create-gke-cluster.result == 'success' && github.event.pull_request.head.repo.full_name == github.repository }}
needs: [ create-gke-cluster, e2e-tests ]
Expand Down
2 changes: 1 addition & 1 deletion internal/clusterdefaults/clusterdefaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func ApplyClusterDefaults(
return nil, fmt.Errorf("deep-copying cluster defaults for cluster type %s: %w", clusterType, err)
}

if err := mergo.Merge(config, defaultsCopy, mergo.WithoutDereference); err != nil {
if err := mergo.Merge(config, defaultsCopy, mergo.WithoutDereference, mergo.WithAppendSlice); err != nil {
return nil, fmt.Errorf("merging-in cluster defaults for cluster type %s: %w", clusterType, err)
}

Expand Down
12 changes: 10 additions & 2 deletions internal/deployer/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,11 @@ func (c *CentralConfig) CustomResource() (map[string]interface{}, error) {
return nil, fmt.Errorf("resource profile 'auto' should have been resolved before building the CR")
}
if c.ResourceProfile != types.ResourceProfileAcsDefaults {
if err := helpers.DeepMerge(cr, getCentralResourcesOperator(c.ResourceProfile)); err != nil {
profileCopy, err := helpers.MergeMaps(getCentralResourcesOperator(c.ResourceProfile))
if err != nil {
return nil, fmt.Errorf("copying resource profile: %w", err)
}
if err := helpers.DeepMerge(cr, profileCopy); err != nil {
return nil, fmt.Errorf("merging resource profile into Central CR: %w", err)
}
}
Expand Down Expand Up @@ -462,7 +466,11 @@ func (s *SecuredClusterConfig) CustomResource() (map[string]interface{}, error)
return nil, fmt.Errorf("resource profile 'auto' must have been resolved before building the CR")
}
if s.ResourceProfile != types.ResourceProfileAcsDefaults {
if err := helpers.DeepMerge(cr, getSecuredClusterResourcesOperator(s.ResourceProfile)); err != nil {
profileCopy, err := helpers.MergeMaps(getSecuredClusterResourcesOperator(s.ResourceProfile))
if err != nil {
return nil, fmt.Errorf("copying resource profile: %w", err)
}
if err := helpers.DeepMerge(cr, profileCopy); err != nil {
return nil, fmt.Errorf("merging resource profile into SecuredCluster CR: %w", err)
}
}
Expand Down
Loading
Loading