httpd_configmap_generator 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +1 -0
- data/.travis.yml +14 -0
- data/Dockerfile +16 -0
- data/Gemfile +4 -0
- data/LICENSE +201 -0
- data/README-active-directory.md +38 -0
- data/README-ipa.md +41 -0
- data/README-saml.md +70 -0
- data/README.md +386 -0
- data/Rakefile +8 -0
- data/bin/httpd_configmap_generator +101 -0
- data/httpd_configmap_generator.gemspec +34 -0
- data/lib/httpd_configmap_generator.rb +29 -0
- data/lib/httpd_configmap_generator/active_directory.rb +114 -0
- data/lib/httpd_configmap_generator/base.rb +83 -0
- data/lib/httpd_configmap_generator/base/command.rb +29 -0
- data/lib/httpd_configmap_generator/base/config.rb +13 -0
- data/lib/httpd_configmap_generator/base/config_map.rb +183 -0
- data/lib/httpd_configmap_generator/base/file.rb +66 -0
- data/lib/httpd_configmap_generator/base/kerberos.rb +13 -0
- data/lib/httpd_configmap_generator/base/network.rb +37 -0
- data/lib/httpd_configmap_generator/base/pam.rb +9 -0
- data/lib/httpd_configmap_generator/base/principal.rb +33 -0
- data/lib/httpd_configmap_generator/base/sssd.rb +51 -0
- data/lib/httpd_configmap_generator/export.rb +31 -0
- data/lib/httpd_configmap_generator/ipa.rb +122 -0
- data/lib/httpd_configmap_generator/options.rb +13 -0
- data/lib/httpd_configmap_generator/saml.rb +104 -0
- data/lib/httpd_configmap_generator/update.rb +39 -0
- data/lib/httpd_configmap_generator/version.rb +3 -0
- data/templates/etc/pam.d/httpd-auth +2 -0
- data/templates/httpd-configmap-generator-template.yaml +113 -0
- metadata +203 -0
@@ -0,0 +1,39 @@
|
|
1
|
+
module HttpdConfigmapGenerator
|
2
|
+
class Update < Base
|
3
|
+
def required_options
|
4
|
+
{
|
5
|
+
:input => { :description => "Input config map file",
|
6
|
+
:short => "-i" },
|
7
|
+
:output => { :description => "Output config map file",
|
8
|
+
:short => "-o" }
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
def optional_options
|
13
|
+
super.merge(
|
14
|
+
:add_file => { :description => "Add file to config map",
|
15
|
+
:short => "-a",
|
16
|
+
:multi => true }
|
17
|
+
)
|
18
|
+
end
|
19
|
+
|
20
|
+
def update(opts)
|
21
|
+
validate_options(opts)
|
22
|
+
@opts = opts
|
23
|
+
config_map = ConfigMap.new(opts)
|
24
|
+
config_map.load(opts[:input])
|
25
|
+
config_map.add_files(opts[:add_file])
|
26
|
+
config_map.save(opts[:output])
|
27
|
+
rescue => err
|
28
|
+
log_command_error(err)
|
29
|
+
raise err
|
30
|
+
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
def validate_options(options)
|
35
|
+
raise "Input configuration map #{options[:input]} does not exist" unless File.exist?(options[:input])
|
36
|
+
raise "Must specify at least one file to add via --add-file" if options[:add_file].nil?
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,113 @@
|
|
1
|
+
apiVersion: v1
|
2
|
+
kind: Template
|
3
|
+
labels:
|
4
|
+
template: httpd-configmap-generator
|
5
|
+
metadata:
|
6
|
+
name: httpd-configmap-generator
|
7
|
+
annotations:
|
8
|
+
description: Httpd Configmap Generator
|
9
|
+
tags: httpd,httpd-configmap-generator
|
10
|
+
iconClass: icon-rails
|
11
|
+
objects:
|
12
|
+
- apiVersion: v1
|
13
|
+
kind: ServiceAccount
|
14
|
+
metadata:
|
15
|
+
name: httpd-configmap-generator
|
16
|
+
- apiVersion: v1
|
17
|
+
kind: Service
|
18
|
+
metadata:
|
19
|
+
name: "${HTTPD_CONFIGMAP_GENERATOR_SERVICE_NAME}"
|
20
|
+
annotations:
|
21
|
+
description: Exposes the httpd configmap generator server
|
22
|
+
service.alpha.openshift.io/dependencies: '[{"name":"${NAME}","namespace":"","kind":"Service"}]'
|
23
|
+
spec:
|
24
|
+
ports:
|
25
|
+
- name: httpd-configmap-generator
|
26
|
+
port: 80
|
27
|
+
targetPort: 80
|
28
|
+
selector:
|
29
|
+
name: httpd-configmap-generator
|
30
|
+
- apiVersion: v1
|
31
|
+
kind: DeploymentConfig
|
32
|
+
metadata:
|
33
|
+
name: "${HTTPD_CONFIGMAP_GENERATOR_SERVICE_NAME}"
|
34
|
+
annotations:
|
35
|
+
description: Defines how to deploy httpd
|
36
|
+
spec:
|
37
|
+
strategy:
|
38
|
+
type: Recreate
|
39
|
+
recreateParams:
|
40
|
+
timeoutSeconds: 1200
|
41
|
+
triggers:
|
42
|
+
- type: ConfigChange
|
43
|
+
replicas: 1
|
44
|
+
selector:
|
45
|
+
name: "${HTTPD_CONFIGMAP_GENERATOR_SERVICE_NAME}"
|
46
|
+
template:
|
47
|
+
metadata:
|
48
|
+
name: "${HTTPD_CONFIGMAP_GENERATOR_SERVICE_NAME}"
|
49
|
+
labels:
|
50
|
+
name: "${HTTPD_CONFIGMAP_GENERATOR_SERVICE_NAME}"
|
51
|
+
spec:
|
52
|
+
containers:
|
53
|
+
- name: httpd-configmap-generator
|
54
|
+
image: "${HTTPD_CONFIGMAP_GENERATOR_IMG_NAME}:${HTTPD_CONFIGMAP_GENERATOR_IMG_TAG}"
|
55
|
+
ports:
|
56
|
+
- containerPort: 80
|
57
|
+
protocol: TCP
|
58
|
+
- containerPort: 8080
|
59
|
+
protocol: TCP
|
60
|
+
livenessProbe:
|
61
|
+
exec:
|
62
|
+
command:
|
63
|
+
- pidof
|
64
|
+
- httpd
|
65
|
+
initialDelaySeconds: 15
|
66
|
+
timeoutSeconds: 3
|
67
|
+
readinessProbe:
|
68
|
+
tcpSocket:
|
69
|
+
port: 80
|
70
|
+
initialDelaySeconds: 10
|
71
|
+
timeoutSeconds: 3
|
72
|
+
resources:
|
73
|
+
requests:
|
74
|
+
memory: "${HTTPD_CONFIGMAP_GENERATOR_MEM_REQ}"
|
75
|
+
cpu: "${HTTPD_CONFIGMAP_GENERATOR_CPU_REQ}"
|
76
|
+
limits:
|
77
|
+
memory: "${HTTPD_CONFIGMAP_GENERATOR_MEM_LIMIT}"
|
78
|
+
lifecycle:
|
79
|
+
postStart:
|
80
|
+
exec:
|
81
|
+
command:
|
82
|
+
- "/usr/bin/save-container-environment"
|
83
|
+
serviceAccount: httpd-configmap-generator
|
84
|
+
serviceAccountName: httpd-configmap-generator
|
85
|
+
parameters:
|
86
|
+
- name: HTTPD_CONFIGMAP_GENERATOR_SERVICE_NAME
|
87
|
+
required: true
|
88
|
+
displayName: Httpd Configmap Generator Service Name
|
89
|
+
description: The name of the OpenShift Service exposed for the httpd configmap generator container.
|
90
|
+
value: httpd-configmap-generator
|
91
|
+
- name: HTTPD_CONFIGMAP_GENERATOR_IMG_NAME
|
92
|
+
displayName: Httpd Configmap Generator Image Name
|
93
|
+
description: This is the httpd configmap generator image name requested to deploy.
|
94
|
+
value: docker.io/manageiq/httpd_configmap_generator
|
95
|
+
- name: HTTPD_CONFIGMAP_GENERATOR_IMG_TAG
|
96
|
+
displayName: Httpd Configmap Generator Image Tag
|
97
|
+
description: This is the httpd configmap generator image tag/version requested to deploy.
|
98
|
+
value: latest
|
99
|
+
- name: HTTPD_CONFIGMAP_GENERATOR_CPU_REQ
|
100
|
+
displayName: Httpd Configmap Generator Min CPU Requested
|
101
|
+
required: true
|
102
|
+
description: Minimum amount of CPU time the httpd configmap generator container will need (expressed in millicores).
|
103
|
+
value: 500m
|
104
|
+
- name: HTTPD_CONFIGMAP_GENERATOR_MEM_REQ
|
105
|
+
displayName: Httpd Configmap Generator Min RAM Requested
|
106
|
+
required: true
|
107
|
+
description: Minimum amount of memory the httpd configmap generator will need.
|
108
|
+
value: 512Mi
|
109
|
+
- name: HTTPD_CONFIGMAP_GENERATOR_MEM_LIMIT
|
110
|
+
displayName: Httpd Configmap Generator Max RAM Limit
|
111
|
+
required: true
|
112
|
+
description: Maximum amount of memory the httpd configmap generator container can consume.
|
113
|
+
value: 8192Mi
|
metadata
ADDED
@@ -0,0 +1,203 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: httpd_configmap_generator
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Httpd Auth Config Developers
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-10-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: codeclimate-test-reporter
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.0.0
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: simplecov
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: activesupport
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '5.0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '5.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: awesome_spawn
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.4'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.4'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: iniparse
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.4'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.4'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: more_core_extensions
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '3.4'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '3.4'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: trollop
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '2.1'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '2.1'
|
139
|
+
description: The Httpd Configmap Generator
|
140
|
+
email:
|
141
|
+
executables:
|
142
|
+
- httpd_configmap_generator
|
143
|
+
extensions: []
|
144
|
+
extra_rdoc_files: []
|
145
|
+
files:
|
146
|
+
- ".gitignore"
|
147
|
+
- ".rspec"
|
148
|
+
- ".travis.yml"
|
149
|
+
- Dockerfile
|
150
|
+
- Gemfile
|
151
|
+
- LICENSE
|
152
|
+
- README-active-directory.md
|
153
|
+
- README-ipa.md
|
154
|
+
- README-saml.md
|
155
|
+
- README.md
|
156
|
+
- Rakefile
|
157
|
+
- bin/httpd_configmap_generator
|
158
|
+
- httpd_configmap_generator.gemspec
|
159
|
+
- lib/httpd_configmap_generator.rb
|
160
|
+
- lib/httpd_configmap_generator/active_directory.rb
|
161
|
+
- lib/httpd_configmap_generator/base.rb
|
162
|
+
- lib/httpd_configmap_generator/base/command.rb
|
163
|
+
- lib/httpd_configmap_generator/base/config.rb
|
164
|
+
- lib/httpd_configmap_generator/base/config_map.rb
|
165
|
+
- lib/httpd_configmap_generator/base/file.rb
|
166
|
+
- lib/httpd_configmap_generator/base/kerberos.rb
|
167
|
+
- lib/httpd_configmap_generator/base/network.rb
|
168
|
+
- lib/httpd_configmap_generator/base/pam.rb
|
169
|
+
- lib/httpd_configmap_generator/base/principal.rb
|
170
|
+
- lib/httpd_configmap_generator/base/sssd.rb
|
171
|
+
- lib/httpd_configmap_generator/export.rb
|
172
|
+
- lib/httpd_configmap_generator/ipa.rb
|
173
|
+
- lib/httpd_configmap_generator/options.rb
|
174
|
+
- lib/httpd_configmap_generator/saml.rb
|
175
|
+
- lib/httpd_configmap_generator/update.rb
|
176
|
+
- lib/httpd_configmap_generator/version.rb
|
177
|
+
- templates/etc/pam.d/httpd-auth
|
178
|
+
- templates/httpd-configmap-generator-template.yaml
|
179
|
+
homepage: https://github.com/ManageIQ/httpd_configmap_generator
|
180
|
+
licenses:
|
181
|
+
- Apache-2.0
|
182
|
+
metadata: {}
|
183
|
+
post_install_message:
|
184
|
+
rdoc_options: []
|
185
|
+
require_paths:
|
186
|
+
- lib
|
187
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
188
|
+
requirements:
|
189
|
+
- - ">="
|
190
|
+
- !ruby/object:Gem::Version
|
191
|
+
version: '0'
|
192
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
193
|
+
requirements:
|
194
|
+
- - ">="
|
195
|
+
- !ruby/object:Gem::Version
|
196
|
+
version: '0'
|
197
|
+
requirements: []
|
198
|
+
rubyforge_project:
|
199
|
+
rubygems_version: 2.6.11
|
200
|
+
signing_key:
|
201
|
+
specification_version: 4
|
202
|
+
summary: The Httpd Configmap Generator
|
203
|
+
test_files: []
|