Skip to content

Instantly share code, notes, and snippets.

View larkintuckerllc's full-sized avatar

John Tucker larkintuckerllc

View GitHub Profile
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: default-cluster-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
kubernetes:
serviceLocatorMethod:
type: multiTenant
clusterLocatorMethods:
- type: config
clusters:
- url: ${K8S_MINIKUBE_URL}
name: minikube
authProvider: serviceAccount
skipTLSVerify: true
# Use postgres/example user/password credentials
version: '3.1'
services:
db:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: example
export POSTGRES_HOST=db
export POSTGRES_PORT=5432
export POSTGRES_USER=postgres
export POSTGRES_PASSWORD=example
export AUTH_GITHUB_CLIENT_ID=[OMITTED]
export AUTH_GITHUB_CLIENT_SECRET=[OMITTED]
export GITHUB_APP_CREDENTIALS=`cat github-app-backstage-mybackstageapp-credentials.yaml`
csp:
connect-src: ["'self'", 'http:', 'https:']
# Content-Security-Policy directives follow the Helmet format: https://helmetjs.github.io/#reference
# Default Helmet Content-Security-Policy values can be removed by setting the key to false
img-src: ["'self'", 'data:', 'https://avatars.githubusercontent.com']
# Use postgres/example user/password credentials
version: '3.1'
services:
db:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: example
.git
node_modules
packages
!packages/backend/dist
plugins
environment.sh
github-app-backstage-mybackstageapp-credentials.yaml
# This dockerfile builds an image for the backend package.
# It should be executed with the root of the repo as docker context.
#
# Before building this image, be sure to have run the following commands in the repo root:
#
# yarn install
# yarn tsc
# yarn build
#
# Once the commands have been run, you can build the image using `yarn build-image`
import { createRouter, createGithubProvider } from '@backstage/plugin-auth-backend';
import { Router } from 'express';
import { PluginEnvironment } from '../types';
export default async function createPlugin({
logger,
database,
config,
discovery,
tokenManager,
catalog:
locations:
- type: url
target: https://github.com/backstage/software-templates/blob/main/scaffolder-templates/docs-template/template.yaml
rules:
- allow: [Template]
- type: github-org
target: https://github.com/MyBackstageApp
rules:
- allow: [Group, User]