Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add static resource controller #185

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ IMAGE_REGISTRY :=registry.svc.ci.openshift.org
# It will generate targets {update,verify}-bindata-$(1) logically grouping them in unsuffixed versions of these targets
# and also hooked into {update,verify}-generated for broader integration.
$(call add-bindata,bootstrap,./bindata/bootstrap/...,bindata,bootstrap,pkg/assets/bootstrap/bindata.go)
$(call add-bindata,v4.1.0,./bindata/v4.1.0/...,bindata,v410_00_assets,pkg/assets/v410_00_assets/bindata.go)

# This will call a macro called "build-image" which will generate image specific targets based on the parameters:
# $0 - macro name
Expand Down
13 changes: 13 additions & 0 deletions bindata/v4.1.0/aws-pod-identity-webhook/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: pod-identity-webhook
rules:
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- get
- watch
- list
12 changes: 12 additions & 0 deletions bindata/v4.1.0/aws-pod-identity-webhook/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: pod-identity-webhook
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: pod-identity-webhook
subjects:
- kind: ServiceAccount
name: pod-identity-webhook
namespace: openshift-cloud-credential-operator
55 changes: 55 additions & 0 deletions bindata/v4.1.0/aws-pod-identity-webhook/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: pod-identity-webhook
namespace: openshift-cloud-credential-operator
spec:
replicas: 1
selector:
matchLabels:
app: pod-identity-webhook
template:
metadata:
labels:
app: pod-identity-webhook
spec:
containers:
- name: pod-identity-webhook
image: ${IMAGE}
imagePullPolicy: IfNotPresent
command:
- /usr/bin/aws-pod-identity-webhook
- --in-cluster
- --namespace=openshift-cloud-credential-operator
- --port=6443
- --service-name=pod-identity-webhook
- --tls-secret=pod-identity-webhook
- --annotation-prefix=eks.amazonaws.com # TODO: use openshift.io based prefix
- --token-audience=sts.amazonaws.com
- --logtostderr
resources:
requests:
cpu: 10m
memory: 10Mi
volumeMounts:
- name: webhook-certs
mountPath: /var/run/app/certs
readOnly: false
nodeSelector:
node-role.kubernetes.io/master: ""
serviceAccountName: pod-identity-webhook
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 120
- effect: NoExecute
key: node.kubernetes.io/not-ready
operator: Exists
tolerationSeconds: 120
volumes:
- name: webhook-certs
emptyDir: {}
19 changes: 19 additions & 0 deletions bindata/v4.1.0/aws-pod-identity-webhook/mutatingwebhook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: admissionregistration.k8s.io/v1beta1
kind: MutatingWebhookConfiguration
metadata:
name: pod-identity-webhook
annotations:
service.beta.openshift.io/inject-cabundle: "true"
webhooks:
- name: pod-identity-webhook.amazonaws.com
failurePolicy: Ignore
sjenning marked this conversation as resolved.
Show resolved Hide resolved
clientConfig:
service:
name: pod-identity-webhook
namespace: openshift-cloud-credential-operator
path: "/mutate"
rules:
- operations: [ "CREATE" ]
apiGroups: [""]
apiVersions: ["v1"]
resources: ["pods"]
22 changes: 22 additions & 0 deletions bindata/v4.1.0/aws-pod-identity-webhook/role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: pod-identity-webhook
namespace: openshift-cloud-credential-operator
rules:
- apiGroups:
- ""
resources:
- secrets
verbs:
- create
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- update
- patch
resourceNames:
- "pod-identity-webhook"
13 changes: 13 additions & 0 deletions bindata/v4.1.0/aws-pod-identity-webhook/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: pod-identity-webhook
namespace: openshift-cloud-credential-operator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: pod-identity-webhook
subjects:
- kind: ServiceAccount
name: pod-identity-webhook
namespace: openshift-cloud-credential-operator
5 changes: 5 additions & 0 deletions bindata/v4.1.0/aws-pod-identity-webhook/sa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: pod-identity-webhook
namespace: openshift-cloud-credential-operator
16 changes: 16 additions & 0 deletions bindata/v4.1.0/aws-pod-identity-webhook/svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: pod-identity-webhook
namespace: openshift-cloud-credential-operator
annotations:
prometheus.io/port: "443"
prometheus.io/scheme: "https"
prometheus.io/scrape: "true"
service.beta.openshift.io/serving-cert-secret-name: pod-identity-webhook
spec:
ports:
- port: 443
targetPort: 6443
selector:
app: pod-identity-webhook
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ require (
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/golang/mock v1.4.3
github.com/imdario/mergo v0.3.7 // indirect
github.com/jteeuwen/go-bindata v3.0.8-0.20151023091102-a0ff2567cfb7+incompatible
github.com/openshift/api v0.0.0-20200210091934-a0e53e94816b
github.com/openshift/api v0.0.0-20200414152312-3e8f22fb0b56
github.com/openshift/build-machinery-go v0.0.0-20200211121458-5e3d6e570160
github.com/openshift/library-go v0.0.0-20200407165825-2e79bd232e72
github.com/prometheus/client_golang v1.5.1
github.com/satori/go.uuid v1.2.0
github.com/sirupsen/logrus v1.5.0
Expand Down
Loading