Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
kube-prometheus
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
prometheus-operator
kube-prometheus
Commits
34fd0ebc
Unverified
Commit
34fd0ebc
authored
8 years ago
by
Frederic Branczyk
Browse files
Options
Downloads
Patches
Plain Diff
hack: allow deploying the example app in non-default namespace
parent
d4b581fa
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hack/example-service-monitoring/deploy
+12
-4
12 additions, 4 deletions
hack/example-service-monitoring/deploy
hack/example-service-monitoring/teardown
+5
-1
5 additions, 1 deletion
hack/example-service-monitoring/teardown
with
17 additions
and
5 deletions
hack/example-service-monitoring/deploy
+
12
−
4
View file @
34fd0ebc
...
@@ -4,8 +4,16 @@ if [ -z "${KUBECONFIG}" ]; then
...
@@ -4,8 +4,16 @@ if [ -z "${KUBECONFIG}" ]; then
KUBECONFIG
=
~/.kube/config
KUBECONFIG
=
~/.kube/config
fi
fi
kubectl
--kubeconfig
=
"
$KUBECONFIG
"
apply
-f
manifests/examples/example-app/prometheus-frontend-svc.yaml
if
[
-z
"
${
NAMESPACE
}
"
]
;
then
kubectl
--kubeconfig
=
"
$KUBECONFIG
"
apply
-f
manifests/examples/example-app/example-app.yaml
NAMESPACE
=
default
kubectl
--kubeconfig
=
"
$KUBECONFIG
"
create
-f
manifests/examples/example-app/prometheus-frontend.yaml
fi
kubectl
--kubeconfig
=
"
$KUBECONFIG
"
create
-f
manifests/examples/example-app/servicemonitor-frontend.yaml
kubectl
--namespace
"
$NAMESPACE
"
--kubeconfig
=
"
$KUBECONFIG
"
apply
-f
manifests/examples/example-app/prometheus-frontend-svc.yaml
kubectl
--namespace
"
$NAMESPACE
"
--kubeconfig
=
"
$KUBECONFIG
"
apply
-f
manifests/examples/example-app/example-app.yaml
# `kubectl apply` is currently not working for third party resources so we are
# using `kubectl create` here for the time being.
# (https://github.com/kubernetes/kubernetes/issues/29542)
kubectl
--namespace
"
$NAMESPACE
"
--kubeconfig
=
"
$KUBECONFIG
"
create
-f
manifests/examples/example-app/prometheus-frontend.yaml
kubectl
--namespace
"
$NAMESPACE
"
--kubeconfig
=
"
$KUBECONFIG
"
create
-f
manifests/examples/example-app/servicemonitor-frontend.yaml
This diff is collapsed.
Click to expand it.
hack/example-service-monitoring/teardown
+
5
−
1
View file @
34fd0ebc
...
@@ -4,5 +4,9 @@ if [ -z "${KUBECONFIG}" ]; then
...
@@ -4,5 +4,9 @@ if [ -z "${KUBECONFIG}" ]; then
KUBECONFIG
=
~/.kube/config
KUBECONFIG
=
~/.kube/config
fi
fi
kubectl
--kubeconfig
=
"
$KUBECONFIG
"
delete
-f
manifests/examples/example-app
if
[
-z
"
${
NAMESPACE
}
"
]
;
then
NAMESPACE
=
default
fi
kubectl
--namespace
"
$NAMESPACE
"
--kubeconfig
=
"
$KUBECONFIG
"
delete
-f
manifests/examples/example-app
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment