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

ipam grpc server #99

Merged
merged 6 commits into from
Jul 3, 2024
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
23 changes: 16 additions & 7 deletions control-plane/roles/metal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ You can look up all the default values of this role [here](defaults/main/main.ya
### Images

| Name | Mandatory | Description |
|----------------------------------------|-----------|-----------------------------------------|
| -------------------------------------- | --------- | --------------------------------------- |
| metal_api_image_name | yes | Image version of the metal-api |
| metal_api_image_tag | yes | Image tag of the metal-api |
| metal_api_image_pull_policy | | Image pull policy of the metal-api |
Expand All @@ -38,6 +38,8 @@ You can look up all the default values of this role [here](defaults/main/main.ya
| metal_masterdata_api_image_name | yes | Image version of the masterdata-api |
| metal_masterdata_api_image_tag | yes | Image tag of the masterdata-api |
| metal_masterdata_api_image_pull_policy | | Image pull policy of the masterdata-api |
| metal_ipam_image_name | yes | Image version of the ipam |
| metal_ipam_image_tag | yes | Image tag of the ipam |

### Service Ports

Expand All @@ -52,7 +54,7 @@ You can look up all the default values of this role [here](defaults/main/main.ya
### metal-api

| Name | Mandatory | Description |
|-------------------------------------|-----------|------------------------------------------------------------------------------------------------|
| ----------------------------------- | --------- | ---------------------------------------------------------------------------------------------- |
| metal_api_replicas | | The number of deployed replicas of the metal-api |
| metal_api_hpa_enabled | | Enables horizontal pod autoscaling for the metal-api |
| metal_api_hpa_max | | Max amount of replicas for the HPA of the metal-api |
Expand All @@ -63,11 +65,7 @@ You can look up all the default values of this role [here](defaults/main/main.ya
| metal_api_dex_clientid | | The trusted dex clientid |
| metal_api_db_address | | The URL of the metal-db |
| metal_api_db_password | | The password of the metal-db |
| metal_api_ipam_db_address | | The URL to the ipam database |
| metal_api_ipam_db_port | | The port of the ipam database |
| metal_api_ipam_db_name | | The database name of the ipam database |
| metal_api_ipam_db_user | | The user of the ipam database |
| metal_api_ipam_db_password | | The password of the ipam database |
| metal_api_ipam_grpc_server_endpoint | | The grpc endpoint address of the ipam grpc service (requires scheme) |
| metal_api_nsq_lookupd_address | | The http address of nsqlookupd (only used for in-cluster traffic) |
| metal_api_nsq_tcp_address | | The tcp address of nsqd |
| metal_api_nsq_http_address | | The http address of nsqd (only used for in-cluster traffic) |
Expand Down Expand Up @@ -131,6 +129,17 @@ You can look up all the default values of this role [here](defaults/main/main.ya
| metal_console_bmc_proxy_certs_client_cert | | The bmc-proxy client certificate as a string (required if enabled) |
| metal_console_bmc_proxy_certs_client_key | | The bmc-proxy client key as a string (required if enabled) |

### ipam

| Name | Mandatory | Description |
| ---------------------- | --------- | --------------------------------------------------------------------------------- |
| metal_ipam_db_address | | The hostname of the ipam service |
| metal_ipam_db_port | | The port of the ipam service |
| metal_ipam_db_name | | The database name of the ipam service |
| metal_ipam_db_user | | The user of the ipam service |
| metal_ipam_db_password | | The password of the ipam service |
| metal_ipam_log_level | | The log level for the ipam service (metal_log_level is not used for this service) |

### Ingress

| Name | Mandatory | Description |
Expand Down
15 changes: 10 additions & 5 deletions control-plane/roles/metal/defaults/main/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,7 @@ metal_api_dex_address: ""
metal_api_dex_clientid: ""
metal_api_db_address: metal-db
metal_api_db_password: change-me
metal_api_ipam_db_address: ipam-db
metal_api_ipam_db_port: 5432
metal_api_ipam_db_name: ipam
metal_api_ipam_db_user: postgres
metal_api_ipam_db_password: change-me
metal_api_ipam_grpc_server_endpoint: http://ipam:9090
metal_api_nsq_tcp_address: "{{ metal_control_plane_ingress_dns }}:4150"
metal_api_nsq_http_address: "nsqd:4151"
metal_api_nsq_lookupd_address: "nsq-lookupd:4161"
Expand Down Expand Up @@ -80,6 +76,15 @@ metal_masterdata_api_resources:
metal_masterdata_api_tenants: []
metal_masterdata_api_projects: []

# ipam
metal_ipam_image_pull_policy: "{{ metal_control_plane_image_pull_policy }}"
metal_ipam_db_address: ipam-db
metal_ipam_db_port: 5432
metal_ipam_db_name: ipam
metal_ipam_db_user: postgres
metal_ipam_db_password: change-me
metal_ipam_log_level: debug

# metal-console
metal_console_image_pull_policy: "{{ metal_control_plane_image_pull_policy }}"
metal_console_enabled: false
Expand Down
2 changes: 2 additions & 0 deletions control-plane/roles/metal/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
- metal_masterdata_api_tls_cert_key is defined
- metal_masterdata_api_tls_client_cert is defined
- metal_masterdata_api_tls_client_key is defined
- metal_ipam_image_name is defined
- metal_ipam_image_tag is defined
- metal_console_image_name is defined
- metal_console_image_tag is defined
- metal_helm_chart_local_path is not none or metal_helm_chart_repo is defined
Expand Down
19 changes: 14 additions & 5 deletions control-plane/roles/metal/templates/metal-values.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ images:
image: "{{ metal_masterdata_api_image_name }}"
imagePullPolicy: "{{ metal_masterdata_api_image_pull_policy }}"
tag: "{{ metal_masterdata_api_image_tag }}"
ipam:
image: "{{ metal_ipam_image_name }}"
imagePullPolicy: "{{ metal_console_image_pull_policy }}"
tag: "{{ metal_ipam_image_tag }}"

resources:
{% if metal_api_resources %}
Expand Down Expand Up @@ -59,14 +63,19 @@ ports:
masterdata_api_metrics: {{ metal_masterdata_api_metrics_port }}
metal_console: {{ metal_console_port }}

ipam:
db_host: "{{ metal_ipam_db_address }}"
db_port: "{{ metal_ipam_db_port }}"
db_name: "{{ metal_ipam_db_name }}"
db_user: "{{ metal_ipam_db_user }}"
db_password: "{{ metal_ipam_db_password }}"
log_level: "{{ metal_ipam_log_level }}"

metal_api:
db_address: "{{ metal_api_db_address }}"
db_password: "{{ metal_api_db_password }}"
ipam_db_address: "{{ metal_api_ipam_db_address }}"
ipam_db_port: "{{ metal_api_ipam_db_port }}"
ipam_db_name: "{{ metal_api_ipam_db_name }}"
ipam_db_user: "{{ metal_api_ipam_db_user }}"
ipam_db_password: "{{ metal_api_ipam_db_password }}"
ipam_grpc_server_endpoint: "{{ metal_api_ipam_grpc_server_endpoint }}"

nsq:
lookupd_address: "{{ metal_api_nsq_lookupd_address }}"
tcp_address: "{{ metal_api_nsq_tcp_address }}"
Expand Down
2 changes: 2 additions & 0 deletions defaults/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ metal_stack_release:
metal_masterdata_api_image_name: "docker-images.metal-stack.control-plane.masterdata-api.name"
metal_console_image_tag: "docker-images.metal-stack.control-plane.metal-console.tag"
metal_console_image_name: "docker-images.metal-stack.control-plane.metal-console.name"
metal_ipam_image_tag: "docker-images.metal-stack.control-plane.ipam.tag"
metal_ipam_image_name: "docker-images.metal-stack.control-plane.ipam.name"
metal_metrics_exporter_image_tag: "docker-images.metal-stack.control-plane.metal-metrics-exporter.tag"
metal_metrics_exporter_image_name: "docker-images.metal-stack.control-plane.metal-metrics-exporter.name"
rethinkdb_exporter_name: "docker-images.metal-stack.control-plane.rethinkdb-exporter.name"
Expand Down
Loading