Skip to content

Commit

Permalink
Merge pull request #102 from ruromero/commonConfig
Browse files Browse the repository at this point in the history
CommonConfig clean up
  • Loading branch information
openshift-merge-robot authored Mar 19, 2019
2 parents ebaafea + 75131e6 commit 6f80666
Show file tree
Hide file tree
Showing 19 changed files with 166 additions and 373 deletions.
50 changes: 25 additions & 25 deletions config/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ console:
from:
kind: ImageStreamTag
namespace: openshift
name: "[[.Product]][[.Version]]-[[.Console.ImageName]]-openshift:[[.ImageTag]]"
name: "[[.Constants.Product]][[.Version]]-[[.Console.ImageName]]-openshift:[[.ImageTag]]"
- type: ConfigChange
replicas: [[.Console.Replicas]]
selector:
Expand All @@ -32,11 +32,11 @@ console:
application: "[[.ApplicationName]]"
service: "[[.ApplicationName]]-[[.Console.Name]]"
spec:
serviceAccountName: "[[.ApplicationName]]-[[.Product]]svc"
serviceAccountName: "[[.ApplicationName]]-[[.Constants.Product]]svc"
terminationGracePeriodSeconds: 60
containers:
- name: "[[.ApplicationName]]-[[.Console.Name]]"
image: "[[.Product]][[.Version]]-[[.Console.ImageName]]-openshift"
image: "[[.Constants.Product]][[.Version]]-[[.Console.ImageName]]-openshift"
imagePullPolicy: Always
resources:
limits:
Expand Down Expand Up @@ -199,13 +199,13 @@ console:
## RoleMapping config END
# Auth config END
volumeMounts:
- name: "[[.ApplicationName]]-[[.Console.Name]]-keystore-volume"
- name: "[[.ApplicationName]]-[[.Console.Name]]-[[.Constants.KeystoreVolumeSuffix]]"
mountPath: "/etc/businesscentral-secret-volume"
readOnly: true
- name: "[[.ApplicationName]]-[[.Console.Name]]-pvol"
mountPath: "/opt/eap/standalone/data/kie"
volumes:
- name: "[[.ApplicationName]]-[[.Console.Name]]-keystore-volume"
- name: "[[.ApplicationName]]-[[.Console.Name]]-[[.Constants.KeystoreVolumeSuffix]]"
secret:
secretName: "[[.Console.KeystoreSecret]]"
- name: "[[.ApplicationName]]-[[.Console.Name]]-pvol"
Expand Down Expand Up @@ -310,7 +310,7 @@ smartRouter:
from:
kind: ImageStreamTag
namespace: "openshift"
name: "[[.Product]][[.Version]]-smartrouter-openshift:[[.ImageTag]]"
name: "[[.Constants.Product]][[.Version]]-smartrouter-openshift:[[.ImageTag]]"
- type: ConfigChange
replicas: [[.SmartRouter.Replicas]]
selector:
Expand All @@ -327,7 +327,7 @@ smartRouter:
terminationGracePeriodSeconds: 60
containers:
- name: "[[.ApplicationName]]-smartrouter"
image: "[[.Product]][[.Version]]-smartrouter-openshift"
image: "[[.Constants.Product]][[.Version]]-smartrouter-openshift"
imagePullPolicy: Always
resources:
limits:
Expand Down Expand Up @@ -364,20 +364,20 @@ smartRouter:
- name: KIE_SERVER_CONTROLLER_PROTOCOL
value: "http"
- name: KIE_SERVER_ROUTER_REPO
value: "/opt/[[.Product]]-smartrouter/data"
value: "/opt/[[.Constants.Product]]-smartrouter/data"
- name: KIE_SERVER_ROUTER_CONFIG_WATCHER_ENABLED
value: "true"
volumeMounts:
- name: "[[.ApplicationName]]-smartrouter"
mountPath: "/opt/[[.Product]]-smartrouter/data"
- name: smartrouter-keystore-volume
mountPath: "/opt/[[.Constants.Product]]-smartrouter/data"
- name: smartrouter-[[.Constants.KeystoreVolumeSuffix]]
mountPath: "/etc/smartrouter-secret-volume"
readOnly: true
volumes:
- name: "[[.ApplicationName]]-smartrouter"
persistentVolumeClaim:
claimName: "[[.ApplicationName]]-smartrouter-claim"
- name: smartrouter-keystore-volume
- name: smartrouter-[[.Constants.KeystoreVolumeSuffix]]
secret:
secretName: "[[.SmartRouter.KeystoreSecret]]"
services:
Expand Down Expand Up @@ -459,11 +459,11 @@ servers:
service: "[[.KieName]]"
deploymentConfig: "[[.KieName]]"
spec:
serviceAccountName: "[[$.ApplicationName]]-[[$.Product]]svc"
serviceAccountName: "[[$.ApplicationName]]-[[$.Constants.Product]]svc"
terminationGracePeriodSeconds: 60
containers:
- name: "[[.KieName]]"
image: "[[$.Product]][[$.Version]]-kieserver-openshift"
image: "[[$.Constants.Product]][[$.Version]]-kieserver-openshift"
imagePullPolicy: Always
env:
- name: KIE_ADMIN_USER
Expand Down Expand Up @@ -496,15 +496,15 @@ servers:
fieldPath: status.podIP
- name: KIE_SERVER_ID
value: "[[.KieName]]"
- name: "[[$.MavenRepo]]_MAVEN_REPO_USERNAME"
- name: "[[$.Constants.MavenRepo]]_MAVEN_REPO_USERNAME"
value: mavenUser
- name: "[[$.MavenRepo]]_MAVEN_REPO_PASSWORD"
- name: "[[$.Constants.MavenRepo]]_MAVEN_REPO_PASSWORD"
value: "[[$.MavenPassword]]"
- name: "[[$.MavenRepo]]_MAVEN_REPO_SERVICE"
- name: "[[$.Constants.MavenRepo]]_MAVEN_REPO_SERVICE"
value: "[[$.ApplicationName]]-[[$.Console.Name]]"
- name: MAVEN_REPOS
value: "[[$.MavenRepo]],EXTERNAL"
- name: "[[$.MavenRepo]]_MAVEN_REPO_PATH"
value: "[[$.Constants.MavenRepo]],EXTERNAL"
- name: "[[$.Constants.MavenRepo]]_MAVEN_REPO_PATH"
value: /maven2/
- name: KIE_SERVER_BYPASS_AUTH_USER
value: "false"
Expand Down Expand Up @@ -642,10 +642,10 @@ servers:
protocol: TCP
volumeMounts:
- mountPath: /etc/kieserver-secret-volume
name: kieserver-keystore-volume
name: kieserver-[[$.Constants.KeystoreVolumeSuffix]]
readOnly: true
volumes:
- name: kieserver-keystore-volume
- name: kieserver-[[$.Constants.KeystoreVolumeSuffix]]
secret:
secretName: "[[.KeystoreSecret]]"
## KIE server deployment config END
Expand Down Expand Up @@ -720,7 +720,7 @@ servers:
others:
- roles:
- metadata:
name: "[[.ApplicationName]]-[[.Product]]svc-edit"
name: "[[.ApplicationName]]-[[.Constants.Product]]svc-edit"
rules:
- apiGroups:
- ""
Expand All @@ -740,18 +740,18 @@ others:

