Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pharos-cluster-critical priority class #1025

Merged
merged 6 commits into from
Jan 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/helm/resources/deployment.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ spec:
resources:
requests:
memory: 32Mi
serviceAccountName: tiller
serviceAccountName: tiller
1 change: 1 addition & 0 deletions addons/host-upgrades/resources/50-daemonset.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ spec:
app: host-upgrades
spec:
serviceAccountName: host-upgrades
priorityClassName: pharos-cluster-critical
containers:
- name: host-upgrades
image: "<%= image_repository %>/pharos-host-upgrades:<%= version %>"
Expand Down
1 change: 1 addition & 0 deletions addons/ingress-nginx/resources/daemonset.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ spec:
<%- end -%>
<%- end -%>
serviceAccountName: nginx-ingress-serviceaccount
priorityClassName: pharos-cluster-critical
hostNetwork: true
<%- unless config.tolerations.empty? -%>
tolerations:
Expand Down
2 changes: 1 addition & 1 deletion lib/pharos/cluster_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def apply_phases
# master is now configured and can be used
apply_phase(Phases::LoadClusterConfiguration, master_only)
# configure essential services

apply_phase(Phases::ConfigurePriorityClasses, master_only)
apply_phase(Phases::ConfigurePSP, master_only)
apply_phase(Phases::ConfigureDNS, master_only)
apply_phase(Phases::ConfigureWeave, master_only) if config.network.provider == 'weave'
Expand Down
13 changes: 13 additions & 0 deletions lib/pharos/phases/configure_priority_classes.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

module Pharos
module Phases
class ConfigurePriorityClasses < Pharos::Phase
title "Configure priority classes"

def call
apply_stack('priority_classes')
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: scheduling.k8s.io/v1beta1
kind: PriorityClass
metadata:
name: pharos-cluster-critical
value: 1000000000
globalDefault: false
description: "This priority class should be used for cluster critical services outside of kube-system."