Skip to content

Commit

Permalink
Add app_log_revision property (#442)
Browse files Browse the repository at this point in the history
This new property enables app logs in the format APP/REV/<version>/PROC/WEB/<process>.

We added this property to the following jobs:
* cloud_controller_ng
* cc_deployment_updater
* cloud_controller_clock
* cloud_controller_worker

We believe cloud_controller_worker does not send desired_lrp actions to diego, however
we were not completely sure so we added it just incase.

Co-authored-by: Sam Gunaratne <[email protected]>
  • Loading branch information
sethboyles and Samze authored Jul 17, 2024
1 parent 3acffc9 commit 9e5b817
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,3 +275,5 @@ max_annotations_per_resource: <%= link("cloud_controller_internal").p("cc.max_an
cpu_weight_min_memory: <%= link("cloud_controller_internal").p("cc.cpu_weight_min_memory") %>
cpu_weight_max_memory: <%= link("cloud_controller_internal").p("cc.cpu_weight_max_memory") %>
custom_metric_tag_prefix_list: <%= link("cloud_controller_internal").p("cc.custom_metric_tag_prefix_list") %>

app_log_revision: <%= link("cloud_controller_internal").p("cc.app_log_revision") %>
Original file line number Diff line number Diff line change
Expand Up @@ -358,3 +358,5 @@ max_annotations_per_resource: <%= link("cloud_controller_internal").p("cc.max_an
cpu_weight_min_memory: <%= link("cloud_controller_internal").p("cc.cpu_weight_min_memory") %>
cpu_weight_max_memory: <%= link("cloud_controller_internal").p("cc.cpu_weight_max_memory") %>
custom_metric_tag_prefix_list: <%= link("cloud_controller_internal").p("cc.custom_metric_tag_prefix_list") %>

app_log_revision: <%= link("cloud_controller_internal").p("cc.app_log_revision") %>
4 changes: 4 additions & 0 deletions jobs/cloud_controller_ng/spec
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ provides:
- uaa.clients.cc_routing.secret
- cc.experimental.use_puma_webserver
- cc.experimental.use_redis
- cc.app_log_revision

consumes:
- name: database
Expand Down Expand Up @@ -800,6 +801,9 @@ properties:
cc.default_app_ssh_access:
default: true
description: "When ssh is allowed and not explicitly set in the application, new applications will start with ssh service enabled"
cc.app_log_revision:
default: false
description: "Add revision version to an app's log source. Only applies if an App is using revisions. For example, app logs will be prefixed with APP/REV/1/PROC/WEB/0"
cc.client_max_body_size:
default: "15M"
description: "Maximum body size for nginx"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,8 @@ cc_service_key_client_secret: <%= p("uaa.clients.cc_service_key_client.secret")
allow_app_ssh_access: <%= p("cc.allow_app_ssh_access") %>
default_app_ssh_access: <%= p("cc.default_app_ssh_access") %>

app_log_revision: <%= p("cc.app_log_revision") %>

skip_cert_verify: <%= p("ssl.skip_cert_verify") %>

install_buildpacks: <%= p("cc.install_buildpacks").to_json %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,3 +349,5 @@ custom_metric_tag_prefix_list: <%= link("cloud_controller_internal").p("cc.custo
cpu_weight_min_memory: <%= link("cloud_controller_internal").p("cc.cpu_weight_min_memory") %>
cpu_weight_max_memory: <%= link("cloud_controller_internal").p("cc.cpu_weight_max_memory") %>
max_manifest_service_binding_poll_duration_in_seconds: <%= p("cc.max_manifest_service_binding_poll_duration_in_seconds") %>

app_log_revision: <%= link("cloud_controller_internal").p("cc.app_log_revision") %>
3 changes: 2 additions & 1 deletion spec/cloud_controller_clock/cloud_controller_clock_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ module Test
'disable_private_domain_cross_space_context_path_route_sharing' => false,
'cpu_weight_min_memory' => 128,
'cpu_weight_max_memory' => 8192,
'custom_metric_tag_prefix_list' => ['heck.yes.example.com']
'custom_metric_tag_prefix_list' => ['heck.yes.example.com'],
'app_log_revision' => true
}
}
end
Expand Down
3 changes: 2 additions & 1 deletion spec/cloud_controller_worker/cloud_controller_worker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ module Test
'custom_metric_tag_prefix_list' => ['heck.yes.example.com'],
'jobs' => {
'enable_dynamic_job_priorities' => false
}
},
'app_log_revision' => true
}
}
end
Expand Down

0 comments on commit 9e5b817

Please sign in to comment.