Browse Source

ocp build artifacts

Grega Bremec 2 years ago
parent
commit
e1a9a8c5d0
3 changed files with 82 additions and 15 deletions
  1. 15 0
      images/base-image.yml
  2. 52 0
      images/bc-psacct.yml
  3. 15 15
      images/bc-sysstat.yml

+ 15 - 0
images/base-image.yml

@@ -0,0 +1,15 @@
+apiVersion: image.openshift.io/v1
+kind: ImageStream
+metadata:
+  name: ubi-minimal
+spec:
+  lookupPolicy:
+    local: false
+  tags:
+    - name: latest
+      from:
+        kind: DockerImage
+        name: registry.redhat.io/ubi9/ubi-minimal:latest
+      importPolicy: {}
+      referencePolicy:
+        type: Source

+ 52 - 0
images/bc-psacct.yml

@@ -0,0 +1,52 @@
+apiVersion: v1
+kind: List
+metadata: {}
+items:
+  - apiVersion: image.openshift.io/v1
+    kind: ImageStream
+    metadata:
+      name: collector-psacct
+    spec:
+      lookupPolicy:
+        local: false
+      tags:
+        - name: latest
+  - apiVersion: build.openshift.io/v1
+    kind: BuildConfig
+    metadata:
+      name: collector-psacct
+      labels:
+        build: collector-psacct
+        build-config: collector-psacct
+    spec:
+      output:
+        to:
+          kind: ImageStreamTag
+          name: collector-psacct:latest
+      source:
+        git:
+          uri: https://git.p0f.net/gregab/linux-metrics-exporter.git
+          ref: main
+        contextDir: images
+      strategy:
+        type: Docker
+        dockerStrategy:
+          dockerfilePath: Containerfile-psacct
+          from:
+            kind: ImageStreamTag
+            name: ubi-minimal:latest
+          volumes:
+            - source:
+                type: Secret
+                secret:
+                  secretName: etc-pki-entitlement
+              name: etc-pki-entitlement
+              mounts:
+                - destinationPath: /etc/pki/entitlement
+            - source:
+                type: Secret
+                secret:
+                  secretName: rhsm-ca
+              name: rhsm-ca
+              mounts:
+                - destinationPath: /etc/rhsm/ca

+ 15 - 15
images/bc-sysstat.yml

@@ -5,21 +5,6 @@ items:
   - apiVersion: image.openshift.io/v1
     kind: ImageStream
     metadata:
-      name: ubi-minimal
-    spec:
-      lookupPolicy:
-        local: false
-      tags:
-        - name: latest
-          from:
-            kind: DockerImage
-            name: registry.redhat.io/ubi9/ubi-minimal:latest
-          importPolicy: {}
-          referencePolicy:
-            type: Source
-  - apiVersion: image.openshift.io/v1
-    kind: ImageStream
-    metadata:
       name: collector-sysstat
     spec:
       lookupPolicy:
@@ -50,3 +35,18 @@ items:
           from:
             kind: ImageStreamTag
             name: ubi-minimal:latest
+          volumes:
+            - source:
+                type: Secret
+                secret:
+                  secretName: etc-pki-entitlement
+              name: etc-pki-entitlement
+              mounts:
+                - destinationPath: /etc/pki/entitlement
+            - source:
+                type: Secret
+                secret:
+                  secretName: rhsm-ca
+              name: rhsm-ca
+              mounts:
+                - destinationPath: /etc/rhsm/ca