summaryrefslogtreecommitdiffstats
path: root/kubernetes/pnda/charts/dcae-pnda-bootstrap/templates/job.yaml
diff options
context:
space:
mode:
authorDonald Hunter <donaldh@cisco.com>2018-09-17 09:17:27 +0100
committerDonald Hunter <donaldh@cisco.com>2018-09-25 14:37:26 +0100
commitb4b9a05017c7c6a337a67e6500edb3c2aad656bc (patch)
treebb61cfe71111c192f12d48a7b4766431f1b8bd80 /kubernetes/pnda/charts/dcae-pnda-bootstrap/templates/job.yaml
parent3d8330ad449c1801ed793f98fb8c510d5a450c6d (diff)
Add PNDA bootstrap job to dcaegen2 chart
Change-Id: I39974a948d261e3e6d80faf0219f67d4ffc8c90c Issue-ID: DCAEGEN2-779 Signed-off-by: Donald Hunter <donaldh@cisco.com>
Diffstat (limited to 'kubernetes/pnda/charts/dcae-pnda-bootstrap/templates/job.yaml')
-rw-r--r--kubernetes/pnda/charts/dcae-pnda-bootstrap/templates/job.yaml94
1 files changed, 94 insertions, 0 deletions
diff --git a/kubernetes/pnda/charts/dcae-pnda-bootstrap/templates/job.yaml b/kubernetes/pnda/charts/dcae-pnda-bootstrap/templates/job.yaml
new file mode 100644
index 0000000000..a98761ffc6
--- /dev/null
+++ b/kubernetes/pnda/charts/dcae-pnda-bootstrap/templates/job.yaml
@@ -0,0 +1,94 @@
+#============LICENSE_START========================================================
+# ================================================================================
+# Copyright (c) 2018 Cisco Systems. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+
+apiVersion: batch/v1
+kind: Job
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ completions: 1
+ backoffLimit: 0
+ template:
+ metadata:
+ labels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ spec:
+ restartPolicy: Never
+ initContainers:
+ - name: {{ include "common.name" . }}-readiness
+ image: {{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ command:
+ - /root/ready.py
+ args:
+ - --container-name
+ - dcae-pnda-mirror
+ - "-t"
+ - "75"
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: metadata.namespace
+ containers:
+ - name: {{ include "common.name" . }}
+ image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ volumeMounts:
+ - mountPath: /inputs
+ name: {{ include "common.fullname" . }}-inputs
+ - mountPath: /scripts
+ name: {{ include "common.fullname" . }}-scripts
+ - mountPath: /secrets
+ name: {{ include "common.fullname" . }}-secrets
+ - mountPath: /pnda-cli/cli/logs
+ name: {{ include "common.fullname" . }}-logs
+ command:
+ - "/scripts/bootstrap.sh"
+ volumes:
+ - name: {{ include "common.fullname" . }}-inputs
+ configMap:
+ name: {{ include "common.fullname" . }}-inputs
+ - name: {{ include "common.fullname" . }}-scripts
+ configMap:
+ name: {{ include "common.fullname" . }}-scripts
+ defaultMode: 0755
+ - name: {{ include "common.fullname" . }}-secrets
+ configMap:
+ name: {{ include "common.fullname" . }}-secrets
+ - name: {{ include "common.fullname" . }}-logs
+ persitentVolumeClaim:
+ claimName: {{ include "common.fullname" . }}-logs
+ volumeClaimTemplates:
+ - metadata:
+ name: {{ include "common.fullname" . }}-logs
+ labels:
+ name: {{ include "common.fullname" . }}
+ spec:
+ accessModes: [ {{ .Values.persistence.accessMode }} ]
+ storageClassName: manual
+ resources:
+ requests:
+ storage: {{ .Values.persistence.size }}
Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.onap.ccsdk.parent</groupId>
        <artifactId>odlparent-lite</artifactId>
        <version>2.2.3</version>
        <relativePath/>
    </parent>

    <groupId>org.onap.ccsdk.sli.northbound</groupId>
    <artifactId>daexim-offsite-backup-installer</artifactId>
    <version>1.3.4-SNAPSHOT</version>
    <packaging>pom</packaging>

    <name>ccsdk-sli-northbound :: ${project.artifactId}</name>

    <properties>
        <application.name>ccsdk-daexim-offsite-backup</application.name>
        <features.boot>${application.name}</features.boot>
        <features.repositories>mvn:org.onap.ccsdk.sli.northbound/${features.boot}/${project.version}/xml/features</features.repositories>
        <include.transitive.dependencies>false</include.transitive.dependencies>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.onap.ccsdk.sli.northbound</groupId>
            <artifactId>daexim-offsite-backup-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.onap.ccsdk.sli.northbound</groupId>
            <artifactId>daexim-offsite-backup-model</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <id>maven-repo-zip</id>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <phase>package</phase>
                        <configuration>
                            <attach>true</attach>
                            <finalName>stage/${application.name}-${project.version}</finalName>
                            <descriptors>
                                <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor>
                            </descriptors>
                            <appendAssemblyId>true</appendAssemblyId>
                        </configuration>
                    </execution>
                    <execution>
                        <id>installer-zip</id>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <phase>package</phase>
                        <configuration>
                            <attach>true</attach>
                            <finalName>${application.name}-${project.version}-installer</finalName>
                            <descriptors>
                                <descriptor>src/assembly/assemble_installer_zip.xml</descriptor>
                            </descriptors>
                            <appendAssemblyId>false</appendAssemblyId>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <phase>prepare-package</phase>
                        <configuration>
                            <transitive>false</transitive>
                            <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>true</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                            <useRepositoryLayout>true</useRepositoryLayout>
                            <addParentPoms>false</addParentPoms>
                            <copyPom>false</copyPom>
                            <includeGroupIds>org.onap.ccsdk.sli.northbound</includeGroupIds>
                            <scope>provided</scope>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <id>copy-version</id>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <phase>validate</phase>
                        <configuration>
                            <outputDirectory>${basedir}/target/stage</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/resources/scripts</directory>
                                    <includes>
                                        <include>install-feature.sh</include>
                                    </includes>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>