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

replace service cluster common_name value with commonName #9

Merged
merged 1 commit into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 33 additions & 33 deletions helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,36 @@ Helm chart that supports a basic, cloud-native containerized app in Kubernetes.

## Values

| Name | Description | Type | Default | Required |
|------|-------------|:------:|:---------:|:--------:|
| name | The service name | `string` | `` | yes |
| clusterName | Name of Kubernetes cluster to deploy to | `string` | `` | yes |
| namespace | Namespace within Kubernetes cluster to deploy | `string` | `` | yes |
| createNamespace | Whether to create the cluster namespace if it does not exist | `string` | `` | yes |
| image | Container image of service release | `string` | `` | yes |
| common_name | Service common DNS name for which traffic external to the cluster should be sent to | `string` (max 64 characters) | `` | yes |
| command | Container command/entrypoint override of service's base Docker image ENTRYPOINT | `list(string)` | `[]` | no |
| args | Arguments to the command/entrypoint override | `list(string)` | `[]` | no |
| serviceAccountName | k8s service account/policy to associate with service | `string` (use value `default` if no service account required) | `` | no |
| serviceType | Type of k8s service object to provision (i.e. ClusterIP, NodePort, LoadBalancer, ExternalName) | `string` | `` | no |
| servicePort | Port incoming service traffic is directed to and mapped to `serviceTargetPort` | `string` | `` | no |
| serviceTargetPort | Port service is listening on inside the container | `string` | `` | no |
| minReplicas | Lower limit for the number of replicas to which the autoscaler can scale down | `int` | `1` | no |
| maxReplicas | Upper limit for the number of replicas to which the autoscaler can scale up | `int` | `3` | no |
| env.config | Set of environment variables to inject into the service's container runtime | `dict` | `{}` | no |
| initContainers | Container definitions to execute during service initialization | `dict` | `{}` | no |
| extraContainers | Additional container definitions to include with service deployments |`dict` | `{}` | no |
| configMaps | ConfigMap definitions to include with service deployments | `dict` | `{}` | no |
| extraVolumes | Additional volume definitions to include within service deployments | `dict` | `{}` | no |
| extraVolumeMounts | Additional volumeMount definitions to attach to service containers | `dict` | `{}` | no |
| volumesFromConfigMaps | Additional volumes to provision based on defined configMaps | `dict` | `{}` | no |
| labels | Collection of metadata labels to assign to service deployments | `dict` | `{}` | no |
| annotations | Collection of metadata annotations to assign to service deployments | `dict` | `{}` | no |
| serviceRoles | RBAC policies and associated service account bindings | `dict` | `{}` | no |
| deployStatefulSet | Whether to deploy a service as a k8s StatefulSet or standard Deployment workload | `bool` | `false` | no |
| statefulSetOptions | volume claim and other options associated with StatefulSet deployments | `dict` | `{}` | no |
| deployStrategy | The deployment strategy to use to replace existing pods with new ones | `dict` | `{}` | no |
| persistentVolumeClaim | persistent volume claim that will be mounted to deployment | `list(object)` | `[]` | no |
| persistentVolume | persistent volume that the pvc can use | `list(object)` | `[]` | no |
| storageClass | storage class that the pvc can use | `list(object)` | `[]` | no |
| dockercfgOverride | Docker config secret override reference (not including `-docker` suffix) | `string` | `` | no |
| Name | Description | Type | Default | Required |
| --------------------- | ---------------------------------------------------------------------------------------------- | :-----------------------------------------------------------: | :-----: | :------: |
| name | The service name | `string` | `` | yes |
| clusterName | Name of Kubernetes cluster to deploy to | `string` | `` | yes |
| namespace | Namespace within Kubernetes cluster to deploy | `string` | `` | yes |
| createNamespace | Whether to create the cluster namespace if it does not exist | `string` | `` | yes |
| image | Container image of service release | `string` | `` | yes |
| commonName | Service common DNS name for which traffic external to the cluster should be sent to | `string` (max 64 characters) | `` | yes |
| command | Container command/entrypoint override of service's base Docker image ENTRYPOINT | `list(string)` | `[]` | no |
| args | Arguments to the command/entrypoint override | `list(string)` | `[]` | no |
| serviceAccountName | k8s service account/policy to associate with service | `string` (use value `default` if no service account required) | `` | no |
| serviceType | Type of k8s service object to provision (i.e. ClusterIP, NodePort, LoadBalancer, ExternalName) | `string` | `` | no |
| servicePort | Port incoming service traffic is directed to and mapped to `serviceTargetPort` | `string` | `` | no |
| serviceTargetPort | Port service is listening on inside the container | `string` | `` | no |
| minReplicas | Lower limit for the number of replicas to which the autoscaler can scale down | `int` | `1` | no |
| maxReplicas | Upper limit for the number of replicas to which the autoscaler can scale up | `int` | `3` | no |
| env.config | Set of environment variables to inject into the service's container runtime | `dict` | `{}` | no |
| initContainers | Container definitions to execute during service initialization | `dict` | `{}` | no |
| extraContainers | Additional container definitions to include with service deployments | `dict` | `{}` | no |
| configMaps | ConfigMap definitions to include with service deployments | `dict` | `{}` | no |
| extraVolumes | Additional volume definitions to include within service deployments | `dict` | `{}` | no |
| extraVolumeMounts | Additional volumeMount definitions to attach to service containers | `dict` | `{}` | no |
| volumesFromConfigMaps | Additional volumes to provision based on defined configMaps | `dict` | `{}` | no |
| labels | Collection of metadata labels to assign to service deployments | `dict` | `{}` | no |
| annotations | Collection of metadata annotations to assign to service deployments | `dict` | `{}` | no |
| serviceRoles | RBAC policies and associated service account bindings | `dict` | `{}` | no |
| deployStatefulSet | Whether to deploy a service as a k8s StatefulSet or standard Deployment workload | `bool` | `false` | no |
| statefulSetOptions | volume claim and other options associated with StatefulSet deployments | `dict` | `{}` | no |
| deployStrategy | The deployment strategy to use to replace existing pods with new ones | `dict` | `{}` | no |
| persistentVolumeClaim | persistent volume claim that will be mounted to deployment | `list(object)` | `[]` | no |
| persistentVolume | persistent volume that the pvc can use | `list(object)` | `[]` | no |
| storageClass | storage class that the pvc can use | `list(object)` | `[]` | no |
| dockercfgOverride | Docker config secret override reference (not including `-docker` suffix) | `string` | `` | no |
2 changes: 1 addition & 1 deletion helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Expand service names containing embedded templates.
Expand service common names/FQDN containing embedded templates.
*/}}
{{- define "basic-service.commonName" -}}
{{- tpl .Values.common_name . -}}
{{- tpl .Values.commonName . -}}
{{- end -}}

