Skip to content

Instantly share code, notes, and snippets.

View deads2k's full-sized avatar

David Eads deads2k

  • Red Hat OpenShift
  • Raleigh, NC
View GitHub Profile
docker pull openshift/origin
docker run -i -t --rm --name "openshift-origin" --net=host --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/openshift:/tmp/openshift openshift/origin start --cert-dir=/tmp/openshift/certs --etcd-dir=/tmp/openshift/etcd --write-config --master-config=/tmp/openshift/master.yaml --node-config=/tmp/openshift/node.yaml
docker run -i -t --rm --name "openshift-origin" --net=host --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/openshift:/tmp/openshift openshift/origin admin create-bootstrap-policy-file --filename=/tmp/openshift/bootstrap-policy.json
sudo chown -R deads:deads /tmp/openshift
sudo find /tmp/openshift -type f -print0 | xargs -0 chmod 644
identityProviders:
- provider:
apiVersion: v1
kind: AllowAllPasswordIdentityProvider
usage:
challenge: true
login: true
providerName: anypassword
// kubectl config view template hits based on `grep -r -- "-o template" * | grep view`
cluster/aws/util.sh: local file=$("${KUBE_ROOT}/cluster/kubectl.sh" config view -o template --template="${template}")
cluster/kubectl.sh:echo "current-context: \"$(${kubectl} "${config[@]:+${config[@]}}" config view -o template --template='{{index . "current-context"}}')\"" >&2
cluster/common.sh: current=$("${kubectl}" config view -o template --template='{{ index . "current-context" }}')
cluster/common.sh: KUBE_USER=$("${KUBE_ROOT}/cluster/kubectl.sh" config view -o template --template="${username}")
cluster/common.sh: KUBE_PASSWORD=$("${KUBE_ROOT}/cluster/kubectl.sh" config view -o template --template="${password}")
docs/man/man1/kubectl-config-view.1:$ kubectl config view \-o template \-\-template='\{\{ index . "users" "e2e" "password" \}\}'
docs/kubectl-config-view.md:$ kubectl config view -o template --template='{{ index . "users" "e2e" "password" }}'
examples/openshift-origin/resource-generator.sh:CURRENT_CONTEXT=
identityProviders:
- challenge: false
login: true
name: google
provider:
apiVersion: v1
kind: GoogleIdentityProvider
clientID:
clientSecret:
hostedDomain: redhat.com
apiVersion: v1
assetConfig:
logoutURL: ""
masterPublicURL: https://10.13.137.63:8443
publicURL: https://10.13.137.63:8443/console/
servingInfo:
bindAddress: 0.0.0.0:8443
certFile: master.server.crt
clientCA: ""
keyFile: master.server.key
{
"<DOCKER_REGISTRY_IP>": {
"Username":"serviceaccount",
"Password":"<TOKEN STRING>",
"Email":"[email protected]"
}
}
oc secrets
Manage secrets in your project.
Secrets are used to store confidential information that should not be contained inside of an image.
They are commonly used to hold things like keys for authentication to other internal systems like
docker registries.
Usage:
oc secrets [options]
apiVersion: v1
items:
- apiVersion: v1
kind: ImageStream
metadata:
creationTimestamp: null
name: ubuntu-debootstrap
spec:
dockerImageRepository: library/ubuntu-debootstrap:14.04
status:
apiVersion: v1
kind: BuildConfig
metadata:
creationTimestamp: null
name: docker-nfs-server
spec:
output:
to:
kind: ImageStreamTag
name: docker-nfs-server:latest
type MockDCClient struct{
Rollback DeploymentConfig
}
func (c *MockDCClient) Rollback(rollback){
return c.Rollback = rollback
}