diff --git a/helm-charts/tarantool-cartridge/templates/cm.yaml b/helm-charts/tarantool-cartridge/templates/cm.yaml new file mode 100644 index 00000000..f2bc50b6 --- /dev/null +++ b/helm-charts/tarantool-cartridge/templates/cm.yaml @@ -0,0 +1,54 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: krb5 + namespace: tarantool +data: + krb5.conf: |+ + [libdefaults] + default_realm = CUD.INT + allow_weak_crypto = true + dns_lookup_kdc = false + dns_lookup_realm = false + ticket_lifetime = 86400 + renew_lifetime = 604800 + forwardable = true + default_tgs_enctypes = rc4-hmac + default_tkt_enctypes = rc4-hmac + permitted_enctypes = rc4-hmac + udp_preference_limit = 1 + kdc_timeout = 3000 + [realms] + CUD.INT = { + kdc = CUDINT217.cud.int + admin_server = CUDINT217.cud.int + } + +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: odbc + namespace: tarantool +data: + odbc.ini: |+ + [Cloudera Hive ODBC Driver 64-bit] + Driver=Cloudera Hive ODBC Driver 64-bit + Description=Hive Cloudera ODBC Driver + Host=name02.cud.int + Port=10000 + Schema=default + ServiceDiscoveryMode=0 + HiveServerType=2 + AuthMech=1 + ThriftTransport=2 + UseNativeQuery=0 + UID=visiology-kauth + KrbHostFQDN=cudint217.cud.int + Keytab=/tmp/key.keytab + GetTablesWithQuery=1 + KrbServiceName=hive + KrbRealm=CUD.INT + KrbAuthType=0 + SSL=0 diff --git a/helm-charts/tarantool-cartridge/templates/deployment.yaml b/helm-charts/tarantool-cartridge/templates/deployment.yaml index 86ee089c..bf09ab95 100644 --- a/helm-charts/tarantool-cartridge/templates/deployment.yaml +++ b/helm-charts/tarantool-cartridge/templates/deployment.yaml @@ -84,11 +84,15 @@ spec: fsGroup: {{ $.Values.securityContext.fsGroup }} {{- if $.Values.affinity }} affinity: - {{ toYaml $.Values.affinity | indent 8 }} +{{ toYaml $.Values.affinity | indent 8 }} {{- end }} containers: - name: "{{ $.Release.Name }}-container" image: "{{ $.Values.image.repository }}:{{ $.Values.image.tag }}" + {{- if .lifecycle }} + lifecycle: +{{ toYaml .lifecycle | indent 10 }} + {{- end }} volumeMounts: - name: {{ $.Release.Name }} mountPath: "{{ $.Values.TarantoolWorkDir }}" @@ -98,6 +102,9 @@ spec: {{- range $name, $volume := .Volumes }} - name: "{{ $name }}" mountPath: "{{ $volume.mountpoint }}" + {{- if $volume.subPath }} + subPath: "{{ $volume.subPath }}" + {{- end }} {{- end }} {{- end }} resources: @@ -153,7 +160,7 @@ spec: port: http initialDelaySeconds: 15 periodSeconds: 10 - # volumes: +# volumes: # - name: share # hostPath: # path: /mnt/share diff --git a/helm-charts/tarantool-cartridge/values.yaml b/helm-charts/tarantool-cartridge/values.yaml index 70f0a27a..979f67cd 100644 --- a/helm-charts/tarantool-cartridge/values.yaml +++ b/helm-charts/tarantool-cartridge/values.yaml @@ -1,17 +1,15 @@ -# Declare variables to be passed into your templates. - ClusterEnv: dev ClusterName: tarantool-cluster ClusterDomainName: cluster.local TarantoolWorkDir: /var/lib/tarantool -LuaMemoryReserveMB: 4096 +LuaMemoryReserveMB: 2048 persistence: storageClassName: local-path image: - repository: tarantool/tarantool-operator-examples-kv - tag: 0.0.4 + repository: docker-public.binary.picodata.io/kirovets + tag: kube pullPolicy: IfNotPresent securityContext: @@ -29,26 +27,69 @@ RoleConfig: - RoleName: routers # ReplicaSet name ReplicaCount: 1 # Number of replicas in each ReplicaSet ReplicaSetCount: 1 # Number of ReplicaSets for this role(s) - DiskSize: 1Gi # Persistent Volume disk sze - CPUallocation: 0.25 # Number of vCPUs to allocate to each container + DiskSize: 16Gi # Persistent Volume disk sze + CPUallocation: 2 # Number of vCPUs to allocate to each container MemtxMemoryMB: 256 # MB of memory to be assigned to each container RolesToAssign: + - failover-coordinator + - vshard-router - app.roles.router - - RoleName: storage - ReplicaCount: 2 + - RoleName: exporter + ReplicaCount: 1 ReplicaSetCount: 1 - DiskSize: 1Gi - CPUallocation: 0.25 - MemtxMemoryMB: 256 + DiskSize: 16Gi + CPUallocation: 2 + MemtxMemoryMB: 1024 Volumes: - testVolume: - mountpoint: /foo + share: + mountpoint: /opt/share type: hostPath: - path: /mnt + path: /mnt/share type: Directory + keytab: + mountpoint: /opt/cloudera/ + type: + configMap: + name: keytab + items: + - key: keytab + path: keytab + odbc: + mountpoint: /etc/odbc.ini + subPath: odbc.ini + type: + configMap: + name: odbc + items: + - key: odbc.ini + path: odbc.ini + krb5: + mountpoint: /etc/krb5.conf + subPath: krb5.conf + type: + configMap: + name: krb5 + items: + - key: krb5.conf + path: krb5.conf + RolesToAssign: + - app.roles.exporter + - vshard-router + lifecycle: + postStart: + exec: + command: ['kinit', 'visiology-kauth', '-k', '-t', '/opt/cloudera/keytab'] + + - RoleName: storage + ReplicaCount: 2 + ReplicaSetCount: 1 + DiskSize: 16Gi + CPUallocation: 2 + MemtxMemoryMB: 4096 RolesToAssign: + - vshard-storage - app.roles.storage ingress: