Skip to content

Commit

Permalink
Actually deploy metric server
Browse files Browse the repository at this point in the history
  • Loading branch information
dturn committed Aug 3, 2018
1 parent 76ee952 commit b8144e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

*Enhancements*
- Add Job resource class ([#295](https://github.com/Shopify/kubernetes-deploy/pull/296))
- Add CustomResourceDefinition resource class ([#305](https://github.com/Shopify/kubernetes-deploy/pull/306))
- Add CustomResourceDefinition resource class ([#306](https://github.com/Shopify/kubernetes-deploy/pull/306))
- Officially support Kubernetes 1.10 ([#308](https://github.com/Shopify/kubernetes-deploy/pull/308))
- SyncMediator will only batch fetch resources when there is a sufficiently large enough set of resources
being tracked ([#316](https://github.com/Shopify/kubernetes-deploy/pull/316))
- Allow CRs to be pruned based on `kubernetes-deploy.shopify.io/prunable` annotation on the custom resource definitions ([312](https://github.com/Shopify/kubernetes-deploy/pull/312))
- Add HorizontalPodAutoscaler resource class ([#305](https://github.com/Shopify/kubernetes-deploy/pull/305))

### 0.20.4
*Enhancements*
Expand Down
7 changes: 6 additions & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,13 @@ def self.prepare_pv(name)

def self.deploy_metric_server
# Set-up the metric server that the HPA needs https://github.com/kubernetes-incubator/metrics-server
logger = KubernetesDeploy::FormattedLogger.build("default", KubeclientHelper::MINIKUBE_CONTEXT, $stderr)
kubectl = KubernetesDeploy::Kubectl.new(namespace: "kube-system", context: KubeclientHelper::MINIKUBE_CONTEXT,
logger: logger, log_failure_by_default: true, default_timeout: '5s')

Dir.glob("test/setup/metrics-server/*.{yml,yaml}*").map do |resource|
Kubeclient::Resource.new(YAML.safe_load(File.read(resource))).create
found = kubectl.run("get", "-f", resource).last.success?
kubectl.run("create", "-f", resource) unless found
end
end
end
Expand Down

0 comments on commit b8144e1

Please sign in to comment.