Skip to content

Commit

Permalink
use "" instead of /tmp
Browse files Browse the repository at this point in the history
Signed-off-by: perdasilva <perdasilva@redhat.com>
  • Loading branch information
perdasilva committed Jun 23, 2022
1 parent d42dcfa commit ee303a2
Show file tree
Hide file tree
Showing 2,267 changed files with 23,205 additions and 1 deletion.
13 changes: 13 additions & 0 deletions catsrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: test
namespace: openshift-marketplace
spec:
displayName: Test
publisher: OLM-QE
sourceType: grpc
image: docker.io/perdasilva/registry:test2
updateStrategy:
registryPoll:
interval: 10m
Binary file added opm
Binary file not shown.
2 changes: 1 addition & 1 deletion pkg/lib/tmp/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// CopyTmpDB reads the file at the given path and copies it to a tmp directory, returning the copied file path or an err
func CopyTmpDB(original string) (path string, err error) {
dst, err := ioutil.TempFile("/tmp", "db-")
dst, err := ioutil.TempFile("", "db-")
if err != nil {
return "", err
}
Expand Down
74 changes: 74 additions & 0 deletions pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
apiVersion: v1
kind: Pod
metadata:
annotations:
cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
seccomp.security.alpha.kubernetes.io/pod: runtime/default
creationTimestamp: "2022-05-30T11:46:51Z"
name: test-catalog
namespace: default
spec:
containers:
- image: configmap-registry:dev
imagePullPolicy: IfNotPresent
livenessProbe:
exec:
command:
- grpc_health_probe
- -addr=:50051
failureThreshold: 3
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
name: registry-server
ports:
- containerPort: 50051
name: grpc
protocol: TCP
readinessProbe:
exec:
command:
- grpc_health_probe
- -addr=:50051
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
resources:
requests:
cpu: 10m
memory: 50Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: false
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: FallbackToLogsOnError
dnsPolicy: ClusterFirst
enableServiceLinks: true
nodeName: kind-control-plane
nodeSelector:
kubernetes.io/os: linux
preemptionPolicy: PreemptLowerPriority
priority: 0
restartPolicy: Always
schedulerName: default-scheduler
securityContext:
runAsNonRoot: true
runAsUser: 1001
seccompProfile:
type: RuntimeDefault
terminationGracePeriodSeconds: 30
tolerations:
- effect: NoExecute
key: node.kubernetes.io/not-ready
operator: Exists
tolerationSeconds: 300
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 300
141 changes: 141 additions & 0 deletions pod2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
apiVersion: v1
kind: Pod
metadata:
annotations:
cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
seccomp.security.alpha.kubernetes.io/pod: runtime/default
name: test-catsrc-2
namespace: default
spec:
containers:
- command:
- configmap-server
- -c
- mock-index
- -n
- default
image: configmap-registry:dev
imagePullPolicy: IfNotPresent
livenessProbe:
exec:
command:
- grpc_health_probe
- -addr=:50051
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
name: configmap-registry-server
ports:
- containerPort: 50051
name: grpc
protocol: TCP
readinessProbe:
exec:
command:
- grpc_health_probe
- -addr=:50051
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
resources:
requests:
cpu: 10m
memory: 50Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: false
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: kube-api-access-ldzzt
readOnly: true
dnsPolicy: ClusterFirst
enableServiceLinks: true
nodeName: kind-control-plane
nodeSelector:
kubernetes.io/os: linux
preemptionPolicy: PreemptLowerPriority
priority: 0
restartPolicy: Always
schedulerName: default-scheduler
securityContext:
runAsNonRoot: true
runAsUser: 1001
seccompProfile:
type: RuntimeDefault
serviceAccount: configmap-catsrc-configmap-server
serviceAccountName: configmap-catsrc-configmap-server
terminationGracePeriodSeconds: 30
tolerations:
- effect: NoExecute
key: node.kubernetes.io/not-ready
operator: Exists
tolerationSeconds: 300
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 300
volumes:
- name: kube-api-access-ldzzt
projected:
defaultMode: 420
sources:
- serviceAccountToken:
expirationSeconds: 3607
path: token
- configMap:
items:
- key: ca.crt
path: ca.crt
name: kube-root-ca.crt
- downwardAPI:
items:
- fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
path: namespace
status:
conditions:
- lastProbeTime: null
lastTransitionTime: "2022-05-30T12:26:07Z"
status: "True"
type: Initialized
- lastProbeTime: null
lastTransitionTime: "2022-05-30T12:26:17Z"
status: "True"
type: Ready
- lastProbeTime: null
lastTransitionTime: "2022-05-30T12:26:17Z"
status: "True"
type: ContainersReady
- lastProbeTime: null
lastTransitionTime: "2022-05-30T12:26:07Z"
status: "True"
type: PodScheduled
containerStatuses:
- containerID: containerd://e0e4b25eabe5ed4d9345236b19c5dceca96611308873a744501398eeea12f36c
image: quay.io/operator-framework/configmap-operator-registry:latest
imageID: quay.io/operator-framework/configmap-operator-registry@sha256:2b4f683caab210007aa680eb7fc8866f9deaf328b7eff825022861e1204d0f97
lastState: {}
name: configmap-registry-server
ready: true
restartCount: 0
started: true
state:
running:
startedAt: "2022-05-30T12:26:11Z"
hostIP: 172.18.0.2
phase: Running
podIP: 10.244.0.16
podIPs:
- ip: 10.244.0.16
qosClass: Burstable
startTime: "2022-05-30T12:26:07Z"
5 changes: 5 additions & 0 deletions test.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM docker.io/perdasilva/opm-builder:test AS builder
FROM quay.io/olmqe/ditto-index:test-xzha-1
COPY --from=builder /bin/opm /bin/opm
ENTRYPOINT ["/bin/opm"]
CMD ["registry", "serve", "--database", "/database/index.db"]
Empty file added tmp/.dockerenv
Empty file.
1 change: 1 addition & 0 deletions tmp/busybox/[
1 change: 1 addition & 0 deletions tmp/busybox/[[
1 change: 1 addition & 0 deletions tmp/busybox/acpid
1 change: 1 addition & 0 deletions tmp/busybox/add-shell
1 change: 1 addition & 0 deletions tmp/busybox/addgroup
1 change: 1 addition & 0 deletions tmp/busybox/adduser
1 change: 1 addition & 0 deletions tmp/busybox/adjtimex
1 change: 1 addition & 0 deletions tmp/busybox/ar
1 change: 1 addition & 0 deletions tmp/busybox/arp
1 change: 1 addition & 0 deletions tmp/busybox/arping
1 change: 1 addition & 0 deletions tmp/busybox/ash
1 change: 1 addition & 0 deletions tmp/busybox/awk
1 change: 1 addition & 0 deletions tmp/busybox/base64
1 change: 1 addition & 0 deletions tmp/busybox/basename
1 change: 1 addition & 0 deletions tmp/busybox/blkdiscard
1 change: 1 addition & 0 deletions tmp/busybox/blkid
1 change: 1 addition & 0 deletions tmp/busybox/blockdev
1 change: 1 addition & 0 deletions tmp/busybox/bootchartd
1 change: 1 addition & 0 deletions tmp/busybox/brctl
1 change: 1 addition & 0 deletions tmp/busybox/bunzip2
Binary file added tmp/busybox/busybox
Binary file not shown.
1 change: 1 addition & 0 deletions tmp/busybox/bzcat
1 change: 1 addition & 0 deletions tmp/busybox/bzip2
1 change: 1 addition & 0 deletions tmp/busybox/cal
1 change: 1 addition & 0 deletions tmp/busybox/cat
1 change: 1 addition & 0 deletions tmp/busybox/chat
1 change: 1 addition & 0 deletions tmp/busybox/chattr
1 change: 1 addition & 0 deletions tmp/busybox/chgrp
1 change: 1 addition & 0 deletions tmp/busybox/chmod
1 change: 1 addition & 0 deletions tmp/busybox/chown
1 change: 1 addition & 0 deletions tmp/busybox/chpasswd
1 change: 1 addition & 0 deletions tmp/busybox/chpst
1 change: 1 addition & 0 deletions tmp/busybox/chroot
1 change: 1 addition & 0 deletions tmp/busybox/chrt
1 change: 1 addition & 0 deletions tmp/busybox/chvt
1 change: 1 addition & 0 deletions tmp/busybox/cksum
1 change: 1 addition & 0 deletions tmp/busybox/clear
1 change: 1 addition & 0 deletions tmp/busybox/cmp
1 change: 1 addition & 0 deletions tmp/busybox/comm
1 change: 1 addition & 0 deletions tmp/busybox/conspy
1 change: 1 addition & 0 deletions tmp/busybox/cp
1 change: 1 addition & 0 deletions tmp/busybox/cpio
1 change: 1 addition & 0 deletions tmp/busybox/crond
1 change: 1 addition & 0 deletions tmp/busybox/crontab
1 change: 1 addition & 0 deletions tmp/busybox/cryptpw
1 change: 1 addition & 0 deletions tmp/busybox/cttyhack
1 change: 1 addition & 0 deletions tmp/busybox/cut
1 change: 1 addition & 0 deletions tmp/busybox/date
1 change: 1 addition & 0 deletions tmp/busybox/dc
1 change: 1 addition & 0 deletions tmp/busybox/dd
1 change: 1 addition & 0 deletions tmp/busybox/deallocvt
1 change: 1 addition & 0 deletions tmp/busybox/delgroup
Loading

0 comments on commit ee303a2

Please sign in to comment.