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

Pick latest changes from 2.x branch #178

Merged
merged 2 commits into from
Nov 3, 2023
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
2 changes: 1 addition & 1 deletion docker/osconsole/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ openshift_config_cluster() {
"openshift": {
"oauth_metadata_uri": "/master/.well-known/oauth-authorization-server",
"oauth_client_id": "${HAWTIO_OAUTH_CLIENT_ID:-hawtio-online}",
"scope": "user:info user:check-access role:edit:*",
"scope": "user:info user:check-access user:list-projects role:edit:*",
tadayosi marked this conversation as resolved.
Show resolved Hide resolved
"web_console_url": "${OPENSHIFT_WEB_CONSOLE_URL:-}",
"cluster_version": "${OPENSHIFT_CLUSTER_VERSION:-}"
}
Expand Down
2 changes: 1 addition & 1 deletion oauthclient.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: v1
apiVersion: oauth.openshift.io/v1
kind: OAuthClient
metadata:
name: hawtio-online-dev
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
"test": "yarn test:docker && yarn test:nginx",
"test:docker": "jasmine docker/*.spec.js",
"test:nginx": "cd docker/ && HAWTIO_ONLINE_RBAC_ACL= njs test.js",
"deploy:k8s:namespace": "kubectl apply --kustomize deploy/k8s/namespace/",
"deploy:k8s:cluster": "kubectl apply --kustomize deploy/k8s/cluster/",
"deploy:openshift:namespace": "oc apply --kustomize deploy/openshift/namespace/",
"deploy:openshift:cluster": "oc apply --kustomize deploy/openshift/cluster/ && ./deploy/openshift/cluster/oauthclient.sh $ROUTE_HOSTNAME",
"deploy:k8s:namespace": "./scripts/kube-apply.sh deploy/k8s/namespace/",
"deploy:k8s:cluster": "./scripts/kube-apply.sh deploy/k8s/cluster/",
"deploy:openshift:namespace": "./scripts/kube-apply.sh deploy/openshift/namespace/",
"deploy:openshift:cluster": "./scripts/kube-apply.sh deploy/openshift/cluster/ && ./deploy/openshift/cluster/oauthclient.sh $ROUTE_HOSTNAME",
"kustomize:image": "cd deploy/base && kustomize edit set image hawtio/online=docker.io/${ORG:-hawtio}/${PROJECT:-online}:${TAG:-latest}"
},
"devDependencies": {
Expand Down
17 changes: 17 additions & 0 deletions scripts/kube-apply.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

set -e -o pipefail

if [ -z "${1}" ]; then
echo "Error: no directory specified"
exit 1
fi

if [ ! -d "${1}" ]; then
echo "Error: directory does not exist"
exit 1
fi

kubectl \
kustomize --load-restrictor LoadRestrictionsNone "${1}" | \
kubectl apply -f -