|
1 year ago | |
---|---|---|
build | 1 year ago | |
cmd/manager | 1 year ago | |
deploy | 1 year ago | |
pkg | 1 year ago | |
vendor | 1 year ago | |
version | 1 year ago | |
.gitignore | 1 year ago | |
Dockerfile | 1 year ago | |
Jenkinsfile | 1 year ago | |
README.md | 1 year ago | |
VERSION | 1 year ago | |
go.mod | 1 year ago | |
go.sum | 1 year ago | |
tools.go | 1 year ago |
Can run simple projects with collectstatic and migrations at init stage. In some cases you can run non-django images like hello-world below, just set Django specific flags to False
and statics path to /notexists
.
Makefile
and change images registry to yoursmake
commandYou can find images here https://hub.docker.com/r/iam21h/django-operator
kubectl -f deploy/service_account.yaml
kubectl -f deploy/role.yaml
kubectl -f deploy/role_binding.yaml
kubectl -f deploy/operator.yaml
This resource can help you run your first image
apiVersion: blindage.org/v1alpha1
kind: Django
metadata:
name: django-test
spec:
pullPolicy: IfNotPresent
image: gcr.io/hello-minikube-zero-install/hello-node:latest
replicas: 1
# application port, default 8080
appPort: 8080
# path where you store static files, typicaly inside application home
appStaticPath: "/app/static"
# run migrations in init container before run
runMigrate: False
# run collectstatic in init container before run
runCollectStatic: False
PullPolicy
: its usual imagePullPolicy
, default IfNotPresent
Image
: string, required, format <image>:<tag>
Replicas
: integer, default 1
Read more about resources limiting here https://kubernetes.io/docs/concepts/policy/resource-quotas/
PodRequests
: default is emptyPodLimits
: default is emptyAffinity and antiaffinity manual https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
Affinity
: default is emptyServiceAnnotations
: <key>: <value>
dict, default is emptyPodAnnotations
: <key>: <value>
dict, default is emptyAppPort
: integer, internal application port, default 8000
AppEnv
: EnvVar array, default is emptyAppStaticPath
: string, path to static files, default /app/static
RunMigrate
: bool, run migrations at init stage, default False
RunCollectStatic
: bool, run collectstatic at init stage, default False
Copyright by Vladimir Smagin (21h) 2019
http://blindage.org email: 21h@blindage.org
Project page: https://git.blindage.org/21h/django-operator