Skip to content

Commit

Permalink
Merge pull request #115 from upmc-enterprises/addClusterNameLabel
Browse files Browse the repository at this point in the history
Added clustername label
  • Loading branch information
stevesloka authored Oct 25, 2017
2 parents 3b8a66e + b5d88f2 commit 6a593f4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/k8sutil/deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ func (k *K8sutil) CreateClientDeployment(baseImage string, replicas *int32, java
"component": component,
"role": role,
"name": deploymentName,
"cluster": clusterName,
},
},
Spec: v1beta1.DeploymentSpec{
Expand All @@ -132,6 +133,7 @@ func (k *K8sutil) CreateClientDeployment(baseImage string, replicas *int32, java
"component": component,
"role": role,
"name": deploymentName,
"cluster": clusterName,
},
Annotations: map[string]string{
"pod.beta.kubernetes.io/init-containers": "[ { \"name\": \"sysctl\", \"image\": \"busybox\", \"imagePullPolicy\": \"IfNotPresent\", \"command\": [\"sysctl\", \"-w\", \"vm.max_map_count=262144\"], \"securityContext\": { \"privileged\": true } }]",
Expand Down
3 changes: 3 additions & 0 deletions pkg/k8sutil/k8sutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ func (k *K8sutil) CreateDataNodeDeployment(deploymentType string, replicas *int3
"component": component,
"role": role,
"name": statefulSetName,
"cluster": clusterName,
},
},
Spec: apps.StatefulSetSpec{
Expand All @@ -407,6 +408,7 @@ func (k *K8sutil) CreateDataNodeDeployment(deploymentType string, replicas *int3
"component": component,
"role": role,
"name": statefulSetName,
"cluster": clusterName,
},
Annotations: map[string]string{
"pod.beta.kubernetes.io/init-containers": "[ { \"name\": \"sysctl\", \"image\": \"busybox\", \"imagePullPolicy\": \"IfNotPresent\", \"command\": [\"sysctl\", \"-w\", \"vm.max_map_count=262144\"], \"securityContext\": { \"privileged\": true } }]",
Expand Down Expand Up @@ -543,6 +545,7 @@ func (k *K8sutil) CreateDataNodeDeployment(deploymentType string, replicas *int3
"component": "elasticsearch",
"role": role,
"name": statefulSetName,
"cluster": clusterName,
},
},
Spec: v1.PersistentVolumeClaimSpec{
Expand Down
1 change: 1 addition & 0 deletions pkg/k8sutil/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func (k *K8sutil) CreateStorageClass(zone, storageClassProvisioner, storageType
Name: zone,
Labels: map[string]string{
"component": component,
"cluster": clusterName,
},
},
Provisioner: storageClassProvisioner,
Expand Down

0 comments on commit 6a593f4

Please sign in to comment.