- 
                Notifications
    
You must be signed in to change notification settings  - Fork 28
 
helm chart addition to cosi-controller #75
Conversation
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
| 
           [APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: thotz The full list of commands accepted by this bot can be found here. 
Needs approval from an approver in each of these files:
 
      Approvers can indicate their approval by writing   | 
    
| 
           Welcome @thotz!   | 
    
| 
           Hi @thotz. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with  Once the patch is verified, the new status will be reflected by the  I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.  | 
    
| We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
| If release name contains chart name it will be used as a full name. | ||
| */}} | ||
| {{- define "container-object-storage-interface-controller.fullname" -}} | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this already starting out with 46 chars because the base name is container-object-storage-interface-controller. I wonder how detailed we all think the name should be.
Can we be as short as cosi-controller?
object(-store?)-interface?
object(-store)?-interface-controller?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest that resources are named {{ template "container-object-storage-interface-controller.fullname" . }} (there is one of each kind, so no need to suffix the name.
this is how helm generate a default chart (helm create container-object-storage-interface-controller)
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: {{ include "container-object-storage-interface-controller.fullname" . }}-objectstorage-controller | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as it's the only deployment in the release, I suggest to not add a suffix
| 
           Link to issue #74  | 
    
| @@ -0,0 +1,8 @@ | |||
| kubernetesClusterDomain: cluster.local | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please keep the values as generated by helm create as it provides documentation
| replicas: {{ .Values.objectstorageController.replicas }} | ||
| selector: | ||
| matchLabels: | ||
| app.kubernetes.io/component: controller | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need all these labels in selector.matchLabels ?
| metadata: | ||
| labels: | ||
| app.kubernetes.io/component: controller | ||
| app.kubernetes.io/name: container-object-storage-interface-controller | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
selectorLabels already includes app.kubernetes.io/name
| - --v=5 | ||
| env: | ||
| - name: KUBERNETES_CLUSTER_DOMAIN | ||
| value: {{ quote .Values.kubernetesClusterDomain }} | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most charts I know use .Values.clusterDomain
| kubernetesClusterDomain: cluster.local | ||
| objectstorageController: | ||
| objectstorageController: | ||
| image: | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too many nesting, as there is only 1 image, I suggest image at the top level (as is the default generated by helm create )
| @@ -0,0 +1,58 @@ | |||
| apiVersion: rbac.authorization.k8s.io/v1 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its weird that there is the SA in deployment, ClusterRole here and 3 rbac objects in objectstorage-controller-rbac.yaml
| labels: | ||
| app.kubernetes.io/component: controller | ||
| app.kubernetes.io/name: container-object-storage-interface-controller | ||
| app.kubernetes.io/part-of: container-object-storage-interface | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "part-of" is used when you deploy a component as part of something else, but container-object-storage-interface is standalone, so I would remove it
| app.kubernetes.io/component: controller | ||
| app.kubernetes.io/name: container-object-storage-interface-controller | ||
| app.kubernetes.io/part-of: container-object-storage-interface | ||
| app.kubernetes.io/version: main | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version should be consistent with AppVersion or image.tag, not hardcoded
| imagePullPolicy: {{ .Values.objectstorageController.objectstorageController.imagePullPolicy | ||
| }} | ||
| name: objectstorage-controller | ||
| resources: {} | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resources should be customizable (as it is with the default from helm create)
| metadata: | ||
| name: {{ include "container-object-storage-interface-controller.fullname" . }}-objectstorage-controller | ||
| labels: | ||
| app.kubernetes.io/component: controller | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think component is usefull if there are multiple components in a chart
| 
           The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules: 
 You can: 
 Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale  | 
    
| 
           The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules: 
 You can: 
 Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten  | 
    
| 
           The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages PRs according to the following rules: 
 You can: 
 Please send feedback to sig-contributor-experience at kubernetes/community. /close  | 
    
| 
           @k8s-triage-robot: Closed this PR. In response to this: 
 Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.  | 
    
Creating helm charts for cosi-controller