Skip to content

Commit

Permalink
Merge pull request #54 from 030/53-k8s-storage-class-pvc
Browse files Browse the repository at this point in the history
fix: [#53] StorageClassName in PVC required in newer k8s versions.
  • Loading branch information
030 committed Nov 18, 2022
2 parents dca8f2b + 3c2a2d8 commit 79c144e
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ docker run \
--name=yaam \
-it \
-v /home/${USER}/.yaam:/opt/yaam/.yaam \
-p 25213:25213 utrecht/yaam:v0.5.1
-p 25213:25213 utrecht/yaam:v0.5.2
```

Once YAAM has been started, configure a project to ensure that artifacts will
Expand Down
12 changes: 11 additions & 1 deletion cmd/yaam/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"io"
"net/http"
"os"
"path/filepath"
"time"

"github.com/030/logging/pkg/logging"
Expand Down Expand Up @@ -198,7 +199,16 @@ func main() {
if logLevelEnv != "" {
logLevel = logLevelEnv
}
l := logging.Logging{File: "yaam.log", Level: logLevel, Syslog: true}
h, err := project.Home()
if err != nil {
log.Fatal(err)
}

dir := filepath.Join(h, "logs")
if err := os.MkdirAll(dir, os.ModePerm); err != nil {
log.Fatal(err)
}
l := logging.Logging{File: filepath.Join(dir, "yaam.log"), Level: logLevel, Syslog: true}
if _, err := l.Setup(); err != nil {
log.Fatal(err)
}
Expand Down
40 changes: 36 additions & 4 deletions deployments/k8s-openshift/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ spec:
containers:
- name: yaam
env:
- name: YAAM_DEBUG
value: 'true'
- name: YAAM_LOG_LEVEL
value: info
- name: YAAM_HOST
value: yaam.some-domain
- name: YAAM_USER
Expand All @@ -139,7 +139,7 @@ spec:
secretKeyRef:
name: creds
key: pass
image: utrecht/yaam:v0.5.1
image: utrecht/yaam:v0.5.2
livenessProbe:
httpGet:
path: /status
Expand All @@ -163,13 +163,18 @@ spec:
mountPath: /opt/yaam/.yaam
- name: repositories
mountPath: /opt/yaam/.yaam/repositories
- name: logs
mountPath: /opt/yaam/.yaam/logs
volumes:
- name: conf
configMap:
name: conf
- name: repositories
persistentVolumeClaim:
claimName: repositories
- name: logs
persistentVolumeClaim:
claimName: logs
---
apiVersion: v1
kind: PersistentVolume
Expand All @@ -182,14 +187,41 @@ spec:
capacity:
storage: 2Gi
hostPath:
path: /repositories/
path: /opt/yaam/repositories/
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: logs
spec:
storageClassName: standard
accessModes:
- ReadWriteOnce
capacity:
storage: 2Gi
hostPath:
path: /opt/yaam/logs/
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: repositories
spec:
volumeName: repositories
storageClassName: standard
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: logs
spec:
volumeName: logs
storageClassName: standard
accessModes:
- ReadWriteOnce
resources:
Expand Down
12 changes: 8 additions & 4 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
## [Unreleased]


<a name="v0.5.2"></a>
## [v0.5.2] - 2022-11-18
### Fix
- [[#53](https://github.com/030/yaam/issues/53)] StorageClassName in PVC required in newer k8s versions.


<a name="v0.5.1"></a>
## [v0.5.1] - 2022-11-16
### Build
- **deps:** Update versions.

### Fix
- Publish code coverage by using v3 action.

Expand Down Expand Up @@ -61,7 +64,8 @@
<a name="v0.2.1"></a>
## v0.2.1 - 2022-08-23

[Unreleased]: https://github.com/030/yaam/compare/v0.5.1...HEAD
[Unreleased]: https://github.com/030/yaam/compare/v0.5.2...HEAD
[v0.5.2]: https://github.com/030/yaam/compare/v0.5.1...v0.5.2
[v0.5.1]: https://github.com/030/yaam/compare/v0.5.0...v0.5.1
[v0.5.0]: https://github.com/030/yaam/compare/v0.4.2...v0.5.0
[v0.4.2]: https://github.com/030/yaam/compare/v0.4.1...v0.4.2
Expand Down

0 comments on commit 79c144e

Please sign in to comment.