Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Use legacy file to ensure compatibility upgrading
Browse files Browse the repository at this point in the history
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
  • Loading branch information
JoshVanL committed Dec 3, 2018
1 parent 66a133e commit ff6437c
Show file tree
Hide file tree
Showing 13 changed files with 56 additions and 40 deletions.
4 changes: 2 additions & 2 deletions puppet/hiera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ hierarchy:
- cloudprovider/%{facts.tarmak_cloudprovider}.yaml
- environment/%{facts.tarmak_environment}.yaml
- instance_pools/%{facts.tarmak_instance_pool}_classes.yaml
- ./%{facts.tarmak_type_instance}.yaml
- ./%{facts.tarmak_type_instance}_common.yaml
- tarmak.yaml
- common.yaml
46 changes: 46 additions & 0 deletions puppet/hieradata/common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---

prometheus::role: "%{::tarmak_role}"
tarmak::role: "%{::tarmak_role}"

tarmak::cluster_name: "%{::tarmak_cluster}"
tarmak::dns_root: "%{::tarmak_dns_root}"
tarmak::etcd_advertise_client_network: 10.0.0.0/8
tarmak::cloud_provider: aws
tarmak::kubernetes_api_url: "https://api.%{::tarmak_cluster}.%{::tarmak_dns_root}:6443"

# point heapster to influxdb
kubernetes_addons::heapster::sink: influxdb:http://monitoring-influxdb.kube-system:8086

kubernetes::kubelet::network_plugin: cni

vault_client::server_url: "https://vault.%{::tarmak_dns_root}:8200"
vault_client::init_token: "%{::vault_token}"
vault_client::init_role: "%{::tarmak_cluster}-%{::tarmak_role}"
vault_client::ca_cert_path: /etc/vault/ca.pem
vault_client::init_policies:
- "%{::tarmak_cluster}/%{::tarmak_role}"

prometheus::server::external_labels:
cluster: "%{::tarmak_cluster}"

consul::consul_master_token: "%{::consul_master_token}"
consul::consul_encrypt: "%{::consul_encrypt}"
consul::consul_bootstrap_expect: "%{::consul_bootstrap_expect}"
consul::region: "%{::vault_region}"
consul::environment: "%{::vault_environment}"
consul::backup_bucket_prefix: "%{::consul_backup_bucket_prefix}"
consul::private_ip: "%{::vault_private_ip}"
consul::cloud_provider: aws
consul::backup_schedule: "%{::consul_backup_schedule}"

vault_server::region: "%{::vault_region}"
vault_server::environment: "%{::vault_environment}"
vault_server::vault_tls_cert_path: "%{::vault_tls_cert_path}"
vault_server::vault_tls_key_path: "%{::vault_tls_key_path}"
vault_server::vault_tls_ca_path: "%{::vault_tls_ca_path}"
vault_server::volume_id: "%{::vault_volume_id}"
vault_server::vault_unsealer_kms_key_id: "%{::vault_unsealer_kms_key_id}"
vault_server::vault_unsealer_ssm_key_prefix: "%{::vault_unsealer_ssm_key_prefix}"
vault_server::consul_master_token: "%{::consul_master_token}"
vault_server::cloud_provider: aws
1 change: 1 addition & 0 deletions puppet/hieradata/role/etcd.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
classes:
- site_module::docker
- vault_client
- tarmak::etcd
- airworthy
Expand Down
1 change: 1 addition & 0 deletions puppet/hieradata/role/master.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
classes:
- site_module::docker
- vault_client
- tarmak::master
- tarmak::worker
Expand Down
1 change: 1 addition & 0 deletions puppet/hieradata/role/worker.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
classes:
- vault_client
- site_module::docker
- site_module::docker_storage
- tarmak::worker
- tarmak::overlay_calico
27 changes: 0 additions & 27 deletions puppet/hieradata/tarmak_common.yaml

This file was deleted.

8 changes: 4 additions & 4 deletions puppet/modules/prometheus/manifests/init.pp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
class prometheus(
String $systemd_path = '/etc/systemd/system',
String $namespace = 'monitoring',
Optional[Enum['etcd','master','worker']] $role = $::prometheus::params::role,
Optional[Enum['etcd','master','worker', 'vault']] $role = $::prometheus::params::role,
$etcd_cluster_exporters = $::prometheus::params::etcd_cluster_exporters,
Integer[1025,65535] $etcd_k8s_main_port = $::prometheus::params::etcd_k8s_main_port,
Integer[1025,65535] $etcd_k8s_events_port = $::prometheus::params::etcd_k8s_events_port,
Integer[1024,65535] $etcd_overlay_port = $::prometheus::params::etcd_overlay_port,
Optional[Integer[1025,65535]] $etcd_k8s_main_port = $::prometheus::params::etcd_k8s_main_port,
Optional[Integer[1025,65535]] $etcd_k8s_events_port = $::prometheus::params::etcd_k8s_events_port,
Optional[Integer[1024,65535]] $etcd_overlay_port = $::prometheus::params::etcd_overlay_port,
String $mode = 'Full',
) inherits ::prometheus::params
{
Expand Down
2 changes: 1 addition & 1 deletion puppet/modules/tarmak/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
String $bin_dir = '/opt/bin',
String $cluster_name = $tarmak::params::cluster_name,
String $systemctl_path = $tarmak::params::systemctl_path,
Enum['etcd','master','worker', nil] $role = nil,
Enum['etcd','master','worker', 'vault', nil] $role = nil,
String $kubernetes_version = $tarmak::params::kubernetes_version,
String $kubernetes_user = 'kubernetes',
String $kubernetes_group = 'kubernetes',
Expand Down
1 change: 0 additions & 1 deletion puppet/spec/hosts/etcd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
:tarmak_role => 'etcd',
:tarmak_hostname => 'etcd-1',
:tarmak_volume_id => 'vol-XX',
:tarmak_type_instance => 'tarmak',
:etcd_backup_bucket_prefix => 'my-etcd-backup-bucket/prefix',
}
end
Expand Down
1 change: 0 additions & 1 deletion puppet/spec/hosts/master_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
let(:facts) do
{
:tarmak_role => 'master',
:tarmak_type_instance => 'tarmak',
}
end

Expand Down
1 change: 0 additions & 1 deletion puppet/spec/hosts/vault_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
let(:facts) do
{
:tarmak_role => 'vault',
:tarmak_type_instance => 'vault',
}
end

Expand Down
1 change: 0 additions & 1 deletion puppet/spec/hosts/worker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
let(:facts) do
{
:tarmak_role => 'worker',
:tarmak_type_instance => 'tarmak',
}
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ write_files:
TARMAK_DESIRED_COUNT=${tarmak_desired_count}
TARMAK_VOLUME_ID=${tarmak_volume_id}
TARMAK_INSTANCE_POOL=${tarmak_instance_pool}
TARMAK_TYPE_INSTANCE=tarmak
ETCD_BACKUP_BUCKET_PREFIX=${etcd_backup_bucket_prefix}

- path: /etc/profile.d/tarmak.sh
Expand Down Expand Up @@ -114,7 +113,6 @@ write_files:
TARMAK_ENVIRONMENT=${tarmak_environment}
TARMAK_DESIRED_COUNT=${instance_count}
TARMAK_INSTANCE_POOL=${tarmak_instance_pool}
TARMAK_TYPE_INSTANCE=vault
VAULT_REGION=${region}
VAULT_ENVIRONMENT=${tarmak_environment}
VAULT_PRIVATE_IP=${private_ip}
Expand Down

0 comments on commit ff6437c

Please sign in to comment.