serviceAccounts:
- metadata:
name: "[[.ApplicationName]]-[[.Product]]svc"
name: "[[.ApplicationName]]-[[.Constants.Product]]svc"
labels:
app: "[[.ApplicationName]]"
application: "[[.ApplicationName]]"

rolebindings:
- metadata:
name: "[[.ApplicationName]]-[[.Product]]svc-edit"
name: "[[.ApplicationName]]-[[.Constants.Product]]svc-edit"
subjects:
- kind: ServiceAccount
name: "[[.ApplicationName]]-[[.Product]]svc"
name: "[[.ApplicationName]]-[[.Constants.Product]]svc"
roleRef:
kind: Role
name: "[[.ApplicationName]]-[[.Product]]svc-edit"
name: "[[.ApplicationName]]-[[.Constants.Product]]svc-edit"
# Other required resources END
6 changes: 3 additions & 3 deletions config/dbs/h2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ servers:
containers:
- name: "[[.KieName]]"
volumeMounts:
- name: "[[.KieName]]-h2-pvol"
- name: "[[.KieName]]-h2-[[$.Constants.DatabaseVolumeSuffix]]"
mountPath: "/opt/eap/standalone/data"
## [[ if ne .Database.Size "" ]]
volumes:
## H2 volume settings BEGIN
- name: "[[.KieName]]-h2-pvol"
- name: "[[.KieName]]-h2-[[$.Constants.DatabaseVolumeSuffix]]"
persistentVolumeClaim:
claimName: "[[.KieName]]-h2-claim"
## KIE server deployment config END
Expand All @@ -41,7 +41,7 @@ servers:
## [[ else ]]
volumes:
## H2 volume settings BEGIN
- name: "[[.KieName]]-h2-pvol"
- name: "[[.KieName]]-h2-[[$.Constants.DatabaseVolumeSuffix]]"
emptyDir: {}
## [[ end ]]
#[[end]]
Expand Down
6 changes: 3 additions & 3 deletions config/dbs/mysql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ servers:
value: "rhpam7"
volumeMounts:
- mountPath: "/var/lib/mysql/data"
name: "[[.KieName]]-mysql-pvol"
name: "[[.KieName]]-mysql-[[$.Constants.DatabaseVolumeSuffix]]"
## [[ if ne .Database.Size "" ]]
volumes:
- name: "[[.KieName]]-mysql-pvol"
- name: "[[.KieName]]-mysql-[[$.Constants.DatabaseVolumeSuffix]]"
persistentVolumeClaim:
claimName: "[[.KieName]]-mysql-claim"
## MySQL persistent volume claim BEGIN
Expand All @@ -127,7 +127,7 @@ servers:
## MySQL persistent volume claim END
## [[ else ]]
volumes:
- name: "[[.KieName]]-mysql-pvol"
- name: "[[.KieName]]-mysql-[[$.Constants.DatabaseVolumeSuffix]]"
emptyDir: {}
## [[ end ]]
## MySQL deployment END
Expand Down
6 changes: 3 additions & 3 deletions config/dbs/postgresql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ servers:
value: "100"
volumeMounts:
- mountPath: "/var/lib/pgsql/data"
name: "[[.KieName]]-postgresql-pvol"
name: "[[.KieName]]-postgresql-[[$.Constants.DatabaseVolumeSuffix]]"
## [[ if ne .Database.Size "" ]]
volumes:
- name: "[[.KieName]]-postgresql-pvol"
- name: "[[.KieName]]-postgresql-[[$.Constants.DatabaseVolumeSuffix]]"
persistentVolumeClaim:
claimName: "[[.KieName]]-postgresql-claim"
## PostgreSQL deployment config END
Expand All @@ -127,7 +127,7 @@ servers:
## PostgreSQL persistent volume claim END
## [[ else ]]
volumes:
- name: "[[.KieName]]-postgresql-pvol"
- name: "[[.KieName]]-postgresql-[[$.Constants.DatabaseVolumeSuffix]]"
emptyDir: {}
## [[ end ]]
services:
Expand Down
40 changes: 20 additions & 20 deletions config/envs/rhdm-authoring-ha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ console:
protocol: TCP
env:
- name: APPFORMER_ELASTIC_HOST
value: "[[.ApplicationName]]-[[.Product]]index"
value: "[[.ApplicationName]]-[[.Constants.Product]]index"
- name: APPFORMER_JMS_BROKER_ADDRESS
value: "[[.ApplicationName]]-amq-tcp"
- name: APPFORMER_JMS_BROKER_USER
Expand Down Expand Up @@ -60,7 +60,7 @@ smartRouter:
others:
- persistentVolumeClaims:
- metadata:
name: "[[.ApplicationName]]-[[.Product]]index-claim"
name: "[[.ApplicationName]]-[[.Constants.Product]]index-claim"
labels:
app: "[[.ApplicationName]]"
application: "[[.ApplicationName]]"
Expand All @@ -73,11 +73,11 @@ others:

