Skip to content

Instantly share code, notes, and snippets.

View rm3l's full-sized avatar
💭
I may be slow to respond.

Armel Soro rm3l

💭
I may be slow to respond.
View GitHub Profile
---
apiVersion: rhdh.redhat.com/v1alpha1
kind: Backstage
metadata:
name: backstage-with-sidecar
spec:
# TODO: you may want to add app-config files, dynamic plugins config, extra env vars, etc. in the 'application' field.
# application: {}
rawRuntimeConfig:
backstageConfig: backstage-with-sidecar-runtime-config
@rm3l
rm3l / backstage-with-sidecar-container.yaml
Created March 20, 2024 09:14
RHDH CR with oauth2-proxy sidecar container
---
apiVersion: rhdh.redhat.com/v1alpha1
kind: Backstage
metadata:
name: backstage-with-sidecar
spec:
# TODO: you may want to add app-config files, dynamic plugins config, extra env vars, etc. in the 'application' field.
# application: {}
rawRuntimeConfig:
backstageConfig: backstage-with-sidecar-runtime-config
#!/bin/bash
#
# Copyright (c) 2023 Red Hat, Inc.
# 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
apiVersion: v1
kind: Namespace
metadata:
name: imageswap-system
labels:
app: imageswap
resource: namespace
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
@rm3l
rm3l / oc-pull-secret-update-global.sh
Last active December 21, 2023 20:28 — forked from nickboldt/oc-pull-secret-update-global.sh
add tokens/pwds for quay.io (and/or for registry.redhat.io) to your openshift's global or per-project pull secret
#!/bin/bash
# set your own logins!
#QUAY_USER="****"
#QUAY_TOKEN="****"
#RRIO_USERNAME="****"
#RRIO_PASSWORD="****"
# login to quay.io
REGISTRY="quay.io"
@rm3l
rm3l / prepare-commit-msg
Created September 7, 2023 11:39
Git hook for adding `Signed-off-by` to commit message - inspired from https://stackoverflow.com/a/46536244
#!/bin/sh
NAME=$(git config user.name)
EMAIL=$(git config user.email)
if [ -z "$NAME" ]; then
echo "empty git config user.name"
exit 1
fi
commands:
- exec:
commandLine: echo exec-1 succeeding after 5s... && sleep 5 && exit 0
component: runtime
id: exec-1
- exec:
commandLine: echo from exec-2
component: runtime
id: exec-2
- exec:
#!/bin/sh
set -o errexit
set -x
cluster_name=${1:-local-k8s-cluster}
registry_port=${2:-35000}
# create registry container unless it already exists
registry_name='local-registry.localhost'
@rm3l
rm3l / sample-devspace.yaml
Created June 6, 2023 08:13
Sample configuration for use with DevSpace
version: v2beta1
name: devspace-test
# You can either specify an exact version or a version range or even
# multiple versions.
require:
devspace: '>= 4.0, < 6.0'
# By default devspace will try to call the command 'NAME version'
# and use the regex '(v\\d+\\.\\d+\\.\\d+)' to find the version
commands:
@rm3l
rm3l / devfile-parent-springboot-mvn.yaml
Created May 25, 2023 10:21
Child Devfile using java-quarkus as parent
schemaVersion: 2.1.0
metadata:
name: java-springboot-jdk17
description: Java application using Spring Boot® and OpenJDK 17
version: 1.3.0
parent:
uri: https://registry.stage.devfile.io/devfiles/java-springboot/1.2.0
components:
- name: tools
container: