Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TODO accounting type #31

Merged
merged 4 commits into from
Jan 12, 2024
Merged

Fix TODO accounting type #31

merged 4 commits into from
Jan 12, 2024

Conversation

heriet
Copy link
Member

@heriet heriet commented Jan 11, 2024

Summary

Review

Result

accountingType blank

$ cat storageclass_blank.yml 
---

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: standard-flash-a-blank
provisioner: additional-storage.csi.nifcloud.com
volumeBindingMode: WaitForFirstConsumer
parameters:
  csi.storage.k8s.io/fstype: ext4
  type: standard-flash-a
allowVolumeExpansion: true
$ cat statefulset_blank.yml 
---

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: test-blank
spec:
  serviceName: "nginx"
  replicas: 2
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: k8s.gcr.io/nginx-slim:0.8
        ports:
        - containerPort: 80
          name: web
        volumeMounts:
        - name: www
          mountPath: /usr/share/nginx/html
  volumeClaimTemplates:
  - metadata:
      name: www
    spec:
      accessModes: [ "ReadWriteOnce" ]
      storageClassName: standard-flash-a-blank
      resources:
        requests:
          storage: 100Gi

pv_blank

accountingType hourly

$ diff storageclass_blank.yml storageclass_hourly.yml 
6c6
<   name: standard-flash-a-blank
---
>   name: standard-flash-a-hourly
11a12
>   accountingType: hourly
$ diff statefulset_blank.yml statefulset_hourly.yml
6c6
<   name: test-blank
---
>   name: test-hourly
32c32
<       storageClassName: standard-flash-a-blank
---
>       storageClassName: standard-flash-a-hourly

pv_hourly

accountingType monthly

$ diff storageclass_blank.yml storageclass_monthly.yml 
6c6
<   name: standard-flash-a-blank
---
>   name: standard-flash-a-monthly
11a12
>   accountingType: monthly
$ diff statefulset_blank.yml statefulset_monthly.yml
6c6
<   name: test-blank
---
>   name: test-monthly
32c32
<       storageClassName: standard-flash-a-blank
---
>       storageClassName: standard-flash-a-monthly

pv_monthly

@heriet heriet changed the title Fix todo accounting type Fix TODO accounting type Jan 11, 2024
@heriet heriet force-pushed the fix-todo-accounting-type branch from 9fc319f to 0fbbd19 Compare January 11, 2024 10:35
@heriet heriet marked this pull request as ready for review January 11, 2024 10:41
@heriet heriet requested a review from aokumasan January 11, 2024 10:41
@aokumasan
Copy link
Member

Thanks! 💰

@aokumasan aokumasan merged commit 5b7a3e6 into main Jan 12, 2024
2 checks passed
@aokumasan aokumasan deleted the fix-todo-accounting-type branch January 12, 2024 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants