<commit_before>package tccp

const AutoScalingGroup = `
{{define "autoscaling_group"}}
{{- $v := .Guest.AutoScalingGroup }}
  {{ $v.ASGType }}AutoScalingGroup:
    Type: "AWS::AutoScaling::AutoScalingGroup"
    Properties:
      VPCZoneIdentifier:
      {{- range $s := $v.PrivateSubnets }}
        - !Ref {{ $s }}
      {{end}}
      AvailabilityZones:
      {{- range $az := $v.WorkerAZs }}
        - {{ $az }}
      {{end}}
      DesiredCapacity: {{ $v.ASGDesiredCapacity }}
      MinSize: {{ $v.ASGMinSize }}
      MaxSize: {{ $v.ASGMaxSize }}
      LaunchConfigurationName: !Ref {{ $v.ASGType }}LaunchConfiguration
      LoadBalancerNames:
        - !Ref IngressLoadBalancer
      HealthCheckGracePeriod: {{ $v.HealthCheckGracePeriod }}
      MetricsCollection:
        - Granularity: "1Minute"
      Tags:
        - Key: Name
          Value: {{ $v.ClusterID }}-{{ $v.ASGType }}
          PropagateAtLaunch: true
        - Key: k8s.io/cluster-autoscaler/enabled
          Value: true
          PropagateAtLaunch: false
        - Key: k8s.io/cluster-autoscaler/{{ $v.ClusterID }}
          Value: true
          PropagateAtLaunch: false
    UpdatePolicy:
      AutoScalingRollingUpdate:
        # minimum amount of instances that must always be running during a rolling update
        MinInstancesInService: {{ $v.MinInstancesInService }}
        # only do a rolling update of this amount of instances max
        MaxBatchSize: {{ $v.MaxBatchSize }}
        # after creating a new instance, pause operations on the ASG for this amount of time
        PauseTime: {{ $v.RollingUpdatePauseTime }}
{{end}}
`<commit_msg>Add internal ingress lb into autoscaling group (#1947)<commit_after>package tccp

const AutoScalingGroup = `
{{define "autoscaling_group"}}
{{- $v := .Guest.AutoScalingGroup }}
  {{ $v.ASGType }}AutoScalingGroup:
    Type: "AWS::AutoScaling::AutoScalingGroup"
    Properties:
      VPCZoneIdentifier:
      {{- range $s := $v.PrivateSubnets }}
        - !Ref {{ $s }}
      {{end}}
      AvailabilityZones:
      {{- range $az := $v.WorkerAZs }}
        - {{ $az }}
      {{end}}
      DesiredCapacity: {{ $v.ASGDesiredCapacity }}
      MinSize: {{ $v.ASGMinSize }}
      MaxSize: {{ $v.ASGMaxSize }}
      LaunchConfigurationName: !Ref {{ $v.ASGType }}LaunchConfiguration
      LoadBalancerNames:
        - !Ref IngressLoadBalancer
        - !Ref IngressInternalLoadBalancer
      HealthCheckGracePeriod: {{ $v.HealthCheckGracePeriod }}
      MetricsCollection:
        - Granularity: "1Minute"
      Tags:
        - Key: Name
          Value: {{ $v.ClusterID }}-{{ $v.ASGType }}
          PropagateAtLaunch: true
        - Key: k8s.io/cluster-autoscaler/enabled
          Value: true
          PropagateAtLaunch: false
        - Key: k8s.io/cluster-autoscaler/{{ $v.ClusterID }}
          Value: true
          PropagateAtLaunch: false
    UpdatePolicy:
      AutoScalingRollingUpdate:
        # minimum amount of instances that must always be running during a rolling update
        MinInstancesInService: {{ $v.MinInstancesInService }}
        # only do a rolling update of this amount of instances max
        MaxBatchSize: {{ $v.MaxBatchSize }}
        # after creating a new instance, pause operations on the ASG for this amount of time
        PauseTime: {{ $v.RollingUpdatePauseTime }}
{{end}}
`
{'fraction_non_alphanumeric': 0.11883273164861613, 'fraction_numerical': 0.0030084235860409147, 'mean_word_length': 2.5222457627118646, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1698075', 'n_tokens_mistral': 1035, 'n_tokens_neox': 1008, 'n_words': 235}