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

Introduce experimental.managedServices.include helm value #3314

Merged
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
3 changes: 3 additions & 0 deletions README.helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ Here are all the values that can be set for the chart:
- `debug` (_Boolean_): Enables remote debugging with [Delve](https://github.com/go-delve/delve).
- `defaultAppDomainName` (_String_): Base domain name for application URLs.
- `eksContainerRegistryRoleARN` (_String_): Amazon Resource Name (ARN) of the IAM role to use to access the ECR registry from an EKS deployed Korifi. Required if containerRegistrySecret not set.
- `experimental`: Experimental features. Make sure you do not enable those on production. No guarantee provided! Backwards incompatible changes in future are quite probable!
- `managedServices`:
- `include` (_Boolean_): Enable managed services support
- `generateIngressCertificates` (_Boolean_): Use `cert-manager` to generate self-signed certificates for the API and app endpoints.
- `helm`:
- `hooksImage` (_String_): Image for the helm hooks containing kubectl
Expand Down
2 changes: 2 additions & 0 deletions api/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ type (
AuthProxyHost string `yaml:"authProxyHost"`
AuthProxyCACert string `yaml:"authProxyCACert"`
LogLevel zapcore.Level `yaml:"logLevel"`

ExperimentalManagedServicesEnabled bool `yaml:"experimentalManagedServicesEnabled"`
}

RoleLevel string
Expand Down
2 changes: 2 additions & 0 deletions api/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ var _ = Describe("Config", func() {
Stack: "lc-stack",
StagingMemoryMB: 10,
},
"experimentalManagedServicesEnabled": true,
}
})

Expand Down Expand Up @@ -88,6 +89,7 @@ var _ = Describe("Config", func() {
StagingMemoryMB: 10,
}))
Expect(cfg.ContainerRegistryType).To(BeEmpty())
Expect(cfg.ExperimentalManagedServicesEnabled).To(BeTrue())
})

When("the FQDN is not specified", func() {
Expand Down
2 changes: 2 additions & 0 deletions controllers/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ type ControllerConfig struct {
ContainerRepositoryPrefix string `yaml:"containerRepositoryPrefix"`
ContainerRegistryType string `yaml:"containerRegistryType"`
Networking Networking `yaml:"networking"`

ExperimentalManagedServicesEnabled bool `yaml:"experimentalManagedServicesEnabled"`
}

type CFProcessDefaults struct {
Expand Down
2 changes: 2 additions & 0 deletions controllers/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ var _ = Describe("LoadFromPath", func() {
GatewayName: "gw-name",
GatewayNamespace: "gw-ns",
},
ExperimentalManagedServicesEnabled: true,
}
})

Expand Down Expand Up @@ -94,6 +95,7 @@ var _ = Describe("LoadFromPath", func() {
GatewayName: "gw-name",
GatewayNamespace: "gw-ns",
},
ExperimentalManagedServicesEnabled: true,
}))
})

Expand Down
1 change: 1 addition & 0 deletions helm/korifi/api/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ data:
{{- if .Values.eksContainerRegistryRoleARN }}
containerRegistryType: "ECR"
{{- end }}
experimentalManagedServicesEnabled: {{ .Values.experimental.managedServices.include }}
role_mappings_config.yaml: |
roleMappings:
admin:
Expand Down
1 change: 1 addition & 0 deletions helm/korifi/controllers/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ data:
networking:
gatewayNamespace: {{ .Release.Namespace }}-gateway
gatewayName: korifi
experimentalManagedServicesEnabled: {{ .Values.experimental.managedServices.include }}

24 changes: 23 additions & 1 deletion helm/korifi/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,14 @@
"type": "string"
}
},
"required": ["description", "name", "minCLIVersion", "recommendedCLIVersion", "custom", "supportAddress"]
"required": [
"description",
"name",
"minCLIVersion",
"recommendedCLIVersion",
"custom",
"supportAddress"
]
},
"lifecycle": {
"type": "object",
Expand Down Expand Up @@ -579,6 +586,21 @@
}
},
"type": "object"
},
"experimental": {
"properties": {
"managedServices": {
"properties": {
"include": {
"description": "Enable managed services support",
"type": "boolean"
}
},
"type": "object"
}
},
"description": "Experimental features. Make sure you do not enable those on production. No guarantee provided! Backwards incompatible changes in future are quite probable!",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description": "Experimental features. Make sure you do not enable those on production. No guarantee provided! Backwards incompatible changes in future are quite probable!",
"description": "Experimental features. No guarantees are provided and breaking/backwards incompatible changes should be expected. These features are not recommended for use in production environments.",

Suggesting a minor wording tweak. Otherwise it all LGTM. 👍

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, I have merged that without noticing your comment. I am goind to put that in the next PR

"type": "object"
}
},
"required": [
Expand Down
10 changes: 8 additions & 2 deletions helm/korifi/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ eksContainerRegistryRoleARN: ""
containerRegistryCACertSecret:
systemImagePullSecrets: []

experimentalManagedServicesEnabled: false

reconcilers:
build: kpack-image-builder
run: statefulset-runner
Expand All @@ -23,7 +25,7 @@ api:
include: true

image: cloudfoundry/korifi-api:latest

nodeSelector: {}
tolerations: []
replicas: 1
Expand Down Expand Up @@ -66,7 +68,7 @@ api:

controllers:
image: cloudfoundry/korifi-controllers:latest

nodeSelector: {}
tolerations: []
replicas: 1
Expand Down Expand Up @@ -138,3 +140,7 @@ helm:

networking:
gatewayClass:

experimental:
managedServices:
include: false
1 change: 1 addition & 0 deletions scripts/deploy-on-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ function deploy_korifi() {
--set=kpackImageBuilder.clusterStackRunImage="paketobuildpacks/run-jammy-base" \
--set=kpackImageBuilder.builderRepository="$KPACK_BUILDER_REPOSITORY" \
--set=networking.gatewayClass="contour" \
--set=experimental.managedServices.include="true" \
--wait
}
popd >/dev/null
Expand Down
1 change: 1 addition & 0 deletions scripts/installer/install-korifi-kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ spec:
--set=kpackImageBuilder.clusterStackRunImage="paketobuildpacks/run-jammy-base" \
--set=kpackImageBuilder.builderRepository="localregistry-docker-registry.default.svc.cluster.local:30050/kpack-builder" \
--set=networking.gatewayClass="contour" \
--set=experimental.managedServices.include="true" \
--wait

kubectl wait --for=condition=ready clusterbuilder --all=true --timeout=15m
Expand Down