i’m trying to set up a simple static site to deploy with autodevops. I am using KAS to deploy to my kubernetes cluster. The problem I am struggling with is changing the port the default helm chart is expecting my application to run on.
I am using paketobuildpacks/builder:base
as my builder to put my application into an nginx container via the BP_WEB_SERVER variable.
here is my .gitlab-ci.yml file
variables:
POSTGRES_ENABLED: "false"
AUTO_DEVOPS_BUILD_IMAGE_CNB_PORT: "8080"
BP_WEB_SERVER: nginx
AUTO_DEVOPS_BUILD_IMAGE_CNB_ENABLED: "true"
AUTO_DEVOPS_BUILD_IMAGE_CNB_BUILDER: paketobuildpacks/builder:base
AUTO_DEVOPS_BUILD_IMAGE_FORWARDED_CI_VARIABLES: "BP_WEB_SERVER"
SAST_DISABLED: "true"
LICENSE_MANAGEMENT_DISABLED: "true"
DEPENDENCY_SCANNING_DISABLED: "true"
DAST_DISABLED: "true"
CONTAINER_SCANNING_DISABLED: "true"
CODE_QUALITY_DISABLED: "true"
PERFORMANCE_DISABLED: "true"
TEST_DISABLED: "true"
SECRET_DETECTION_DISABLED: "true"
include:
- template: Auto-DevOps.gitlab-ci.yml
When my application deploys, the target port is always 5000 even though I have specified AUTO_DEVOPS_BUILD_IMAGE_CNB_PORT variable in my job.
Is my understanding of AUTO_DEVOPS_BUILD_IMAGE_CNB_PORT or is this completely brokern?
I am running on-prem gitlab 15.4.2
$ kubectl describe svc -n website
Name: staging-auto-deploy
Namespace: website
Labels: app=staging
app.kubernetes.io/instance=staging
app.kubernetes.io/managed-by=Helm
app.kubernetes.io/name=staging
chart=auto-deploy-app-2.35.0
helm.sh/chart=auto-deploy-app-2.35.0
heritage=Helm
release=staging
track=stable
Annotations: meta.helm.sh/release-name: staging
meta.helm.sh/release-namespace: website
Selector: app=staging,tier=web,track=stable
Type: ClusterIP
IP Family Policy: SingleStack
IP Families: IPv4
IP: 10.43.190.219
IPs: 10.43.190.219
Port: web 5000/TCP
TargetPort: 5000/TCP
Endpoints:
Session Affinity: None
Events: <none>
Thanks