Skip to content

Commit

Permalink
Add new label to each created object to allow for easy filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Matsuoka committed Dec 18, 2024
1 parent d747bc3 commit adb47cc
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions templates/jlink/jlinked-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ metadata:
annotations:
description: Template to produce imagestreams and buildconfigs for jlinked application
name: jlink-app-template
labels:
jlink-app-name: ${APPNAME}
##############################################################################
# List of parameters required to create template
parameters:
Expand Down Expand Up @@ -47,6 +49,8 @@ objects:
kind: ImageStream
metadata:
name: ${APPNAME}-ubi9-openjdk-${JDK_VERSION}-jlink
labels:
jlink-app-name: ${APPNAME}
spec:
lookupPolicy:
local: false
Expand All @@ -58,6 +62,7 @@ objects:
name: ${APPNAME}-jlink-builder-jdk-${JDK_VERSION}
labels:
app: ${APPNAME}-jlink-builder-jdk-${JDK_VERSION}
jlink-app-name: ${APPNAME}
spec:
source:
dockerfile: |
Expand Down Expand Up @@ -97,6 +102,8 @@ objects:
kind: ImageStream
metadata:
name: ${APPNAME}-intermediate
labels:
jlink-app-name: ${APPNAME}
spec:
lookupPolicy:
local: false
Expand All @@ -108,6 +115,7 @@ objects:
name: ${APPNAME}-jlink-s2i-jdk-${JDK_VERSION}
labels:
app: ${APPNAME}-jlink-s2i-jdk-${JDK_VERSION}
jlink-app-name: ${APPNAME}
spec:
source:
type: Git
Expand Down Expand Up @@ -147,6 +155,8 @@ objects:
kind: ImageStream
metadata:
name: ${APPNAME}-ubimicro
labels:
jlink-app-name: ${APPNAME}
spec:
lookupPolicy:
local: true
Expand Down Expand Up @@ -234,6 +244,8 @@ objects:
name: ${APPNAME}-jlinked-app-deployment
annotations:
template.alpha.openshift.io/wait-for-ready: "true"
labels:
jlink-app-name: ${APPNAME}
spec:
replicas: 1
selector:
Expand Down Expand Up @@ -267,6 +279,8 @@ objects:
kind: Service
metadata:
name: ${APPNAME}-jlinked-app-service
labels:
jlink-app-name: ${APPNAME}
spec:
selector:
app: ${APPNAME}-jlinked-app
Expand All @@ -279,6 +293,8 @@ objects:
kind: Route
metadata:
name: ${APPNAME}-jlinked-app-route
labels:
jlink-app-name: ${APPNAME}
spec:
to:
kind: Service
Expand All @@ -289,6 +305,8 @@ objects:
kind: Pod
metadata:
name: ${APPNAME}-jlinked-app-pod
labels:
jlink-app-name: ${APPNAME}
spec:
containers:
- image: ${APPNAME}-lightweight-image:latest
Expand Down

0 comments on commit adb47cc

Please sign in to comment.