Commit c51edede authored by vaikas-google's avatar vaikas-google

Merge pull request #90 from goltermann/ns

Put DM into its own namespace
parents 701f5945 6b4726d3
......@@ -55,7 +55,7 @@ install.yaml`
That's it. You can now use `kubectl` to see DM running in your cluster:
```
kubectl get pod,rc,service
kubectl get pod,rc,service --namespace=dm
```
If you see expandybird-service, manager-service, resourcifier-service, and
......@@ -70,9 +70,9 @@ The easiest way to interact with Deployment Manager is through the `dm` tool
hitting a `kubectl` proxy. To set that up:
1. Build the tool by running `make` in the deployment-manager repository.
1. Run `kubectl proxy --port=8001 &` to start a proxy that lets you interact
1. Run `kubectl proxy --port=8001 --namespace=dm &` to start a proxy that lets you interact
with the Kubernetes API server through port 8001 on localhost. `dm` uses
`http://localhost:8001/api/v1/proxy/namespaces/default/services/manager-service:manager`
`http://localhost:8001/api/v1/proxy/namespaces/dm/services/manager-service:manager`
as the default service address for DM.
### Using the client
......
......@@ -39,7 +39,7 @@ var (
stdin = flag.Bool("stdin", false, "Reads a configuration from the standard input")
properties = flag.String("properties", "", "Properties to use when deploying a template (e.g., --properties k1=v1,k2=v2)")
template_registry = flag.String("registry", "kubernetes/deployment-manager/templates", "Github based template registry (owner/repo[/path])")
service = flag.String("service", "http://localhost:8001/api/v1/proxy/namespaces/default/services/manager-service:manager", "URL for deployment manager")
service = flag.String("service", "http://localhost:8001/api/v1/proxy/namespaces/dm/services/manager-service:manager", "URL for deployment manager")
binary = flag.String("binary", "../expandybird/expansion/expansion.py", "Path to template expansion binary")
)
......
......@@ -41,9 +41,13 @@ pkill -f $MANAGER
$MANAGER > $LOGDIR/manager.log 2>&1 --port=8080 --expanderURL=http://localhost:8081 --deployerURL=http://localhost:8082 &
echo
echo "Creating dm namespace..."
$KUBECTL create -f dm-namespace.yaml
echo
echo "Starting kubectl proxy..."
pkill -f "$KUBECTL proxy"
$KUBECTL proxy --port=8001 &
$KUBECTL proxy --port=8001 --namespace=dm &
sleep 1s
echo
......
......@@ -2,6 +2,7 @@ resources:
- name: expandybird
type: https://raw.githubusercontent.com/kubernetes/deployment-manager/master/templates/replicatedservice/v1/replicatedservice.py
properties:
namespace: dm
service_port: 8081
target_port: 8080
container_port: 8080
......@@ -13,6 +14,7 @@ resources:
- name: resourcifier
type: https://raw.githubusercontent.com/kubernetes/deployment-manager/master/templates/replicatedservice/v1/replicatedservice.py
properties:
namespace: dm
service_port: 8082
target_port: 8080
container_port: 8080
......@@ -24,6 +26,7 @@ resources:
- name: manager
type: https://raw.githubusercontent.com/kubernetes/deployment-manager/master/templates/replicatedservice/v1/replicatedservice.py
properties:
namespace: dm
service_port: 8080
target_port: 8080
container_port: 8080
......
apiVersion: v1
kind: Namespace
metadata:
labels:
app: dm
name: dm-namespace
name: dm
......@@ -11,6 +11,14 @@
# limitations under the License.
######################################################################
---
apiVersion: v1
kind: Namespace
metadata:
labels:
app: dm
name: dm-namespace
name: dm
---
apiVersion: v1
kind: Service
......@@ -19,7 +27,7 @@ metadata:
app: dm
name: expandybird-service
name: expandybird-service
namespace: default
namespace: dm
spec:
ports:
- name: expandybird
......@@ -36,7 +44,7 @@ metadata:
app: dm
name: expandybird-rc
name: expandybird-rc
namespace: default
namespace: dm
spec:
replicas: 2
selector:
......@@ -63,7 +71,7 @@ metadata:
app: dm
name: resourcifier-service
name: resourcifier-service
namespace: default
namespace: dm
spec:
ports:
- name: resourcifier
......@@ -80,7 +88,7 @@ metadata:
app: dm
name: resourcifier-rc
name: resourcifier-rc
namespace: default
namespace: dm
spec:
replicas: 2
selector:
......@@ -107,7 +115,7 @@ metadata:
app: dm
name: manager-service
name: manager-service
namespace: default
namespace: dm
spec:
ports:
- name: manager
......@@ -124,7 +132,7 @@ metadata:
app: dm
name: manager-rc
name: manager-rc
namespace: default
namespace: dm
spec:
replicas: 1
selector:
......
......@@ -37,7 +37,7 @@ resources:
apiVersion: v1
metadata:
name: test-controller-v1
namespace: default
namespace: dm
labels:
k8s-app: test
version: v1
......@@ -66,7 +66,7 @@ resources:
kind: Service
metadata:
name: test
namespace: default
namespace: dm
labels:
k8s-app: test
version: v1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment