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

Merge upstream #414

Merged
merged 13 commits into from
Jul 24, 2020
Merged
Show file tree
Hide file tree
Changes from 11 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
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