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

Update openshift helpers - with this ghost can be deployed. #1230

Merged
merged 3 commits into from
Oct 17, 2019
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
1 change: 1 addition & 0 deletions chart/kubeapps/templates/apprepository-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ rules:
- kubeapps.com
resources:
- apprepositories
- apprepositories/finalizers
verbs:
- get
- list
Expand Down
8 changes: 8 additions & 0 deletions docs/user/manifests/kubeapps-local-dev-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
frontend:
replicaCount: 1
tillerProxy:
replicaCount: 1
chartsvc:
replicaCount: 1
dashboard:
replicaCount: 1
21 changes: 19 additions & 2 deletions script/openshift-cluster.mk
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,30 @@ devel/openshift-kubeapps-project-created: devel/openshift-tiller-project-created
oc policy add-role-to-user edit "system:serviceaccount:${TILLER_NAMESPACE}:tiller" && \
touch $@

devel/openshift-kubeapps-installed: openshift-install-tiller
chart/kubeapps/charts/mongodb-%.tgz:
helm dep update ./chart/kubeapps
Comment on lines +49 to +50
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why you need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise if someone pulls our Kubeapps repo and runs make openshift-kubeapps it fails because it's deploying the chart from the current branch, which won't include the chart deps initially.


devel/openshift-kubeapps-installed: openshift-install-tiller chart/kubeapps/charts/mongodb-%.tgz
@$(shell minishift oc-env) && \
oc project ${KUBEAPPS_NAMESPACE} && \
helm --tiller-namespace=${TILLER_NAMESPACE} install ./chart/kubeapps -n ${KUBEAPPS_NAMESPACE} --set tillerProxy.host=tiller-deploy.tiller:44134
helm --tiller-namespace=${TILLER_NAMESPACE} install ./chart/kubeapps -n ${KUBEAPPS_NAMESPACE} \
--set tillerProxy.host=tiller-deploy.tiller:44134 \
--values ./docs/user/manifests/kubeapps-local-dev-values.yaml

# Due to openshift having multiple secrets for the service account, the code is slightly different from
# that at https://github.com/kubeapps/kubeapps/blob/master/docs/user/getting-started.md#on-linuxmacos
# TODO: potentially update the docs to use this. Note kubectl jsonpath support
# does not yet support regex filtering, hence the separate grep
# https://github.com/kubernetes/kubernetes/issues/61406
openshift-tiller-token:
@kubectl get secret -n "${TILLER_NAMESPACE}" \
$(shell kubectl get serviceaccount -n "${TILLER_NAMESPACE}" tiller -o jsonpath='{range .secrets[*]}{.name}{"\n"}{end}' | grep tiller-token) \
-o go-template='{{.data.token | base64decode}}' && echo

openshift-kubeapps: devel/openshift-kubeapps-installed

# TODO: Update so all steps carried out even when others fail (otherwise
# resetting an incomplete install will fail.
openshift-kubeapps-reset:
$(shell minishift oc-env) && \
oc login -u system:admin && \
Expand Down