Skip to content

Commit

Permalink
Merge pull request #97 from wp-media/develop
Browse files Browse the repository at this point in the history
Add new IPs live1 & k8spod1
  • Loading branch information
MathieuLamiot authored May 22, 2024
2 parents 1a40ce8 + ac611d2 commit 4f0477f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions sources/handlers/ServerListHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ def __init__(self):
self.slack_message_factory = SlackMessageFactory()
self.ovh_api_factory = OvhApiFactory()

def get_groupone_live1_ipv4(self):
"""
Lists all IP used by live1 cluster from group.One
"""
live1_ips = ''
# Defined in k8s_sips:
# https://gitlab.one.com/systems/chef-repo/-/blob/master/roles/onecom-global-firewall-macros.json#L173
live1_ips += "46.30.212.67\n"
return live1_ips

def get_groupone_live2_ipv4(self):
"""
Lists all IP used by live2 cluster from group.One
Expand All @@ -30,6 +40,16 @@ def get_groupone_live2_ipv4(self):
live2_ips += "46.30.212.70\n46.30.212.71\n46.30.212.72\n46.30.212.73\n"
return live2_ips

def get_groupone_k8spod1_ipv4(self):
"""
Lists all IP used by k8spod1 cluster from group.One
"""
k8spod1_ips = ''
# Defined in k8s_sips:
# https://gitlab.one.com/systems/chef-repo/-/blob/master/roles/onecom-global-firewall-macros.json#L173
k8spod1_ips += "46.30.211.168\n"
return k8spod1_ips

def get_groupone_cpcss_ipv4(self):
"""
Lists all IPv4 used specifically by CPCSS service from group.One
Expand Down Expand Up @@ -86,6 +106,8 @@ def generate_wp_rocket_ips_human_readable(self, app_context):
# SaaS CNAME in https://gitlab.one.com/systems/group.one-authdns/-/blob/main/octodns/wp-rocket.me.yaml?ref_type=heads
text += self.get_groupone_saas_ipv4()
text += self.get_groupone_live2_ipv4()
text += self.get_groupone_live1_ipv4()
text += self.get_groupone_k8spod1_ipv4()
# OVH servers
all_server_list = self.ovh_api_factory.get_dedicated_servers(app_context)
ovh_ipv4 = ''
Expand Down Expand Up @@ -130,6 +152,8 @@ def generate_wp_rocket_ipv4_machine_readable(self, app_context):
text += self.get_groupone_saas_ipv4()
text += self.get_groupone_backend_ipv4()
text += self.get_groupone_live2_ipv4()
text += self.get_groupone_live1_ipv4()
text += self.get_groupone_k8spod1_ipv4()
# OVH servers
all_server_list = self.ovh_api_factory.get_dedicated_servers(app_context)
ovh_ipv4 = ''
Expand Down

0 comments on commit 4f0477f

Please sign in to comment.