kustomizer 0.1.15 → 0.1.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24481b3d630d8c9cfa75e87096df77aba2f9037fecae595f0b96708ddd0b5a86
4
- data.tar.gz: 2560ac97bb60ad701194aadb9bbb7706d60c599b8bbad0b769dbd61c3d97abee
3
+ metadata.gz: 17f8b2a446416a68a00870a0b9d641fe0475cc2ffcbf533f5257b9cd97efed0d
4
+ data.tar.gz: b67ba2a7239880a20ee188cb7a6e88a401ee8687f2d28f8fb685b91e45475bd6
5
5
  SHA512:
6
- metadata.gz: c88dfae7e03f6e3387ca4109e3e805b09e6fcd9382d6cccbeabd69bc0c93ab13b5a2c63851414ae8d5a8a707251805c72e05de0460a063bae80daddda69f8144
7
- data.tar.gz: 88eef287b8769333a795d5e566ab9aeb2352b162aaf26356348a018c97b5708cef620f007907796634f9c56e784e42dcb25a6734a9745e3ef0cb355586004a54
6
+ metadata.gz: 902d92cdb76b51f380e00e14120720148d879124b53ef37d748b49ade1bda756a522911ae61e0db27aa151c76eb215b913627f169fefd8d69710091aef22a971
7
+ data.tar.gz: 17a85e4d98e49b5a15a313e3e834eb710bf42f12c97722ceb94f56a0ffd6ff49102f5dfdcf3e4e044290e4b1cfb5aeb039b901b1adb22fb32fb1894215b5894b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kustomizer (0.1.15)
4
+ kustomizer (0.1.18)
5
5
  accessory (~> 0.1.11)
6
6
  base32-multi
7
7
 
@@ -11,7 +11,7 @@ GEM
11
11
  accessory (0.1.11)
12
12
  base32-multi (0.1.1)
13
13
  diff-lcs (1.4.4)
14
- rake (13.0.3)
14
+ rake (13.0.6)
15
15
  rspec (3.10.0)
16
16
  rspec-core (~> 3.10.0)
17
17
  rspec-expectations (~> 3.10.0)
@@ -33,3 +33,6 @@ DEPENDENCIES
33
33
  kustomizer!
34
34
  rake (~> 13.0)
35
35
  rspec (~> 3.0)
36
+
37
+ BUNDLED WITH
38
+ 2.2.30
data/README.md CHANGED
@@ -47,7 +47,7 @@ Status of support for other Kustomize features:
47
47
 
48
48
  * [ ] Automatic name suffixing of generated resources
49
49
  * [x] Secrets
50
- * [ ] ConfigMaps
50
+ * [x] ConfigMaps
51
51
 
52
52
  Status of support for "extra" features not supported by Kustomize:
53
53
 
@@ -5,6 +5,7 @@ require 'kustomize/transform/ref_fixup_transform'
5
5
  require 'kustomize/transform/filter_for_session_specified_component_transform'
6
6
  require 'kustomize/transform/drop_filtered_documents_transform'
7
7
  require 'kustomize/transform/purge_internal_annotations_transform'
8
+ require 'kustomize/transform/application_order_transform'
8
9
 
9
10
  class Kustomize::Emitter::FinalizerEmitter < Kustomize::Emitter
10
11
  def initialize(input_emitter, session:)
@@ -31,7 +32,8 @@ class Kustomize::Emitter::FinalizerEmitter < Kustomize::Emitter
31
32
  Kustomize::Transform::RefFixupTransform.instance,
32
33
  final_filters,
33
34
  Kustomize::Transform::DropFilteredDocumentsTransform.instance,
34
- Kustomize::Transform::PurgeInternalAnnotationsTransform.instance
35
+ Kustomize::Transform::PurgeInternalAnnotationsTransform.instance,
36
+ Kustomize::Transform::ApplicationOrderTransform.instance
35
37
  ].flatten.compact
36
38
  end
37
39
 
@@ -0,0 +1,56 @@
1
+ require 'singleton'
2
+
3
+ require 'kustomize/transform'
4
+
5
+ class Kustomize::Transform::ApplicationOrderTransform < Kustomize::Transform
6
+ include Singleton
7
+
8
+ # order from https://github.com/helm/helm/blob/main/pkg/releaseutil/kind_sorter.go
9
+ KIND_PRIORITIES = [
10
+ "Namespace",
11
+ "NetworkPolicy",
12
+ "ResourceQuota",
13
+ "LimitRange",
14
+ "PodSecurityPolicy",
15
+ "PodDisruptionBudget",
16
+ "ServiceAccount",
17
+ "SealedSecret",
18
+ "Secret",
19
+ "SecretList",
20
+ "ConfigMap",
21
+ "StorageClass",
22
+ "PersistentVolume",
23
+ "PersistentVolumeClaim",
24
+ "CustomResourceDefinition",
25
+ "ClusterRole",
26
+ "ClusterRoleList",
27
+ "ClusterRoleBinding",
28
+ "ClusterRoleBindingList",
29
+ "Role",
30
+ "RoleList",
31
+ "RoleBinding",
32
+ "RoleBindingList",
33
+ "Service",
34
+ "DaemonSet",
35
+ "Pod",
36
+ "ReplicationController",
37
+ "ReplicaSet",
38
+ "Deployment",
39
+ "HorizontalPodAutoscaler",
40
+ "StatefulSet",
41
+
42
+ :unknown_kind,
43
+
44
+ "Job",
45
+ "CronJob",
46
+ "IngressClass",
47
+ "Ingress",
48
+ "APIService",
49
+ ].each_with_index.to_h
50
+
51
+ def rewrite_all(rcs)
52
+ rcs.sort_by do |rc|
53
+ KIND_PRIORITIES[rc['kind']] || KIND_PRIORITIES[:unknown_kind]
54
+ end
55
+ end
56
+ end
@@ -1,3 +1,3 @@
1
1
  module Kustomize
2
- VERSION = "0.1.15"
2
+ VERSION = "0.1.18"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kustomizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.15
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Levi Aul
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-24 00:00:00.000000000 Z
11
+ date: 2023-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: accessory
@@ -79,6 +79,7 @@ files:
79
79
  - lib/kustomize/session.rb
80
80
  - lib/kustomize/target_spec.rb
81
81
  - lib/kustomize/transform.rb
82
+ - lib/kustomize/transform/application_order_transform.rb
82
83
  - lib/kustomize/transform/common_annotations_transform.rb
83
84
  - lib/kustomize/transform/common_labels_transform.rb
84
85
  - lib/kustomize/transform/drop_filtered_documents_transform.rb
@@ -113,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
114
  - !ruby/object:Gem::Version
114
115
  version: '0'
115
116
  requirements: []
116
- rubygems_version: 3.2.15
117
+ rubygems_version: 3.4.2
117
118
  signing_key:
118
119
  specification_version: 4
119
120
  summary: Pure-ruby impl of Kubernetes kustomize