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
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- octopub-ingress.yaml
- octopub-products.yaml

configMapGenerator:
- name: product-service-env-vars
env: variables.properties

generatorOptions:
disableNameSuffixHash: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: octopub-ingress-products
annotations:
spec:
ingressClassName: nginx
rules:
- host:
http:
paths:
- path: /api/products
pathType: Prefix
backend:
service:
name: octopub-productservice-cluster-ip
port:
name: http-product
- path: /health/products
pathType: Prefix
backend:
service:
name: octopub-productservice-cluster-ip
port:
name: http-product
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: v1
kind: Service
metadata:
name: octopub-productservice-cluster-ip
spec:
type: ClusterIP
selector:
component: productservice
ports:
- port: 8083
targetPort: 8083
name: http-product
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: octopub-productservice-deployment
spec:
replicas: 1
selector:
matchLabels:
component: productservice
template:
metadata:
labels:
component: productservice
spec:
containers:
- name: productservice
image: octopussamples/octopub-products-microservice
ports:
- name: http-product
containerPort: 8083
env:
- name: MIGRATE_AT_START
valueFrom:
configMapKeyRef:
name: product-service-env-vars
key: MIGRATE_AT_START
- name: COGNITO_DISABLE_AUTH
valueFrom:
configMapKeyRef:
name: product-service-env-vars
key: COGNITO_DISABLE_AUTH
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../base

patches:
- target:
kind: Ingress
name: octopub-ingress-products
path: octopub-ingress.yaml
- target:
kind: Service
name: octopub-products-deployment
path: octopub-products-deployment.yaml
- target:
kind: Deployment
name: octopub-products-service
path: octopub-products-service.yaml

configMapGenerator:
- name: product-service-env-vars
behavior: merge
env: variables.properties

images:
- name: octopussamples/octopub-products-microservice
newName: ghcr.io/octopussamples/octopub-products-microservice
newTag: 20250917.431.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- op: replace
path: /spec/rules/0/host
value: "update-manifests-kustomize-octopub-test"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- op: replace
path: /spec/template/spec/containers/0/ports/0/containerPort
value: 8083
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- op: replace
path: /spec/ports/0/port
value: 8083
- op: replace
path: /spec/ports/0/targetPort
value: 8083
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../base

patches:
- target:
kind: Ingress
name: octopub-ingress-products
path: octopub-ingress.yaml
- target:
kind: Service
name: octopub-products-deployment
path: octopub-products-deployment.yaml
- target:
kind: Deployment
name: octopub-products-service
path: octopub-products-service.yaml

configMapGenerator:
- name: product-service-env-vars
behavior: merge
env: variables.properties

images:
- name: octopussamples/octopub-products-microservice
newName: ghcr.io/octopussamples/octopub-products-microservice
newTag: 20250917.431.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- op: replace
path: /spec/rules/0/host
value: "update-manifests-kustomize-octopub-test"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- op: replace
path: /spec/template/spec/containers/0/ports/0/containerPort
value: 8083
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- op: replace
path: /spec/ports/0/port
value: 8083
- op: replace
path: /spec/ports/0/targetPort
value: 8083