X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=ansible%2Froles%2Fswift%2Ftemplates%2Fmain%2Fswift_main.yml;h=d514e46c6f5cbeb128f71abf804c8cee39e84833;hb=refs%2Fchanges%2F01%2F2201%2F2;hp=bcbf9e86730c8185a9fd268a5ebe93201ea4806b;hpb=2ed671c54dad28dd81763928b28cd17d5c76df66;p=ta%2Fcaas-registry.git diff --git a/ansible/roles/swift/templates/main/swift_main.yml b/ansible/roles/swift/templates/main/swift_main.yml index bcbf9e8..d514e46 100644 --- a/ansible/roles/swift/templates/main/swift_main.yml +++ b/ansible/roles/swift/templates/main/swift_main.yml @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. #} --- -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: DaemonSet metadata: name: swift @@ -28,10 +28,16 @@ spec: labels: name: swift spec: + priorityClassName: "system-cluster-critical" hostNetwork: true dnsPolicy: ClusterFirstWithHostNet nodeSelector: nodetype: caas_master + tolerations: + - key: "node-maintenancemode" + value: "enabled" + operator: "Equal" + effect: "NoExecute" securityContext: runAsUser: {{ caas.uid.swift }} containers: @@ -39,21 +45,23 @@ spec: image: {{ container_image_names | select('search', '/swift') | list | last }} securityContext: capabilities: - add: ["NET_BIND_SERVICE"] + add: ["NET_BIND_SERVICE", "SETGID", "SETUID"] args: - BACKEND resources: limits: + cpu: "1" memory: "4Gi" requests: + cpu: "200m" memory: "1Gi" env: - name: "SWIFT_USER" - value: "{{ swift_user_for_template.stdout }}" + value: "{{ caas.swift_credential.user }}" - name: "SWIFT_TENANT" - value: "{{ swift_tenant_for_template.stdout }}" + value: "{{ caas.swift_credential.tenant }}" - name: "SWIFT_PASS" - value: "{{ swift_password_for_template.stdout }}" + value: "{{ caas.swift_credential.password }}" - name: "SWIFT_PART_POWER" value: "7" - name: "SWIFT_PART_HOUR" @@ -66,6 +74,8 @@ spec: - name: "SWIFT_OAM{{loop.index}}_IP" value: "{{ hostvars[host]['networking']['infra_internal']['ip'] }}" {% endfor %} + - name: "SWIFT_URL" + value: "{{ caas.swift }}" volumeMounts: - name: config mountPath: /etc/swift/