Skip to content
Open
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
9 changes: 7 additions & 2 deletions apis/installer/v1alpha1/ace_platform_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ type PlatformApiSpec struct {
//+optional
PodSecurityContext *core.PodSecurityContext `json:"podSecurityContext"`
//+optional
SecurityContext *core.SecurityContext `json:"securityContext"`
Service AceServiceSpec `json:"service"`
SecurityContext *core.SecurityContext `json:"securityContext"`
Service AcePlatformAPIServiceSpec `json:"service"`
//+optional
Resources core.ResourceRequirements `json:"resources"`
Autoscaling AutoscalingSpec `json:"autoscaling"`
Expand Down Expand Up @@ -105,6 +105,11 @@ type PlatformApiSpec struct {
Distro shared.DistroSpec `json:"distro"`
}

type AcePlatformAPIServiceSpec struct {
AceServiceSpec `json:",inline,omitempty"`
Metrics *AceMetricsSpec `json:"metrics,omitempty"`
}

type AceAPISettings struct {
CAProviderClass string `json:"caProviderClass"`
SkipGCPMarketplaceMeteringService bool `json:"skipGCPMarketplaceMeteringService"`
Expand Down
5 changes: 5 additions & 0 deletions apis/installer/v1alpha1/ace_shared_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ type AceServiceSpec struct {
Port int `json:"port"`
}

type AceMetricsSpec struct {
Enabled bool `json:"enabled"`
Port int `json:"port"`
}

type AutoscalingSpec struct {
Enabled bool `json:"enabled"`
MinReplicas int `json:"minReplicas"`
Expand Down
38 changes: 37 additions & 1 deletion apis/installer/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions charts/ace/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20378,6 +20378,16 @@ properties:
type: object
service:
properties:
metrics:
properties:
enabled:
type: boolean
port:
type: integer
required:
- enabled
- port
type: object
port:
type: integer
type:
Expand Down
2 changes: 2 additions & 0 deletions charts/platform-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ The following table lists the configurable parameters of the `platform-api` char
| securityContext | Security options this container should run with | <code>{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsNonRoot":true,"runAsUser":65534,"seccompProfile":{"type":"RuntimeDefault"}}</code> |
| service.type | | <code>ClusterIP</code> |
| service.port | | <code>80</code> |
| service.metrics.enabled | | <code>true</code> |
| service.metrics.port | | <code>9090</code> |
| resources | | <code>{}</code> |
| autoscaling.enabled | | <code>false</code> |
| autoscaling.minReplicas | | <code>1</code> |
Expand Down
12 changes: 12 additions & 0 deletions charts/platform-api/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ spec:
targetPort: http
protocol: TCP
name: http
{{- if .Values.service.metrics.enabled }}
- port: {{ .Values.service.metrics.port }}
targetPort: http
protocol: TCP
name: metrics
{{- end }}
selector:
{{- include "platform-api.selectorLabels" . | nindent 4 }}

Expand All @@ -33,6 +39,12 @@ spec:
targetPort: http
protocol: TCP
name: http
{{- if .Values.service.metrics.enabled }}
- port: {{ .Values.service.metrics.port }}
targetPort: http
protocol: TCP
name: metrics
{{- end }}
# selector needed to create pods dns name
selector:
{{- include "platform-api.selectorLabels" . | nindent 4 }}
10 changes: 10 additions & 0 deletions charts/platform-api/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,16 @@ properties:
type: object
service:
properties:
metrics:
properties:
enabled:
type: boolean
port:
type: integer
required:
- enabled
- port
type: object
port:
type: integer
type:
Expand Down
3 changes: 3 additions & 0 deletions charts/platform-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ securityContext: # +doc-gen:break
service:
type: ClusterIP
port: 80
metrics:
enabled: true
port: 9090

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
Expand Down