deploymentConfigs:
- metadata:
name: "[[.ApplicationName]]-[[.Product]]index"
name: "[[.ApplicationName]]-[[.Constants.Product]]index"
labels:
app: "[[.ApplicationName]]"
application: "[[.ApplicationName]]"
service: "[[.ApplicationName]]-[[.Product]]index"
service: "[[.ApplicationName]]-[[.Constants.Product]]index"
spec:
strategy:
type: Recreate
Expand All @@ -86,30 +86,30 @@ others:
imageChangeParams:
automatic: true
containerNames:
- "[[.ApplicationName]]-[[.Product]]index"
- "[[.ApplicationName]]-[[.Constants.Product]]index"
from:
kind: ImageStreamTag
namespace: "openshift"
name: "[[.Product]][[.Version]]-[[.Console.ImageName]]-indexing-openshift:[[.ImageTag]]"
name: "[[.Constants.Product]][[.Version]]-[[.Console.ImageName]]-indexing-openshift:[[.ImageTag]]"
- type: ConfigChange
replicas: 1
selector:
deploymentConfig: "[[.ApplicationName]]-[[.Product]]index"
deploymentConfig: "[[.ApplicationName]]-[[.Constants.Product]]index"
template:
metadata:
name: "[[.ApplicationName]]-[[.Product]]index"
name: "[[.ApplicationName]]-[[.Constants.Product]]index"
labels:
deploymentConfig: "[[.ApplicationName]]-[[.Product]]index"
deploymentConfig: "[[.ApplicationName]]-[[.Constants.Product]]index"
app: "[[.ApplicationName]]"
application: "[[.ApplicationName]]"
spec:
terminationGracePeriodSeconds: 60
containers:
- name: "[[.ApplicationName]]-[[.Product]]index"
image: "[[.Product]][[.Version]]-[[.Console.ImageName]]-indexing-openshift"
- name: "[[.ApplicationName]]-[[.Constants.Product]]index"
image: "[[.Constants.Product]][[.Version]]-[[.Console.ImageName]]-indexing-openshift"
imagePullPolicy: Always
volumeMounts:
- name: "[[.ApplicationName]]-[[.Product]]index-pvol"
- name: "[[.ApplicationName]]-[[.Constants.Product]]index-pvol"
mountPath: "/opt/elasticsearch/data"
livenessProbe:
tcpSocket:
Expand All @@ -131,9 +131,9 @@ others:
containerPort: 9200
protocol: TCP
volumes:
- name: "[[.ApplicationName]]-[[.Product]]index-pvol"
- name: "[[.ApplicationName]]-[[.Constants.Product]]index-pvol"
persistentVolumeClaim:
claimName: "[[.ApplicationName]]-[[.Product]]index-claim"
claimName: "[[.ApplicationName]]-[[.Constants.Product]]index-claim"

