From 7670dfe469ad36b3bf2b693f38ee443008ffbf64 Mon Sep 17 00:00:00 2001 From: Adrien Date: Sat, 11 Jul 2020 00:22:58 +0200 Subject: [PATCH] Start working on gitea --- files/gitea/gitea-ConfigMap.yaml | 139 ++++++++++++++++++++++++++++++ files/gitea/gitea-Deployment.yaml | 63 ++++++++++++++ files/gitea/gitea-Service.yaml | 16 ++++ files/gitea/gitea-ingress.yaml | 24 ++++++ files/gitea/gitea-pvc.yaml | 13 +++ 5 files changed, 255 insertions(+) create mode 100644 files/gitea/gitea-ConfigMap.yaml create mode 100644 files/gitea/gitea-Deployment.yaml create mode 100644 files/gitea/gitea-Service.yaml create mode 100644 files/gitea/gitea-ingress.yaml create mode 100644 files/gitea/gitea-pvc.yaml diff --git a/files/gitea/gitea-ConfigMap.yaml b/files/gitea/gitea-ConfigMap.yaml new file mode 100644 index 0000000..ab8db0b --- /dev/null +++ b/files/gitea/gitea-ConfigMap.yaml @@ -0,0 +1,139 @@ +$ANSIBLE_VAULT;1.1;AES256 +32663261623139646566366365346634616635343764326139313261336664323964363836326231 +3735383761616665373430366434653735643761643232390a623934363139383161613735326564 +38353563306532303935316665346664323137363136643161653866636436376266646362313335 +3636353731346134360a356432343066353666366661333365643765343863666665333261343835 +63356534656461363466643437386336303839613365393831363833323933623438326436613932 +35306135633966356137326366313530663066613166636362623461626635313031636431616133 +62346237633063363633333864623330396432383438663436353939623737333037643530613961 +31636234356434326231376230303032663436323631336361393637303335393332323237623731 +38653936313665653531343035373464356165336162616339366661353631393466376663356563 +64616336393432386631303439323837326339653039373130623933356534656463386463636339 +61333831353330313036393838393061636361663231346234383037623938336239653130613565 +62373464366565626561613032343161356239353732303064313565376234343032623065303535 +64386235363962323962613233643465366531303564636137303561343931666330353631323730 +38383032393365666434386232343536666230663637613930363135633961393162356162663166 +34626365333736386465343764333431396438373364346565386461373134613661303762346565 +62346462373735633737336536393761303232333466383432613361363730633830616635303434 +37333638646337363437366664343136396437646333313665376636623266356338653238326664 +34306632393061636236363165656434356133366165376338316238386364346239353865313238 +36303239386563666334633230306435656366343637646566613430616566393539323431363437 +38383362373233343162326562336664653331313565656631306662316233316237313035616433 +66646661653830353736306535623037386333613733656365366238313532613361373966363631 +35356234653931633033643062653539356564393064323331373664383864653761353861613066 +33393634333639313235343665303433656431323632306565333464316334303133623630383466 +65333635616139663732656436646166393039306330366165376162366635346365633739663234 +33363032393734323333353265343965326239633565626435666430663630663265616133653332 +64326266643363633162313236366135343863663235326231656435373332346639306336666366 +36343833343663383437343036303763613034303231346334613233323033663866353266323833 +64636230653264373231323766663966386632653637626262616230316261393536636161316465 +64363763386630643264306230346365316333376363616232336635303935316262303934666337 +34626637316366666233616236323761333436643065386533636539373265363061653338383438 +62356534373664323634636432353363323337343638633933373431346636306237633833306637 +38306631356231353138336432333137663839353463373666623134316539613838643339663561 +31356566383533623432323735663137313963336265313639383732336431623164393935653164 +62306237323463636662306130363532363830356432303661623237646631306632633566303065 +37633937626433393235386662663332366666386530373934303339643831636138633031663363 +63343032346431303763616535643333356662653038333830383531653664656130373833636563 +30343330383234643934343931656666333661613236653062393063613465313934656461393732 +62303964313433326662643936653032383832373330356537316363633130393235326133303736 +36616165363362633831613864633864336233623631616665303063613334313431663738393535 +61626265656335376237613766326136366337653230613365363961633838646335656536656237 +30353032666331393536393664326361333637376364613165323033386134326363643134613361 +66653365346130383233653065613838393561346663336565316463663465666435623361316535 +34636235356462643833643061356133643064633166643738366138623263333364663062613737 +36383763663733336335313333396466633135366531616264336136653963306262616166613738 +32643939363461323565646339313461373364636163363232636434376532656530373737313966 +37616235623962323132376137383964633637623362653134373734613466643137616665353137 +30633431306331326335653933373132663438366133373032656339306664643137626365326161 +33336665316631663262386230316130303435363365616364623439316635366239343261303537 +31306237663030326136336630393266653932656133333364346563306364643638653664373565 +36393230376566373331363234303765643835656664313334343932306338363035373733336432 +66616231333730343065303131373332333339346533333363333466386231393231653137663636 +66623366643439313630613230366431646334393336346362356566336264376661336564663133 +39333162353462626432366164613836643865316238343032336666333635656634323938303361 +36383462623633346633343834396431633136373364646233343638306233616432613336346337 +34616533343933613332656538636336373466326231643138373330373033636338316330323764 +38653461306564623134616136366231383733313366353865393935666436383761373339366230 +62316261663862663264343463653162623962393065343334343537623737643839366636306436 +63623933306237383662663239306130613737323865323537653230396330373063613739656163 +33343861623233306534363331636139376330356535366661623762303831663932663139316636 +35333631313231383836636534323739303938616661376230386530336530353839346466643963 +35323738353736316335386161333765343662386363303865396237376230386163613337336234 +61396337623662633330663232623831366534653735643464356361303234336538663332393434 +62316663356562333164343832633331373035333230343339616239383166613365626334343965 +30646566626334313063306461386331333235313636366434346331376638353763363264346564 +39623830663438363761396261633431303631326237333533656338396466303134656566613039 +31376334613039326261333066386234653833373362666362383666633861336432393134393666 +39656530663764613930383562363938356534323233363730666630333337383836353635356534 +31323665376431306265663930373762316636363165646330316566336434633065626665383061 +38316563643334663665353937363330396564353030626239363731313231663135653664353162 +35393136363065353134656562346637366232623931616633333465303434336134326464343035 +32346633363962663636653861366638336238363633626535303730393135336363383731373830 +38613833336562386166643364643632376331663334353762376231316131633934383335373535 +62336666363266333031343036343836663063373938626366623031313138646439333035633062 +30616132316336333463303238616235336638613563306461393930323038633063646238323662 +35363337353230373030363162343734666237376530323636656634303830336439366239326561 +64366665613835623839376264396434633036616164636232373162383831343234323664333965 +66306536613666303535333431313230663638376632353461363136636364663530383861336532 +31303139616661316434313039343931323761313039396263663661356663313033313565643832 +38373231316535326530393264633566373665353530386137383338343035303635313438663333 +39353638393562363034656233326662303961323932393834623562623737313565336538303534 +34316537623835393861633838393038656530623061333430663836376134396537303136363831 +33663566633561316439323566376433316136326338316337373666626262663131383733366437 +64646364383234313164356437656635333664396131363263353832306431613836623661323436 +32306335323138613461616638313135383231653164336532666264386463373939643561336537 +39616133313032386239626465663332303762346262333638356436303231313639376636333831 +39363334373762343435346338363638646361396161656366313731633238323963386563363361 +30323365323462326531373930306535633663623332613232623562383039626136353861386162 +30333966656561646133356131663963623963356432333362333739333836616135666662343037 +36613563343766376336303863396662613835643161396466616634383639663137306164346164 +64616439323432316435376562623535636332646530393064646264626535376164373436386630 +37336135613334656630396561663161376665646138353439613764323738313234323332646539 +31616137393436376532623436326630666166363730373062313734623233333139316261396664 +30373861393330343132366531613362356337383830373138353064646562356463653139303261 +36623966653131366432636337346438633632366162353235343038303663373166633161363438 +39386262373935323235643133306632316436663836663164633465646263383438633066323432 +37303062303638663561623533616235303966636463653637613531633363633139363765353838 +31633738323930376235323062353465636438616333356533393137363338306637343531636537 +61663635356634663736323336663734396333376163373865373734393165393639363333336363 +33313564386364376233643162313165383437326363343037636664373131373434353666623730 +34303038643136623830656163363838386237613263666564333930626538303366616565373334 +33633534366463326132663536613861323839626239343034313535636265646662363131336162 +37333930636335343832363135353437613730396337323538336230303362363064323066313861 +34343364326164396166643563616466383033303036363666373830386566666532636161396130 +36313365386235336362626465626134366233323233663935353131656237623830343638323762 +66656438353133383139313237303731306333393230326461666438336362333233613364363639 +65363065623361653934663337353334306639376465326665336236383134323531656535626564 +63653761316539303738653136656365663133373263393164333939636462643533333937376462 +33653335373566386263306538306434666133393336306430356635366535663832393132323838 +64643035616539306363303266636232343137336430323839343831303430613432356131636463 +65613438653663313734343732336532396565373166333962323663383461633665633234663562 +39633232636162386636636331633166656630643735303933363138366234313966663032633464 +38323133623536336139666363396436373235636237333538633138366134323530396230633064 +30323236346132343934643634323933653166313365663531303934653565643661613336343832 +37323031616432636266343333376261346132623531303563663436613430633262336565666333 +63323962353630343837343737623632396666373864396438346366393666306136353130306139 +31613336633330613438313438313464343962336335343930363737336534376431323261303736 +39393931313466656337373139303266353235373866663063656334633463616165633865343936 +32633266616463666261313139656632323437666362353231383266633933396437366439343862 +31623665333464653330623263313861323231626239383135313131316533353231663535303934 +33313537633139346330373766313338363061623365613039646461346562373431333635376262 +38626337383736626433366138656166313638613133623338356636326561373463393636363161 +33343435366436343436653137653937656430303535333330353066656332306433383334316138 +65636361613564396637653032613431623636396432313862306534393335663065343431343236 +31623165623266306264343232386139373339336136326138646161336133633065353665346639 +66366466356331353036616631613130363066373463366531346635393863643966316138383438 +31393962656232376434356634613432616336356534643730633532646534386330323363343735 +66336531653735656536316661336562643338663565643236663433333031626533373837353235 +62653032376231336137633035623731396262656531393535376339356234646236653432616333 +33323462356339326436316430386164643061326131373431623933326537366137663938303066 +62353266326264643233326366663363633737393039613137613130646263623636393530343661 +38636164353634323639336366313564656338633137343039313835363663313037643863376565 +36323564386262376637343264306530643632636636343330316266346366383338643166366636 +36333934366233333964303733663062326461306263383732613931656636313965373938313661 +66383864613231336262313334633030366662313163396165303637666363363230346535306461 +31363863383634663966613035303338363864623233353939393166303933356462626363316665 +61613464376566343033373837313437376563313061353239623835353233323737343338333863 +62366665353735613362666137363636623930353832313330313664356337336365643434386532 +3864356435393364376265366333336263646339343866623465 diff --git a/files/gitea/gitea-Deployment.yaml b/files/gitea/gitea-Deployment.yaml new file mode 100644 index 0000000..3bdc170 --- /dev/null +++ b/files/gitea/gitea-Deployment.yaml @@ -0,0 +1,63 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: gitea + namespace: gitea + labels: + app: gitea +spec: + replicas: 1 + selector: + matchLabels: + app: gitea + strategy: + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + type: RollingUpdate + template: + metadata: + labels: + app: gitea + spec: + initContainers: + - name: init-disk + image: busybox:latest + command: + - /bin/chown + - 1000:1000 + - /data + volumeMounts: + - name: gitea-data + mountPath: "/data" + containers: + - name: gitea + image: gitea/gitea:latest + ports: + - containerPort: 3000 + name: gitea + - containerPort: 22 + name: git-ssh + volumeMounts: + - mountPath: /data + name: git-data + - name: gitea-config + mountPath: /data/gitea/conf + resources: + requests: + cpu: 10m + memory: 50Mi + limits: + cpu: 1 + memory: 200Mi + volumes: + - name: git-data +# hostPath: +# path: /mnt/kube-data/gitea +# type: Directory +# persistentVolumeClaim: +# claimName: gitea + emptyDir: {} + - name: gitea-config + configMap: + name: gitea \ No newline at end of file diff --git a/files/gitea/gitea-Service.yaml b/files/gitea/gitea-Service.yaml new file mode 100644 index 0000000..3d4fefc --- /dev/null +++ b/files/gitea/gitea-Service.yaml @@ -0,0 +1,16 @@ +kind: Service +apiVersion: v1 +metadata: + name: gitea + namespace: gitea +spec: + selector: + app: gitea + ports: + - name: gitea-http + port: 3000 + targetPort: gitea-http + - name: gitea-ssh + port: 2222 + targetPort: gitea-ssh + sessionAffinity: ClientIP \ No newline at end of file diff --git a/files/gitea/gitea-ingress.yaml b/files/gitea/gitea-ingress.yaml new file mode 100644 index 0000000..25bee55 --- /dev/null +++ b/files/gitea/gitea-ingress.yaml @@ -0,0 +1,24 @@ +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: gitea + namespace: gitea + annotations: + kubernetes.io/ingress.class: nginx + nginx.ingress.kubernetes.io/rewrite-target: / +spec: + tls: + - hosts: + - gitea.local + secretName: ingress-secrets + rules: + - host: gitea.local + http: + paths: + - path: / + backend: + serviceName: gitea + servicePort: 443 + - backend: + serviceName: gitea-ssh + servicePort: 22 \ No newline at end of file diff --git a/files/gitea/gitea-pvc.yaml b/files/gitea/gitea-pvc.yaml new file mode 100644 index 0000000..a494b1f --- /dev/null +++ b/files/gitea/gitea-pvc.yaml @@ -0,0 +1,13 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: gitea + namespace: gitea + annotations: + volume.beta.kubernetes.io/storage-class: "managed-nfs-storage" +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi \ No newline at end of file