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

feat: remove '/preview' and '/beta' #191

Merged
merged 3 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
VERSION ?= 0.0.1

# CHANNELS define the bundle channels used in the bundle.
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "preview,fast,stable")
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "fast,stable")
Victoremepunto marked this conversation as resolved.
Show resolved Hide resolved
# To re-generate a bundle for other specific channels without changing the standard setup, you can:
# - use the CHANNELS as arg of the bundle target (e.g make bundle CHANNELS=preview,fast,stable)
# - use environment variables to overwrite this value (e.g export CHANNELS="preview,fast,stable")
# - use the CHANNELS as arg of the bundle target (e.g make bundle CHANNELS=fast,stable)
# - use environment variables to overwrite this value (e.g export CHANNELS="fast,stable")
ifneq ($(origin CHANNELS), undefined)
BUNDLE_CHANNELS := --channels=$(CHANNELS)
endif
Expand Down
12 changes: 0 additions & 12 deletions controllers/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,10 @@ func populateContainerVolumeMounts(frontendEnvironment *crd.FrontendEnvironment)
// This will allow chrome to incorperate the generated nav and fed-modules.json
// at run time. This means chrome can merge the config in mixed environments

// We need to have the config mounted in 2 places because of the preview/stable
// split. We need to have the config mounted in the preview and stable directories
volumeMounts = append(volumeMounts, v1.VolumeMount{
Name: "config",
MountPath: "/opt/app-root/src/build/stable/operator-generated",
})
volumeMounts = append(volumeMounts, v1.VolumeMount{
Name: "config",
MountPath: "/opt/app-root/src/build/preview/operator-generated",
})

// We generate SSL cert mounts conditionally
if frontendEnvironment.Spec.SSL {
Expand Down Expand Up @@ -684,12 +678,10 @@ func (r *FrontendReconciliation) getFrontendPaths() []string {
frontendPaths := r.Frontend.Spec.Frontend.Paths
defaultPath := fmt.Sprintf("/apps/%s", r.Frontend.Name)
defaultBetaPath := fmt.Sprintf("/beta/apps/%s", r.Frontend.Name)
Victoremepunto marked this conversation as resolved.
Show resolved Hide resolved
defaultPreviewPath := fmt.Sprintf("/preview/apps/%s", r.Frontend.Name)

if r.Frontend.Spec.AssetsPrefix != "" {
defaultPath = fmt.Sprintf("/%s/%s", r.Frontend.Spec.AssetsPrefix, r.Frontend.Name)
defaultBetaPath = fmt.Sprintf("/beta/%s/%s", r.Frontend.Spec.AssetsPrefix, r.Frontend.Name)
Victoremepunto marked this conversation as resolved.
Show resolved Hide resolved
defaultPreviewPath = fmt.Sprintf("/preview/%s/%s", r.Frontend.Spec.AssetsPrefix, r.Frontend.Name)
}

if !r.Frontend.Spec.Frontend.HasPath(defaultPath) {
Expand All @@ -700,10 +692,6 @@ func (r *FrontendReconciliation) getFrontendPaths() []string {
frontendPaths = append(frontendPaths, defaultBetaPath)
Victoremepunto marked this conversation as resolved.
Show resolved Hide resolved
}

if !r.Frontend.Spec.Frontend.HasPath(defaultPreviewPath) {
frontendPaths = append(frontendPaths, defaultPreviewPath)
}

return frontendPaths
}

Expand Down
4 changes: 1 addition & 3 deletions tests/e2e/basic-frontend/02-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,4 @@ spec:
protocol: TCP
volumeMounts:
- name: config
mountPath: /opt/app-root/src/build/stable/operator-generated
- name: config
mountPath: /opt/app-root/src/build/preview/operator-generated
mountPath: /opt/app-root/src/build/stable/operator-generated
Victoremepunto marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 0 additions & 2 deletions tests/e2e/bundles/02-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ spec:
mountPath: /opt/app-root/src/build/chrome
- name: config
mountPath: /opt/app-root/src/build/stable/operator-generated
- name: config
mountPath: /opt/app-root/src/build/preview/operator-generated
---
apiVersion: cloud.redhat.com/v1alpha1
kind: Bundle
Expand Down
6 changes: 0 additions & 6 deletions tests/e2e/cachebust/02-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ spec:
volumeMounts:
- name: config
mountPath: /opt/app-root/src/build/stable/operator-generated
- name: config
mountPath: /opt/app-root/src/build/preview/operator-generated
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
Expand Down Expand Up @@ -118,8 +116,6 @@ spec:
volumeMounts:
- name: config
mountPath: /opt/app-root/src/build/stable/operator-generated
- name: config
mountPath: /opt/app-root/src/build/preview/operator-generated
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
Expand Down Expand Up @@ -200,5 +196,3 @@ spec:
volumeMounts:
- name: config
mountPath: /opt/app-root/src/build/stable/operator-generated
- name: config
mountPath: /opt/app-root/src/build/preview/operator-generated
6 changes: 0 additions & 6 deletions tests/e2e/cachebust/04-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ spec:
volumeMounts:
- name: config
mountPath: /opt/app-root/src/build/stable/operator-generated
- name: config
mountPath: /opt/app-root/src/build/preview/operator-generated
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
Expand Down Expand Up @@ -118,8 +116,6 @@ spec:
volumeMounts:
- name: config
mountPath: /opt/app-root/src/build/stable/operator-generated
- name: config
mountPath: /opt/app-root/src/build/preview/operator-generated
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
Expand Down Expand Up @@ -200,5 +196,3 @@ spec:
volumeMounts:
- name: config
mountPath: /opt/app-root/src/build/stable/operator-generated
- name: config
mountPath: /opt/app-root/src/build/preview/operator-generated
7 changes: 0 additions & 7 deletions tests/e2e/frontend-paths/02-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,4 @@ spec:
name: chrome
port:
number: 8000
- path: /preview/apps/chrome
pathType: Prefix
backend:
service:
name: chrome
port:
number: 8000

3 changes: 0 additions & 3 deletions tests/e2e/generate-nav-json/02-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,3 @@ spec:
mountPath: /opt/app-root/src/build/chrome
- name: config
mountPath: /opt/app-root/src/build/stable/operator-generated
- name: config
mountPath: /opt/app-root/src/build/preview/operator-generated

7 changes: 0 additions & 7 deletions tests/e2e/networking/02-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@ spec:
name: chrome
port:
number: 8000
- path: /preview/apps/chrome
pathType: Prefix
backend:
service:
name: chrome
port:
number: 8000
---
kind: Service
apiVersion: v1
Expand Down
2 changes: 0 additions & 2 deletions tests/e2e/ssl/02-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,5 @@ spec:
volumeMounts:
- name: config
mountPath: /opt/app-root/src/build/stable/operator-generated
- name: config
mountPath: /opt/app-root/src/build/preview/operator-generated
- name: certs
mountPath: /opt/certs
2 changes: 0 additions & 2 deletions tests/e2e/storage/02-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ spec:
volumeMounts:
- mountPath: /opt/app-root/src/build/stable/operator-generated
name: config
- mountPath: /opt/app-root/src/build/preview/operator-generated
name: config
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
Expand Down
2 changes: 0 additions & 2 deletions tests/e2e/whitelist/02-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ spec:
volumeMounts:
- name: config
mountPath: /opt/app-root/src/build/stable/operator-generated
- name: config
mountPath: /opt/app-root/src/build/preview/operator-generated
---
kind: Ingress
apiVersion: networking.k8s.io/v1
Expand Down
Loading