Filename: Private: No Yes Filetype: Auto ABAP Sophia Apex Azure CLI Batch Bicep C Cameligo Clojure CoffeeScript C++ C# CSP CSS Cypher Dart Dockerfile ECL Elixir Flow9 FreeMarker2 FreeMarker2 (Angle/Bracket) FreeMarker2 (Angle/Dollar) FreeMarker2 (Auto/Bracket) FreeMarker2 (Auto/Dollar) FreeMarker2 (Bracket/Bracket) FreeMarker2 (Bracket/Dollar) F# Go GraphQL Handlebars Terraform HTML Ini Java JavaScript Julia Kotlin Less Lexon Liquid Lua Modula-3 Markdown MDX MIPS DAX MySQL Objective-C Pascal Pascaligo Perl PostgreSQL PHP Plain text ATS PQ PowerShell Protobuf Pug Python Q# R Razor Redis Redshift ReStructuredText Ruby Rust Small Basic Scala Scheme Sass Shell Solidity SPARQL SQL StructuredText Swift SV Tcl Twig TypeScript TypeSpec Visual Basic V WebGPU Shading Language XML YAML Indentation: Spaces Tabs 1 2 3 4 5 6 7 8 Clone {{- define "allocatable-cpu" -}} {{- $ctx := index . 0 -}} {{- $resources := index . 1 -}} {{- $type := index . 2 -}} {{- $cpu := int ((include "trim-cpu" $resources.requests.cpu ) ) -}} {{- $metricsCPU := ( include "metrics-cpu" $ctx ) -}} {{- $stateCPU := 0 -}} {{- if or (eq $type "maxscale") (eq $type "server") -}} {{- $stateCPU := ( include "state-cpu" $ctx ) -}} {{- end -}} {{- $ldapCPU := 0 -}} {{- if eq $type "server" -}} {{- $ldapCPU = ( include "ldap-cpu" $ctx ) -}} {{- end -}} {{- $maxscaleNginxCPU := 0 -}} {{- if eq $type "maxscale" -}} {{- $maxscaleNginxCPU = ( include "maxscale-envoy-cpu" $ctx ) -}} {{- end -}} {{- $safetyCPU := ( include "safety-cpu" $ctx ) -}} {{- $laceworkCPU := ( include "lacework-cpu" $ctx ) -}} {{ sub $cpu (add $metricsCPU $stateCPU $ldapCPU $safetyCPU $laceworkCPU $maxscaleNginxCPU) }} {{- end -}} Paste