github.com/verrazzano/verrazzano@v1.7.1/tests/testdata/ingress/console/components.yaml (about)

     1  # Copyright (c) 2021, 2023, Oracle and/or its affiliates.
     2  # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
     3  
     4  apiVersion: core.oam.dev/v1alpha2
     5  kind: Component
     6  metadata:
     7    name: todo-domain
     8    namespace: console-ingress
     9  spec:
    10    workload:
    11      apiVersion: oam.verrazzano.io/v1alpha1
    12      kind: VerrazzanoWebLogicWorkload
    13      spec:
    14        template:
    15          metadata:
    16            name: todo-domain
    17            namespace: console-ingress
    18          spec:
    19            domainUID: cidomain
    20            domainHome: /u01/domains/tododomain
    21            image: container-registry.oracle.com/verrazzano/example-todo:1.0.0-1-20210728181814-eb1e622
    22            imagePullSecrets:
    23              - name: tododomain-repo-credentials
    24            domainHomeSourceType: "FromModel"
    25            includeServerOutInPodLog: true
    26            replicas: 1
    27            webLogicCredentialsSecret:
    28              name: tododomain-weblogic-credentials
    29            configuration:
    30              introspectorJobActiveDeadlineSeconds: 900
    31              model:
    32                configMap: tododomain-jdbc-config
    33                domainType: WLS
    34                modelHome: /u01/wdt/models
    35                runtimeEncryptionSecret: tododomain-runtime-encrypt-secret
    36              secrets:
    37                - tododomain-jdbc-tododb
    38            serverPod:
    39              env:
    40                - name: JAVA_OPTIONS
    41                  value: "-Dweblogic.StdoutDebugEnabled=false"
    42                - name: USER_MEM_ARGS
    43                  value: "-Djava.security.egd=file:/dev/./urandom -Xms64m -Xmx256m "
    44                - name: WL_HOME
    45                  value: /u01/oracle/wlserver
    46                - name: MW_HOME
    47                  value: /u01/oracle
    48  ---
    49  apiVersion: core.oam.dev/v1alpha2
    50  kind: Component
    51  metadata:
    52    name: todo-jdbc-configmap
    53    namespace: console-ingress
    54  spec:
    55    workload:
    56      apiVersion: v1
    57      kind: ConfigMap
    58      metadata:
    59        name: tododomain-jdbc-config
    60        namespace: console-ingress
    61      data:
    62        wdt_jdbc.yaml: |
    63          resources:
    64            JDBCSystemResource:
    65              'ToDo-Datasource':
    66                Target: 'AdminServer'
    67                JdbcResource:
    68                  DatasourceType: GENERIC
    69                  JDBCDataSourceParams:
    70                    GlobalTransactionsProtocol: OnePhaseCommit
    71                    JNDIName: jdbc/ToDoDB
    72                  JDBCDriverParams:
    73                    # for MySQL, the last element in the URL is the database name, and must match the name inside the DB server
    74                    URL: "jdbc:mysql://mysql:3306/tododb"
    75                    PasswordEncrypted: '@@SECRET:tododomain-jdbc-tododb:password@@'
    76                    DriverName: com.mysql.cj.jdbc.Driver
    77                    Properties:
    78                      user:
    79                        Value: '@@SECRET:tododomain-jdbc-tododb:username@@'
    80  ---
    81  apiVersion: core.oam.dev/v1alpha2
    82  kind: Component
    83  metadata:
    84    name: todo-mysql-configmap
    85    namespace: console-ingress
    86  spec:
    87    workload:
    88      apiVersion: v1
    89      kind: ConfigMap
    90      metadata:
    91        name: mysql-initdb-config
    92        namespace: console-ingress
    93      data:
    94        initdb.sql: |
    95          create table `ToDos` (
    96              `taskId` int not null auto_increment,
    97              `task` varchar(200) not null,
    98              `completed` boolean,
    99              constraint todo_pk primary key (`taskId`)
   100          );
   101  ---
   102  apiVersion: core.oam.dev/v1alpha2
   103  kind: Component
   104  metadata:
   105    name: todo-mysql-service
   106    namespace: console-ingress
   107  spec:
   108    workload:
   109      apiVersion: v1
   110      kind: Service
   111      metadata:
   112        name: mysql
   113        namespace: console-ingress
   114      spec:
   115        ports:
   116          - port: 3306
   117        selector:
   118          app: mysql
   119        clusterIP: None
   120  ---
   121  apiVersion: core.oam.dev/v1alpha2
   122  kind: Component
   123  metadata:
   124    name: todo-mysql-deployment
   125    namespace: console-ingress
   126  spec:
   127    workload:
   128      apiVersion: apps/v1
   129      kind: Deployment
   130      metadata:
   131        name: mysql
   132        namespace: console-ingress
   133      spec:
   134        replicas: 1
   135        selector:
   136          matchLabels:
   137            app: mysql
   138        template:
   139          metadata:
   140            labels:
   141              app: mysql
   142          spec:
   143            containers:
   144              - env:
   145                  - name: MYSQL_ROOT_PASSWORD
   146                    valueFrom:
   147                      secretKeyRef:
   148                        name: tododomain-jdbc-tododb
   149                        key: password
   150                  - name: MYSQL_USER
   151                    valueFrom:
   152                      secretKeyRef:
   153                        name: tododomain-jdbc-tododb
   154                        key: username
   155                  - name: MYSQL_PASSWORD
   156                    valueFrom:
   157                      secretKeyRef:
   158                        name: tododomain-jdbc-tododb
   159                        key: password
   160                  - name: MYSQL_DATABASE
   161                    value: tododb
   162                image: ghcr.io/verrazzano/mysql:8.0.28
   163                imagePullPolicy: IfNotPresent
   164                name: mysql
   165                ports:
   166                  - containerPort: 3306
   167                    name: mysql
   168                    protocol: TCP
   169                volumeMounts:
   170                  - mountPath: /docker-entrypoint-initdb.d
   171                    name: mysql-initdb
   172            imagePullSecrets:
   173              - name: ocr
   174            volumes:
   175              - configMap:
   176                  defaultMode: 420
   177                  name: mysql-initdb-config
   178                name: mysql-initdb