Skip to content

Commit

Permalink
Merge upstream (#414)
Browse files Browse the repository at this point in the history
* Improve recent and favourites display (cloudfoundry#4421)

* Improve recent and favourites display

* Remove debug logging

* Remove debug logging/subscription leak

* Unit test fix

* Tweaks following review

* Changes following review
- favourite & recent icon changes

Co-authored-by: Richard Cox <richard.cox@suse.com>

* Add line-height to favourite and recent entity labels (cloudfoundry#4438)

- missed out from another PR following review

* Autoscaler e2e tests: Give better failure error when the test can't find the scaling row (cloudfoundry#4424)

* Improve autoscaler e2e tests

* Remove duplicate fail statement

* Helm Chart: Remove encryption key volume (cloudfoundry#4355)

* Remove encryption key volume

* Remove encrpytion key volume migration from config-init job

* Improve the logout experience (cloudfoundry#4439)

* Add support for including breaking changes in the changelog

* Improve the logout experience

* Fix unit tests

* Add request for version info to github issues template (cloudfoundry#4443)

* Merge downstream (cloudfoundry#4441)

* Merge src/frontend from downstream

* Merge src/jetstream from jetstream

* Remove examples/custom-src

* Merge deploy from downstream
Does not include changes to
- deploy/all-in-one/*
- deploy/aio-entrypoint.sh
- deploy/Dockerfile.all-in-one

* Merge build from downstream

* Add missing merge items from deploy

* Updates to package-lock

* Remove fdescribe

* Fix e2e core tests

* Remove favicon from packages/core/src

* Changes following review

* Show all favorites for an endpoint favorite if there is only one (cloudfoundry#4440)

* Show all favorites for the endpoint favorite if there is only one

* Missing changes

* Merge downstream - JSON Viewer with dark mode & Header Fixes (cloudfoundry#4444)

* Fix json-viewer dark mode

* Fix profile page and side nav top position following header diet
- Fix side nav top position
- Update fix for profile page to also work in non-desktop mode

* Fix issues with tests not running if build upload fails (cloudfoundry#4453)

* Fix issues with tests not running if build upload fails

* Fix script

* One more fix for script

* Fix white space at start of file

* Fix log out page when there's a custom log in page

* Fix log out page given previous commit changes

Co-authored-by: Neil MacDougall <nwmac@users.noreply.github.com>
  • Loading branch information
richard-cox and nwmac committed Jul 24, 2020
1 parent 864f650 commit 8f68d22
Show file tree
Hide file tree
Showing 34 changed files with 299 additions and 191 deletions.
19 changes: 11 additions & 8 deletions deploy/ci/travis/e2e-build-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function tryGetExistingBuild() {
fi
}

# Need S3 endpoint - if we don't have it, we don't have the Travis env vars
if [ -n "${AWS_ENDPOINT}" ]; then
tryGetExistingBuild
fi
Expand All @@ -68,14 +69,16 @@ else
npm run build
npm run build-backend

set +e
tar cvfz ${GZIP_NAME} dist/* src/jetstream/jetstream
# Only try to upload if we have the S3 configuration
if [ -n "${AWS_ENDPOINT}" ]; then
set +e
tar cvfz ${GZIP_NAME} dist/* src/jetstream/jetstream

# Upload
mc cp -q --insecure ${GZIP_NAME} ${MC_HOST}/${S3_BUILDS_BUCKET}

# Ignore error from uploading - should not fail build if we can't upload the build archive
# This just means we won't be able to us this cache next build
exit 0
# Upload
mc cp -q --insecure ${GZIP_NAME} ${MC_HOST}/${S3_BUILDS_BUCKET}

# Ignore error from uploading - should not fail build if we can't upload the build archive
# This just means we won't be able to us this cache next build
echo "Uploaded builds"
fi
fi
3 changes: 2 additions & 1 deletion deploy/ci/travis/e2e-mc-helper.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Helper for mc command

mc version > /dev/null
# Check if mc command is available (don't log error if it is not)
mc version > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "mc command already installed and confgiured"
else
Expand Down
30 changes: 3 additions & 27 deletions deploy/containers/config-init/config-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ echo "RELEASE_NAME : ${RELEASE_NAME}"
echo "RELEASE_REVISION : ${RELEASE_REVISION}"
echo "IS_UPGRADE : ${IS_UPGRADE}"
echo "CONSOLE_TLS_SECRET_NAME : ${CONSOLE_TLS_SECRET_NAME}"
echo "ENCRYPTION_KEY_VOLUME : ${ENCRYPTION_KEY_VOLUME}"
echo "ENCRYPTION_KEY_FILENAME : ${ENCRYPTION_KEY_FILENAME}"
echo "CONSOLE_PROXY_CERT_PATH : ${CONSOLE_PROXY_CERT_PATH}"
echo "CONSOLE_PROXY_CERT_KEY_PATH : ${CONSOLE_PROXY_CERT_KEY_PATH}"
echo ""
echo "============================================"
echo ""
Expand Down Expand Up @@ -44,15 +40,6 @@ EOF
}

function generateCert {
if [ -n "${CONSOLE_PROXY_CERT_PATH}" ] && [ -n "${CONSOLE_PROXY_CERT_KEY_PATH}" ]; then
if [ -f "${CONSOLE_PROXY_CERT_PATH}" ] && [ -f "${CONSOLE_PROXY_CERT_KEY_PATH}" ]; then
echo "Found existing certificate on encryption key volume - going to use it"
CERT_CRT=$(cat ${CONSOLE_PROXY_CERT_PATH} | base64 -w 0)
CERT_KEY=$(cat ${CONSOLE_PROXY_CERT_KEY_PATH} | base64 -w 0)
return
fi
fi

echo "Using cert generator to generate a self-signed certificate ..."
export CERTS_PATH=./certs
export DEV_CERTS_DOMAIN=tls
Expand Down Expand Up @@ -97,20 +84,9 @@ if [ $EXISTS -eq 0 ]; then
else
echo "Fresh installation - generating a new Encryption Key secret"

# Migrate existing key from the legacy encryption key volume if there is one
if [ ${ENCRYPTION_KEY_VOLUME} -a ${ENCRYPTION_KEY_FILENAME} ]; then
ekFile="${ENCRYPTION_KEY_VOLUME}/${ENCRYPTION_KEY_FILENAME}"
if [ -f "${ekFile}" ]; then
echo "Found encryption key file on the legacy encryption key volume"
KEY=$(cat ${ekFile} | base64 -w 0)
fi
fi

if [ -z $KEY ]; then
# Generate a random encryption key
echo "Generating a new Encryption Key ..."
KEY=$(openssl enc -aes-256-cbc -k secret -P -md sha1 | grep key | cut -d '=' -f2 | base64 -w 0)
fi
# Generate a random encryption key
echo "Generating a new Encryption Key ..."
KEY=$(openssl enc -aes-256-cbc -k secret -P -md sha1 | grep key | cut -d '=' -f2 | base64 -w 0)

# We will create a new secret for the encryption key
cat << EOF > create-key-secret.yaml
Expand Down
16 changes: 0 additions & 16 deletions deploy/kubernetes/console/templates/config-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,26 +118,14 @@ spec:
value: "{{ .Chart.AppVersion }}"
- name: "HELM_CHART"
value: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
- name: ENCRYPTION_KEY_VOLUME
value: "/{{ .Release.Name }}-encryption-key-volume"
- name: ENCRYPTION_KEY_FILENAME
value: key
- name: CONSOLE_TLS_SECRET_NAME
value: "{{ default "" .Values.console.tlsSecretName }}"
- name: CONSOLE_PROXY_CERT_PATH
value: "/{{ .Release.Name }}-encryption-key-volume/console.crt"
- name: CONSOLE_PROXY_CERT_KEY_PATH
value: "/{{ .Release.Name }}-encryption-key-volume/console.key"
image: {{.Values.kube.registry.hostname}}/{{.Values.kube.organization}}/{{default "stratos-config-init" .Values.images.configInit}}:{{.Values.consoleVersion}}
command: ["/config-init.sh"]
imagePullPolicy: {{.Values.imagePullPolicy}}
livenessProbe: ~
name: "config-init"
readinessProbe: ~
volumeMounts:
- mountPath: "/{{ .Release.Name }}-encryption-key-volume"
name: "{{ .Release.Name }}-encryption-key-volume"
readOnly: true
{{- if and .Values.kube.registry.username .Values.kube.registry.password }}
imagePullSecrets:
- name: {{.Values.dockerRegistrySecret}}
Expand All @@ -147,10 +135,6 @@ spec:
serviceAccountName: "config-init"
{{- end }}
terminationGracePeriodSeconds: 600
volumes:
- name: "{{ .Release.Name }}-encryption-key-volume"
persistentVolumeClaim:
claimName: "{{ .Release.Name }}-encryption-key-volume"
---
{{- if .Values.autoCleanup }}
# Cleanup job will delete the created secret when the release is deleted
Expand Down
27 changes: 1 addition & 26 deletions deploy/kubernetes/console/templates/volumes.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,6 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: "{{ .Release.Name }}-encryption-key-volume"
labels:
app.kubernetes.io/name: "stratos"
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/version: "{{ .Chart.AppVersion }}"
app.kubernetes.io/component: "console-encryption-volume"
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
annotations:
{{- if .Values.storageClass }}
volume.beta.kubernetes.io/storage-class: {{ .Values.storageClass | quote }}
{{- else if .Values.kube.storage_class.persistent }}
volume.beta.kubernetes.io/storage-class: {{ .Values.kube.storage_class.persistent | quote }}
{{- else }}
volume.alpha.kubernetes.io/storage-class: default
{{- end }}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Mi
---
{{- if (not .Values.mariadb.external) }}
{{- if and .Values.mariadb.persistence.enabled (not .Values.mariadb.persistence.existingClaim) }}
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
Expand Down
8 changes: 6 additions & 2 deletions docs/issue_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<!--- For bugs and general issues -->
### Stratos Version
<!-- What version of Stratos does this related to? -->
<!-- Version information can be seen in the `About` page reached via the User Icon top right -->
<!-- If directly using code which branch, commit, etc did the source come from, what repository was it cloned from? -->
### Frontend Deployment type
<!--- Where is the frontend deployed? -->
<!--- Put an 'x' in one of the boxes below. -->
Expand All @@ -21,11 +25,11 @@

### Actual behaviour

### Steps to reproduce the behavior
### Steps to reproduce the behaviour

### Log output covering before error and any error statements
```
Insert log hereCopy
Insert your log here
```


Expand Down
115 changes: 66 additions & 49 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/frontend/packages/core/sass/_all-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
@import '../src/shared/components/list/list-table/table-row/table-row.component.theme';
@import '../src/shared/components/no-content-message/no-content-message.component.theme';
@import '../src/shared/components/boolean-indicator/boolean-indicator.component.theme';

@import '../src/shared/components/json-viewer/json-viewer.component.theme';
@import '../src/shared/components/loading-page/loading-page.component.theme';
@import '../src/shared/components/log-viewer/log-viewer.component.theme';
@import '../src/shared/components/chips/chips.component.theme';
Expand Down Expand Up @@ -126,5 +126,6 @@
@include restore-endpoints-theme($theme, $app-theme);
@include metrics-component-theme($theme, $app-theme);
@include intro-screen-theme($theme, $app-theme);
@include app-json-view-theme($theme, $app-theme);

}
9 changes: 9 additions & 0 deletions src/frontend/packages/core/sass/mat-desktop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,13 @@ $desktop-toggle-button-item-height: $desktop-menu-item-height - 2px;
flex: 0 0 $desktop-page-header-height;
height: $desktop-page-header-height;
}

mat-drawer.dashboard__side_preview {
top: $desktop-page-header-height;
height: calc(100vw - #{$desktop-page-header-height} - 1px);
}

app-profile-info .user-profile {
top: $desktop-page-header-height;
}
}
Loading

0 comments on commit 8f68d22

Please sign in to comment.