- metadata:
labels:
Expand Down Expand Up @@ -238,20 +238,20 @@ others:
port: 9300
targetPort: 9300
selector:
deploymentConfig: "[[.ApplicationName]]-[[.Product]]index"
deploymentConfig: "[[.ApplicationName]]-[[.Constants.Product]]index"
metadata:
name: "[[.ApplicationName]]-[[.Product]]index"
name: "[[.ApplicationName]]-[[.Constants.Product]]index"
labels:
app: "[[.ApplicationName]]"
application: "[[.ApplicationName]]"
service: "[[.ApplicationName]]-[[.Product]]index"
service: "[[.ApplicationName]]-[[.Constants.Product]]index"
annotations:
description: All the Decision Central Indexing Elasticsearch ports.

routes:
- id: "[[.ApplicationName]]-[[.Product]]index-http"
- id: "[[.ApplicationName]]-[[.Constants.Product]]index-http"
metadata:
name: "[[.ApplicationName]]-[[.Product]]index"
name: "[[.ApplicationName]]-[[.Constants.Product]]index"
labels:
app: "[[.ApplicationName]]"
application: "[[.ApplicationName]]"
Expand All @@ -260,7 +260,7 @@ others:
spec:
host: ""
to:
name: "[[.ApplicationName]]-[[.Product]]index"
name: "[[.ApplicationName]]-[[.Constants.Product]]index"
port:
targetPort: rest
## ES/AMQ END
6 changes: 3 additions & 3 deletions config/envs/rhdm-production-immutable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ servers:
value: "true"
- name: KIE_SERVER_STARTUP_STRATEGY
value: LocalContainersStartupStrategy
- name: "[[$.MavenRepo]]_MAVEN_REPO_USERNAME"
- name: "[[$.Constants.MavenRepo]]_MAVEN_REPO_USERNAME"
value: ""
- name: "[[$.MavenRepo]]_MAVEN_REPO_PASSWORD"
- name: "[[$.Constants.MavenRepo]]_MAVEN_REPO_PASSWORD"
value: ""
- name: "[[$.MavenRepo]]_MAVEN_REPO_SERVICE"
- name: "[[$.Constants.MavenRepo]]_MAVEN_REPO_SERVICE"
value: ""
- name: MAVEN_REPOS
value: "EXTERNAL"
Expand Down
Loading

0 comments on commit 6f80666

Please sign in to comment.