{{/*
Expand Down
108 changes: 54 additions & 54 deletions helm/values-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ id: 1
name: foo-service-{{.Values.id}}
environment: t-foo
clusterName: t-foo-test-eks-cluster
common_name: foo-service-{{.Values.id}}.t-foo-test
commonName: foo-service-{{.Values.id}}.t-foo-test
namespace: foo
createNamespace: true

image:
command: ['sleep']
args: ['infinity']
command: ["sleep"]
args: ["infinity"]

dockercfg:

Expand All @@ -21,32 +21,32 @@ maxReplicas: 1

initContainers:
example-init-a:
- name: example-init
image: busybox:latest
command: ['sh', '-c', 'echo hello']
- name: example-init
image: busybox:latest
command: ["sh", "-c", "echo hello"]

extraContainers:
example-container:
- name: watch-container
image: busybox:latest
command: ['sh', '-c', 'watch ls /tmp']
- name: watch-container
image: busybox:latest
command: ["sh", "-c", "watch ls /tmp"]

extraVolumes:
example-volume:
- name: empty-example
emptyDir: {}
- name: empty-example
emptyDir: {}

volumesFromConfigMaps:
cm-volume:
configMapName: example-config

extraVolumeMounts:
empty-mount:
- name: empty-example
mountPath: /tmp
- name: empty-example
mountPath: /tmp
cm-mount:
- name: cm-volume
mountPath: /var/tmp
- name: cm-volume
mountPath: /var/tmp

labels:
test-label: "this is a test"
Expand All @@ -56,7 +56,7 @@ annotations:

env:
config:
ENV_SPECIFIC_VAR: 'foo-test'
ENV_SPECIFIC_VAR: "foo-test"
VAR_TEST: "{{.Values.id}}-env-var"

configMaps:
Expand All @@ -71,22 +71,22 @@ serviceRoles:
example:
serviceAccount: example-svc-account
apiGroups:
- apiGroups:
- ""
- apps
- apiGroups:
- ""
- apps
resources:
- pods
- pods
verbs:
- create
- create
custom-ns-example:
namespace: custom-namespace
apiGroups:
- apiGroups:
- cert-manager.io
resources:
- certificates
verbs:
- list
- apiGroups:
- cert-manager.io
resources:
- certificates
verbs:
- list

deployStatefulSet: false
pvcName: ebs
Expand All @@ -100,34 +100,34 @@ deployStategy:
maxUnavailable: 1

storageClass:
- create: true
name: efs-sc
provisioner: efs.csi.aws.com
- create: true
name: efs-sc
provisioner: efs.csi.aws.com

persistentVolumeClaim:
- name: mount1
accessModes: ReadWriteMany
storage: 10Gi
storageClassName: efs-sc
mountPath: /mount1
- name: mount2
accessModes: ReadWriteMany
storage: 11Gi
storageClassName: efs-sc
mountPath: /mount2
- name: mount1
accessModes: ReadWriteMany
storage: 10Gi
storageClassName: efs-sc
mountPath: /mount1
- name: mount2
accessModes: ReadWriteMany
storage: 11Gi
storageClassName: efs-sc
mountPath: /mount2

persistentVolume:
- name: mount1
storage: 10Gi
accessModes: ReadWriteMany
reclaimPolicy: Retain
driver: efs.csi.aws.com
volumeHandle: "fs-123456789"
subPath: "mount1"
- name: mount2
storage: 11Gi
accessModes: ReadWriteMany
reclaimPolicy: Retain
driver: efs.csi.aws.com
volumeHandle: "fs-123456789"
subPath: "mount2"
- name: mount1
storage: 10Gi
accessModes: ReadWriteMany
reclaimPolicy: Retain
driver: efs.csi.aws.com
volumeHandle: "fs-123456789"
subPath: "mount1"
- name: mount2
storage: 11Gi
accessModes: ReadWriteMany
reclaimPolicy: Retain
driver: efs.csi.aws.com
volumeHandle: "fs-123456789"
subPath: "mount2"
11 changes: 7 additions & 4 deletions helm/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: foo-service
common_name: foo-service.foo
commonName: foo-service.foo
namespace: foo
image:
command: []
Expand Down Expand Up @@ -88,13 +88,15 @@ deployStategy: {}
# updateStrategy:
# type: RollingUpdate

storageClass: []
storageClass:
[]
# - create: true
# name: efs-sc
# provisioner: efs.csi.aws.com

# see: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims
persistentVolumeClaim: []
persistentVolumeClaim:
[]
# - name: mount1
# accessModes: ReadWriteMany
# storage: 10Gi
Expand All @@ -107,7 +109,8 @@ persistentVolumeClaim: []
# mountPath: /mount2

# see: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistent-volumes
persistentVolume: []
persistentVolume:
[]
# - name: mount1
# storage: 10Gi
# accessModes: ReadWriteMany
Expand Down