Browse Source

Remove kube-examples software configs

In a default nova deployment user-data for software deployments
goes into nova's db. That field is 64KB, so we are contraint by
space and we need to pass only what is needed.

Change-Id: I84bb59dbedc6e97b3bb985db5621daf34b6e17ee
Closes-Bug: #1680900
Closes-Bug: #1650538
changes/78/454778/5
Spyros Trigazis 5 years ago
parent
commit
58d1fc5523
  1. 117
      magnum/drivers/common/templates/kubernetes/fragments/kube-examples.yaml
  2. 7
      magnum/drivers/k8s_fedora_atomic_v1/templates/kubemaster.yaml
  3. 7
      magnum/drivers/k8s_fedora_atomic_v1/templates/kubeminion.yaml
  4. 7
      magnum/drivers/k8s_fedora_ironic_v1/templates/kubemaster.yaml
  5. 7
      magnum/drivers/k8s_fedora_ironic_v1/templates/kubeminion_software_configs.yaml

117
magnum/drivers/common/templates/kubernetes/fragments/kube-examples.yaml

@ -1,117 +0,0 @@
#cloud-config
merge_how: dict(recurse_array)+list(append)
write_files:
- path: /etc/kubernetes/examples/replication-controller.yaml
owner: "root:root"
permissions: "0644"
content: |
apiVersion: v1
kind: ReplicationController
metadata:
name: nginx-controller
spec:
replicas: 2
# selector identifies the set of pods that this
# replication controller is responsible for managing
selector:
name: nginx
# template defines the 'cookie cutter' used for creating
# new pods when necessary
template:
metadata:
labels:
# Important: these labels need to match the selector above
# The api server enforces this constraint.
app: nginx
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80
- path: /etc/kubernetes/examples/pod-nginx-with-label.yaml
owner: "root:root"
permissions: "0644"
content: |
apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80
- path: /etc/kubernetes/examples/service.yaml
owner: "root:root"
permissions: "0644"
content: |
apiVersion: v1
kind: Service
metadata:
name: nginx-service
spec:
ports:
- port: 8000 # the port that this service should serve on
# the container on each pod to connect to, can be a name
# (e.g. 'www') or a number (e.g. 80)
targetPort: 80
protocol: TCP
# just like the selector in the replication controller,
# but this time it identifies the set of pods to load balance
# traffic to.
selector:
app: nginx
- path: /etc/kubernetes/examples/README.md
owner: "root:root"
permissions: "0644"
content: |
Kubernetes 101 (http://kubernetes.io/v1.0/docs/user-guide/walkthrough/README.html)
==================================================================================
List all nodes:
kubectl get nodes
Replication Controllers:
kubectl create -f /etc/kubernetes/examples/replication-controller.yaml
kubectl get rc
kubectl delete rc nginx-controller
Pods:
kubectl create -f /etc/kubernetes/examples/pod-nginx-with-label.yaml
kubectl get pods
curl http://$(kubectl get pod nginx -o=template -t={{.status.podIP}})
Services:
kubectl create -f /etc/kubernetes/examples/service.yaml
kubectl get services
export SERVICE_IP=$(kubectl get service nginx-service -o=template -t={{.spec.clusterIP}})
export SERVICE_PORT=$(kubectl get service nginx-service -o=template '-t={{(index .spec.ports 0).port}}')
curl http://${SERVICE_IP}:${SERVICE_PORT}
kubectl delete service nginx-service
Troubleshooting:
kubectl get events
kubectl describe rc nginx-controller
kubectl describe pod nginx
kubectl describe service nginx-service
kubectl exec nginx env
kubectl exec -ti nginx -- bash

7
magnum/drivers/k8s_fedora_atomic_v1/templates/kubemaster.yaml

@ -376,12 +376,6 @@ resources:
group: ungrouped
config: {get_file: ../../common/templates/kubernetes/fragments/enable-services-master.sh}
kube_examples:
type: OS::Heat::SoftwareConfig
properties:
group: ungrouped
config: {get_file: ../../common/templates/kubernetes/fragments/kube-examples.yaml}
network_service:
type: OS::Heat::SoftwareConfig
properties:
@ -453,7 +447,6 @@ resources:
- config: {get_resource: enable_kube_controller_manager_scheduler}
- config: {get_resource: enable_kube_proxy}
- config: {get_resource: kube_ui_service}
- config: {get_resource: kube_examples}
- config: {get_resource: enable_monitoring}
- config: {get_resource: master_wc_notify}

7
magnum/drivers/k8s_fedora_atomic_v1/templates/kubeminion.yaml

@ -301,12 +301,6 @@ resources:
group: ungrouped
config: {get_file: ../../common/templates/kubernetes/fragments/configure-kubernetes-minion.sh}
kube_examples:
type: OS::Heat::SoftwareConfig
properties:
group: ungrouped
config: {get_file: ../../common/templates/kubernetes/fragments/kube-examples.yaml}
network_service:
type: OS::Heat::SoftwareConfig
properties:
@ -370,7 +364,6 @@ resources:
- config: {get_resource: write_kubeconfig}
- config: {get_resource: write_kube_os_config}
- config: {get_resource: make_cert}
- config: {get_resource: kube_examples}
- config: {get_resource: configure_docker_storage}
- config: {get_resource: configure_docker_registry}
- config: {get_resource: configure_kubernetes_minion}

7
magnum/drivers/k8s_fedora_ironic_v1/templates/kubemaster.yaml

@ -364,12 +364,6 @@ resources:
group: ungrouped
config: {get_file: ../../common/templates/kubernetes/fragments/enable-services-master.sh}
kube_examples:
type: OS::Heat::SoftwareConfig
properties:
group: ungrouped
config: {get_file: ../../common/templates/kubernetes/fragments/kube-examples.yaml}
network_service:
type: OS::Heat::SoftwareConfig
properties:
@ -441,7 +435,6 @@ resources:
- config: {get_resource: enable_kube_controller_manager_scheduler}
- config: {get_resource: enable_kube_proxy}
- config: {get_resource: kube_ui_service}
- config: {get_resource: kube_examples}
- config: {get_resource: enable_monitoring}
- config: {get_resource: master_wc_notify}

7
magnum/drivers/k8s_fedora_ironic_v1/templates/kubeminion_software_configs.yaml

@ -252,12 +252,6 @@ resources:
group: ungrouped
config: {get_file: ../../common/templates/kubernetes/fragments/configure-kubernetes-minion.sh}
kube_examples:
type: OS::Heat::SoftwareConfig
properties:
group: ungrouped
config: {get_file: ../../common/templates/kubernetes/fragments/kube-examples.yaml}
network_service:
type: OS::Heat::SoftwareConfig
properties:
@ -320,7 +314,6 @@ resources:
- config: {get_resource: write_heat_params}
- config: {get_resource: write_kubeconfig}
- config: {get_resource: make_cert}
- config: {get_resource: kube_examples}
- config: {get_resource: configure_docker_storage}
- config: {get_resource: configure_docker_registry}
- config: {get_resource: configure_kubernetes_minion}

Loading…
Cancel
Save