some fixes

This commit is contained in:
Eugenio Marzo
2021-03-27 17:54:58 +01:00
parent 6312aa0450
commit c30e7ad615
6 changed files with 14 additions and 40 deletions
-4
View File
@@ -29,10 +29,6 @@ RUN chmod +x /opt/kube-linter-parser.sh
# Install game part
COPY ./html5 /var/www/html
# Install chaos-node
COPY chaos-node/chaos-node.sh /opt/
RUN chmod +x /opt/chaos-node.sh
# Install Redis
RUN apt-get install redis -y
COPY redis/redis.conf /etc/redis/redis.conf
Vendored
+1
View File
@@ -34,6 +34,7 @@ Vagrant.configure('2') do |config|
config.vm.define 'kubeinvaders01' do |rke|
rke.vm.box = 'ubuntu/focal64'
rke.vm.hostname = 'kubeinvaders01'
rke.vm.network "private_network", ip: "192.168.58.99"
rke.vm.provider :virtualbox do |vb|
vb.memory = 4096
vb.cpus = 2
@@ -32,12 +32,6 @@ spec:
secretKeyRef:
key: token
name: kubeinvaders-token
- name: HITSLIMIT
value: "{{ .Values.hitslimit }}"
- name: ALIENPROXIMITY
value: "{{ .Values.alienproximity }}"
- name: UPDATETIME
value: "{{ .Values.updatetime }}"
name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
@@ -1,5 +1,4 @@
{{- if .Values.ingress.enabled -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
@@ -27,3 +26,4 @@ spec:
serviceName: kubeinvaders
servicePort: 8080
{{- end }}
+6 -24
View File
@@ -1,3 +1,6 @@
# Default namespace target
target_namespace: "default"
# Default values for kubeinvaders.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
@@ -10,23 +13,19 @@ serviceAccount:
create: true
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name:
name: kubeinvaders
clusterRole:
create: true
# The name of a cluster role to bind to; if not set and create is
# true, a name based on fullname is generated
name:
# If clusterRole "false" specifies which namespaces
# kubeinvaders should have access to
allowedNamespaces: []
name: kubeinvaders
replicaCount: 1
image:
repository: luckysideburn/kubeinvaders
tag: latest
tag: v1.0
pullPolicy: Always
nameOverride: ""
@@ -45,22 +44,5 @@ ingress:
# secretName: kubeinvaders.local
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
route_host: kubernetes.default.svc
target_namespace: "foobar"
hitslimit: 1
alienproximity: 15
updatetime: 1
+6 -5
View File
@@ -85,11 +85,12 @@ for k,v in ipairs(resp) do
decoded = json.decode(v)
if decoded["kind"] == "NodeList" then
for k2,v2 in ipairs(decoded["items"]) do
if not v2["metadata"]["labels"]["node-role.kubernetes.io/master"] then
ngx.log(ngx.ERR, "found node " .. v2["metadata"]["name"])
nodes["items"][i] = v2["metadata"]["name"]
i = i + 1
end
-- TODO: masters should be included?
-- if not v2["metadata"]["labels"]["node-role.kubernetes.io/master"] then
ngx.log(ngx.ERR, "found node " .. v2["metadata"]["name"])
nodes["items"][i] = v2["metadata"]["name"]
i = i + 1
--end
end
end
end